-
Notifications
You must be signed in to change notification settings - Fork 0
/
auto-i18n.project.yaml
34 lines (33 loc) · 1.48 KB
/
auto-i18n.project.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# py-auto-i18n project.
# * `i18n_dir`: The directory for storing translation files
# * `main_file`: The translation file for the main language
# * `code_files`: The types of code files to scan
# * `i18n_pattern`: The pattern to mark text that needs to be translated in the code
# * `dict`: A dictionary of specific terms for translation; you can place specific translations for your project here
# * `strategy`: The translation strategy
# * `"diff"` means only translating new content
# * `"full"` means translating all content
# * `i18n_var_prefix`: The prefix used for replacement variables in the code
# * `export_dir`: The export directory. If set, it will be used as the output directory for the export command.
# * `i18n_var_mid`: The strategy for generating the middle part of the i18n key. Options are:
# * `"filename"`: Uses the full filename, e.g. `testts`
# * `"filename_noext"`: Uses the filename without its extension
# * `"pathname"`: Uses the relative path of the file, replacing '/' with '_'
#
code_files:
- src/**/*.ts
- src/**/*.svelte
dict:
- 思源翻译为 SiYuan
- QueryView, DataView 这些专有名词, 不用翻译, 保持原名
- 视图组件 翻译成 "View Component
- 块 是思源笔记中的基本单位,翻译成 Block
- 嵌入块 翻译成 Embed Block
- 反向链接 或者 反链 翻译成 backlink
export_dir: src/types
i18n_dir: public/i18n
i18n_pattern: \(\(`(.+?)`\)\)
i18n_var_mid: pathname
i18n_var_prefix: i18n
main_file: zh_CN.yaml
strategy: diff