- Clarification on accepting new language PRs

This commit is contained in:
trigg 2022-05-29 23:41:13 +00:00
parent d9a69cb0f6
commit 53d26e1e36

View file

@ -123,6 +123,8 @@ msgstr "Ewch i'n Discord"
#### Compiling updates
This is NOT required if you are submitting a pull request for a new language to be added or to change a few translations. It should be done in a different commit afterwards.
`gettext` requires the `.po` files to be compiled into `.mo` before it can be used. Once a `.po` file is changed it can be compiled with
`msgfmt -o discover_overlay/locales/XX/LC_MESSAGES/default.mo discover_overlay/locales/XX/LC_MESSAGES/default.po`
@ -135,9 +137,12 @@ We welcome pull requests and bug reports about missing or wrong translations, bu
Once you've used `_('something')` in code somewhere the original `base.pot` and all translations need updating to include the new phrase.
`xgettext -d base -o discover_overlay/locales/base.pot discover_overlay/*.py`
```
xgettext -d base --no-location -o discover_overlay/locales/base.pot discover_overlay/*.py
sed -i 's/charset=CHARSET/charset=UTF-8/g' discover_overlay/locales/base.pot
```
and double check the line `"Content-Type: text/plain; charset=UTF-8\n"` and change from `CHARSET` if it has changed again
At this point the new msgid should be copied to each separate translation `.po` file and if possible a suitable translation be added.
## Why do you keep making Discord Overlays?