mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 00:09:16 +08:00
feat: Improve and format language files (#7634)
This commit is contained in:
parent
2b18251360
commit
ca0d24bf56
@ -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 ru"`
|
||||
Language string `json:"language" validate:"required,oneof=zh en tw ru ms"`
|
||||
}
|
||||
|
||||
type MFALogin struct {
|
||||
|
@ -100,6 +100,7 @@ func Init() {
|
||||
_, _ = bundle.LoadMessageFileFS(fs, "lang/fa.yaml")
|
||||
_, _ = bundle.LoadMessageFileFS(fs, "lang/pt.yaml")
|
||||
_, _ = bundle.LoadMessageFileFS(fs, "lang/ru.yaml")
|
||||
_, _ = bundle.LoadMessageFileFS(fs, "lang/ms.yaml")
|
||||
}
|
||||
|
||||
func UseI18nForCmd(lang string) {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -121,7 +121,7 @@
|
||||
</el-select>
|
||||
</template>
|
||||
<template #body>
|
||||
<div style="position: relative; margin-top: 20px">
|
||||
<div style="position: relative; margin-top: 60px">
|
||||
<div class="monitor-tags" v-if="chartOption === 'network'">
|
||||
<el-tag>
|
||||
{{ $t('monitor.up') }}: {{ computeSizeFromKBs(currentChartInfo.netBytesSent) }}
|
||||
|
@ -62,6 +62,7 @@
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
<el-dropdown-item command="ru">Русский</el-dropdown-item>
|
||||
<el-dropdown-item command="ms">Bahasa Melayu</el-dropdown-item>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
@ -275,6 +276,8 @@ function handleCommand(command: string) {
|
||||
dropdownText.value = '中文(繁體)';
|
||||
} else if (command === 'ru') {
|
||||
dropdownText.value = 'Русский';
|
||||
} else if (command === 'ms') {
|
||||
dropdownText.value = 'Bahasa Melayu';
|
||||
}
|
||||
nextTick(() => {
|
||||
loginFormRef.value.clearValidate();
|
||||
|
@ -319,6 +319,7 @@ const languageOptions = ref([
|
||||
{ value: 'tw', label: '中文(繁體)' },
|
||||
...(!globalStore.isIntl ? [{ value: 'en', label: 'English' }] : []),
|
||||
{ value: 'ru', label: 'Русский' },
|
||||
{ value: 'ms', label: 'Bahasa Melayu' },
|
||||
]);
|
||||
|
||||
if (globalStore.isIntl) {
|
||||
|
@ -257,7 +257,7 @@ const toFolder = (folder: string) => {
|
||||
router.push({ path: '/hosts/files', query: { path: folder } });
|
||||
};
|
||||
const toDoc = async () => {
|
||||
window.open(docsUrl + '/user_manual/toolbox/clam/', '_blank', 'noopener,noreferrer');
|
||||
window.open(docsUrl.value + '/user_manual/toolbox/clam/', '_blank', 'noopener,noreferrer');
|
||||
};
|
||||
|
||||
const onChange = async (row: any) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user