You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -69,11 +70,6 @@ Run the translation manager with your new npm script
69
70
npm run manage:translations
70
71
```
71
72
72
-
### Advanced
73
-
74
-
Build your own translationManager based on the core of this package, or it's
75
-
exposed helper methods.
76
-
77
73
## Usage
78
74
79
75
Now you can check the status of your translations by just running the script. Then
@@ -89,9 +85,13 @@ checking the translations status.
89
85
90
86
### manageTranslations
91
87
92
-
This will maintain all translation files. Based on your config you will get output for duplicate ids, and per specified language you will get the deleted translations, added messages (new messages that need to be translated), and not yet translated messages. It will also maintain a whitelist file per language where you can specify translation keys where the translation is identical to the default message. This way you can avoid untranslated message warnings for these messages.
93
-
94
-
You can optionally pass a printer object to this method. This way you can override the console logging with your own logging logic. If you want custom file writing logic, it is advised to roll your own translationManager based on the core.
88
+
This will maintain all translation files. Based on your config you will get
89
+
output for duplicate ids, and per specified language you will get the deleted
90
+
translations, added messages (new messages that need to be translated), and not
91
+
yet translated messages. It will also maintain a whitelist file per language
92
+
where you can specify translation keys where the translation is identical to
93
+
the default message. This way you can avoid untranslated message warnings for
94
+
these messages.
95
95
96
96
#### Config
97
97
@@ -104,15 +104,17 @@ You can optionally pass a printer object to this method. This way you can overri
- Directory of the whitelist files the translation manager needs to maintain.
107
-
These files contain the key of translations that have the exact same text in a specific language as the defaultMessage. Specifying this key will suppress
107
+
These files contain the key of translations that have the exact same text in
108
+
a specific language as the defaultMessage. Specifying this key will suppress
108
109
`unmaintained translation` warnings.
109
110
- example: `Dashboard` in english is also accepted as a valid translation for
110
111
dutch.
111
112
-`languages` (optional, default: `[]`)
112
113
- What languages the translation manager needs to maintain. Specifying no
113
114
languages actually doesn't make sense, but won't break the translationManager
114
115
either.
115
-
- example: for `['nl', 'fr']` the translation manager will maintain a `nl.json`, `fr.json`, `whitelist_nl.json` and a `whitelist_fr.json` file
116
+
- example: for `['nl', 'fr']` the translation manager will maintain a
117
+
`nl.json`, `fr.json`, `whitelist_nl.json` and a `whitelist_fr.json` file
0 commit comments