Skip to content
This repository was archived by the owner on Jan 16, 2022. It is now read-only.

Commit a0c0186

Browse files
feat(i18n): added i18next
1 parent 8d4b3ce commit a0c0186

File tree

79 files changed

+1114
-724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1114
-724
lines changed

i18n/config.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import i18n from 'i18next';
2+
import { initReactI18next } from 'react-i18next';
3+
4+
import translationEN from './translations/en-US.json';
5+
import translationPT from './translations/pt-BR.json';
6+
7+
i18n
8+
// pass the i18n instance to react-i18next.
9+
.use(initReactI18next)
10+
// init i18next
11+
// for all options read: https://www.i18next.com/overview/configuration-options
12+
.init({
13+
// in case window.VEDACCIO_LANGUAGE is undefined,it will fall back to 'en-US'
14+
lng: window?.__VERDACCIO_BASENAME_UI_OPTIONS?.language,
15+
fallbackLng: 'en-US',
16+
whitelist: ['en-US', 'pt-BR'],
17+
load: 'currentOnly',
18+
resources: {
19+
'en-US': {
20+
translation: translationEN,
21+
},
22+
'pt-BR': {
23+
translation: translationPT,
24+
},
25+
},
26+
debug: false,
27+
interpolation: {
28+
escapeValue: false, // react already safes from xss
29+
},
30+
});
31+
32+
export default i18n;

i18n/translations/en-US.json

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"copy-to-clipboard": "Copy to clipboard",
3+
"author-anonymous": "Anonymous",
4+
"action-bar-action": {
5+
"visit-home-page": "Visit homepage",
6+
"open-an-issue": "Open an issue",
7+
"download-tarball": "Download tarball"
8+
},
9+
"dialog": {
10+
"registry-info": {
11+
"title": "Register Info"
12+
}
13+
},
14+
"header": {
15+
"documentation": "Documentation",
16+
"registry-info": "Registry Information",
17+
"greetings": "Hi "
18+
},
19+
"search": {
20+
"packages": "Search Packages"
21+
},
22+
"auto-complete": {
23+
"loading": "Loading...",
24+
"no-results-found": "No results found."
25+
},
26+
"tab": {
27+
"uplinks": "Uplinks",
28+
"versions": "Versions",
29+
"dependencies": "Dependencies",
30+
"readme": "Readme"
31+
},
32+
"uplinks": {
33+
"title": "Uplinks",
34+
"no-items": "{{name}} has no uplinks."
35+
},
36+
"versions": {
37+
"current-tags": "Current Tags",
38+
"version-history": "Version history",
39+
"not-available": "Not available"
40+
},
41+
"package": {
42+
"published-on": "Published on {{time}} •",
43+
"version": "v{{version}}",
44+
"visit-home-page": "Visit homepage",
45+
"homepage": "Homepage",
46+
"open-an-issue": "Open an issue",
47+
"bugs": "Bugs",
48+
"download": "Download {{what}}",
49+
"the-tar-file": "the tar file",
50+
"tarball": "Tarball"
51+
},
52+
"dependencies": {
53+
"has-no-dependencies": "{{package}} has no dependencies.",
54+
"dependency-block": "{{package}}@{{version}}"
55+
},
56+
"form": {
57+
"username": "Username",
58+
"password": "Password"
59+
},
60+
"form-placeholder": {
61+
"username": "Your username",
62+
"password": "Your strong password"
63+
},
64+
"form-validation": {
65+
"required-field": "This field is required",
66+
"required-min-length": "This field required the min length of {{length}}",
67+
"unable-to-sign-in": "Unable to sign in",
68+
"username-or-password-cant-be-empty": "Username or password can't be empty!"
69+
},
70+
"help": {
71+
"title": "No Package Published Yet.",
72+
"sub-title": "To publish your first package just:",
73+
"first-step": "1. Login",
74+
"first-step-command-line": "npm adduser --registry {{registryUrl}}",
75+
"second-step": "2. Publish",
76+
"second-step-command-line": "npm publish --registry {{registryUrl}}",
77+
"third-step": "3. Refresh this page."
78+
},
79+
"sidebar": {
80+
"detail": {
81+
"latest-version": "Latest v{{version}}",
82+
"version": "v{{version}}"
83+
},
84+
"installation": {
85+
"title": "Installation",
86+
"install-using-yarn": "Install using yarn",
87+
"install-using-yarn-command": "yarn add {{packageName}}",
88+
"install-using-npm": "Install using npm",
89+
"install-using-npm-command": "npm install {{packageName}}",
90+
"install-using-pnpm": "Install using pnpm",
91+
"install-using-pnpm-command": "pnpm install {{packageName}}"
92+
},
93+
"repository": {
94+
"title": "Repository"
95+
},
96+
"author": {
97+
"title": "Author"
98+
},
99+
"distribution": {
100+
"title": "Latest Distribution",
101+
"license": "License",
102+
"size": "Size",
103+
"file-count": "file count"
104+
},
105+
"maintainers": {
106+
"title": "Maintainers"
107+
},
108+
"contributors": {
109+
"title": "Contributors"
110+
},
111+
"engines": {
112+
"npm-version": "NPM Version",
113+
"node-js": "NODE JS"
114+
}
115+
},
116+
"footer": {
117+
"powered-by": "Powered by",
118+
"made-with-love-on": "Made with <0>♥</0> on"
119+
},
120+
"button": {
121+
"close": "Close",
122+
"cancel": "Cancel",
123+
"login": "Login",
124+
"logout": "Logout",
125+
"go-to-the-home-page": "Go to the home page",
126+
"learn-more": "Learn More",
127+
"fund-this-package": "<0>Fund</0> this package"
128+
},
129+
"error": {
130+
"unspecific": "Something went wrong.",
131+
"404": {
132+
"page-not-found": "404 - Page not found",
133+
"sorry-we-could-not-find-it": "Sorry, we couldn't find it..."
134+
},
135+
"app-context-not-correct-used": "The app context was not correct used",
136+
"package-meta-is-required-at-detail-context": "packageMeta is required at DetailContext"
137+
}
138+
}

i18n/translations/pt-BR.json

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"copy-to-clipboard": "Copiar para área de transferência",
3+
"author-anonymous": "Anônimo(a)",
4+
"action-bar-action": {
5+
"visit-home-page": "Visitar a página inicial",
6+
"open-an-issue": "Criar um incidente",
7+
"download-tarball": "Baixar Tarball"
8+
},
9+
"dialog": {
10+
"registry-info": {
11+
"title": "Informações do Registro"
12+
}
13+
},
14+
"header": {
15+
"documentation": "Documentação",
16+
"registry-info": "Informações do Registro",
17+
"greetings": "Oi "
18+
},
19+
"search": {
20+
"packages": "Pesquisar Pacotes"
21+
},
22+
"auto-complete": {
23+
"loading": "Carregando...",
24+
"no-results-found": "Nenhum resultado encontrado."
25+
},
26+
"tab": {
27+
"uplinks": "Uplinks",
28+
"versions": "Versões",
29+
"dependencies": "Dependências",
30+
"readme": "Leia-me"
31+
},
32+
"uplinks": {
33+
"title": "Uplinks",
34+
"no-items": "{{name}} não tem uplinks."
35+
},
36+
"versions": {
37+
"current-tags": "Tags atuais",
38+
"version-history": "Histórico de versões",
39+
"not-available": "Não disponível"
40+
},
41+
"package": {
42+
"published-on": "Publicado em {{time}} •",
43+
"version": "v{{version}}",
44+
"visit-home-page": "Visitar a página inicial",
45+
"homepage": "Página inicial",
46+
"open-an-issue": "Criar um incidente",
47+
"bugs": "Erros",
48+
"download": "Baixar {{what}}",
49+
"the-tar-file": "o arquivo tar",
50+
"tarball": "Tarball"
51+
},
52+
"dependencies": {
53+
"has-no-dependencies": "{{package}} não tem dependências.",
54+
"dependency-block": "{{package}}@{{version}}"
55+
},
56+
"form": {
57+
"username": "Nome do usuário",
58+
"password": "Senha"
59+
},
60+
"form-placeholder": {
61+
"username": "O seu nome",
62+
"password": "A sua senha forte"
63+
},
64+
"form-validation": {
65+
"required-field": "Este campo é obrigatório",
66+
"required-min-length": "Este campo requer o mínimo de {{length}} caracteres",
67+
"unable-to-sign-in": "Não foi possível fazer login",
68+
"username-or-password-cant-be-empty": "Nome de usuário ou senha não podem estar vazios!"
69+
},
70+
"help": {
71+
"title": "Nenhum pacote publicado ainda.",
72+
"sub-title": "Para publicar seu primeiro pacote apenas:",
73+
"first-step": "1. Faça login",
74+
"first-step-command-line": "npm adduser --registry {{registryUrl}}",
75+
"second-step": "2. Publique",
76+
"second-step-command-line": "npm publish --registry {{registryUrl}}",
77+
"third-step": "3. Atualize esta página."
78+
},
79+
"sidebar": {
80+
"detail": {
81+
"latest-version": "Última versão: v{{version}}",
82+
"version": "v{{version}}"
83+
},
84+
"installation": {
85+
"title": "Instalação",
86+
"install-using-yarn": "Instale usando yarn",
87+
"install-using-yarn-command": "yarn add {{packageName}}",
88+
"install-using-npm": "Instale usando npm",
89+
"install-using-npm-command": "npm install {{packageName}}",
90+
"install-using-pnpm": "Instale usando pnpm",
91+
"install-using-pnpm-command": "pnpm install {{packageName}}"
92+
},
93+
"repository": {
94+
"title": "Repositório"
95+
},
96+
"author": {
97+
"title": "Autor(a)"
98+
},
99+
"distribution": {
100+
"title": "Distribuição mais recente",
101+
"license": "Licença",
102+
"size": "Tamanho",
103+
"file-count": "Contagem de arquivos"
104+
},
105+
"maintainers": {
106+
"title": "Mantenedores(as)"
107+
},
108+
"contributors": {
109+
"title": "Contribuidores(as)"
110+
},
111+
"engines": {
112+
"npm-version": "Versão NPM",
113+
"node-js": "NODE JS"
114+
}
115+
},
116+
"footer": {
117+
"powered-by": "Distribuído por",
118+
"made-with-love-on": "Feito com amor <0>♥</0> no(a)"
119+
},
120+
"button": {
121+
"close": "Fechar",
122+
"cancel": "Cancelar",
123+
"login": "Conectar",
124+
"logout": "Desconectar",
125+
"go-to-the-home-page": "Ir para a página inicial",
126+
"learn-more": "Leia mais",
127+
"fund-this-package": "<0>Financie</0> este pacote"
128+
},
129+
"error": {
130+
"unspecific": "Algo deu errado.",
131+
"404": {
132+
"page-not-found": "404 - Página não encontrada",
133+
"sorry-we-could-not-find-it": "Desculpe, não conseguimos encontrar..."
134+
},
135+
"app-context-not-correct-used": "O contexto do aplicativo não foi usado corretamente",
136+
"package-meta-is-required-at-detail-context": "packageMeta é requerido em DetailContext"
137+
}
138+
}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"github-markdown-css": "3.0.1",
7272
"html-webpack-plugin": "3.2.0",
7373
"husky": "3.1.0",
74+
"i18next": "19.1.0",
7475
"identity-obj-proxy": "3.0.0",
7576
"in-publish": "2.0.0",
7677
"jest": "24.9.0",
@@ -99,6 +100,7 @@
99100
"react-dom": "16.13.0",
100101
"react-hook-form": "3.29.4",
101102
"react-hot-loader": "4.12.18",
103+
"react-i18next": "11.3.1",
102104
"react-router-dom": "5.1.2",
103105
"request": "2.88.0",
104106
"resolve-url-loader": "3.1.1",
406 KB
Binary file not shown.

