michael-s-molina commented on a change in pull request #12595:
URL: https://github.com/apache/superset/pull/12595#discussion_r560342113
##########
File path: CONTRIBUTING.md
##########
@@ -755,22 +756,34 @@ LANGUAGES = {
### Extracting new strings for translation
```bash
-flask fab babel-extract --target superset/translations --output
superset/translations/messages.pot --config superset/translations/babel.cfg -k
_ -k __ -k t -k tn -k tct
+pybabel extract -F superset/translations/babel.cfg -o
superset/translations/messages.pot -k _ -k __ -k t -k tn -k tct .
+```
+
+This will update the template file `superset/translations/messages.pot` with
current application strings.
+
+### Updating language files
+
+```bash
+ pybabel update -i superset/translations/messages.pot -d superset/translations
--ignore-obsolete
```
+This will update language files with the new extracted strings.
+
You can then translate the strings gathered in files located under
`superset/translation`, where there's one per language. You can use
[Poedit](https://poedit.net/features)
to translate the `po` file more conveniently.
There are some [tutorials in the
wiki](https://wiki.lxde.org/en/Translate_*.po_files_with_Poedit).
-For the translations to take effect:
+In the case of JS translation, we need to convert the PO file into a JSON
file, and we need the global download of the npm package po2json.
```bash
-# In the case of JS translation, we need to convert the PO file into a JSON
file, and we need the global download of the npm package po2json.
npm install -g po2json
-flask fab babel-compile --target superset/translations
-# Convert the en PO file into a JSON file
-po2json -d superset -f jed1.x superset/translations/en/LC_MESSAGES/messages.po
superset/translations/en/LC_MESSAGES/messages.json
+```
+
+To convert all PO files to formatted JSON files you can use the `po2json.sh`
script.
+
+```bash
+./superset/translations/po2json.sh
Review comment:
Yes! Great observation. I'll do that.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]