Enhance your ngx-translate workflows.
- Automatic indexing of translation files
- Easy-to-use translations editor
- Autocomplete for translations
- Translation information when hovering over a translation
- Create translations on the fly
- Catch untranslated or incomplete translations
NOTE: Autocomplete and creation is only supported in html files
NOTE: This extension only supports json translation file
- Angular 2 and above
- The @ngx-translate/core package
The extension automatically indexes all translation files. If the above warning continues to appear, or the translation editor is stuck on loading, run the Update translations
command
- Write the desired text you want translated
- Select it, and execute the
Create translation from selection
command - A snake_case key will be generated for you, but you can change it to whatever you want
- Press the enter key to confirm the creation
- Open the translation files to see your new translation :)
- Open the translations view either by using the provided
Translations Editor
activity bar view, or by executing theOpen translations editor
command - The editor displays all your translations in a table, order by
Key
->Languages
, and will update automatically when changes to the translation files are made- If this is not the case, to fix this issue either click the
Refresh
button or execute theUpdate translations
command
- If this is not the case, to fix this issue either click the
- You can now live edit all translation keys and values.
NOTE: empty values wlil be marked in red
- To create a new entry, click the
+ New
button at the bottom of the table - To delete a translation, click the
🗑️
button at the end of its row
- To get translation autocomplete suggestions, type
t:
(all suggestions are prefixed witht:
) - Choose the desired value, and the translation pipe will be filled for you
The extension currently provides these diagnostics:
Type | Description | Suggested action | |
---|---|---|---|
key-doesnt-exist | Error | The target translation key doesn't exist | Create the translation key |
key-not-fully-implemented | Warning | The target translation key isn't implemented in the described languages | Implement the translation key in the missing languages |
Keybinding | Description | |
---|---|---|
Update translations | Windows: Ctrl+T Ctrl+U Mac: Cmd+T Cmd+U |
Updates and indexes all translations |
Create translation from selection | Windows: Ctrl+T Ctrl+N Mac: Cmd+T Cmd+N |
Creates a translation from the current text selection. NOTE: If the translation already exists, the key won't be created and the translation will be filled in for you |
Open translations editor | Windows: Ctrl+T Ctrl+E Mac: Cmd+T Cmd+E |
Opens the translation editor in a new tab |
Open translation files | Windows: Ctrl+T Ctrl+O Mac: Cmd+T Cmd+O |
Opens all indexed translation files in new columns |
Type | Default | Description | |
---|---|---|---|
ng-translate-intellisense.translationsFolder | string | i18n | Specifies the translations folder name to index. The folder name should not be a path. After changing this, it is recommended to execute the Update translations command |
Opening issues is appreciated :)
All contributions to this project are welcome :)
- First release
- Minor improvements and documentation fixes