2020-04-08 09:34:58 +00:00
|
|
|
# i18n
|
|
|
|
|
2020-06-17 03:01:18 +00:00
|
|
|
i18n build only works with the meson build system. See github issue #728 for more details.
|
2020-04-08 09:34:58 +00:00
|
|
|
|
|
|
|
## Updating a translations
|
|
|
|
|
|
|
|
```bash
|
|
|
|
meson transl-builddir
|
2020-06-16 19:21:19 +00:00
|
|
|
ninja build -C transl-builddir
|
2020-04-08 09:34:58 +00:00
|
|
|
ninja lutris-update-po -C transl-builddir
|
|
|
|
```
|
2020-06-17 03:01:18 +00:00
|
|
|
Now edit the `$LANG.po` file, and run after that
|
2020-04-08 09:34:58 +00:00
|
|
|
```bash
|
|
|
|
ninja lutris-update-po -C transl-builddir
|
|
|
|
rm -Rf transl-builddir
|
|
|
|
```
|
|
|
|
and commit your changes.
|
|
|
|
|
|
|
|
## Creating a translation
|
|
|
|
|
|
|
|
```bash
|
|
|
|
meson transl-builddir
|
2020-06-16 19:21:19 +00:00
|
|
|
ninja build -C transl-builddir
|
2020-04-08 09:34:58 +00:00
|
|
|
ninja lutris-pot -C transl-builddir
|
|
|
|
mv po/lutris.pot po/$LANG.po
|
|
|
|
```
|
2020-06-17 03:01:18 +00:00
|
|
|
Now edit the `$LANG.po` file, and run after that
|
2020-04-08 09:34:58 +00:00
|
|
|
```bash
|
2020-06-17 03:01:18 +00:00
|
|
|
ninja build -C transl-builddir
|
2020-04-08 09:34:58 +00:00
|
|
|
ninja lutris-update-po -C transl-builddir
|
|
|
|
rm -Rf transl-builddir
|
|
|
|
```
|
|
|
|
and commit your changes.
|
|
|
|
|
|
|
|
## Notes
|
|
|
|
|
|
|
|
- Only commit changes for the translation file you actually edited.
|
2020-06-17 03:01:18 +00:00
|
|
|
- Ignore or delete the first four lines (copyright notice) in the `$LANG.po` files.
|
|
|
|
- The `LINGUAS` and `POTFILES` updated by the `ninja build -C transl-builddir` command. You don't need to edit them manually.
|
2020-04-08 09:34:58 +00:00
|
|
|
- Languages can't be tested without installing Lutris via meson:
|
|
|
|
```bash
|
|
|
|
rm -Rf transl-builddir
|
|
|
|
meson transl-builddir --prefix=~/.local
|
2020-06-16 19:21:19 +00:00
|
|
|
ninja build -C transl-builddir
|
2020-06-16 02:06:49 +00:00
|
|
|
ninja install -C transl-builddir
|
2020-04-08 09:34:58 +00:00
|
|
|
env LANGUAGE=$LANG ~/.local/bin/lutris
|
|
|
|
```
|