Commit a711b488 authored by Alexandru Băluț's avatar Alexandru Băluț

bin: Unset LC_ALL when developing

It's set when entering the sandbox to en_US.UTF-8, and this prevents the
LANG env var to have effect.
parent 2f9d938a
......@@ -94,6 +94,15 @@ def _add_pitivi_path():
sys.path.append(path)
# i18n
if _in_devel():
# LC_ALL is set to en_US.UTF-8 by flatpak builder which is used
# when developers run Pitivi in the development sandbox.
# We don't need to use LC_ALL when developing, so unset it
# to avoid being surprised that setting LANG does not work.
try:
del os.environ["LC_ALL"]
except KeyError:
pass
localedir = os.path.join(DATADIR, "locale")
try:
gettext.bindtextdomain("pitivi", localedir)
......
......@@ -162,3 +162,23 @@ You can then inspect the call tree profile with your preferred image viewer:
```
$ xdg-open profile.svg
```
## Switching locales
To see how Pitivi looks in a different locale, use:
```
(ptv-flatpak) $ LANG=fr_FR.UTF-8 pitivi
```
Pay attention the translations in the sandbox are not automatically
updated when you `git pull`. You can update them by updating your
sandbox (`ptvenv --update`) or by reinstalling Pitivi in the sandbox:
```
(ptv-flatpak) $ binstall
[...]
Installing /.../pitivi-dev/pitivi/mesonbuild/po/de.gmo to /app/share/locale/de/LC_MESSAGES/pitivi.mo
[...]
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment