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

Commit 3b87165

Browse files
authored
Merge branch 'master' into fix-npm-set-scope
2 parents b016308 + b59840d commit 3b87165

File tree

31 files changed

+1302
-193
lines changed

31 files changed

+1302
-193
lines changed

.secrets-baseline

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@
3737
],
3838
"results": {},
3939
"version": "0.12.4"
40-
}
40+
}

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [1.7.1](https://github.com/verdaccio/ui/compare/v1.7.0...v1.7.1) (2020-04-27)
6+
7+
8+
### Bug Fixes
9+
10+
* **i18n:** fixed current locale ([#462](https://github.com/verdaccio/ui/issues/462)) ([f44abd7](https://github.com/verdaccio/ui/commit/f44abd7dd08a8d68b1bfc2bf0c053f3e80a343d0))
11+
12+
## [1.7.0](https://github.com/verdaccio/ui/compare/v1.6.0...v1.7.0) (2020-04-24)
13+
14+
15+
### Features
16+
17+
* add japanese translations ([#460](https://github.com/verdaccio/ui/issues/460)) ([25def6c](https://github.com/verdaccio/ui/commit/25def6ccd5a42d43af1c33e7ace4bd7fdbec0e64))
18+
19+
## [1.6.0](https://github.com/verdaccio/ui/compare/v1.5.0...v1.6.0) (2020-04-23)
20+
21+
22+
### Features
23+
24+
* **lng:** Added change language on the fly ([#456](https://github.com/verdaccio/ui/issues/456)) ([675ee98](https://github.com/verdaccio/ui/commit/675ee980ee2c4c789e52d38553f751bb219d1270))
25+
* Add french language + minor english language fix ([#459](https://github.com/verdaccio/ui/issues/459)) ([b173684](https://github.com/verdaccio/ui/commit/b17368470d63878292aca3e6d2f9adc97748ebac))
26+
527
## [1.5.0](https://github.com/verdaccio/ui/compare/v1.4.0...v1.5.0) (2020-04-08)
628

729

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,28 @@ If you have any issue you can try the following options, do no desist to ask or
105105

106106
Translations are handled locally. I18n files can be found in the folder ```i18n/translations/*``` of this repository. We would love to provide translations from other languages, embracing all our users, but unfortunately we cannot do this without your help. Would you like to help us? Please feel **super welcome** to add a locale by opening a pull request.
107107

108+
Your PR should contain:
109+
110+
1 - A json file in the folder ```i18n/translations/*``` with the translations. The file must be named according to the new added language
111+
112+
2 - The files ```i18n/config.ts``` and ```LanguageSwitch.tsx``` updated with the new language. Please see the current structure
113+
114+
3 - The other translations containing the new language in the language of the file. Example:
115+
116+
New language: ```cs_CZ ```
117+
118+
The file ```pt-BR ``` should contain:
119+
```
120+
"lng": {
121+
...,
122+
"czech": "Tcheco"
123+
}
124+
```
125+
126+
4 - A SVG flag of the new translated language in the the folder ```src/components/Icon/img/*```. You maybe want to compress the svg file using https://jakearchibald.github.io/svgomg/
127+
128+
129+
108130
### License
109131

110132
Verdaccio is [MIT licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)

i18n/config.ts

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,39 @@ import translationEN from './translations/en-US.json';
55
import translationPT from './translations/pt-BR.json';
66
import translationES from './translations/es-ES.json';
77
import translationDE from './translations/de-DE.json';
8+
import translationFR from './translations/fr-FR.json';
89
import translationCN from './translations/zh-CN.json';
10+
import translationJP from './translations/ja-JP.json';
11+
import translationUA from './translations/uk-UA.json';
12+
13+
const languages = {
14+
'en-US': {
15+
translation: translationEN,
16+
},
17+
'pt-BR': {
18+
translation: translationPT,
19+
},
20+
'es-ES': {
21+
translation: translationES,
22+
},
23+
'de-DE': {
24+
translation: translationDE,
25+
},
26+
'fr-FR': {
27+
translation: translationFR,
28+
},
29+
'zh-CN': {
30+
translation: translationCN,
31+
},
32+
'ja-JP': {
33+
translation: translationJP,
34+
},
35+
'uk-UA': {
36+
translation: translationUA,
37+
},
38+
};
39+
40+
type Language = keyof typeof languages;
941

1042
i18n
1143
// pass the i18n instance to react-i18next.
@@ -16,29 +48,14 @@ i18n
1648
// in case window.VEDACCIO_LANGUAGE is undefined,it will fall back to 'en-US'
1749
lng: window?.__VERDACCIO_BASENAME_UI_OPTIONS?.language,
1850
fallbackLng: 'en-US',
19-
whitelist: ['en-US', 'pt-BR', 'es-ES', 'de-DE', 'zh-CN'],
51+
whitelist: ['en-US', 'pt-BR', 'es-ES', 'de-DE', 'fr-FR', 'zh-CN', 'ja-JP', 'uk-UA'],
2052
load: 'currentOnly',
21-
resources: {
22-
'en-US': {
23-
translation: translationEN,
24-
},
25-
'pt-BR': {
26-
translation: translationPT,
27-
},
28-
'es-ES': {
29-
translation: translationES,
30-
},
31-
'de-DE': {
32-
translation: translationDE,
33-
},
34-
'zh-CN': {
35-
translation: translationCN,
36-
},
37-
},
53+
resources: languages,
3854
debug: false,
3955
interpolation: {
4056
escapeValue: false, // react already safes from xss
4157
},
4258
});
4359

4460
export default i18n;
61+
export { Language };

i18n/translations/de-DE.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,17 @@
135135
"app-context-not-correct-used": "Der App-Kontext wurde nicht korrekt verwendet",
136136
"theme-context-not-correct-used": "Der Theme-Kontext wurde nicht korrekt verwendet",
137137
"package-meta-is-required-at-detail-context": "packageMeta wird bei DetailContext benötigt"
138-
}
138+
},
139+
"lng": {
140+
"english": "Englisch",
141+
"japanese": "Japanisch",
142+
"portuguese": "Portugiesisch",
143+
"spanish": "Spanisch",
144+
"german": "Deutsch",
145+
"chinese": "Chinesisch",
146+
"french": "Französisch",
147+
"ukraine": "Ukrainisch"
148+
},
149+
"help-to-translate": "Hilfe beim Übersetzen",
150+
"change-language": "Sprache ändern"
139151
}

i18n/translations/en-US.json

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"dialog": {
1010
"registry-info": {
11-
"title": "Register Info"
11+
"title": "Registry Info"
1212
}
1313
},
1414
"header": {
@@ -132,8 +132,20 @@
132132
"page-not-found": "404 - Page not found",
133133
"sorry-we-could-not-find-it": "Sorry, we couldn't find it..."
134134
},
135-
"app-context-not-correct-used": "The app context was not correct used",
136-
"theme-context-not-correct-used": "The theme context was not correct used",
135+
"app-context-not-correct-used": "The app context was not used correctly",
136+
"theme-context-not-correct-used": "The theme context was not used correctly",
137137
"package-meta-is-required-at-detail-context": "packageMeta is required at DetailContext"
138-
}
139-
}
138+
},
139+
"lng": {
140+
"english": "English",
141+
"japanese": "Japanese",
142+
"portuguese": "Portuguese",
143+
"spanish": "Spanish",
144+
"german": "German",
145+
"chinese": "Chinese",
146+
"french": "French",
147+
"ukraine": "Ukraine"
148+
},
149+
"help-to-translate": "Help to translate",
150+
"change-language": "Change language"
151+
}

