Skip to content

Commit

Permalink
Add doc about translation using poedit (apache#6600)
Browse files Browse the repository at this point in the history
* Update CONTRIBUTING.md
  • Loading branch information
zhouyao1994 authored and kristw committed Jan 14, 2019
1 parent 5055157 commit f480a52
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,11 @@ fabmanager babel-extract --target superset/translations --output superset/transl
```

You can then translate the strings gathered in files located under
`superset/translation`, where there's one per language. For the translations
to take effect:
`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:

```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.
Expand All @@ -446,6 +449,8 @@ If you get errors running `po2json`, you might be running the Ubuntu package wit
name, rather than the NodeJS package (they have a different format for the arguments). If
there is a conflict, you may need to update your `PATH` environment variable or fully qualify
the executable path (e.g. `/usr/local/bin/po2json` instead of `po2json`).
If you get a lot of `[null,***]` in `messages.json`, just delete all the `null,`.
For example, `"year":["年"]` is correct while `"year":[null,"年"]`is incorrect.

### Creating a new language dictionary

Expand Down

0 comments on commit f480a52

Please sign in to comment.