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"` Captcha string `json:"captcha"`
CaptchaID string `json:"captchaID"` CaptchaID string `json:"captchaID"`
AuthMethod string `json:"authMethod" validate:"required,oneof=jwt session"` 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 { type MFALogin struct {

View File

@ -105,7 +105,7 @@ func Init() {
_, _ = bundle.LoadMessageFileFS(fs, "lang/pt.yaml") _, _ = bundle.LoadMessageFileFS(fs, "lang/pt.yaml")
// (dev: lucasplcorrea) - Add pt-BR.yaml // (dev: lucasplcorrea) - Add pt-BR.yaml
_, _ = bundle.LoadMessageFileFS(fs, "lang/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/ru.yaml")
_, _ = bundle.LoadMessageFileFS(fs, "lang/ms.yaml") _, _ = bundle.LoadMessageFileFS(fs, "lang/ms.yaml")
} }

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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