2020-04-08 09:34:58 +00:00
|
|
|
# i18n
|
|
|
|
|
2020-06-17 18:25:43 +00:00
|
|
|
Translations are not implemented yet, see github issue #728. Please read the notes before opening a PR.
|
2020-04-08 09:34:58 +00:00
|
|
|
|
|
|
|
## Updating a translations
|
|
|
|
|
|
|
|
```bash
|
2020-05-24 18:33:04 +00:00
|
|
|
meson builddir
|
|
|
|
ninja lutris-update-po -C builddir
|
2020-04-08 09:34:58 +00:00
|
|
|
```
|
2020-06-17 18:25:43 +00:00
|
|
|
Now update the `$LANG.po` file, and run after that
|
2020-04-08 09:34:58 +00:00
|
|
|
```bash
|
2020-05-24 18:33:04 +00:00
|
|
|
ninja lutris-update-po -C builddir
|
|
|
|
rm -Rf builddir
|
2020-04-08 09:34:58 +00:00
|
|
|
```
|
|
|
|
and commit your changes.
|
|
|
|
|
|
|
|
## Creating a translation
|
|
|
|
|
|
|
|
```bash
|
2020-05-24 18:33:04 +00:00
|
|
|
meson builddir
|
|
|
|
ninja lutris-pot -C builddir
|
2020-04-08 09:34:58 +00:00
|
|
|
mv po/lutris.pot po/$LANG.po
|
|
|
|
```
|
2020-06-17 18:25:43 +00:00
|
|
|
Now edit the `$LANG.po` file, add `$LANG` to the `LINGUAS` file, and run after that
|
2020-04-08 09:34:58 +00:00
|
|
|
```bash
|
2020-05-24 18:33:04 +00:00
|
|
|
ninja lutris-update-po -C builddir
|
|
|
|
rm -Rf builddir
|
2020-04-08 09:34:58 +00:00
|
|
|
```
|
|
|
|
and commit your changes.
|
|
|
|
|
|
|
|
## Notes
|
|
|
|
|
|
|
|
- Only commit changes for the translation file you actually edited.
|
2020-11-04 10:34:47 +00:00
|
|
|
- Delete the first five lines (copyright notice) in the `$LANG.po` files.
|
2020-06-17 18:25:43 +00:00
|
|
|
- Keep the `LINGUAS` file sorted alphabetically.
|
2020-11-04 10:34:47 +00:00
|
|
|
- The files to translate might change, if the `ninja` commands fail, try to run `./po/generate-potfiles.sh`
|
2020-04-08 09:34:58 +00:00
|
|
|
- Languages can't be tested without installing Lutris via meson:
|
|
|
|
```bash
|
2020-07-12 11:46:25 +00:00
|
|
|
rm -Rf builddir
|
|
|
|
meson builddir --prefix=~/.local
|
|
|
|
ninja install -C builddir
|
2020-05-24 18:33:04 +00:00
|
|
|
|
|
|
|
rm -Rf builddir
|
|
|
|
meson builddir --prefix=~/.local
|
|
|
|
ninja install -C builddir
|
2020-04-08 09:34:58 +00:00
|
|
|
env LANGUAGE=$LANG ~/.local/bin/lutris
|
|
|
|
```
|