mirror of https://github.com/apache/superset.git
chore: update babel doc (#17679)
* chore: update babel doc * update .po file * update translation workflow
This commit is contained in:
parent
cd88b8e81e
commit
12f1d914bd
|
@ -54,7 +54,4 @@ jobs:
|
|||
pip-upgrade
|
||||
pip install -r requirements/base.txt
|
||||
- name: Test babel extraction
|
||||
run: |
|
||||
flask fab babel-extract --target superset/translations \
|
||||
--output superset/translations/messages.pot \
|
||||
--config superset/translations/babel.cfg -k _,__,t,tn,tct
|
||||
run: ./scripts/babel_update.sh
|
||||
|
|
|
@ -1039,22 +1039,15 @@ LANGUAGES = {
|
|||
}
|
||||
```
|
||||
|
||||
### Extracting new strings for translation
|
||||
|
||||
```bash
|
||||
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. Do not forget to update
|
||||
this file with the appropriate license information.
|
||||
|
||||
### Updating language files
|
||||
|
||||
```bash
|
||||
pybabel update -i superset/translations/messages.pot -d superset/translations --ignore-obsolete
|
||||
./scripts/babel_update.sh
|
||||
```
|
||||
|
||||
This will update language files with the new extracted strings.
|
||||
This script will
|
||||
1. update the template file `superset/translations/messages.pot` with current application strings.
|
||||
2. 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)
|
||||
|
|
|
@ -46,6 +46,12 @@ pybabel extract \
|
|||
--copyright-holder=Superset \
|
||||
--project=Superset \
|
||||
-k _ -k __ -k t -k tn -k tct .
|
||||
cat $LICENSE_TMP $ROOT_DIR/superset/translations/messages.pot > messages.pot.tmp \
|
||||
&& mv messages.pot.tmp $ROOT_DIR/superset/translations/messages.pot \
|
||||
&& cd $CURRENT_DIR
|
||||
cat $LICENSE_TMP superset/translations/messages.pot > messages.pot.tmp \
|
||||
&& mv messages.pot.tmp superset/translations/messages.pot
|
||||
|
||||
pybabel update \
|
||||
-i superset/translations/messages.pot \
|
||||
-d superset/translations \
|
||||
--ignore-obsolete
|
||||
|
||||
cd $CURRENT_DIR
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -25,7 +25,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Superset VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2021-12-07 18:42+0100\n"
|
||||
"POT-Creation-Date: 2021-12-08 12:22+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue