Anglar I18n Editor for VSCode (
|
| Path | Object Type | Description |
|---|---|---|
locales |
string[] |
The locales setting accepts one ore more target locales that your application is going to be translated into. See: Locale Setting. |
editor |
object |
The editor setting is to control the behavior of I18n editor as well as the background task manager. See: Editor Setting |
editor.taskConfig |
object |
The editor.taskConfig is to control the background task manager, which executes the transunit saving commands. See: Task Config Setting |
Locale Setting
The locales setting accepts one ore more target locales that your application is going to be translated into.
{
"locales": ["zh-CN", "ja-JP"]
}
Editor Setting
The editor setting is to control the behavior of I18n editor as well as the background task manager.
editor.translationSaveOn: 'blur' | 'change' | 'manual'
Three types of trigger type that tell the editor when to save your translation. The default value is blur.
Only support blur by far.
editor.messageLocations: string[]
The message locations is the location collection for the Angular Compiler extracted xliff files. They should
ends with .xliff or .xlf.
{
"editor": {
"messageLocations": ["src/locale/messages.xlf"]
}
}
editor.translationFileNamePattern: string
The pattern to locate the target translation file. The default value is ${name}(${lang}-${region}).
${name}: the source xliff file name;${lang}: the target language;${region}: the region where the language in use.
${lang} and ${region} is the consist parts of LCID
editor.mode: 'default' | 'target-file'
Editor mode.
The
defaultmode:Use the xliff specify in the
messageLocationsas source and auto generate the target translation xliff based on the giventranslationFileNamePattern;The
target-filemode:Edit directly on the target xliff (based on the
messageLocationsand the giventranslationFileNamePattern)
editor.emptyTranslationHandling: 'delete' | 'keep' | 'fallback-to-source'
Determine how to handle empty translation.
delete: delete the trans unit in the target xliff when empty;keep: keep the trans unit in the target xliff and mark asneed-translation;fallback-to-source: fill the translation target using the source string and mark asneed-translation;
When editor is in default mode, this option is set delete as default; When editor is in target-file mode, this option is set fallback-to-source as default;
Task Config Setting
The editor.taskConfig is to control the background task manager, which executes the transunit saving commands.
{
"editor": {
"taskConfig": {
"intervalSeconds": 5,
"itemEachPack": 10
}
}
}
editor.taskConfig.intervalSeconds?: number
The frequency of task checking. Default value is 5.
editor.taskConfig.itemEachPack?: number
The maximum command size for each task execution. Default value is 10.
Translation Memory Setting (tm)
(CURRENTLY NOT AVAILABLE)
Feedback or Issues
If you do like this extension, please give me feedback so I know you are using it. If you do like more features, tell me and we can start a discussion.
If you have any problems, go and fire an issue.
Release Notes
The current version is just build for temporary use. Please verify your translation file before building your application into the target locale.

