PB wrote: ↑Fri Feb 07, 2020 12:38 pm
Thanks, I was able to get it working by looking at the output from AddTraceMask.
This is where I had my MO files located:
Code: Select all
./langs/en/en.mo
./langs/de/de.mo
./langs/ga/ga.mo
In order to get this to work, I had to move these files to:
Code: Select all
./langs/en/en.mo
./langs/en/de.mo
./langs/en/ga.mo
This works fine for now but obviously it's not the proper way to do it.
Here's the output from AddTracemask:
Code: Select all
looking for available translations of "ga" in search path:
/opt/gitdir/dynamo/langs
/usr/local/share/dynamo
/usr/local/share/locale
/usr/share/locale
found en translation of "ga" in /opt/gitdir/dynamo/langs/en
choosing best language for domain 'ga'
- available translations: [en,en_US,en]
- obtained best language from locale: en_GB
=> using language 'en_GB'
adding 'en_GB' translation for domain 'ga' (msgid language 'en_US'
looking for "ga.mo" in search path:
/opt/gitdir/dynamo/langs/en_GB.UTF-8/LC_MESSAGES
/opt/gitdir/dynamo/langs/en_GB.UTF-8
/usr/local/share/dynamo/en_GB.UTF-8/LC_MESSAGES
/usr/local/share/dynamo/en_GB.UTF-8
/usr/local/share/locale/en_GB.UTF-8/LC_MESSAGES
/usr/local/share/locale/en_GB.UTF-8
/usr/share/locale/en_GB.UTF-8/LC_MESSAGES
/usr/share/locale/en_GB.UTF-8
looking for "ga.mo" in search path:
/opt/gitdir/dynamo/langs/en_GB/LC_MESSAGES
/opt/gitdir/dynamo/langs/en_GB
/usr/local/share/dynamo/en_GB/LC_MESSAGES
/usr/local/share/dynamo/en_GB
/usr/local/share/locale/en_GB/LC_MESSAGES
/usr/local/share/locale/en_GB
/usr/share/locale/en_GB/LC_MESSAGES
/usr/share/locale/en_GB
looking for "ga.mo" in search path:
/opt/gitdir/dynamo/langs/en/LC_MESSAGES
/opt/gitdir/dynamo/langs/en
/usr/local/share/dynamo/en/LC_MESSAGES
/usr/local/share/dynamo/en
/usr/local/share/locale/en/LC_MESSAGES
/usr/local/share/locale/en
/usr/share/locale/en/LC_MESSAGES
/usr/share/locale/en
Using catalog "/opt/gitdir/dynamo/langs/en/ga.mo".
It seems that I'm using the name of the laguage, e.g. "ga", instead of the name of my application, i.e. "dynamo".
What I really
really really want to do is just specify the path of an MO file, for example "/tmp/ga.mo" and to get rid of all that system stuff like "/usr/share/locale".
By the way, it looks like my application knows that I've written it in English... or maybe it's just reading the system locale as "en" and that's why it's looking in the folder "./langs/en". Again I don't want any of this stuff, I just want to specify a path to a catalogue file to load.