@liujitcn/kratos-uni-app-core 0.0.20 → 0.0.23
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/README.md +1 -1
- package/dist/module.mjs +780 -4
- package/dist/vite.mjs +5 -3
- package/package.json +1 -1
- package/src/api/base/language.ts +25 -0
- package/src/bootstrap.ts +21 -0
- package/src/components/BootstrapStatus.vue +4 -1
- package/src/index.ts +1 -0
- package/src/locales/README.md +15 -0
- package/src/locales/en-US.json +107 -0
- package/src/locales/es-ES.json +107 -0
- package/src/locales/fr-FR.json +107 -0
- package/src/locales/generated.ts +22 -0
- package/src/locales/index.ts +216 -0
- package/src/locales/ja-JP.json +107 -0
- package/src/locales/ko-KR.json +107 -0
- package/src/locales/zh-CN.json +107 -0
- package/src/locales/zh-TW.json +107 -0
- package/src/module.ts +7 -0
- package/src/navigation.ts +58 -27
- package/src/pages.ts +3 -3
- package/src/rpc/base/v1/config.ts +14 -1
- package/src/rpc/base/v1/language.ts +31 -0
- package/src/rpc/base/v1/login.ts +14 -1
- package/src/stores/index.ts +1 -0
- package/src/stores/modules/locale.ts +28 -0
- package/src/stores/modules/setting.ts +11 -6
- package/src/utils/file.ts +19 -26
- package/src/utils/http.ts +12 -6
- package/src/utils/passwordCrypto.ts +17 -16
- package/src/views/pages/index/index.vue +16 -14
- package/src/views/pages/login/login.vue +125 -57
- package/src/views/pages/login/protocal.vue +5 -3
- package/src/views/pages/status/index.vue +16 -18
- package/src/views/pages/webview/webview.vue +6 -4
- package/src/vite.ts +4 -3
- package/src/rpc/base/v1/enum.ts +0 -54
- package/src/rpc/system/common/v1/enum.ts +0 -80
package/dist/vite.mjs
CHANGED
|
@@ -487,6 +487,8 @@ function scanViews(root) {
|
|
|
487
487
|
function appendPage(manifest, page) {
|
|
488
488
|
const [first, ...rest] = page.route.split("/");
|
|
489
489
|
if (!first.startsWith("pages") || first === "pages") {
|
|
490
|
+
if (manifest.pages.some((item) => normalizeRoute(item.path) === page.route))
|
|
491
|
+
return;
|
|
490
492
|
manifest.pages.push({ path: page.route, style: page.style });
|
|
491
493
|
return;
|
|
492
494
|
}
|
|
@@ -496,21 +498,21 @@ function appendPage(manifest, page) {
|
|
|
496
498
|
subPackage = { root: first, pages: [] };
|
|
497
499
|
manifest.subPackages.push(subPackage);
|
|
498
500
|
}
|
|
501
|
+
if (subPackage.pages.some((item) => normalizeRoute(`${first}/${item.path}`) === page.route))
|
|
502
|
+
return;
|
|
499
503
|
subPackage.pages.push({ path: rest.join("/"), style: page.style });
|
|
500
504
|
}
|
|
501
505
|
function createPageWrapper(page) {
|
|
502
506
|
const source = page.source.replace(/\\/g, "/");
|
|
503
507
|
return `<script setup lang="ts">
|
|
504
|
-
import type { Component } from 'vue'
|
|
505
508
|
import KratosPage from ${JSON.stringify(source)}
|
|
506
509
|
import KratosTabBar from '@liujitcn/kratos-uni-app-core/components/KratosTabBar.vue'
|
|
507
510
|
|
|
508
511
|
defineOptions({ inheritAttrs: false })
|
|
509
|
-
const Page = KratosPage as Component
|
|
510
512
|
</script>
|
|
511
513
|
|
|
512
514
|
<template>
|
|
513
|
-
<
|
|
515
|
+
<KratosPage v-bind="$attrs" />
|
|
514
516
|
<KratosTabBar route=${JSON.stringify(page.route)} />
|
|
515
517
|
</template>
|
|
516
518
|
`;
|
package/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { http } from '../../utils/http'
|
|
2
|
+
import type {
|
|
3
|
+
OptionLanguageRequest,
|
|
4
|
+
OptionLanguageResponse,
|
|
5
|
+
LanguageService,
|
|
6
|
+
} from '../../rpc/base/v1/language'
|
|
7
|
+
|
|
8
|
+
const LANGUAGE_URL = '/v1/base/language'
|
|
9
|
+
|
|
10
|
+
/** 语言公共服务。 */
|
|
11
|
+
export class LanguageServiceImpl implements LanguageService {
|
|
12
|
+
/** 查询当前支持的语言选项。 */
|
|
13
|
+
OptionLanguage(request: OptionLanguageRequest): Promise<OptionLanguageResponse> {
|
|
14
|
+
return http<OptionLanguageResponse>({
|
|
15
|
+
url: LANGUAGE_URL,
|
|
16
|
+
method: 'GET',
|
|
17
|
+
authMode: 'none',
|
|
18
|
+
data: request,
|
|
19
|
+
header: { Authorization: 'no-auth' },
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** 主语言公共服务。 */
|
|
25
|
+
export const defLanguageService = new LanguageServiceImpl()
|
package/src/bootstrap.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { Pinia } from 'pinia'
|
|
2
2
|
import type { App, Component } from 'vue'
|
|
3
3
|
import { registerKratosAppModules, type KratosAppModule } from './module'
|
|
4
|
+
import {
|
|
5
|
+
applyLanguageConfig,
|
|
6
|
+
initializeLocale,
|
|
7
|
+
registerLocaleChangeHandler,
|
|
8
|
+
registerLocaleMessages,
|
|
9
|
+
} from './locales'
|
|
10
|
+
import { initializeAppNavigation } from './navigation'
|
|
11
|
+
import { useSettingStore } from './stores'
|
|
12
|
+
import { defLanguageService } from './api/base/language'
|
|
4
13
|
|
|
5
14
|
/** uni-app 启动参数。 */
|
|
6
15
|
export interface KratosAppBootstrapOptions {
|
|
@@ -17,6 +26,18 @@ export interface KratosAppBootstrapOptions {
|
|
|
17
26
|
/** 创建 uni-app 实例并注册模块。 */
|
|
18
27
|
export function bootstrapKratosApp(options: KratosAppBootstrapOptions) {
|
|
19
28
|
registerKratosAppModules(options.modules)
|
|
29
|
+
registerLocaleMessages(options.modules)
|
|
30
|
+
initializeLocale()
|
|
31
|
+
void defLanguageService
|
|
32
|
+
.OptionLanguage({})
|
|
33
|
+
.then((response) => {
|
|
34
|
+
applyLanguageConfig(response)
|
|
35
|
+
})
|
|
36
|
+
.catch(() => {
|
|
37
|
+
// 语言公共接口失败时继续使用静态语言包和系统语言。
|
|
38
|
+
})
|
|
39
|
+
registerLocaleChangeHandler(initializeAppNavigation)
|
|
40
|
+
registerLocaleChangeHandler(() => useSettingStore(options.pinia).loadData())
|
|
20
41
|
const app = options.createSSRApp(options.app)
|
|
21
42
|
app.use(options.pinia)
|
|
22
43
|
return { app }
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { useI18n } from '../locales'
|
|
3
|
+
|
|
2
4
|
defineProps<{ title?: string; detail?: string }>()
|
|
5
|
+
const { t } = useI18n()
|
|
3
6
|
</script>
|
|
4
7
|
|
|
5
8
|
<template>
|
|
6
9
|
<view class="bootstrap-status">
|
|
7
10
|
<image class="bootstrap-status__logo" src="../static/images/logo_icon.png" mode="aspectFit" />
|
|
8
|
-
<text class="bootstrap-status__title">{{ title || '
|
|
11
|
+
<text class="bootstrap-status__title">{{ title || t('core.status.loading') }}</text>
|
|
9
12
|
<text v-if="detail" class="bootstrap-status__detail">{{ detail }}</text>
|
|
10
13
|
</view>
|
|
11
14
|
</template>
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# uni-app Core 语言包
|
|
2
|
+
|
|
3
|
+
本目录提供 uni-app 底座和公共页面使用的稳定文案,包括登录、启动状态、导航、认证、文件处理和网络错误提示。语言包由 `../module.ts` 的 `coreModule` 导入并注册,应用启动时由 `bootstrapKratosApp` 调用 `registerLocaleMessages` 合并;页面、hooks、请求工具通过 `useI18n()` 或 `t()` 使用。
|
|
4
|
+
|
|
5
|
+
| 文件 | 用途 | 使用位置 |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| `zh-CN.json` | 简体中文固定 UI 默认语言包,也是所有语言键集合和占位符校验基准。 | uni-app 固定文案默认语言及缺失翻译回退。 |
|
|
8
|
+
| `zh-TW.json` | 繁体中文 Core 语言包。 | uni-app 切换为繁体中文时使用。 |
|
|
9
|
+
| `en-US.json` | 英文 Core 语言包。 | uni-app 切换为英文时使用。 |
|
|
10
|
+
| `ja-JP.json` | 日文 Core 语言包。 | uni-app 切换为日文时使用。 |
|
|
11
|
+
| `ko-KR.json` | 韩语 Core 语言包。 | uni-app 切换为韩语时使用。 |
|
|
12
|
+
| `fr-FR.json` | 法语 Core 语言包。 | uni-app 切换为法语时使用。 |
|
|
13
|
+
| `es-ES.json` | 西班牙语 Core 语言包。 | uni-app 切换为西班牙语时使用。 |
|
|
14
|
+
|
|
15
|
+
语言包是标准 JSON,不能在文件内直接写注释;公共键使用 `common.` 或 `core.` 命名空间。新增语言后执行仓库根目录的 `make i18n-sync`。语言切换选项固定显示后端 `base_language.native_name`,接口不可用时使用代码内置的原生名称;`common.language.*` 仅用于普通文案和语言迁移初始数据。新增语言的完整文件清单见[国际化语言扩展指南](../../../../../../docs/国际化语言扩展指南.md)。
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"common.action.cancel": "Cancel",
|
|
3
|
+
"common.action.confirm": "Confirm",
|
|
4
|
+
"common.action.delete": "Delete",
|
|
5
|
+
"common.action.login": "Log in",
|
|
6
|
+
"common.action.logout": "Log out",
|
|
7
|
+
"common.action.new": "New",
|
|
8
|
+
"common.action.open_in_new_window": "Open in new window",
|
|
9
|
+
"common.action.save": "Save",
|
|
10
|
+
"common.field.language": "Language",
|
|
11
|
+
"common.language.en-US": "English",
|
|
12
|
+
"common.language.ja-JP": "日本語",
|
|
13
|
+
"common.language.zh-CN": "简体中文",
|
|
14
|
+
"common.language.zh-TW": "Traditional Chinese",
|
|
15
|
+
"common.language.ko-KR": "Korean",
|
|
16
|
+
"common.language.fr-FR": "French",
|
|
17
|
+
"common.language.es-ES": "Spanish",
|
|
18
|
+
"common.message.loading": "Loading",
|
|
19
|
+
"common.message.network_error": "Network error. Check your connection and try again.",
|
|
20
|
+
"common.message.request_error": "Request failed",
|
|
21
|
+
"common.message.unknown": "Unable to process this request. Try again later.",
|
|
22
|
+
"common.title.notice": "Notice",
|
|
23
|
+
"core.auth.login_again": "Log in again",
|
|
24
|
+
"core.auth.session_expired": "Your session has expired. Please log in again.",
|
|
25
|
+
"core.config.missing": "Missing app configuration: {names}",
|
|
26
|
+
"core.crypto.base64_decode_unsupported": "Base64 decoding is not supported in this environment",
|
|
27
|
+
"core.crypto.base64_encode_unsupported": "Base64 encoding is not supported in this environment",
|
|
28
|
+
"core.crypto.encrypt_failed": "Password encryption failed",
|
|
29
|
+
"core.crypto.password_required": "Password is required",
|
|
30
|
+
"core.crypto.password_too_long": "Password exceeds the supported length",
|
|
31
|
+
"core.crypto.public_key_invalid": "Invalid public key",
|
|
32
|
+
"core.crypto.random_failed": "Failed to generate random data",
|
|
33
|
+
"core.crypto.unsupported": "Password encryption is not supported in this environment",
|
|
34
|
+
"core.file.upload_failed": "Upload failed",
|
|
35
|
+
"core.home.account_capability": "Account features",
|
|
36
|
+
"core.home.account_capability_description": "Profile, app settings, and AI assistant access are included",
|
|
37
|
+
"core.home.cross_platform": "Cross-platform pages",
|
|
38
|
+
"core.home.cross_platform_description": "One codebase for H5 and WeChat Mini Program",
|
|
39
|
+
"core.home.demo_scope": "Demo scope",
|
|
40
|
+
"core.home.framework": "App framework",
|
|
41
|
+
"core.home.language": "Language",
|
|
42
|
+
"core.home.main_title": "Application Framework",
|
|
43
|
+
"core.home.state_management": "State management",
|
|
44
|
+
"core.home.static_home": "Static home",
|
|
45
|
+
"core.home.static_home_description": "This page presents framework details without business APIs",
|
|
46
|
+
"core.home.style_solution": "Styling",
|
|
47
|
+
"core.home.sub_title": "Shared navigation and account experience",
|
|
48
|
+
"core.home.tech_stack": "Technology stack",
|
|
49
|
+
"core.login.agree_prefix": "I have read and agree to the",
|
|
50
|
+
"core.login.agree_separator": "and",
|
|
51
|
+
"core.login.behavior_click": "Click the characters in order",
|
|
52
|
+
"core.login.behavior_loading": "Loading...",
|
|
53
|
+
"core.login.behavior_puzzle": "Drag the slider to complete the puzzle",
|
|
54
|
+
"core.login.behavior_rotate": "Drag the slider to rotate the inner image upright",
|
|
55
|
+
"core.login.bind_wechat": "Log in and link WeChat",
|
|
56
|
+
"core.login.captcha": "Enter verification code",
|
|
57
|
+
"core.login.captcha_load_failed": "Failed to load verification code",
|
|
58
|
+
"core.login.captcha_type_missing": "Verification method is not configured",
|
|
59
|
+
"core.login.captcha_type_name": "Login verification method",
|
|
60
|
+
"core.login.captcha_type_response_missing": "Verification response did not include a type",
|
|
61
|
+
"core.login.captcha_write_failed": "Failed to save verification image",
|
|
62
|
+
"core.login.default_sub_title": "Welcome",
|
|
63
|
+
"core.login.login_success": "Logged in",
|
|
64
|
+
"core.login.password": "Enter password",
|
|
65
|
+
"core.login.privacy": "Privacy Policy",
|
|
66
|
+
"core.login.protocol_missing": "Terms of Service and Privacy Policy are not configured",
|
|
67
|
+
"core.login.protocol_prompt": "Read and accept the agreements first. Confirm to accept and continue.",
|
|
68
|
+
"core.login.service": "Terms of Service",
|
|
69
|
+
"core.login.tenant": "Enter tenant code",
|
|
70
|
+
"core.login.user_name": "Enter username or mobile number",
|
|
71
|
+
"core.login.user_name_mobile": "Enter username or mobile number",
|
|
72
|
+
"core.login.user_name_password": "Enter username and password",
|
|
73
|
+
"core.login.wechat": "Continue with WeChat",
|
|
74
|
+
"core.login.wechat_bind_tip": "This WeChat account is not linked. Log in to an existing account to link it.",
|
|
75
|
+
"core.login.wechat_failed": "WeChat login failed. Try again later.",
|
|
76
|
+
"core.navigation.home": "Home",
|
|
77
|
+
"core.navigation.error.access": "Invalid menu access mode: {access}",
|
|
78
|
+
"core.navigation.error.child_tab": "Only second-level app menus can be tabs: {name}",
|
|
79
|
+
"core.navigation.error.cycle": "Menu parent cycle detected: {name}",
|
|
80
|
+
"core.navigation.error.identity": "Menu id, name, or app/ path is invalid",
|
|
81
|
+
"core.navigation.error.item_object": "Menu item is not an object",
|
|
82
|
+
"core.navigation.error.list_missing": "Menu response does not contain a flat list",
|
|
83
|
+
"core.navigation.error.name_prefix": "Menu name must start with App: {name}",
|
|
84
|
+
"core.navigation.error.parent_invalid": "Menu parent id is invalid: {name}",
|
|
85
|
+
"core.navigation.error.parent_missing": "Menu parent id is missing: {name}",
|
|
86
|
+
"core.navigation.error.parent_not_found": "Menu parent was not found: {name}",
|
|
87
|
+
"core.navigation.error.response_object": "Menu response is not an object",
|
|
88
|
+
"core.navigation.error.root_tab": "Second-level app menu must be a tab: {name}",
|
|
89
|
+
"core.navigation.error.tab_count": "tabBar must contain 0 or 2-5 items",
|
|
90
|
+
"core.navigation.error.unique": "Menu id, name, and path must be unique",
|
|
91
|
+
"core.navigation.error.view_key": "Unregistered viewKey: {viewKey}",
|
|
92
|
+
"core.navigation.my": "My Account",
|
|
93
|
+
"core.navigation.protocol": "Agreement",
|
|
94
|
+
"core.protocol.load_failed": "Failed to load app configuration",
|
|
95
|
+
"core.protocol.not_configured": "{title} is not configured and cannot be viewed",
|
|
96
|
+
"core.protocol.privacy": "Privacy Policy",
|
|
97
|
+
"core.protocol.service": "Terms of Service",
|
|
98
|
+
"core.status.CONFIG_ERROR": "Invalid navigation configuration",
|
|
99
|
+
"core.status.forbidden": "Access denied",
|
|
100
|
+
"core.status.NOT_FOUND": "Page not found",
|
|
101
|
+
"core.status.offline": "Network unavailable",
|
|
102
|
+
"core.status.page_unavailable": "Page temporarily unavailable",
|
|
103
|
+
"core.status.loading": "Loading",
|
|
104
|
+
"core.webview.embed_blocked": "The destination may block embedding on H5",
|
|
105
|
+
"core.webview.invalid_url": "No valid link was provided",
|
|
106
|
+
"core.webview.open_failed": "Unable to open link"
|
|
107
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"common.action.cancel": "Cancelar",
|
|
3
|
+
"common.action.confirm": "Confirmar",
|
|
4
|
+
"common.action.delete": "Eliminar",
|
|
5
|
+
"common.action.login": "Iniciar sesión",
|
|
6
|
+
"common.action.logout": "Cerrar sesión",
|
|
7
|
+
"common.action.new": "Nuevo",
|
|
8
|
+
"common.action.open_in_new_window": "Abrir en una ventana nueva",
|
|
9
|
+
"common.action.save": "Guardar",
|
|
10
|
+
"common.field.language": "Idioma",
|
|
11
|
+
"common.language.en-US": "Inglés",
|
|
12
|
+
"common.language.ja-JP": "Japonés",
|
|
13
|
+
"common.language.zh-CN": "Chino simplificado",
|
|
14
|
+
"common.language.zh-TW": "Chino tradicional",
|
|
15
|
+
"common.language.ko-KR": "Coreano",
|
|
16
|
+
"common.language.fr-FR": "Francés",
|
|
17
|
+
"common.language.es-ES": "Español",
|
|
18
|
+
"common.message.loading": "Cargando",
|
|
19
|
+
"common.message.network_error": "Error de red. Comprueba tu conexión e inténtalo de nuevo.",
|
|
20
|
+
"common.message.request_error": "Error de solicitud",
|
|
21
|
+
"common.message.unknown": "No se puede procesar esta solicitud. Inténtalo de nuevo más tarde.",
|
|
22
|
+
"common.title.notice": "Aviso",
|
|
23
|
+
"core.auth.login_again": "Vuelve a iniciar sesión",
|
|
24
|
+
"core.auth.session_expired": "Tu sesión ha caducado. Vuelve a iniciar sesión.",
|
|
25
|
+
"core.config.missing": "Falta la configuración de la aplicación: {names}",
|
|
26
|
+
"core.crypto.base64_decode_unsupported": "La decodificación Base64 no está disponible en este entorno",
|
|
27
|
+
"core.crypto.base64_encode_unsupported": "La codificación Base64 no está disponible en este entorno",
|
|
28
|
+
"core.crypto.encrypt_failed": "Error al cifrar la contraseña",
|
|
29
|
+
"core.crypto.password_required": "La contraseña es obligatoria",
|
|
30
|
+
"core.crypto.password_too_long": "La contraseña supera la longitud permitida",
|
|
31
|
+
"core.crypto.public_key_invalid": "Clave pública no válida",
|
|
32
|
+
"core.crypto.random_failed": "Error al generar datos aleatorios",
|
|
33
|
+
"core.crypto.unsupported": "El cifrado de contraseñas no está disponible en este entorno",
|
|
34
|
+
"core.file.upload_failed": "Error de carga",
|
|
35
|
+
"core.home.account_capability": "Funciones de la cuenta",
|
|
36
|
+
"core.home.account_capability_description": "Incluye el perfil, la configuración de la aplicación y el acceso al asistente de IA",
|
|
37
|
+
"core.home.cross_platform": "Páginas multiplataforma",
|
|
38
|
+
"core.home.cross_platform_description": "Una sola base de código para H5 y el miniprograma de WeChat",
|
|
39
|
+
"core.home.demo_scope": "Alcance de la demostración",
|
|
40
|
+
"core.home.framework": "Marco de la aplicación",
|
|
41
|
+
"core.home.language": "idioma",
|
|
42
|
+
"core.home.main_title": "Ejemplo de marco de aplicación",
|
|
43
|
+
"core.home.state_management": "Gestión del estado",
|
|
44
|
+
"core.home.static_home": "Página de inicio estática",
|
|
45
|
+
"core.home.static_home_description": "Esta página presenta información del marco sin usar APIs de negocio",
|
|
46
|
+
"core.home.style_solution": "Estilos",
|
|
47
|
+
"core.home.sub_title": "Navegación compartida y experiencia de cuenta",
|
|
48
|
+
"core.home.tech_stack": "Pila tecnológica",
|
|
49
|
+
"core.login.agree_prefix": "He leído y acepto",
|
|
50
|
+
"core.login.agree_separator": "y",
|
|
51
|
+
"core.login.behavior_click": "Haz clic en los caracteres en orden",
|
|
52
|
+
"core.login.behavior_loading": "Cargando...",
|
|
53
|
+
"core.login.behavior_puzzle": "Arrastra el control deslizante para completar el rompecabezas",
|
|
54
|
+
"core.login.behavior_rotate": "Arrastra el control deslizante para orientar correctamente la imagen interior",
|
|
55
|
+
"core.login.bind_wechat": "Iniciar sesión y vincular WeChat",
|
|
56
|
+
"core.login.captcha": "Introduce el código de verificación",
|
|
57
|
+
"core.login.captcha_load_failed": "Error al cargar el código de verificación",
|
|
58
|
+
"core.login.captcha_type_missing": "El método de verificación no está configurado",
|
|
59
|
+
"core.login.captcha_type_name": "Método de verificación de inicio de sesión",
|
|
60
|
+
"core.login.captcha_type_response_missing": "La respuesta de verificación no incluye un tipo",
|
|
61
|
+
"core.login.captcha_write_failed": "Error al guardar la imagen de verificación",
|
|
62
|
+
"core.login.default_sub_title": "Bienvenido",
|
|
63
|
+
"core.login.login_success": "Sesión iniciada",
|
|
64
|
+
"core.login.password": "Introduce la contraseña",
|
|
65
|
+
"core.login.privacy": "Política de privacidad",
|
|
66
|
+
"core.login.protocol_missing": "Los términos del servicio y la política de privacidad no están configurados",
|
|
67
|
+
"core.login.protocol_prompt": "Lee y acepta primero los acuerdos. Confirma para aceptar y continuar.",
|
|
68
|
+
"core.login.service": "Términos del servicio",
|
|
69
|
+
"core.login.tenant": "Introduce el código del inquilino",
|
|
70
|
+
"core.login.user_name": "Introduce el nombre de usuario",
|
|
71
|
+
"core.login.user_name_mobile": "Introduce el nombre de usuario o el número de móvil",
|
|
72
|
+
"core.login.user_name_password": "Introduce el nombre de usuario y la contraseña",
|
|
73
|
+
"core.login.wechat": "Continuar con WeChat",
|
|
74
|
+
"core.login.wechat_bind_tip": "Esta cuenta de WeChat no está vinculada. Inicia sesión con una cuenta existente para vincularla.",
|
|
75
|
+
"core.login.wechat_failed": "Error de inicio de sesión de WeChat. Inténtalo de nuevo más tarde.",
|
|
76
|
+
"core.navigation.home": "Inicio",
|
|
77
|
+
"core.navigation.error.access": "Modo de acceso al menú no válido: {access}",
|
|
78
|
+
"core.navigation.error.child_tab": "Solo los menús de aplicación de segundo nivel pueden ser pestañas: {name}",
|
|
79
|
+
"core.navigation.error.cycle": "Se detectó un ciclo en los menús superiores: {name}",
|
|
80
|
+
"core.navigation.error.identity": "El id, nombre o ruta app/ del menú no es válido",
|
|
81
|
+
"core.navigation.error.item_object": "El elemento del menú no es un objeto",
|
|
82
|
+
"core.navigation.error.list_missing": "La respuesta del menú no contiene una lista plana",
|
|
83
|
+
"core.navigation.error.name_prefix": "El nombre del menú debe comenzar por App: {name}",
|
|
84
|
+
"core.navigation.error.parent_invalid": "El id del menú superior no es válido: {name}",
|
|
85
|
+
"core.navigation.error.parent_missing": "Falta el ID del menú superior: {name}",
|
|
86
|
+
"core.navigation.error.parent_not_found": "No se encontró el menú superior: {name}",
|
|
87
|
+
"core.navigation.error.response_object": "La respuesta del menú no es un objeto",
|
|
88
|
+
"core.navigation.error.root_tab": "El menú de aplicación de segundo nivel debe ser una pestaña: {name}",
|
|
89
|
+
"core.navigation.error.tab_count": "tabBar debe contener 0 o entre 2 y 5 elementos",
|
|
90
|
+
"core.navigation.error.unique": "El id, nombre y ruta del menú deben ser únicos",
|
|
91
|
+
"core.navigation.error.view_key": "viewKey no registrado: {viewKey}",
|
|
92
|
+
"core.navigation.my": "Mi cuenta",
|
|
93
|
+
"core.navigation.protocol": "Acuerdo",
|
|
94
|
+
"core.protocol.load_failed": "Error al cargar la configuración de la aplicación",
|
|
95
|
+
"core.protocol.not_configured": "{title} no está configurado y no se puede ver",
|
|
96
|
+
"core.protocol.privacy": "Política de privacidad",
|
|
97
|
+
"core.protocol.service": "Términos del servicio",
|
|
98
|
+
"core.status.CONFIG_ERROR": "Configuración de navegación no válida",
|
|
99
|
+
"core.status.forbidden": "Acceso denegado",
|
|
100
|
+
"core.status.NOT_FOUND": "Página no encontrada",
|
|
101
|
+
"core.status.offline": "Red no disponible",
|
|
102
|
+
"core.status.page_unavailable": "Página temporalmente no disponible",
|
|
103
|
+
"core.status.loading": "Cargando",
|
|
104
|
+
"core.webview.embed_blocked": "El destino puede impedir la incrustación en H5",
|
|
105
|
+
"core.webview.invalid_url": "No se ha proporcionado un enlace válido",
|
|
106
|
+
"core.webview.open_failed": "No se pudo abrir el enlace"
|
|
107
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"common.action.cancel": "Annuler",
|
|
3
|
+
"common.action.confirm": "Confirmer",
|
|
4
|
+
"common.action.delete": "Supprimer",
|
|
5
|
+
"common.action.login": "Se connecter",
|
|
6
|
+
"common.action.logout": "Se déconnecter",
|
|
7
|
+
"common.action.new": "Nouveau",
|
|
8
|
+
"common.action.open_in_new_window": "Ouvrir dans une nouvelle fenêtre",
|
|
9
|
+
"common.action.save": "Enregistrer",
|
|
10
|
+
"common.field.language": "Langue",
|
|
11
|
+
"common.language.en-US": "Anglais",
|
|
12
|
+
"common.language.ja-JP": "Japonais",
|
|
13
|
+
"common.language.zh-CN": "Chinois simplifié",
|
|
14
|
+
"common.language.zh-TW": "Chinois traditionnel",
|
|
15
|
+
"common.language.ko-KR": "Coréen",
|
|
16
|
+
"common.language.fr-FR": "Français",
|
|
17
|
+
"common.language.es-ES": "Espagnol",
|
|
18
|
+
"common.message.loading": "Chargement",
|
|
19
|
+
"common.message.network_error": "Erreur réseau. Vérifiez votre connexion et réessayez.",
|
|
20
|
+
"common.message.request_error": "Échec de la requête",
|
|
21
|
+
"common.message.unknown": "Impossible de traiter cette demande. Réessayez plus tard.",
|
|
22
|
+
"common.title.notice": "Avis",
|
|
23
|
+
"core.auth.login_again": "Se reconnecter",
|
|
24
|
+
"core.auth.session_expired": "Votre session a expiré. Veuillez vous reconnecter.",
|
|
25
|
+
"core.config.missing": "Configuration de l’application manquante : {names}",
|
|
26
|
+
"core.crypto.base64_decode_unsupported": "Le décodage Base64 n’est pas pris en charge dans cet environnement",
|
|
27
|
+
"core.crypto.base64_encode_unsupported": "L’encodage Base64 n’est pas pris en charge dans cet environnement",
|
|
28
|
+
"core.crypto.encrypt_failed": "Échec du chiffrement du mot de passe",
|
|
29
|
+
"core.crypto.password_required": "Le mot de passe est obligatoire",
|
|
30
|
+
"core.crypto.password_too_long": "Le mot de passe dépasse la longueur autorisée",
|
|
31
|
+
"core.crypto.public_key_invalid": "Clé publique non valide",
|
|
32
|
+
"core.crypto.random_failed": "Échec de la génération de données aléatoires",
|
|
33
|
+
"core.crypto.unsupported": "Le chiffrement du mot de passe n’est pas pris en charge dans cet environnement",
|
|
34
|
+
"core.file.upload_failed": "Échec de l’envoi",
|
|
35
|
+
"core.home.account_capability": "Fonctionnalités du compte",
|
|
36
|
+
"core.home.account_capability_description": "Le profil, les paramètres de l’application et l’accès à l’assistant IA sont inclus",
|
|
37
|
+
"core.home.cross_platform": "Pages multiplateformes",
|
|
38
|
+
"core.home.cross_platform_description": "Une seule base de code pour H5 et le mini-programme WeChat",
|
|
39
|
+
"core.home.demo_scope": "Périmètre de démonstration",
|
|
40
|
+
"core.home.framework": "Framework de l’application",
|
|
41
|
+
"core.home.language": "Langage",
|
|
42
|
+
"core.home.main_title": "Exemple de framework d’application",
|
|
43
|
+
"core.home.state_management": "Gestion de l’état",
|
|
44
|
+
"core.home.static_home": "Accueil statique",
|
|
45
|
+
"core.home.static_home_description": "Cette page présente le framework sans utiliser d’API métier",
|
|
46
|
+
"core.home.style_solution": "Styles",
|
|
47
|
+
"core.home.sub_title": "Navigation partagée et expérience de compte",
|
|
48
|
+
"core.home.tech_stack": "Stack technique",
|
|
49
|
+
"core.login.agree_prefix": "J’ai lu et j’accepte",
|
|
50
|
+
"core.login.agree_separator": "et",
|
|
51
|
+
"core.login.behavior_click": "Cliquez sur les caractères dans l'ordre",
|
|
52
|
+
"core.login.behavior_loading": "Chargement...",
|
|
53
|
+
"core.login.behavior_puzzle": "Faites glisser le curseur pour terminer le puzzle",
|
|
54
|
+
"core.login.behavior_rotate": "Faites glisser le curseur pour remettre l'image intérieure à l'endroit",
|
|
55
|
+
"core.login.bind_wechat": "Se connecter et lier WeChat",
|
|
56
|
+
"core.login.captcha": "Saisissez le code de vérification",
|
|
57
|
+
"core.login.captcha_load_failed": "Échec du chargement du code de vérification",
|
|
58
|
+
"core.login.captcha_type_missing": "La méthode de vérification n’est pas configurée",
|
|
59
|
+
"core.login.captcha_type_name": "Méthode de vérification de connexion",
|
|
60
|
+
"core.login.captcha_type_response_missing": "La réponse de vérification ne contient aucun type",
|
|
61
|
+
"core.login.captcha_write_failed": "Échec de l’enregistrement de l’image de vérification",
|
|
62
|
+
"core.login.default_sub_title": "Bienvenue",
|
|
63
|
+
"core.login.login_success": "Connexion réussie",
|
|
64
|
+
"core.login.password": "Saisissez le mot de passe",
|
|
65
|
+
"core.login.privacy": "Politique de confidentialité",
|
|
66
|
+
"core.login.protocol_missing": "Les conditions d’utilisation et la politique de confidentialité ne sont pas configurées",
|
|
67
|
+
"core.login.protocol_prompt": "Lisez et acceptez d’abord les accords. Confirmez pour accepter et continuer.",
|
|
68
|
+
"core.login.service": "Conditions d’utilisation",
|
|
69
|
+
"core.login.tenant": "Saisissez le code du locataire",
|
|
70
|
+
"core.login.user_name": "Saisissez le nom d'utilisateur",
|
|
71
|
+
"core.login.user_name_mobile": "Saisissez le nom d’utilisateur ou le numéro de mobile",
|
|
72
|
+
"core.login.user_name_password": "Saisissez le nom d’utilisateur et le mot de passe",
|
|
73
|
+
"core.login.wechat": "Continuer avec WeChat",
|
|
74
|
+
"core.login.wechat_bind_tip": "Ce compte WeChat n’est pas lié. Connectez-vous à un compte existant pour le lier.",
|
|
75
|
+
"core.login.wechat_failed": "Échec de la connexion WeChat. Réessayez plus tard.",
|
|
76
|
+
"core.navigation.home": "Accueil",
|
|
77
|
+
"core.navigation.error.access": "Mode d’accès au menu invalide : {access}",
|
|
78
|
+
"core.navigation.error.child_tab": "Seuls les menus d’application de deuxième niveau peuvent être des onglets : {name}",
|
|
79
|
+
"core.navigation.error.cycle": "Cycle de parenté détecté dans le menu : {name}",
|
|
80
|
+
"core.navigation.error.identity": "L’identifiant, le nom ou le chemin app/ du menu est invalide",
|
|
81
|
+
"core.navigation.error.item_object": "L’élément de menu n’est pas un objet",
|
|
82
|
+
"core.navigation.error.list_missing": "La réponse du menu ne contient pas de liste plate",
|
|
83
|
+
"core.navigation.error.name_prefix": "Le nom du menu doit commencer par App : {name}",
|
|
84
|
+
"core.navigation.error.parent_invalid": "L’identifiant du parent du menu est invalide : {name}",
|
|
85
|
+
"core.navigation.error.parent_missing": "L’identifiant du parent du menu est manquant : {name}",
|
|
86
|
+
"core.navigation.error.parent_not_found": "Le parent du menu est introuvable : {name}",
|
|
87
|
+
"core.navigation.error.response_object": "La réponse du menu n’est pas un objet",
|
|
88
|
+
"core.navigation.error.root_tab": "Le menu d’application de deuxième niveau doit être un onglet : {name}",
|
|
89
|
+
"core.navigation.error.tab_count": "tabBar doit contenir 0 ou 2 à 5 éléments",
|
|
90
|
+
"core.navigation.error.unique": "L’identifiant, le nom et le chemin du menu doivent être uniques",
|
|
91
|
+
"core.navigation.error.view_key": "viewKey non enregistré : {viewKey}",
|
|
92
|
+
"core.navigation.my": "Mon compte",
|
|
93
|
+
"core.navigation.protocol": "Accord",
|
|
94
|
+
"core.protocol.load_failed": "Échec du chargement de la configuration de l’application",
|
|
95
|
+
"core.protocol.not_configured": "{title} n’est pas configuré et ne peut pas être consulté",
|
|
96
|
+
"core.protocol.privacy": "Politique de confidentialité",
|
|
97
|
+
"core.protocol.service": "Conditions d’utilisation",
|
|
98
|
+
"core.status.CONFIG_ERROR": "Configuration de navigation invalide",
|
|
99
|
+
"core.status.forbidden": "Accès refusé",
|
|
100
|
+
"core.status.NOT_FOUND": "Page introuvable",
|
|
101
|
+
"core.status.offline": "Réseau indisponible",
|
|
102
|
+
"core.status.page_unavailable": "Page temporairement indisponible",
|
|
103
|
+
"core.status.loading": "Chargement",
|
|
104
|
+
"core.webview.embed_blocked": "La destination peut bloquer l’intégration sur H5",
|
|
105
|
+
"core.webview.invalid_url": "Aucun lien valide n’a été fourni",
|
|
106
|
+
"core.webview.open_failed": "Impossible d’ouvrir le lien"
|
|
107
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* 此文件由 scripts/sync_locales.py 生成,请勿手工修改。 */
|
|
2
|
+
import localeZhCn from './zh-CN.json'
|
|
3
|
+
import localeEnUs from './en-US.json'
|
|
4
|
+
import localeEsEs from './es-ES.json'
|
|
5
|
+
import localeFrFr from './fr-FR.json'
|
|
6
|
+
import localeJaJp from './ja-JP.json'
|
|
7
|
+
import localeKoKr from './ko-KR.json'
|
|
8
|
+
import localeZhTw from './zh-TW.json'
|
|
9
|
+
|
|
10
|
+
export const LOCALE_MESSAGES = {
|
|
11
|
+
'zh-CN': localeZhCn,
|
|
12
|
+
'en-US': localeEnUs,
|
|
13
|
+
'es-ES': localeEsEs,
|
|
14
|
+
'fr-FR': localeFrFr,
|
|
15
|
+
'ja-JP': localeJaJp,
|
|
16
|
+
'ko-KR': localeKoKr,
|
|
17
|
+
'zh-TW': localeZhTw,
|
|
18
|
+
} as const satisfies Record<string, Record<string, string>>
|
|
19
|
+
|
|
20
|
+
export type GeneratedLocale = keyof typeof LOCALE_MESSAGES
|
|
21
|
+
export const DEFAULT_LOCALE: GeneratedLocale = 'zh-CN'
|
|
22
|
+
export const SUPPORTED_LOCALES = Object.keys(LOCALE_MESSAGES) as GeneratedLocale[]
|