diff --git a/doc/TRANSLATIONS.md b/doc/TRANSLATIONS.md index 651914730..f7ce97bf9 100644 --- a/doc/TRANSLATIONS.md +++ b/doc/TRANSLATIONS.md @@ -34,16 +34,30 @@ correctly. ### In template files [ᐞ](#table-of-contents) -Translations are easy to use with `translate` pipe: +Translations are easy to use with `transloco` pipe: ```html
{{ message | transloco }}
``` ## Workflow [ᐞ](#table-of-contents) @@ -96,30 +118,37 @@ in the $!@. Eventually some keys will be forgotten from some of our translation files, or some keys turn out to be redundant and forgotten to be deleted. **Fortunately** we have a tool to be used when working with translations. -`@biesbjerg/ngx-translate-extract` is set up in the application so, that it +`@jsverse/transloco-keys-manager` is set up in the application so, that it will collect all used translation keys and add them to our translation files. It'll also sort the JSON nicely, cleans up unused tags, and keeps the format just like we wanted. All that just in one command: ```bash yarn run extract-translations + +OR + +make extract-translations ``` Neat right? So recommend workflow with translations is just following: 1. Add your translations to your _templates_ or _code_ using that `marker` function. -2. Run `yarn run extract-translations` command. -3. Open your translation files and fill out those empty spots. +1. Run `yarn run extract-translations` OR `make extract-translations` + command. +1. Open your translation files under `translations` and fill out those + empty spots. +1. After that you need to run `yarn run sync-translations` OR + `make sync-translations` command With that workflow your translation files will always be synced between different languages and there isn't any redundant translations tags. ## Resources [ᐞ](#table-of-contents) -* [Great tutorial](https://www.codeandweb.com/babeledit/tutorials/how-to-translate-your-angular7-app-with-ngx-translate) -* [Github](https://github.com/ngx-translate/core) -* [Ngx-Translate home page](http://www.ngx-translate.com/) +* [Github](https://github.com/jsverse/transloco/) +* [Transloco home page](https://jsverse.github.io/transloco/) ---