Skip to content

Commit 6014b76

Browse files
committed
feat: close #2294 add documents for adding a new translation
1 parent ca29558 commit 6014b76

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/translation.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# How to add a new translation?
2+
3+
Assume that we are adding a new translation for `new`.
4+
5+
1. copy `app/locales/en.ts` to `app/locales/new.ts`;
6+
2. edit `new.ts`, change `const en: LocaleType = ` to `const new: PartialLocaleType`, and `export default new;`;
7+
3. edit `app/locales/index.ts`:
8+
4. `import new from './new.ts'`;
9+
5. add `new` to `ALL_LANGS`;
10+
6. add `new: "new lang"` to `ALL_LANG_OPTIONS`;
11+
7. translate the strings in `new.ts`;
12+
8. submit a pull request, and the author will merge it.

0 commit comments

Comments
 (0)