Skip to content

FEATURE: Add commands to convert between locale JSON and Excel for easier translation management (增加多语言JSON和Excel文件互转命令) #6618

@Tian-ya-luer

Description

@Tian-ya-luer

Version

Vben Admin V5

Description

When working with multilingual configurations in vue-vben-admin, I find the current process of managing translations challenging, especially when collaborating with non-technical team members. The JSON format, while perfect for development, isn't the most translator-friendly format.
I propose adding two commands to streamline the translation workflow:
getLangExcel: Generates an Excel file from existing locale JSON files
setLangJson: Updates locale JSON files from a modified Excel file
(希望添加两个命令:

  1. 命令名称暂定 getLangExcel: 根据项目多语言 json 文件内容,生成一个 excel 文件, excel 文件用于给非开发人员进行填写
  2. 命令名称暂定 setLangJson: 根据 excel 文件内容, 回填到项目多语言 json 文件中,完成多语言的更新)

Proposed Solution

The Excel file contains:

  1. The first column is the path to the JSON file (used to determine the path when backfilling)
  2. The second column is the key
  3. The third column and beyond are the values for each language

excel 文件包含:

  1. 第一列为 json 文件的路径(用于回填时确定路径)
  2. 第二列为 key
  3. 第三列开始为各语言的 value

Alternatives Considered

Online translation management tools
多语言编辑功能实现

Additional Context

No response

Validations

  • Read the docs
  • Ensure the code is up to date. (Some issues have been fixed in the latest version)
  • I have searched the existing issues and checked that my issue does not duplicate any existing issues.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions