🚧 Alpha! The API and configuration file format are likely changed.
build diplomat/cmd package
cd cmd && go build
- Generate translation module
- Auto chinese convertion (simplied <=> tranditional)
version: "1"
preprocessors:
- type: chinese
options:
mode: t2s
from: zh-TW
to: zh-CN
- type: copy
options:
from: en
to: fr
outputs:
- selectors:
- admin
- manage
templates:
- type: js-object
options:
filename: "control-panel.js"
Above configuration will generate a file:
// control-panel.js
// DO NOT EDIT. generated by diplomat (https://github.com/tony84727/diplomat).
export default {
"admin.admin.zh-TW": "管理員","admin.admin.en": "Admin","admin.admin.zh-CN": "管理员","admin.admin.fr": "Admin","admin.message.hello.zh-TW": "您好","admin.message.hello.en": "Hello!","admin.message.hello.zh-CN": "您好","admin.message.hello.fr": "Hello!",
}