diff --git a/docker-compose.yml b/docker-compose.yml index cbc8a20..537b96d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,7 @@ services: image: wongsaang/chatgpt-ui-client:latest environment: - SERVER_DOMAIN=http://backend-web-server + - DEFAULT_LOCALE=en # - NUXT_PUBLIC_APP_NAME='ChatGPT UI' # The name of the application # - NUXT_PUBLIC_TYPEWRITER=true # Whether to enable the typewriter effect, default false # - NUXT_PUBLIC_TYPEWRITER_DELAY=50 # The delay time of the typewriter effect, default 50ms diff --git a/docs/guide/configuration.md b/docs/guide/configuration.md index e0a4ad1..d902c40 100644 --- a/docs/guide/configuration.md +++ b/docs/guide/configuration.md @@ -66,6 +66,7 @@ backend-wsgi-server: | Parameter | Description | Default Value | |-----------------------|---------------------------------------------|----------------------------| | SERVER_DOMAIN | Server Address | http://backend-web-server | +| DEFAULT_LOCALE | Default Language | en | | NUXT_PUBLIC_APP_NAME | Application Name | ChatGPT UI | | NUXT_PUBLIC_TYPEWRITER| Enable Typewriter Effect [true/false] | true | | NUXT_PUBLIC_TYPEWRITER_DELAY | Typewriter Effect Delay in milliseconds | 50 | diff --git a/docs/guide/quick-start.md b/docs/guide/quick-start.md index 2ff3a23..03b561c 100644 --- a/docs/guide/quick-start.md +++ b/docs/guide/quick-start.md @@ -35,6 +35,7 @@ services: image: wongsaang/chatgpt-ui-client:latest environment: - SERVER_DOMAIN=http://backend-web-server + - DEFAULT_LOCALE=en # - NUXT_PUBLIC_APP_NAME='ChatGPT UI' # The name of the application # - NUXT_PUBLIC_TYPEWRITER=true # Whether to enable the typewriter effect, default false # - NUXT_PUBLIC_TYPEWRITER_DELAY=50 # The delay time of the typewriter effect, default 50ms diff --git a/docs/zh/guide/configuration.md b/docs/zh/guide/configuration.md index fa547a4..db0c0c7 100644 --- a/docs/zh/guide/configuration.md +++ b/docs/zh/guide/configuration.md @@ -66,6 +66,7 @@ backend-wsgi-server: | 参数 | 说明 | 默认值 | |----------------------|-------------------------------------------|---------------------------| | SERVER_DOMAIN | 服务端地址 | http://backend-web-server | +| DEFAULT_LOCALE | 默认语言 | en | | NUXT_PUBLIC_APP_NAME | 应用名称 | ChatGPT UI | | NUXT_PUBLIC_TYPEWRITER | 是否开启 打字机 效果[true/false]| true | | NUXT_PUBLIC_TYPEWRITER_DELAY | 打字机效果的延迟时间,单位:毫秒| 50 | diff --git a/docs/zh/guide/quick-start.md b/docs/zh/guide/quick-start.md index a916b12..571ca7d 100644 --- a/docs/zh/guide/quick-start.md +++ b/docs/zh/guide/quick-start.md @@ -37,6 +37,7 @@ services: image: wongsaang/chatgpt-ui-client:latest environment: - SERVER_DOMAIN=http://backend-web-server + - DEFAULT_LOCALE=zh # - NUXT_PUBLIC_APP_NAME='ChatGPT UI' # APP 名称 # - NUXT_PUBLIC_TYPEWRITER=true # 是否开启 打字机 效果 # - NUXT_PUBLIC_TYPEWRITER_DELAY=50 # 打字机效果的延迟时间,单位:毫秒,默认:50 diff --git a/lang/en-US.json b/lang/en-US.json index 97f807a..3cb69cb 100644 --- a/lang/en-US.json +++ b/lang/en-US.json @@ -1,4 +1,21 @@ { + "signIn":"Sign In", + "signUp":"Sign Up", + "username":"User Name", + "password":"Password", + "Username is required":"Username is required", + "Password is required":"Password is required", + "Create your account":"Create your account", + "createAccount":"Create Account", + "email":"E-mail", + "Sign in instead":"Sign in instead", + "Please enter your username":"Please enter your username", + "Username must be at least 4 characters":"Username must be at least 4 characters", + "Please enter your e-mail address":"Please enter your e-mail address", + "E-mail address must be valid":"E-mail address must be valid", + "Please enter your password":"Please enter your password", + "Password must be at least 8 characters":"Password must be at least 8 characters", + "Please confirm your password":"Please confirm your password", "welcomeTo": "Welcome to", "language": "Language", "setApiKey": "Set API Key", diff --git a/lang/ru-RU.json b/lang/ru-RU.json index 3026e92..4fbf481 100644 --- a/lang/ru-RU.json +++ b/lang/ru-RU.json @@ -1,4 +1,21 @@ { + "signIn":"Sign In", + "signUp":"Sign Up", + "username":"User Name", + "password":"Password", + "Username is required":"Username is required", + "Password is required":"Password is required", + "Create your account":"Create your account", + "createAccount":"Create Account", + "email":"E-mail", + "Sign in instead":"Sign in instead", + "Please enter your username":"Please enter your username", + "Username must be at least 4 characters":"Username must be at least 4 characters", + "Please enter your e-mail address":"Please enter your e-mail address", + "E-mail address must be valid":"E-mail address must be valid", + "Please enter your password":"Please enter your password", + "Password must be at least 8 characters":"Password must be at least 8 characters", + "Please confirm your password":"Please confirm your password", "welcomeTo": "Добро пожаловать в", "language": "Язык", "setApiKey": "Установить ключ API", diff --git a/lang/zh-CN.json b/lang/zh-CN.json index e60353d..64edb1b 100644 --- a/lang/zh-CN.json +++ b/lang/zh-CN.json @@ -1,4 +1,29 @@ { + "invitation code":"邀请码", + "Please enter your code":"请填写邀请码", + "signIn":"登录", + "signUp":"注册", + "username":"用户名", + "password":"密码", + "Username is required":"请填写用户名", + "Password is required":"请填写密码", + "Create your account":"创建你的账号", + "createAccount":"创建账号", + "email":"邮箱", + "Sign in instead":"返回登录", + "Please enter your username":"请输入你的用户名", + "Username must be at least 4 characters":"用户名至少四个字符", + "Please enter your e-mail address":"请输入你的电子邮箱", + "E-mail address must be valid":"电子邮箱地址格式不正确", + "Please enter your password":"请输入你的密码", + "Password must be at least 8 characters":"密码至少八个字符", + "Please confirm your password":"请输入确认密码", + "Something went wrong. Please try again.":"网络错误请稍后重试", + "This password is too common.":"密码过于简单", + "This password is entirely numeric.":"密码不能全是数字", + "Your registration is successful":"恭喜你,注册成功!", + "You can now":"现在你可以", + "to your account.":"你的账号了。", "welcomeTo": "欢迎来到", "language": "语言", "setApiKey": "设置API密钥", diff --git a/nuxt.config.ts b/nuxt.config.ts index f3701f0..c27a4c5 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -63,7 +63,7 @@ export default defineNuxtConfig({ ], lazy: true, langDir: 'lang', - defaultLocale: 'en', + defaultLocale: process.env.DEFAULT_LOCALE || 'en', vueI18n: { fallbackLocale: 'en', }, diff --git a/pages/account/onboarding.vue b/pages/account/onboarding.vue index d7accfc..b886d6e 100644 --- a/pages/account/onboarding.vue +++ b/pages/account/onboarding.vue @@ -47,9 +47,9 @@ onNuxtReady(() => { >
- You can now