Visual Studio Code extension to help maintaining angular i18n localization files
- Merge @angular-cli generated file into existing localization file.
- Search and highlight missing translations.
- Currently support Xliff 1.2 and 2.0
- Convert between Xliff 1.2 and 2.0 format
- Upcoming support for Xmb files
- Macbook Pro Touchbar support.
Install through VS Code extensions: search for Angular Localization Helper
Install through terminal: ext install angular-localization-helper
Generate/Update the base localization file using the angular-cli, then use the extension to merge the changes into a new or an existing translation file.
The extension will try to find corresponding translations units within an existing file for each units in the base file by searching units in the following order:
- By Id
- By Meaning & Source
- By Meaning & Description (optional)
- By Meaning (optional)
If no translation unit is found, the unit is added and tagged as missing.
The extension can convert translations files from one type to another. Simply generate the base file from the angular-cli with a new file type and then merge the translation files. They will be automatically changed to the new file type.
- F1 or CMD + Shift + P to open the command palette
- Angular i18n: Sync
- Ctrl + Windows + S or Ctrl + Cmd + S (default shortcut)
By default, the extension expects the base file to be named messages.xlf
. If no corresponding file is found, you are prompted to identify the base file. This setting will be saved for future use. If the extension is invoked from a localization file, that file will be updated, otherwise the extension will prompt you for the file to update. You can also create a new file.
Missing Translations are tagged and highlighted. You can use the extension to navigate between missing tranaslations
- F1 or CMD + Shift + P to open the command palette
- Angular i18n: Next
- Ctrl + Windows + N or Ctrl + Cmd + N (default shortcut)
On Macbook Pros the extension's commands appear on the touchbar within xlf files.
Identifies the base localization file generated by the @angular-cli
. If file does not exist, you are prompted to identify the file and the setting is saved.
Identify the type of localization to process (xlf or xmb)
Target tag text for missing translation
Missing translation highlight decoration
- Xmb format is not yet implemented
- List missing translations is not yet implemented
Enjoy!