Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Multi-Language Support to Jumpserver #2969

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 107 additions & 3 deletions apps/jumpserver/4.5.0/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,29 @@ additionalProperties:
labelZh: 加密签名
required: true
type: password
label:
en: Cryptographic signing
ja: 暗号署名
ms: Tandatangan kriptografi
pt-br: Assinatura criptográfica
ru: Криптографическая подпись
zh-Hant: 加密簽名
zh: 加密签名
- default: K1ffDfLSIK8SV2PZj6VaxOiv8KuawlJK
edit: true
envKey: BOOTSTRAP_TOKEN
labelEn: Bootstrap token
labelZh: 认证令牌
required: true
type: password
label:
en: Bootstrap token
ja: ブートストラップトークン
ms: Token Bootstrap
pt-br: Token de inicialização
ru: Токен для начальной настройки
zh-Hant: 引導令牌
zh: 认证令牌
- default: "false"
envKey: DEBUG
labelEn: Debug mode
Expand All @@ -25,6 +41,14 @@ additionalProperties:
value: "true"
- label: 关闭
value: "false"
label:
en: Debug mode
ja: デバッグモード
ms: Modus Debug
pt-br: Modo de depuração
ru: Режим отладки
zh-Hant: 調試模式
zh: 调试模式
- default: "ERROR"
envKey: LOG_LEVEL
labelEn: Log level
Expand All @@ -42,6 +66,14 @@ additionalProperties:
value: "ERROR"
- label: CRITICAL
value: "CRITICAL"
label:
en: Log level
ja: ログレベル
ms: Tahap log
pt-br: Nível de log
ru: Уровень журнала
zh-Hant: 日誌級別
zh: 日志级别
- child:
default: ""
envKey: PANEL_DB_HOST
Expand All @@ -60,6 +92,14 @@ additionalProperties:
value: mysql
- label: MariaDB
value: mariadb
label:
en: Database Service
ja: データベースサービス
ms: Perkhidmatan Pangkalan Data
pt-br: Serviço de Banco de Dados
ru: Сервис баз данных
zh-hant: 資料庫服務
zh: 数据库服务
- default: jumpserver
envKey: PANEL_DB_NAME
labelEn: Database
Expand All @@ -68,14 +108,30 @@ additionalProperties:
required: true
rule: paramCommon
type: text
label:
en: Database
ja: データベース
ms: Pangkalan Data
pt-br: Banco de Dados
ru: База данных
zh-hant: 資料庫
zh: 数据库
- default: jumpserver
envKey: PANEL_DB_USER
labelEn: Database User
labelZh: 数据库用户
random: true
required: true
rule: paramCommon
type: text
labelEn: Database User
labelZh: 数据库用户
label:
en: Database User
ja: データベースユーザー
ms: Pengguna Pangkalan Data
pt-br: Usuário do Banco de Dados
ru: Пользователь базы данных
zh-hant: 資料庫用戶
zh: 数据库用户
- default: jumpserver
envKey: PANEL_DB_USER_PASSWORD
labelEn: Database User Password
Expand All @@ -84,6 +140,14 @@ additionalProperties:
required: true
rule: paramComplexity
type: password
label:
en: Database Password
ja: データベースのパスワード
ms: Kata Laluan Pangkalan Data
pt-br: Senha do Banco de Dados
ru: Пароль базы данных
zh-hant: 資料庫密碼
zh: 数据库密码
- default: ""
edit: true
envKey: REDIS_HOST
Expand All @@ -92,6 +156,14 @@ additionalProperties:
labelZh: 缓存服务服务
required: true
type: service
label:
en: Redis Service
ja: Redis サービス
ms: Perkhidmatan Redis
pt-br: Serviço Redis
ru: Сервис Redis
zh-Hant: Redis 服務
zh: Redis 服务
- default: ""
edit: true
envKey: PANEL_REDIS_ROOT_PASSWORD
Expand All @@ -100,6 +172,14 @@ additionalProperties:
required: true
rule: paramCommon
type: password
label:
en: Redis service password
ja: Redis サービスのパスワード
ms: Kata laluan perkhidmatan Redis
pt-br: Senha do serviço Redis
ru: Пароль службы Redis
zh-Hant: Redis 服務密碼
zh: Redis 服务密码
- default: 8080
edit: true
envKey: PANEL_APP_PORT_HTTP
Expand All @@ -108,6 +188,14 @@ additionalProperties:
required: true
rule: paramPort
type: number
label:
en: HTTP Port
ja: HTTP ポート
ms: HTTP Port
pt-br: HTTP Porta
ru: HTTP Порт
zh-Hant: HTTP 埠
zh: HTTP 端口
- default: 2222
edit: true
envKey: SSH_PORT
Expand All @@ -116,9 +204,25 @@ additionalProperties:
required: true
rule: paramPort
type: number
label:
en: SSH Port
ja: SSH ポート
ms: SSH Port
pt-br: SSH Porta
ru: SSH Порт
zh-Hant: SSH 埠
zh: SSH 端口
- default: ""
edit: true
envKey: DOMAINS
labelEn: DOMAINS
labelZh: DOMAINS
type: text
type: text
label:
en: DOMAINS
ja: ドメイン
ms: DOMAIN
pt-br: DOMÍNIOS
ru: ДОМИНЫ
zh-Hant: 領域
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provided diff shows several changes to various configuration parameters and labels in a YAML/JSON-like format. Here's an analysis of the changes:

  1. Password Field Changes:

    • The type field for two fields (password) is changed consistently throughout to maintain consistency.
  2. Default Values:

    • Some default values remain unchanged, such as "false" and "ERROR", indicating they have no apparent changes needed.
  3. Environment Variables:

    • Various environment variable names (BOOTSTRAP_TOKEN, DEBUG, LOG_LEVEL, etc.) are kept consistent across languages (e.g., both "English", "Japanese").
  4. Labels:

    • Multiple new entries with translated labels added for various properties (Cryptographic signing, Bootstrap token, Debug mode, Log level, etc.). These new translations ensure better support for multiple linguistic environments.
    • Translated labels include: Chinese simplified ("简体中文"), Chinese traditional ("繁體中文"),
      Japanese ('日本語'), Malay ('Bahasa Melayu'),
      Portuguese Brazilian ('Português Brasileiro'), Russian ('Русский язык'),
      Turkish ('Türkçe'), Vietnamese ('Tiếng Việt').
  5. Service Types:

    • Label additions for database services like MySQL/MariaDB and Redis add more clarity on each service type.
  6. Port Fields:

    • Labels for port-specific fields also underwent translation.

However, it’s important to note that there isn’t anything concerning or unusual about these specific changes since they appear to be updating existing configurations while providing comprehensive internationalization through multilingual labels.

Overall, this diff adds necessary language support without altering core functionality in terms of parameter structure or logic.

zh: 域名
8 changes: 8 additions & 0 deletions apps/jumpserver/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ additionalProperties:
- Security
shortDescZh: 广受欢迎的开源堡垒机
shortDescEn: The world's first open-source Bastion Host
description:
en: The world's first open-source Bastion Host
ja: 世界初のオープンソースのバスティオンホスト
ms: Bastion Host sumber terbuka pertama di dunia
pt-br: O primeiro Bastion Host de código aberto do mundo
ru: Первый в мире открытый Bastion Host
zh-Hant: 全球首個開源堡壘主機
zh: 广受欢迎的开源堡垒机
type: tool
crossVersionUpdate: false
limit: 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only issue with this code is that while the "description" field has multiple translations, not all languages are included for every translation. It would be beneficial to include Spanish (es) and French (fr).

Expand Down
Loading