feat: Improve and format language files (#7645)

pull/7655/head
2025-01-06 13:48:21 +08:00 committed by GitHub
parent 120d0dd7c6
commit 5f0c740eb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 340 additions and 252 deletions

View File

@ -29,7 +29,7 @@ type Login struct {
Captcha string `json:"captcha"`
CaptchaID string `json:"captchaID"`
AuthMethod string `json:"authMethod" validate:"required,oneof=jwt session"`
Language string `json:"language" validate:"required,oneof=zh en tw jp ru ms pt-BR"`
Language string `json:"language" validate:"required,oneof=zh en tw ja ru ms 'pt-BR'"`
}
type MFALogin struct {

View File

@ -105,7 +105,7 @@ func Init() {
_, _ = bundle.LoadMessageFileFS(fs, "lang/pt.yaml")
// (dev: lucasplcorrea) - Add pt-BR.yaml
_, _ = bundle.LoadMessageFileFS(fs, "lang/pt-BR.yaml")
_, _ = bundle.LoadMessageFileFS(fs, "lang/jp.yaml")
_, _ = bundle.LoadMessageFileFS(fs, "lang/ja.yaml")
_, _ = bundle.LoadMessageFileFS(fs, "lang/ru.yaml")
_, _ = bundle.LoadMessageFileFS(fs, "lang/ms.yaml")
}

View File

@ -3,7 +3,7 @@ import zh from './modules/zh';
import tw from './modules/tw';
import en from './modules/en';
import ptBr from './modules/pt-br';
import jp from './modules/jp';
import ja from './modules/ja';
import ru from './modules/ru';
import ms from './modules/ms';
@ -16,8 +16,8 @@ const i18n = createI18n({
zh,
tw,
en,
'pt-br': ptBr,
jp,
'pt-BR': ptBr,
ja,
ru,
ms,
},

View File

@ -1,8 +1,8 @@
import fit2cloudEnLocale from 'fit2cloud-ui-plus/src/locale/lang/en';
let xpackJpLocale = {};
const xpackModules = import.meta.glob('../../xpack/lang/jp.ts', { eager: true });
if (xpackModules['../../xpack/lang/jp.ts']) {
xpackJpLocale = xpackModules['../../xpack/lang/jp.ts']['default'] || {};
const xpackModules = import.meta.glob('../../xpack/lang/ja.ts', { eager: true });
if (xpackModules['../../xpack/lang/ja.ts']) {
xpackJpLocale = xpackModules['../../xpack/lang/ja.ts']['default'] || {};
}
const message = {
@ -106,7 +106,7 @@ const message = {
protocol: '',
tableSetting: '',
refreshRate: '',
refreshRateUnit: '|{n} second/time |{n}/',
refreshRateUnit: '|{n}/ |{n}/',
selectColumn: '',
},
loadingText: {
@ -296,15 +296,15 @@ const message = {
year: '||',
time: 'RPM',
core: '||',
millisecond: 'Millisecond |',
millisecond: ' |',
secondUnit: 's',
minuteUnit: '分',
minuteUnit: 'min',
hourUnit: 'h',
dayUnit: 'd',
weekUnit: 'w',
monthUnit: 'm',
yearUnit: 'y',
millisecondUnit: 'MS',
millisecondUnit: 'ms',
},
operate: {
down: '',
@ -317,7 +317,7 @@ const message = {
},
menu: {
home: '',
apps: 'appStore',
apps: '',
website: '|',
project: '|',
config: '|',
@ -335,7 +335,7 @@ const message = {
terminal: '|',
settings: '|',
toolbox: '',
logs: 'log |',
logs: ' |',
runtime: '|',
processManage: '|',
process: '|',
@ -436,7 +436,7 @@ const message = {
confChange: '',
confNotFound:
'App Store',
'',
portHelper:
'',
@ -590,8 +590,8 @@ const message = {
container: {
create: '',
edit: '',
updateHelper1: 'App Store2',
updateHelper2: '1.App Store',
updateHelper1: '2',
updateHelper2: '1.',
updateHelper3:
'2.',
updateHelper4: '',
@ -611,7 +611,7 @@ const message = {
containerPrune: '',
containerPruneHelper1: '',
containerPruneHelper2:
'App StoreApp Store->[]',
' -> ',
containerPruneHelper3: '',
imagePrune: '',
imagePruneSome: '',
@ -658,7 +658,7 @@ const message = {
inputIpv6: '20010DB885A3000000008A2E03707334',
containerFromAppHelper:
'App Store',
'',
containerFromAppHelper1:
'[PARAM]',
command: '',
@ -678,7 +678,8 @@ const message = {
oldImage: '',
targetImage: '',
imageLoadErr: '',
appHelper: 'App Store',
appHelper:
'',
input: '',
forcePull: '',
forcePullHelper: '',
@ -846,7 +847,7 @@ const message = {
'Docker',
sockPathErr: 'Docker',
related: '',
includeAppstore: 'App Store',
includeAppstore: '',
cleanDockerDiskZone: 'Docker使',
cleanImagesHelper: '使',
@ -1250,7 +1251,7 @@ const message = {
currentSelect: '',
unsupportedType: '',
deleteHelper: '',
fileHeper: `note:\n1SearchResultsCan'tはソートされます。\N2。フォルダーはできます'tBeSortedBySize`,
fileHeper: `note:\n1.SearchResultsCan'tはソートされます。\n2.フォルダーはできます'tBeSortedBySize`,
forceDeleteHelper: '',
recycleBin: '',
sourcePath: '',
@ -1386,9 +1387,11 @@ const message = {
systemIP: '',
proxy: '',
proxyHelper: '',
proxyHelper1: 'App StoreProfessional Edition',
proxyHelper1:
'',
proxyHelper2: '',
proxyHelper4: 'DockerProfessional Edition',
proxyHelper4:
'Docker',
proxyHelper3: '',
proxyType: '',
proxyUrl: '',
@ -1801,7 +1804,7 @@ const message = {
stopOperatorHelper: '',
restartOperatorHelper: '',
reloadOperatorHelper: '',
checkInstalledWarn: `{0}」は検出されません。「App Store」に移動してインストールします`,
checkInstalledWarn: `{0}」が検出されませんでした。「アプリストア」に移動してインストールしてください`,
gotoInstalled: '',
search: '',
limitHelper: '',
@ -2133,7 +2136,7 @@ const message = {
tencentCloud: '',
containWarn: '',
rewriteHelper2:
'App StoreWordPress',
'WordPress',
websiteBackupWarn:
'',
ipWebsiteWarn:
@ -2284,7 +2287,7 @@ const message = {
cookieBlockList: '',
firewall: '',
dockerHelper: `Linuxファイアウォール "{0}" Dockerポートマッピングは無効にできません。アプリケーションは、「App Store->インストールされた」ページのパラメーターを編集して、ポートがリリースされるかどうかを制御できます。`,
dockerHelper: `Linuxファイアウォール{0}」ではDockerポートマッピングを無効にできません。アプリケーションは「アプリストア -> インストール済み」ページでパラメータを編集することにより、ポートの解放を制御できます。`,
quickJump: '',
used: '使',
unUsed: '使',

File diff suppressed because it is too large Load Diff

View File

@ -61,7 +61,7 @@
English
</el-dropdown-item>
<el-dropdown-item command="pt-BR">Portugês (Brasil)</el-dropdown-item>
<el-dropdown-item command="jp">日本語</el-dropdown-item>
<el-dropdown-item command="ja">日本語</el-dropdown-item>
<el-dropdown-item command="ru">Русский</el-dropdown-item>
<el-dropdown-item command="ms">Bahasa Melayu</el-dropdown-item>
</el-dropdown-menu>
@ -276,9 +276,9 @@ function handleCommand(command: string) {
dropdownText.value = 'English';
} else if (command === 'pt-BR') {
dropdownText.value = 'Português (Brasil)';
}else if (command === 'tw') {
} else if (command === 'tw') {
dropdownText.value = '中文(繁體)';
} else if (command === 'jp') {
} else if (command === 'ja') {
dropdownText.value = '日本語';
} else if (command === 'ru') {
dropdownText.value = 'Русский';