forked from sombochea/verdaccio-ui
Compare commits
15 Commits
dependabot
...
master
Author | SHA1 | Date | |
---|---|---|---|
563a6677f6 | |||
c2c94929a7 | |||
484543dabc | |||
3c5fd072f0 | |||
35be83f560 | |||
ee9ef143d2 | |||
b06ae66961 | |||
57f45e7867 | |||
37e3574fb1 | |||
|
7e56c8e7e2 | ||
|
b59840d352 | ||
|
2965973f77 | ||
|
c9910c97b0 | ||
|
1e060474c7 | ||
|
f8101ae90a |
@ -3,7 +3,7 @@
|
|||||||
"files": null,
|
"files": null,
|
||||||
"lines": null
|
"lines": null
|
||||||
},
|
},
|
||||||
"generated_at": "2019-09-29T18:19:50Z",
|
"generated_at": "2020-05-05T12:14:08Z",
|
||||||
"plugins_used": [
|
"plugins_used": [
|
||||||
{
|
{
|
||||||
"name": "AWSKeyDetector"
|
"name": "AWSKeyDetector"
|
||||||
@ -23,6 +23,7 @@
|
|||||||
"name": "HexHighEntropyString"
|
"name": "HexHighEntropyString"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"keyword_exclude": null,
|
||||||
"name": "KeywordDetector"
|
"name": "KeywordDetector"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -36,5 +37,9 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"results": {},
|
"results": {},
|
||||||
"version": "0.12.4"
|
"version": "0.13.0",
|
||||||
|
"word_list": {
|
||||||
|
"file": null,
|
||||||
|
"hash": null
|
||||||
|
}
|
||||||
}
|
}
|
22
README.md
22
README.md
@ -105,6 +105,28 @@ If you have any issue you can try the following options, do no desist to ask or
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
Your PR should contain:
|
||||||
|
|
||||||
|
1 - A json file in the folder ```i18n/translations/*``` with the translations. The file must be named according to the new added language
|
||||||
|
|
||||||
|
2 - The files ```i18n/config.ts``` and ```LanguageSwitch.tsx``` updated with the new language. Please see the current structure
|
||||||
|
|
||||||
|
3 - The other translations containing the new language in the language of the file. Example:
|
||||||
|
|
||||||
|
New language: ```cs_CZ ```
|
||||||
|
|
||||||
|
The file ```pt-BR ``` should contain:
|
||||||
|
```
|
||||||
|
"lng": {
|
||||||
|
...,
|
||||||
|
"czech": "Tcheco"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
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/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### License
|
### License
|
||||||
|
|
||||||
Verdaccio is [MIT licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)
|
Verdaccio is [MIT licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)
|
||||||
|
@ -8,6 +8,8 @@ import translationDE from './translations/de-DE.json';
|
|||||||
import translationFR from './translations/fr-FR.json';
|
import translationFR from './translations/fr-FR.json';
|
||||||
import translationCN from './translations/zh-CN.json';
|
import translationCN from './translations/zh-CN.json';
|
||||||
import translationJP from './translations/ja-JP.json';
|
import translationJP from './translations/ja-JP.json';
|
||||||
|
import translationUA from './translations/uk-UA.json';
|
||||||
|
import translationKM from './translations/km-KH.json';
|
||||||
|
|
||||||
const languages = {
|
const languages = {
|
||||||
'en-US': {
|
'en-US': {
|
||||||
@ -31,6 +33,12 @@ const languages = {
|
|||||||
'ja-JP': {
|
'ja-JP': {
|
||||||
translation: translationJP,
|
translation: translationJP,
|
||||||
},
|
},
|
||||||
|
'uk-UA': {
|
||||||
|
translation: translationUA,
|
||||||
|
},
|
||||||
|
'km-KH': {
|
||||||
|
translation: translationKM,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
type Language = keyof typeof languages;
|
type Language = keyof typeof languages;
|
||||||
@ -44,7 +52,7 @@ i18n
|
|||||||
// in case window.VEDACCIO_LANGUAGE is undefined,it will fall back to 'en-US'
|
// in case window.VEDACCIO_LANGUAGE is undefined,it will fall back to 'en-US'
|
||||||
lng: window?.__VERDACCIO_BASENAME_UI_OPTIONS?.language,
|
lng: window?.__VERDACCIO_BASENAME_UI_OPTIONS?.language,
|
||||||
fallbackLng: 'en-US',
|
fallbackLng: 'en-US',
|
||||||
whitelist: ['en-US', 'pt-BR', 'es-ES', 'de-DE', 'fr-FR', 'zh-CN', 'ja-JP'],
|
whitelist: ['en-US', 'pt-BR', 'es-ES', 'de-DE', 'fr-FR', 'zh-CN', 'ja-JP', 'uk-UA', 'km-KH'],
|
||||||
load: 'currentOnly',
|
load: 'currentOnly',
|
||||||
resources: languages,
|
resources: languages,
|
||||||
debug: false,
|
debug: false,
|
||||||
|
@ -143,7 +143,9 @@
|
|||||||
"spanish": "Spanisch",
|
"spanish": "Spanisch",
|
||||||
"german": "Deutsch",
|
"german": "Deutsch",
|
||||||
"chinese": "Chinesisch",
|
"chinese": "Chinesisch",
|
||||||
"french": "Französisch"
|
"french": "Französisch",
|
||||||
|
"ukraine": "Ukrainisch",
|
||||||
|
"khmer": "Khmer"
|
||||||
},
|
},
|
||||||
"help-to-translate": "Hilfe beim Übersetzen",
|
"help-to-translate": "Hilfe beim Übersetzen",
|
||||||
"change-language": "Sprache ändern"
|
"change-language": "Sprache ändern"
|
||||||
|
@ -143,7 +143,9 @@
|
|||||||
"spanish": "Spanish",
|
"spanish": "Spanish",
|
||||||
"german": "German",
|
"german": "German",
|
||||||
"chinese": "Chinese",
|
"chinese": "Chinese",
|
||||||
"french": "French"
|
"french": "French",
|
||||||
|
"ukraine": "Ukraine",
|
||||||
|
"khmer": "Khmer"
|
||||||
},
|
},
|
||||||
"help-to-translate": "Help to translate",
|
"help-to-translate": "Help to translate",
|
||||||
"change-language": "Change language"
|
"change-language": "Change language"
|
||||||
|
@ -143,7 +143,9 @@
|
|||||||
"spanish": "Español",
|
"spanish": "Español",
|
||||||
"german": "Alemán",
|
"german": "Alemán",
|
||||||
"chinese": "Chino",
|
"chinese": "Chino",
|
||||||
"french": "francés"
|
"french": "Francés",
|
||||||
|
"ukraine": "Ucraniano",
|
||||||
|
"khmer": "Khmer"
|
||||||
},
|
},
|
||||||
"help-to-translate": "Ayuda a traducir",
|
"help-to-translate": "Ayuda a traducir",
|
||||||
"change-language": "Cambiar idioma"
|
"change-language": "Cambiar idioma"
|
||||||
|
@ -143,7 +143,9 @@
|
|||||||
"spanish": "Espagnol",
|
"spanish": "Espagnol",
|
||||||
"german": "Allemand",
|
"german": "Allemand",
|
||||||
"chinese": "Chinois",
|
"chinese": "Chinois",
|
||||||
"french": "Français"
|
"french": "Français",
|
||||||
|
"ukraine": "Ukrainien",
|
||||||
|
"khmer": "Khmer"
|
||||||
},
|
},
|
||||||
"help-to-translate": "Aide à la traduction",
|
"help-to-translate": "Aide à la traduction",
|
||||||
"change-language": "Changer la langue"
|
"change-language": "Changer la langue"
|
||||||
|
@ -143,7 +143,9 @@
|
|||||||
"spanish": "スペイン語",
|
"spanish": "スペイン語",
|
||||||
"german": "ドイツ語",
|
"german": "ドイツ語",
|
||||||
"chinese": "中国語",
|
"chinese": "中国語",
|
||||||
"french": "フランス語"
|
"french": "フランス語",
|
||||||
|
"ukraine": "ウクライナ",
|
||||||
|
"khmer": "Khmer"
|
||||||
},
|
},
|
||||||
"help-to-translate": "翻訳を助ける",
|
"help-to-translate": "翻訳を助ける",
|
||||||
"change-language": "言語を変更"
|
"change-language": "言語を変更"
|
||||||
|
152
i18n/translations/km-KH.json
Normal file
152
i18n/translations/km-KH.json
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
{
|
||||||
|
"copy-to-clipboard": "ចម្លងទៅក្ដារតម្បៀតខ្ទាស់",
|
||||||
|
"author-anonymous": "គ្មានអត្តសញ្ញាណ",
|
||||||
|
"action-bar-action": {
|
||||||
|
"visit-home-page": "ទស្សនាគេហទំព័រ",
|
||||||
|
"open-an-issue": "បើកកិច្ចការ",
|
||||||
|
"download-tarball": "ទាញយកកញ្ចប់ឯកសារ"
|
||||||
|
},
|
||||||
|
"dialog": {
|
||||||
|
"registry-info": {
|
||||||
|
"title": "ព័ត៌មានការចុះឈ្មោះ"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"header": {
|
||||||
|
"documentation": "ឯកសារ",
|
||||||
|
"registry-info": "ព័ត៌មានការចុះឈ្មោះ",
|
||||||
|
"greetings": "សួស្តី"
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
|
"packages": "ស្វែងរកកញ្ចប់"
|
||||||
|
},
|
||||||
|
"auto-complete": {
|
||||||
|
"loading": "កំពុងផ្ទុក...",
|
||||||
|
"no-results-found": "រកមិនឃើញលទ្ធផល"
|
||||||
|
},
|
||||||
|
"tab": {
|
||||||
|
"uplinks": "ភ្ជាប់តំណទៅ",
|
||||||
|
"versions": "កំណែ",
|
||||||
|
"dependencies": "អាស្រ័យលើ",
|
||||||
|
"readme": "អានខ្ញុំជាមុនសិន"
|
||||||
|
},
|
||||||
|
"uplinks": {
|
||||||
|
"title": "ភ្ជាប់តំណទៅ",
|
||||||
|
"no-items": "{{name}} គ្មានភ្ជាប់តំណទៅ។"
|
||||||
|
},
|
||||||
|
"versions": {
|
||||||
|
"current-tags": "ស្លាកបច្ចុប្បន្ន",
|
||||||
|
"version-history": "ប្រវត្តិសាស្រ្តជំនាន់",
|
||||||
|
"not-available": "Not available"
|
||||||
|
},
|
||||||
|
"package": {
|
||||||
|
"published-on": "បោះពុម្ភផ្សាយ {{time}}។",
|
||||||
|
"version": "v{{version}}",
|
||||||
|
"visit-home-page": "ទស្សនាគេហទំព័រ",
|
||||||
|
"homepage": "គេហទំព័រ",
|
||||||
|
"open-an-issue": "បើកកិច្ចការ",
|
||||||
|
"bugs": "កំហុស",
|
||||||
|
"download": "ទាញយក {{what}}",
|
||||||
|
"the-tar-file": "ឯកសាជា tar",
|
||||||
|
"tarball": "ឯកសារ Tarball"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"has-no-dependencies": "{{package}} មិនមានភាពអាស្រ័យ។",
|
||||||
|
"dependency-block": "{{package}}@{{version}}"
|
||||||
|
},
|
||||||
|
"form": {
|
||||||
|
"username": "ឈ្មោះអ្នកប្រើប្រាស់",
|
||||||
|
"password": "ពាក្យសម្ងាត់"
|
||||||
|
},
|
||||||
|
"form-placeholder": {
|
||||||
|
"username": "ឈ្មោះអ្នកប្រើរបស់អ្នក",
|
||||||
|
"password": "ពាក្យសម្ងាត់ខ្លាំងរបស់អ្នក"
|
||||||
|
},
|
||||||
|
"form-validation": {
|
||||||
|
"required-field": "ចន្លោះនេះត្រូវតែំពេញ",
|
||||||
|
"required-min-length": "ប្រអប់នេះទាមទារប្រវែងអប្បបរមា {{length}}",
|
||||||
|
"unable-to-sign-in": "មិនអាចចូលបានទេ",
|
||||||
|
"username-or-password-cant-be-empty": "ឈ្មោះអ្នកប្រើឬពាក្យសម្ងាត់មិនអាចទទេ!"
|
||||||
|
},
|
||||||
|
"help": {
|
||||||
|
"title": "មិនទាន់មានការបោះពុម្ពផ្សាយកញ្ចប់នៅឡើយទេ។",
|
||||||
|
"sub-title": "ដើម្បីផ្សព្វផ្សាយកញ្ចប់ដំបូងរបស់អ្នកគ្រាន់តែ៖",
|
||||||
|
"first-step": "1. ចូល",
|
||||||
|
"first-step-command-line": "npm adduser --registry {{registryUrl}}",
|
||||||
|
"second-step": "2. ផ្សព្វផ្សាយ",
|
||||||
|
"second-step-command-line": "npm publish --registry {{registryUrl}}",
|
||||||
|
"third-step": "ផ្ទុកទំព័រនេះឡើងវិញ។"
|
||||||
|
},
|
||||||
|
"sidebar": {
|
||||||
|
"detail": {
|
||||||
|
"latest-version": "ចុងក្រោយ v{{version}}",
|
||||||
|
"version": "v{{version}}"
|
||||||
|
},
|
||||||
|
"installation": {
|
||||||
|
"title": "ការដំឡើង",
|
||||||
|
"install-using-yarn": "ដំឡើងដោយប្រើ yarn",
|
||||||
|
"install-using-yarn-command": "yarn add {{packageName}}",
|
||||||
|
"install-using-npm": "ដំឡើងដោយប្រើ npm",
|
||||||
|
"install-using-npm-command": "npm install {{packageName}}",
|
||||||
|
"install-using-pnpm": "ដំឡើងដោយប្រើ pnpm",
|
||||||
|
"install-using-pnpm-command": "pnpm install {{packageName}}"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"title": "ឃ្លាំង"
|
||||||
|
},
|
||||||
|
"author": {
|
||||||
|
"title": "អ្នកនិពន្ធ"
|
||||||
|
},
|
||||||
|
"distribution": {
|
||||||
|
"title": "ការចែកចាយចុងក្រោយ",
|
||||||
|
"license": "អាជ្ញាប័ណ្ណ",
|
||||||
|
"size": "ទំហំ",
|
||||||
|
"file-count": "រាប់ឯកសារ"
|
||||||
|
},
|
||||||
|
"maintainers": {
|
||||||
|
"title": "អ្នកថែរក្សា"
|
||||||
|
},
|
||||||
|
"contributors": {
|
||||||
|
"title": "អ្នកចូលរួមអភិវឌ្ឍ"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"npm-version": "NPM កំណែ",
|
||||||
|
"node-js": "NODE JS"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"footer": {
|
||||||
|
"powered-by": "ឧបត្ថម្ភដោយ",
|
||||||
|
"made-with-love-on": "ផលិតជាមួយ <0>♥</0> លើ"
|
||||||
|
},
|
||||||
|
"button": {
|
||||||
|
"close": "បិទ",
|
||||||
|
"cancel": "បោះបង់",
|
||||||
|
"login": "ចូល",
|
||||||
|
"logout": "ចាកចេញ",
|
||||||
|
"go-to-the-home-page": "ទៅទំព័រដើម",
|
||||||
|
"learn-more": "ស្វែងយល់បន្ថែម",
|
||||||
|
"fund-this-package": "<0>Fund</0> កញ្ចប់នេះ"
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"unspecific": "មានអ្វីមួយមិនប្រក្រតី។",
|
||||||
|
"404": {
|
||||||
|
"page-not-found": "៤០៤ - រកមិនឃើញទំព័រ",
|
||||||
|
"sorry-we-could-not-find-it": "សូមទោសយើងមិនអាចរកវាឃើញទេ..."
|
||||||
|
},
|
||||||
|
"app-context-not-correct-used": "បរិបទកម្មវិធីមិនត្រូវបានប្រើត្រឹមត្រូវទេ",
|
||||||
|
"theme-context-not-correct-used": "បរិបទទម្រង់មិនត្រូវបានប្រើត្រឹមត្រូវទេ",
|
||||||
|
"package-meta-is-required-at-detail-context": "packageMeta ត្រូវបានទាមទារនៅ DetailContext"
|
||||||
|
},
|
||||||
|
"lng": {
|
||||||
|
"english": "អង់គ្លេស",
|
||||||
|
"japanese": "ជប៉ុន",
|
||||||
|
"portuguese": "ព័រទុយហ្កាល់",
|
||||||
|
"spanish": "អេស្ប៉ាញ",
|
||||||
|
"german": "អាឡឺម៉ង់",
|
||||||
|
"chinese": "ចិន",
|
||||||
|
"french": "បារាំង",
|
||||||
|
"ukraine": "អ៊ុយក្រែន",
|
||||||
|
"khmer": "ខ្មែរ"
|
||||||
|
},
|
||||||
|
"help-to-translate": "ជួយបកប្រែ",
|
||||||
|
"change-language": "ប្ដូរភាសា"
|
||||||
|
}
|
@ -143,7 +143,9 @@
|
|||||||
"spanish": "Espanhol",
|
"spanish": "Espanhol",
|
||||||
"german": "Alemão",
|
"german": "Alemão",
|
||||||
"chinese": "Chinês",
|
"chinese": "Chinês",
|
||||||
"french": "Francês"
|
"french": "Francês",
|
||||||
|
"ukraine": "Ucraniano",
|
||||||
|
"khmer": "Khmer"
|
||||||
},
|
},
|
||||||
"help-to-translate": "Ajude a traduzir",
|
"help-to-translate": "Ajude a traduzir",
|
||||||
"change-language": "Mudar idioma"
|
"change-language": "Mudar idioma"
|
||||||
|
152
i18n/translations/uk-UA.json
Normal file
152
i18n/translations/uk-UA.json
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
{
|
||||||
|
"copy-to-clipboard": "Копіювати в буфер обміну",
|
||||||
|
"author-anonymous": "Анонімний",
|
||||||
|
"action-bar-action": {
|
||||||
|
"visit-home-page": "Відвідати домашню сторінку",
|
||||||
|
"open-an-issue": "Відкрити питання, проблему, ...",
|
||||||
|
"download-tarball": "Завантажити архів"
|
||||||
|
},
|
||||||
|
"dialog": {
|
||||||
|
"registry-info": {
|
||||||
|
"title": "Інформація про реєстр"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"header": {
|
||||||
|
"documentation": "Документація",
|
||||||
|
"registry-info": "Інформація про реєстр",
|
||||||
|
"greetings": "Привіт "
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
|
"packages": "Пошук пакетів"
|
||||||
|
},
|
||||||
|
"auto-complete": {
|
||||||
|
"loading": "Завантаження...",
|
||||||
|
"no-results-found": "Нічого не знайдено"
|
||||||
|
},
|
||||||
|
"tab": {
|
||||||
|
"uplinks": "Публікації",
|
||||||
|
"versions": "Версії",
|
||||||
|
"dependencies": "Залежності",
|
||||||
|
"readme": "Опис"
|
||||||
|
},
|
||||||
|
"uplinks": {
|
||||||
|
"title": "Публікації",
|
||||||
|
"no-items": "{{name}} не опубліковано."
|
||||||
|
},
|
||||||
|
"versions": {
|
||||||
|
"current-tags": "Поточні теги",
|
||||||
|
"version-history": "Історія версій",
|
||||||
|
"not-available": "Недоступний"
|
||||||
|
},
|
||||||
|
"package": {
|
||||||
|
"published-on": "Опубліковано {{time}} •",
|
||||||
|
"version": "v{{version}}",
|
||||||
|
"visit-home-page": "Відвідати домашню сторінку",
|
||||||
|
"homepage": "Домашня сторінка",
|
||||||
|
"open-an-issue": "Відкрити питання, проблему, ...",
|
||||||
|
"bugs": "Помилки",
|
||||||
|
"download": "Завантажити {{what}}",
|
||||||
|
"the-tar-file": "файл tar",
|
||||||
|
"tarball": "Завантажити"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"has-no-dependencies": "{{package}} не має залежностей.",
|
||||||
|
"dependency-block": "{{package}}@{{version}}"
|
||||||
|
},
|
||||||
|
"form": {
|
||||||
|
"username": "Ім'я користувача",
|
||||||
|
"password": "Пароль"
|
||||||
|
},
|
||||||
|
"form-placeholder": {
|
||||||
|
"username": "Ваше ім'я користувача",
|
||||||
|
"password": "Ваш надійний пароль"
|
||||||
|
},
|
||||||
|
"form-validation": {
|
||||||
|
"required-field": "Це поле є обов'язковим",
|
||||||
|
"required-min-length": "Для цього поля потрібна мінімальна довжина {{length}}",
|
||||||
|
"unable-to-sign-in": "Неможливо ввійти",
|
||||||
|
"username-or-password-cant-be-empty": "Ім'я користувача або пароль не можуть бути порожніми !"
|
||||||
|
},
|
||||||
|
"help": {
|
||||||
|
"title": "Пакети ще не опубліковані",
|
||||||
|
"sub-title": "Опублікувати свій перший пакет просто:",
|
||||||
|
"first-step": "1. Підключіться",
|
||||||
|
"first-step-command-line": "npm adduser --registry {{registryUrl}}",
|
||||||
|
"second-step": "2. Опублікуйте",
|
||||||
|
"second-step-command-line": "npm publish --registry {{registryUrl}}",
|
||||||
|
"third-step": "3. Оновіть цю сторінку."
|
||||||
|
},
|
||||||
|
"sidebar": {
|
||||||
|
"detail": {
|
||||||
|
"latest-version": "Остання версія v{{version}}",
|
||||||
|
"version": "v{{version}}"
|
||||||
|
},
|
||||||
|
"installation": {
|
||||||
|
"title": "Встановлення",
|
||||||
|
"install-using-yarn": "Встановлення за допомогою yarn",
|
||||||
|
"install-using-yarn-command": "yarn add {{packageName}}",
|
||||||
|
"install-using-npm": "Встановлення за допомогою npm",
|
||||||
|
"install-using-npm-command": "npm install {{packageName}}",
|
||||||
|
"install-using-pnpm": "Встановлення за допомогою pnpm",
|
||||||
|
"install-using-pnpm-command": "pnpm install {{packageName}}"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"title": "Сховище"
|
||||||
|
},
|
||||||
|
"author": {
|
||||||
|
"title": "Автор"
|
||||||
|
},
|
||||||
|
"distribution": {
|
||||||
|
"title": "Умови поширення",
|
||||||
|
"license": "Ліцензія",
|
||||||
|
"size": "Розмір",
|
||||||
|
"file-count": "кількість файлів"
|
||||||
|
},
|
||||||
|
"maintainers": {
|
||||||
|
"title": "Технічне супроводження"
|
||||||
|
},
|
||||||
|
"contributors": {
|
||||||
|
"title": "Автори"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"npm-version": "NPM версія",
|
||||||
|
"node-js": "NODE JS"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"footer": {
|
||||||
|
"powered-by": "Працює на",
|
||||||
|
"made-with-love-on": "Зроблено з <0> ♥ </0> на"
|
||||||
|
},
|
||||||
|
"button": {
|
||||||
|
"close": "Закрити",
|
||||||
|
"cancel": "Скасувати",
|
||||||
|
"login": "Вхід",
|
||||||
|
"logout": "Вийти",
|
||||||
|
"go-to-the-home-page": "Перейдіть на головну сторінку",
|
||||||
|
"learn-more": "Вивчайте більше",
|
||||||
|
"fund-this-package": "<0>Фінансувати</0> цей пакет"
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"unspecific": "Щось пішло не так.",
|
||||||
|
"404": {
|
||||||
|
"page-not-found": "404 - Сторінку не знайдено",
|
||||||
|
"sorry-we-could-not-find-it": "На жаль, ми не змогли його знайти ..."
|
||||||
|
},
|
||||||
|
"app-context-not-correct-used": "Контекст програми не використовувався правильно",
|
||||||
|
"theme-context-not-correct-used": "Контекст теми використано неправильно",
|
||||||
|
"package-meta-is-required-at-detail-context": "packageMeta is required at DetailContext"
|
||||||
|
},
|
||||||
|
"lng": {
|
||||||
|
"english": "Англійська",
|
||||||
|
"japanese": "Японська",
|
||||||
|
"portuguese": "Португальська",
|
||||||
|
"spanish": "Іспанська",
|
||||||
|
"german": "Німецька",
|
||||||
|
"chinese": "Китайська",
|
||||||
|
"french": "Французька",
|
||||||
|
"ukraine": "Українська",
|
||||||
|
"khmer": "Khmer"
|
||||||
|
},
|
||||||
|
"help-to-translate": "Допоможіть перекласти",
|
||||||
|
"change-language": "Змінити мову"
|
||||||
|
}
|
@ -109,7 +109,7 @@
|
|||||||
"title": "贡献者"
|
"title": "贡献者"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"npm-version": "NPM Version",
|
"npm-version": "NPM版本",
|
||||||
"node-js": "NODE JS"
|
"node-js": "NODE JS"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -136,14 +136,16 @@
|
|||||||
"package-meta-is-required-at-detail-context": "packageMeta is required at DetailContext"
|
"package-meta-is-required-at-detail-context": "packageMeta is required at DetailContext"
|
||||||
},
|
},
|
||||||
"lng": {
|
"lng": {
|
||||||
"english": "英語",
|
"english": "英语",
|
||||||
"japanese": "日語",
|
"japanese": "日语",
|
||||||
"portuguese": "葡萄牙語",
|
"portuguese": "葡萄牙语",
|
||||||
"spanish": "西班牙文",
|
"spanish": "西班牙语",
|
||||||
"german": "德語",
|
"german": "德语",
|
||||||
"chinese": "中文",
|
"chinese": "中文",
|
||||||
"french": "法國人"
|
"french": "法语",
|
||||||
|
"ukraine": "烏克蘭",
|
||||||
|
"khmer": "Khmer"
|
||||||
},
|
},
|
||||||
"help-to-translate": "幫助翻譯",
|
"help-to-translate": "幫助翻译",
|
||||||
"change-language": "改變語言"
|
"change-language": "改变语言"
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./static/main.*.js",
|
"path": "./static/main.*.js",
|
||||||
"maxSize": "30 kB"
|
"maxSize": "35 kB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./static/[0-9].*.{js,css}",
|
"path": "./static/[0-9].*.{js,css}",
|
||||||
|
@ -13,10 +13,10 @@ import Loading from '../components/Loading';
|
|||||||
import Box from '../muiComponents/Box';
|
import Box from '../muiComponents/Box';
|
||||||
import StyleBaseline from '../design-tokens/StyleBaseline';
|
import StyleBaseline from '../design-tokens/StyleBaseline';
|
||||||
import { Theme } from '../design-tokens/theme';
|
import { Theme } from '../design-tokens/theme';
|
||||||
|
import loadDayJSLocale from '../design-tokens/load-dayjs-locale';
|
||||||
|
|
||||||
import AppContextProvider from './AppContextProvider';
|
import AppContextProvider from './AppContextProvider';
|
||||||
import AppRoute, { history } from './AppRoute';
|
import AppRoute, { history } from './AppRoute';
|
||||||
import loadDayJSLocale from './load-dayjs-locale';
|
|
||||||
|
|
||||||
const StyledBox = styled(Box)<{ theme?: Theme }>(({ theme }) => ({
|
const StyledBox = styled(Box)<{ theme?: Theme }>(({ theme }) => ({
|
||||||
backgroundColor: theme?.palette.background.default,
|
backgroundColor: theme?.palette.background.default,
|
||||||
|
@ -14,6 +14,8 @@ import spain from './img/spain.svg';
|
|||||||
import usa from './img/usa.svg';
|
import usa from './img/usa.svg';
|
||||||
import france from './img/france.svg';
|
import france from './img/france.svg';
|
||||||
import japan from './img/japan.svg';
|
import japan from './img/japan.svg';
|
||||||
|
import ukraine from './img/ukraine.svg';
|
||||||
|
import khmer from './img/khmer.svg';
|
||||||
import earth from './img/earth.svg';
|
import earth from './img/earth.svg';
|
||||||
import verdaccio from './img/verdaccio.svg';
|
import verdaccio from './img/verdaccio.svg';
|
||||||
import filebinary from './img/filebinary.svg';
|
import filebinary from './img/filebinary.svg';
|
||||||
@ -34,6 +36,8 @@ export interface IconsMap {
|
|||||||
germany: string;
|
germany: string;
|
||||||
india: string;
|
india: string;
|
||||||
japan: string;
|
japan: string;
|
||||||
|
ukraine: string;
|
||||||
|
khmer: string;
|
||||||
earth: string;
|
earth: string;
|
||||||
verdaccio: string;
|
verdaccio: string;
|
||||||
license: string;
|
license: string;
|
||||||
@ -63,6 +67,8 @@ export const Icons: IconsMap = {
|
|||||||
usa,
|
usa,
|
||||||
france,
|
france,
|
||||||
japan,
|
japan,
|
||||||
|
ukraine,
|
||||||
|
khmer,
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
|
1
src/components/Icon/img/khmer.svg
Normal file
1
src/components/Icon/img/khmer.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" id="khmer"><g fill="#032ea1"><path d="M0 304.8v64.8a48.3 48.3 0 0048 48.8h400c26.4 0 48-21.6 48-48.8v-64.8H0zM448 77.6H48c-26.4 0-48 21.6-48 48.8v64.8h496v-64.8a48.3 48.3 0 00-48-48.8z"/></g><path fill="#e00025" d="M0 189.6h496v116H0z"/><g fill="#042a7f"><path d="M448 418.4c26.4 0 48-21.6 48-48.8v-64.8H315.2L448 418.4zM448 77.6H48l132.8 113.6H496v-64.8a48.3 48.3 0 00-48-48.8z"/></g><path fill="#b50030" d="M316 306.4h180V189.6H180z"/><path fill="#002566" d="M448 77.6H48l370.4 113.6H496v-64.8a48.3 48.3 0 00-48-48.8z"/><path fill="#8c002b" d="M496 214.4v-24.8h-81.6z"/><path fill="#002566" d="M496 369.6a48.3 48.3 0 01-48 48.8H48c-26.4 0-48-21.6-48-48.8"/><g fill="#fff"><path d="M249.6 200s0-2.4-1.6-2.4-1.6 2.4-1.6 2.4h3.2zM321.6 290.4v-7.2h-24 20v-6.4h-4V272h-16H312v-4h-3.2c-.8-.8-2.4-1.6-2.4-3.2v-12c.8-1.6 1.6-3.2 2.4-3.2v-11.2c-1.6 0-2.4 1.6-2.4 1.6v-4.8h-1.6v9.6-6.4h-2.4 2.4v-1.6h-2.4v-5.6c-.8 0-.8 2.4-2.4 2.4-.8 0-.8-.8 0-1.6s.8-1.6 0-4c-.8 1.6-1.6 1.6-1.6.8.8-1.6 1.6-1.6.8-4 0 2.4-1.6 2.4-1.6.8 0-1.6.8-1.6 0-4-.8 2.4-1.6 2.4-1.6.8 0-2.4 0-4-2.4-4.8 0 0 0-1.6-.8-1.6s-.8 1.6-.8 1.6c-2.4.8-2.4 3.2-2.4 4.8s-.8 1.6-1.6-.8c-.8 1.6 0 2.4 0 4s-.8 1.6-1.6-.8c-.8 2.4 0 2.4.8 4 0 .8-.8.8-1.6-.8-.8 1.6 0 3.2 0 4 .8.8.8 1.6 0 1.6-1.6 0-1.6-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.2.8h4-4zm-12 .8h-4 4zM248 197.6c-1.6 0-1.6 2.4-1.6 2.4h2.4c.8 0 .8-2.4-.8-2.4z"/><path d="M243.2 203.2v2.4h9.6v-2.4zM252 203.2v-1.6h-8v1.6zM250.4 201.6V200h-4.8v1.6z"/></g></svg>
|
After Width: | Height: | Size: 4.6 KiB |
1
src/components/Icon/img/ukraine.svg
Normal file
1
src/components/Icon/img/ukraine.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" id="ukraine"><path d="M0 248v121.6C0 396.8 21.6 416 48 416h400c26.4 0 48-19.2 48-46.4V248H0z" fill="#fdce0c"/><path d="M248 248l197.6 168c26.4 0 50.4-19.2 50.4-46.4V248H248z" fill="#f4ba00"/><path d="M448 80H48C21.6 80 0 99.2 0 126.4V248h496V126.4c0-27.2-21.6-46.4-48-46.4z" fill="#44c1ef"/><path d="M448 80H48l200 168h248V126.4c0-27.2-21.6-46.4-48-46.4z" fill="#18b4ea"/><path d="M496 368.8c0 29.6-21.6 47.2-48 47.2H48c-26.4 0-48-20.8-48-48" fill="#f2a700"/><path d="M48 80h400c26.4 0 48 19.2 48 46.4V216" fill="#10a2e2"/></svg>
|
After Width: | Height: | Size: 593 B |
@ -59,6 +59,16 @@ const getTranslatedCurrentLanguageDetails = (
|
|||||||
translation: t('lng.japanese'),
|
translation: t('lng.japanese'),
|
||||||
icon: 'japan',
|
icon: 'japan',
|
||||||
};
|
};
|
||||||
|
case 'uk-UA':
|
||||||
|
return {
|
||||||
|
translation: t('lng.ukraine'),
|
||||||
|
icon: 'ukraine',
|
||||||
|
};
|
||||||
|
case 'km-KH':
|
||||||
|
return {
|
||||||
|
translation: t('lng.khmer'),
|
||||||
|
icon: 'khmer',
|
||||||
|
};
|
||||||
default:
|
default:
|
||||||
return {
|
return {
|
||||||
translation: t('lng.english'),
|
translation: t('lng.english'),
|
||||||
|
@ -3,6 +3,7 @@ import { ThemeProvider as MuiThemeProvider } from '@material-ui/core/styles';
|
|||||||
import { ThemeProvider as EmotionThemeProvider } from 'emotion-theming';
|
import { ThemeProvider as EmotionThemeProvider } from 'emotion-theming';
|
||||||
import i18next from 'i18next';
|
import i18next from 'i18next';
|
||||||
|
|
||||||
|
import loadDayJSLocale from './load-dayjs-locale';
|
||||||
import ThemeContext from './ThemeContext';
|
import ThemeContext from './ThemeContext';
|
||||||
import { getTheme, ThemeMode } from './theme';
|
import { getTheme, ThemeMode } from './theme';
|
||||||
import useLocalStorage from './useLocalStorage';
|
import useLocalStorage from './useLocalStorage';
|
||||||
@ -22,7 +23,8 @@ const ThemeProvider: React.FC = ({ children }) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
changeLanguage();
|
changeLanguage();
|
||||||
}, [language, changeLanguage]);
|
loadDayJSLocale();
|
||||||
|
}, [language, changeLanguage, loadDayJSLocale]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeContext.Provider value={{ isDarkMode, setIsDarkMode, language, setLanguage }}>
|
<ThemeContext.Provider value={{ isDarkMode, setIsDarkMode, language, setLanguage }}>
|
||||||
|
@ -19,12 +19,7 @@ function loadDayJSLocale() {
|
|||||||
const fallbackLanguage = getFallFackLanguage();
|
const fallbackLanguage = getFallFackLanguage();
|
||||||
const locale = i18n.language || fallbackLanguage;
|
const locale = i18n.language || fallbackLanguage;
|
||||||
|
|
||||||
// dayjs loades en-US by default
|
switch (locale?.toLowerCase()) {
|
||||||
if (!locale || locale === 'en-US') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (locale.toLowerCase()) {
|
|
||||||
case 'pt-br':
|
case 'pt-br':
|
||||||
{
|
{
|
||||||
require('dayjs/locale/pt-br');
|
require('dayjs/locale/pt-br');
|
||||||
@ -61,7 +56,17 @@ function loadDayJSLocale() {
|
|||||||
dayjs.locale('ja');
|
dayjs.locale('ja');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'uk-ua':
|
||||||
|
{
|
||||||
|
require('dayjs/locale/uk');
|
||||||
|
dayjs.locale('uk');
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
|
{
|
||||||
|
require('dayjs/locale/en');
|
||||||
|
dayjs.locale('en');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
import { SyntheticEvent } from 'react';
|
import { SyntheticEvent } from 'react';
|
||||||
|
|
||||||
import { copyToClipBoardUtility } from './cli-utils';
|
import { copyToClipBoardUtility, getCLISetConfigRegistry } from './cli-utils';
|
||||||
|
|
||||||
describe('copyToClipBoardUtility', () => {
|
describe('copyToClipBoardUtility', () => {
|
||||||
let originalGetSelection;
|
let originalGetSelection;
|
||||||
@ -47,3 +47,18 @@ describe('copyToClipBoardUtility', () => {
|
|||||||
expect(spys.removeChild).toHaveBeenCalledWith(expectedDiv);
|
expect(spys.removeChild).toHaveBeenCalledWith(expectedDiv);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('getCLISetRegistry', () => {
|
||||||
|
const command = 'npm set';
|
||||||
|
const scope = '@testscope';
|
||||||
|
const blankScope = '';
|
||||||
|
const url = 'https://test.local';
|
||||||
|
|
||||||
|
test('should return ":" separated string when scope is set', () => {
|
||||||
|
expect(getCLISetConfigRegistry(command, scope, url)).toEqual(`${command} ${scope}:registry ${url}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('should not output scope when scope is not set', () => {
|
||||||
|
expect(getCLISetConfigRegistry(command, blankScope, url)).toEqual(`${command} registry ${url}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
@ -21,7 +21,8 @@ export const copyToClipBoardUtility = (str: string): ((e: SyntheticEvent<HTMLEle
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function getCLISetConfigRegistry(command: string, scope: string, registryUrl: string): string {
|
export function getCLISetConfigRegistry(command: string, scope: string, registryUrl: string): string {
|
||||||
return `${command} ${scope}registry ${registryUrl}`;
|
// if there is a scope defined there needs to be a ":" separator between the scope and the registry
|
||||||
|
return `${command} ${scope}${scope !== '' ? ':' : ''}registry ${registryUrl}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCLISetRegistry(command: string, registryUrl: string): string {
|
export function getCLISetRegistry(command: string, registryUrl: string): string {
|
||||||
|
@ -50,7 +50,7 @@ describe('formatRepository', (): void => {
|
|||||||
describe('formatDate', (): void => {
|
describe('formatDate', (): void => {
|
||||||
test('should format the date', (): void => {
|
test('should format the date', (): void => {
|
||||||
const date = 1532211072138;
|
const date = 1532211072138;
|
||||||
expect(formatDate(date)).toEqual('21.07.2018, 22:11:12');
|
expect(formatDate(date)).toEqual('07/21/2018 10:11:12 PM');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ describe('formatDateDistance', (): void => {
|
|||||||
describe('getLastUpdatedPackageTime', (): void => {
|
describe('getLastUpdatedPackageTime', (): void => {
|
||||||
test('should get the last update time', (): void => {
|
test('should get the last update time', (): void => {
|
||||||
const lastUpdated = packageMeta._uplinks;
|
const lastUpdated = packageMeta._uplinks;
|
||||||
expect(getLastUpdatedPackageTime(lastUpdated)).toEqual('22.07.2018, 22:11:12');
|
expect(getLastUpdatedPackageTime(lastUpdated)).toEqual('07/22/2018 10:11:12 PM');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should get the last update time for blank uplink', (): void => {
|
test('should get the last update time for blank uplink', (): void => {
|
||||||
@ -91,9 +91,9 @@ describe('getRecentReleases', (): void => {
|
|||||||
test('should get the recent releases', (): void => {
|
test('should get the recent releases', (): void => {
|
||||||
const { time } = packageMeta;
|
const { time } = packageMeta;
|
||||||
const result = [
|
const result = [
|
||||||
{ time: '14.12.2017, 15:43:27', version: '2.7.1' },
|
{ time: '12/14/2017 3:43:27 PM', version: '2.7.1' },
|
||||||
{ time: '05.12.2017, 23:25:06', version: '2.7.0' },
|
{ time: '12/05/2017 11:25:06 PM', version: '2.7.0' },
|
||||||
{ time: '08.11.2017, 22:47:16', version: '2.6.6' },
|
{ time: '11/08/2017 10:47:16 PM', version: '2.6.6' },
|
||||||
];
|
];
|
||||||
expect(getRecentReleases(time)).toEqual(result);
|
expect(getRecentReleases(time)).toEqual(result);
|
||||||
expect(getRecentReleases()).toEqual([]);
|
expect(getRecentReleases()).toEqual([]);
|
||||||
|
@ -5,12 +5,14 @@ import { UpLinks } from '@verdaccio/types';
|
|||||||
import isString from 'lodash/isString';
|
import isString from 'lodash/isString';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||||
|
import localizedFormat from 'dayjs/plugin/localizedFormat';
|
||||||
|
|
||||||
import { Time } from '../../types/packageMeta';
|
import { Time } from '../../types/packageMeta';
|
||||||
|
|
||||||
export const TIMEFORMAT = 'DD.MM.YYYY, HH:mm:ss';
|
export const TIMEFORMAT = 'L LTS';
|
||||||
|
|
||||||
dayjs.extend(relativeTime);
|
dayjs.extend(relativeTime);
|
||||||
|
dayjs.extend(localizedFormat);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formats license field for webui.
|
* Formats license field for webui.
|
||||||
|
Loading…
Reference in New Issue
Block a user