perf: optimize the naming of locale key

This commit is contained in:
vince
2024-07-10 21:55:16 +08:00
parent 25a1e93ab2
commit 4674380266
59 changed files with 664 additions and 1253 deletions

View File

@@ -16,6 +16,7 @@ const localesMap = loadLocalesMap(modules);
/**
* 加载应用特有的语言包
* 这里也可以改造为从服务端获取翻译数据
* @param lang
*/
async function loadMessages(lang: SupportedLanguagesType) {

View File

@@ -4,29 +4,28 @@
"title": "Demos",
"access": {
"title": "Access Control",
"frontend-control": "Front-end Control",
"backend-control": "Backend Control",
"page": "Page visit",
"button": "Button control",
"loading-menu": "In the loading menu",
"access-test-1": "Super visit",
"access-test-2": "Admin visit",
"access-test-3": "User visit"
"frontendControl": "Frontend Control",
"backendControl": "Backend Control",
"pageAccess": "Page Access",
"buttonControl": "Button Control",
"superVisible": "Visible to Super",
"adminVisible": "Visible to Admin",
"userVisible": "Visible to User"
},
"nested": {
"title": "Nested Menu",
"menu1": "Menu 1",
"menu2": "Menu 2",
"menu21": "Menu 2-1",
"menu2_1": "Menu 2-1",
"menu3": "Menu 3",
"menu31": "Menu 3-1",
"menu32": "Menu 3-2",
"menu321": "Menu 3-2-1"
"menu3_1": "Menu 3-1",
"menu3_2": "Menu 3-2",
"menu3_2_1": "Menu 3-2-1"
},
"outside": {
"title": "External Page",
"embedded": "embedded Page",
"external-link": "External Link"
"title": "External Pages",
"embedded": "Embedded",
"externalLink": "External Link"
},
"fallback": { "title": "Fallback Page" }
}

View File

@@ -4,28 +4,28 @@
"title": "演示",
"access": {
"title": "访问控制",
"frontend-control": "前端控制",
"backend-control": "后端控制",
"page": "页面访问",
"button": "按钮控制",
"access-test-1": "Super 可见",
"access-test-2": "Admin 可见",
"access-test-3": "User 可见"
"frontendControl": "前端控制",
"backendControl": "后端控制",
"pageAccess": "页面访问",
"buttonControl": "按钮控制",
"superVisible": "Super 可见",
"adminVisible": "Admin 可见",
"userVisible": "User 可见"
},
"nested": {
"title": "嵌套菜单",
"menu1": "菜单 1",
"menu2": "菜单 2",
"menu21": "菜单 2-1",
"menu2_1": "菜单 2-1",
"menu3": "菜单 3",
"menu31": "菜单 3-1",
"menu32": "菜单 3-2",
"menu321": "菜单 3-2-1"
"menu3_1": "菜单 3-1",
"menu3_2": "菜单 3-2",
"menu3_2_1": "菜单 3-2-1"
},
"outside": {
"title": "外部页面",
"embedded": "内嵌",
"external-link": "外链"
"externalLink": "外链"
},
"fallback": {
"title": "缺省页"