i18n/translations/es-ES.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,17 @@
135135
"app-context-not-correct-used": "El contexto de la aplicación no fue correctamente usado",
136136
"theme-context-not-correct-used": "El contexto del tema no fue correctamente usado",
137137
"package-meta-is-required-at-detail-context": "packageMeta es requerido en DetailContext"
138-
}
138+
},
139+
"lng": {
140+
"english": "Inglés",
141+
"japanese": "Japonés",
142+
"portuguese": "Portugués",
143+
"spanish": "Español",
144+
"german": "Alemán",
145+
"chinese": "Chino",
146+
"french": "Francés",
147+
"ukraine": "Ucraniano"
148+
},
149+
"help-to-translate": "Ayuda a traducir",
150+
"change-language": "Cambiar idioma"
139151
}

i18n/translations/fr-FR.json

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
{
2+
"copy-to-clipboard": "Copier dans le presse-papier",
3+
"author-anonymous": "Anonyme",
4+
"action-bar-action": {
5+
"visit-home-page": "Visiter la page d'accueil",
6+
"open-an-issue": "Ouvrir un ticket",
7+
"download-tarball": "Télécharger l'archive"
8+
},
9+
"dialog": {
10+
"registry-info": {
11+
"title": "Informations du Registry"
12+
}
13+
},
14+
"header": {
15+
"documentation": "Documentation",
16+
"registry-info": "Informations du Registry",
17+
"greetings": "Bonjour "
18+
},
19+
"search": {
20+
"packages": "Rechercher des paquets"
21+
},
22+
"auto-complete": {
23+
"loading": "En cours de chargement...",
24+
"no-results-found": "Aucun resultat trouvé"
25+
},
26+
"tab": {
27+
"uplinks": "Uplinks",
28+
"versions": "Versions",
29+
"dependencies": "Dépendances",
30+
"readme": "Readme"
31+
},
32+
"uplinks": {
33+
"title": "Uplinks",
34+
"no-items": "{{name}} n'a pas de uplink."
35+
},
36+
"versions": {
37+
"current-tags": "Tags courants",
38+
"version-history": "Historique de version",
39+
"not-available": "Non disponible"
40+
},
41+
"package": {
42+
"published-on": "Publié le {{time}} •",
43+
"version": "v{{version}}",
44+
"visit-home-page": "Visiter la page d'accueil",
45+
"homepage": "Page d'accueil",
46+
"open-an-issue": "Ouvrir un ticket",
47+
"bugs": "Bugs",
48+
"download": "Télécharger {{what}}",
49+
"the-tar-file": "le fichier tar",
50+
"tarball": "Archive"
51+
},
52+
"dependencies": {
53+
"has-no-dependencies": "{{package}} n'a aucune dépendance.",
54+
"dependency-block": "{{package}}@{{version}}"
55+
},
56+
"form": {
57+
"username": "Nom d'utilisateur",
58+
"password": "Mot de passe"
59+
},
60+
"form-placeholder": {
61+
"username": "Votre nom d'utilisateur",
62+
"password": "Votre mot de passe"
63+
},
64+
"form-validation": {
65+
"required-field": "Ce champ est obligatoire",
66+
"required-min-length": "Ce champ doit faire au moins {{length}} caractères",
67+
"unable-to-sign-in": "Connexion impossible",
68+
"username-or-password-cant-be-empty": "Le nom d'utilisateur ou mot de passe ne peut pas être vide!"
69+
},
70+
"help": {
71+
"title": "Aucun paquet publié pour l'instant.",
72+
"sub-title": "Pour publier votre premier paquet:",
73+
"first-step": "1. Se connecter",
74+
"first-step-command-line": "npm adduser --registry {{registryUrl}}",
75+
"second-step": "2. Publier",
76+
"second-step-command-line": "npm publish --registry {{registryUrl}}",
77+
"third-step": "3. Recharger cette page."
78+
},
79+
"sidebar": {
80+
"detail": {
81+
"latest-version": "Dernière v{{version}}",
82+
"version": "v{{version}}"
83+
},
84+
"installation": {
85+
"title": "Installation",
86+
"install-using-yarn": "Installer avec yarn",
87+
"install-using-yarn-command": "yarn add {{packageName}}",
88+
"install-using-npm": "Installer avec npm",
89+
"install-using-npm-command": "npm install {{packageName}}",
90+
"install-using-pnpm": "Installer avec pnpm",
91+
"install-using-pnpm-command": "pnpm install {{packageName}}"
92+
},
93+
"repository": {
94+
"title": "Dépôt"
95+
},
96+
"author": {
97+
"title": "Auteur"
98+
},
99+
"distribution": {
100+
"title": "Dernière distribution",
101+
"license": "Licence",
102+
"size": "Taille",
103+
"file-count": "nombre de fichiers"
104+
},
105+
"maintainers": {
106+
"title": "Mainteneurs"
107+
},
108+
"contributors": {
109+
"title": "Contributeurs"
110+
},
111+
"engines": {
112+
"npm-version": "Version NPM",
113+
"node-js": "NODE JS"
114+
}
115+
},
116+
"footer": {
117+
"powered-by": "Propulsé par",
118+
"made-with-love-on": "Fait avec <0>♥</0> sur"
119+
},
120+
"button": {
121+
"close": "Fermer",
122+
"cancel": "Annuler",
123+
"login": "Se connecter",
124+
"logout": "Se déconnecter",
125+
"go-to-the-home-page": "Aller à la page d'accueil",
126+
"learn-more": "En savoir plus",
127+
"fund-this-package": "<0>Financer</0> ce paquet"
128+
},
129+
"error": {
130+
"unspecific": "Quelque chose a mal tourné.",
131+
"404": {
132+
"page-not-found": "404 - Page non trouvée",
133+
"sorry-we-could-not-find-it": "Desolé, nous n'avons rien retrouvé..."
134+
},
135+
"app-context-not-correct-used": "Le contexte de l'application n'a pas été utilisé correctement",
136+
"theme-context-not-correct-used": "Le contexte du thème n'a pas été utilisé correctement",
137+
"package-meta-is-required-at-detail-context": "packageMeta est obligatoire à DetailContext"
138+
},
139+
"lng": {
140+
"english": "Anglais",
141+
"japanese": "Japonais",
142+
"portuguese": "Portugais",
143+
"spanish": "Espagnol",
144+
"german": "Allemand",
145+
"chinese": "Chinois",
146+
"french": "Français",
147+
"ukraine": "Ukrainien"
148+
},
149+
"help-to-translate": "Aide à la traduction",
150+
"change-language": "Changer la langue"
151+
}

0 commit comments

Comments
 (0)