partials/storage/jquery/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4976,8 +4976,12 @@
49764976
"_attachments": {
49774977
"jquery-1.5.1.tgz": {
49784978
"shasum": "2ae2d661e906c1a01e044a71bb5b2743942183e5"
4979+
},
4980+
"jquery-3.3.1.tgz": {
4981+
"shasum": "958ce29e81c9790f31be7792df5d4d95fc57fbca"
49794982
}
49804983
},
4981-
"_rev": "60-fed4915c27b9c1e6",
4982-
"readme": "# jQuery\n\n> jQuery is a fast, small, and feature-rich JavaScript library.\n\nFor information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/).\nFor source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery).\n\nIf upgrading, please see the [blog post for 3.3.1](https://blog.jquery.com/2017/03/20/jquery-3.3.1-now-available/). This includes notable differences from the previous version and a more readable changelog.\n\n## Including jQuery\n\nBelow are some of the most common ways to include jQuery.\n\n### Browser\n\n#### Script tag\n\n```html\n<script src=\"https://code.jquery.com/jquery-3.3.1.min.js\"></script>\n```\n\n#### Babel\n\n[Babel](http://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively.\n\n```js\nimport $ from \"jquery\";\n```\n\n#### Browserify/Webpack\n\nThere are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this...\n\n```js\nvar $ = require(\"jquery\");\n```\n\n#### AMD (Asynchronous Module Definition)\n\nAMD is a module format built for the browser. For more information, we recommend [require.js' documentation](http://requirejs.org/docs/whyamd.html).\n\n```js\ndefine([\"jquery\"], function($) {\n\n});\n```\n\n### Node\n\nTo include jQuery in [Node](nodejs.org), first install with npm.\n\n```sh\nnpm install jquery\n```\n\nFor jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/tmpvar/jsdom). This can be useful for testing purposes.\n\n```js\nrequire(\"jsdom\").env(\"\", function(err, window) {\n\tif (err) {\n\t\tconsole.error(err);\n\t\treturn;\n\t}\n\n\tvar $ = require(\"jquery\")(window);\n});\n```"
4983-
}
4984+
"_rev": "61-e6be890a78963127",
4985+
"readme": "# jQuery\n\n> jQuery is a fast, small, and feature-rich JavaScript library.\n\nFor information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/).\nFor source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery).\n\nIf upgrading, please see the [blog post for 3.3.1](https://blog.jquery.com/2017/03/20/jquery-3.3.1-now-available/). This includes notable differences from the previous version and a more readable changelog.\n\n## Including jQuery\n\nBelow are some of the most common ways to include jQuery.\n\n### Browser\n\n#### Script tag\n\n```html\n<script src=\"https://code.jquery.com/jquery-3.3.1.min.js\"></script>\n```\n\n#### Babel\n\n[Babel](http://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively.\n\n```js\nimport $ from \"jquery\";\n```\n\n#### Browserify/Webpack\n\nThere are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this...\n\n```js\nvar $ = require(\"jquery\");\n```\n\n#### AMD (Asynchronous Module Definition)\n\nAMD is a module format built for the browser. For more information, we recommend [require.js' documentation](http://requirejs.org/docs/whyamd.html).\n\n```js\ndefine([\"jquery\"], function($) {\n\n});\n```\n\n### Node\n\nTo include jQuery in [Node](nodejs.org), first install with npm.\n\n```sh\nnpm install jquery\n```\n\nFor jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/tmpvar/jsdom). This can be useful for testing purposes.\n\n```js\nrequire(\"jsdom\").env(\"\", function(err, window) {\n\tif (err) {\n\t\tconsole.error(err);\n\t\treturn;\n\t}\n\n\tvar $ = require(\"jquery\")(window);\n});\n```",
4986+
"_id": "jquery"
4987+
}

0 commit comments

Comments
 (0)