i18ntk 4.7.0 → 4.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -1
- package/README.md +15 -4
- package/main/i18ntk-ui.js +35 -30
- package/main/i18ntk-usage.js +2 -2
- package/main/i18ntk-validate.js +1 -1
- package/main/manage/commands/ValidateCommand.js +1 -1
- package/main/manage/index.js +52 -47
- package/main/manage/managers/LanguageMenu.js +3 -1
- package/main/manage/services/ConfigurationService.js +1 -1
- package/main/manage/services/FrameworkDetectionService.js +1 -1
- package/main/manage/services/UsageService.js +2 -2
- package/package.json +11 -7
- package/settings/settings-manager.js +19 -3
- package/ui-locales/ar.json +2636 -0
- package/ui-locales/cs.json +2636 -0
- package/ui-locales/de.json +17 -1
- package/ui-locales/el.json +2636 -0
- package/ui-locales/en.json +17 -1
- package/ui-locales/es.json +17 -1
- package/ui-locales/fr.json +17 -1
- package/ui-locales/he.json +2636 -0
- package/ui-locales/hi.json +2636 -0
- package/ui-locales/hu.json +2636 -0
- package/ui-locales/it.json +2636 -0
- package/ui-locales/ja.json +17 -1
- package/ui-locales/ko.json +2636 -0
- package/ui-locales/nl.json +2636 -0
- package/ui-locales/pl.json +2636 -0
- package/ui-locales/pt.json +2636 -0
- package/ui-locales/ru.json +17 -1
- package/ui-locales/sv.json +2636 -0
- package/ui-locales/th.json +2636 -0
- package/ui-locales/tr.json +2636 -0
- package/ui-locales/uk.json +2636 -0
- package/ui-locales/vi.json +2636 -0
- package/ui-locales/zh.json +17 -1
- package/utils/config-helper.js +2 -2
- package/utils/config-manager.js +3 -4
- package/utils/env-manager.js +1 -1
- package/utils/locale-optimizer.js +1 -1
package/ui-locales/zh.json
CHANGED
|
@@ -2057,7 +2057,23 @@
|
|
|
2057
2057
|
"fr": "法语",
|
|
2058
2058
|
"ru": "俄语",
|
|
2059
2059
|
"ja": "日本人",
|
|
2060
|
-
"zh": "中国人"
|
|
2060
|
+
"zh": "中国人",
|
|
2061
|
+
"it": "意大利语",
|
|
2062
|
+
"pt": "葡萄牙语",
|
|
2063
|
+
"nl": "荷兰语",
|
|
2064
|
+
"pl": "波兰语",
|
|
2065
|
+
"sv": "瑞典语",
|
|
2066
|
+
"uk": "乌克兰语",
|
|
2067
|
+
"cs": "捷克语",
|
|
2068
|
+
"tr": "土耳其语",
|
|
2069
|
+
"ko": "韩语",
|
|
2070
|
+
"ar": "阿拉伯语",
|
|
2071
|
+
"hi": "印地语",
|
|
2072
|
+
"th": "泰语",
|
|
2073
|
+
"vi": "越南语",
|
|
2074
|
+
"he": "希伯来语",
|
|
2075
|
+
"el": "希腊语",
|
|
2076
|
+
"hu": "匈牙利语"
|
|
2061
2077
|
},
|
|
2062
2078
|
"viewAll": {
|
|
2063
2079
|
"title": "查看所有设置"
|
package/utils/config-helper.js
CHANGED
|
@@ -534,7 +534,7 @@ async function initializeSourceFiles(sourceDir, sourceLang) {
|
|
|
534
534
|
SecurityUtils.safeWriteFileSync(sourceFile, JSON.stringify(defaultContent, null, 2), sourceDir, 'utf8');
|
|
535
535
|
|
|
536
536
|
// Create directories for supported languages
|
|
537
|
-
const supportedLanguages = ['es', 'fr', 'de', 'ja', 'ru', 'zh', 'pt'];
|
|
537
|
+
const supportedLanguages = ['es', 'fr', 'de', 'ja', 'ru', 'zh', 'pt', 'it', 'nl', 'pl', 'sv', 'uk', 'cs', 'tr', 'ko', 'ar', 'hi', 'th', 'vi', 'he', 'el', 'hu'];
|
|
538
538
|
|
|
539
539
|
supportedLanguages.forEach(lang => {
|
|
540
540
|
const langFile = path.join(sourceDir, `${lang}.json`);
|
|
@@ -564,7 +564,7 @@ async function initializeSourceFiles(sourceDir, sourceLang) {
|
|
|
564
564
|
sourceDir: sourceDir,
|
|
565
565
|
outputDir: "./i18ntk-reports",
|
|
566
566
|
defaultLanguage: sourceLang,
|
|
567
|
-
supportedLanguages: [sourceLang, 'es', 'fr', 'de', 'ja', 'ru', 'zh', 'pt'],
|
|
567
|
+
supportedLanguages: [sourceLang, 'es', 'fr', 'de', 'ja', 'ru', 'zh', 'pt', 'it', 'nl', 'pl', 'sv', 'uk', 'cs', 'tr', 'ko', 'ar', 'hi', 'th', 'vi', 'he', 'el', 'hu'],
|
|
568
568
|
setup: {
|
|
569
569
|
completed: true,
|
|
570
570
|
completedAt: new Date().toISOString(),
|
package/utils/config-manager.js
CHANGED
|
@@ -106,10 +106,9 @@ const DEFAULT_CONFIG = {
|
|
|
106
106
|
"setupId": null
|
|
107
107
|
},
|
|
108
108
|
"framework": {
|
|
109
|
-
"preference": "auto",
|
|
110
|
-
"fallback": "vanilla",
|
|
111
|
-
"detect": true
|
|
112
|
-
"supported": ["react", "vue", "angular", "svelte", "i18next", "nuxt", "next", "vanilla"]
|
|
109
|
+
"preference": "auto",
|
|
110
|
+
"fallback": "vanilla",
|
|
111
|
+
"detect": true
|
|
113
112
|
},
|
|
114
113
|
"scriptDirectories": {
|
|
115
114
|
"init": null,
|
package/utils/env-manager.js
CHANGED
|
@@ -71,7 +71,7 @@ const ALLOWED_ENV_VARS = {
|
|
|
71
71
|
// UI and interaction
|
|
72
72
|
'I18NTK_UI_LANGUAGE': {
|
|
73
73
|
default: 'en',
|
|
74
|
-
validate: (value) => ['en', 'de', 'es', 'fr', 'ru', 'ja', 'zh'].includes(value.toLowerCase()),
|
|
74
|
+
validate: (value) => ['en', 'de', 'es', 'fr', 'it', 'pt', 'nl', 'pl', 'sv', 'uk', 'cs', 'tr', 'ru', 'ja', 'ko', 'zh', 'ar', 'hi', 'th', 'vi', 'he', 'el', 'hu'].includes(value.toLowerCase()),
|
|
75
75
|
transform: (value) => value.toLowerCase()
|
|
76
76
|
},
|
|
77
77
|
|
|
@@ -23,7 +23,7 @@ const { getGlobalReadline } = require('./cli');
|
|
|
23
23
|
class LocaleOptimizer {
|
|
24
24
|
constructor() {
|
|
25
25
|
this.uiLocalesDir = path.join(__dirname, '..', 'resources', 'i18n', 'ui-locales');
|
|
26
|
-
this.allLocales = ['en', 'de', 'es', 'fr', '
|
|
26
|
+
this.allLocales = ['en', 'de', 'es', 'fr', 'it', 'pt', 'nl', 'pl', 'sv', 'uk', 'cs', 'tr', 'ru', 'ja', 'ko', 'zh', 'ar', 'hi', 'th', 'vi', 'he', 'el', 'hu'];
|
|
27
27
|
this.backupDir = path.join(__dirname, '..', 'backups', 'locales');
|
|
28
28
|
this.rl = getGlobalReadline();
|
|
29
29
|
|