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

写一个 I18n 的 vscode扩展 #91

Open
2 of 13 tasks
axetroy opened this issue Apr 27, 2018 · 1 comment
Open
2 of 13 tasks

写一个 I18n 的 vscode扩展 #91

axetroy opened this issue Apr 27, 2018 · 1 comment

Comments

@axetroy
Copy link
Owner

axetroy commented Apr 27, 2018

初衷/目标

为了我们更方便的写 i18n

初步定义 i18n 文件的格式,不想繁琐,所以拒绝使用JSON

# app.i18n.yaml
language: 
  - en
  - zh
  - hk

keys:
  apple.add:
    - Add
    - 添加
    - 添加
  apple.delete:
    - Delete
    - 删除
    - 刪除
  people.say:
    - Hello, {0}
    - 你好, {0}
    - 你好, {0}

主要功能包括:

  • 使用yaml定义 i18n 文件
  • vscode 支持校验字段,包括语言
  • 导出各常用语言,如Javascript/Typescript/JSON
  • I18n 的模版支持传入参数

TODO类型

  • 类库
  • 框架
  • 服务
  • 命令行工具

预计时间

  • 一天
  • 一周
  • 两周
  • 一月
  • 更久

相关链接

https://github.com/axetroy/todo

@alsotang
Copy link

我觉得 i18n 最本质的繁琐问题不是 yaml 或者 json 的格式。而是对于要翻译的每一个地方,都像 css name 一样要取个 unique 的名字。

给每一条河每一座山取一个温暖的名字
陌生人,我也为你祝福
愿你有一个灿烂的前程
愿你有情人终成眷属
愿你在尘世获得幸福
我只愿面朝大海,春暖花开

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants