[dev] [en] fixing localization
Thomas Preud'homme
robotux at celest.fr
Ven 29 Mar 17:41:30 CET 2013
Hi there, [yeah I need to change from time to time]
I noticed while packaging SàT that the localization was not working despite
the translated strings being installed in the correct system path. Then I
stumbled upon this line in frontends/src/quick_frontend/quick_app.py:
gettext.install('sat_frontend', "../i18n", unicode=True)
and the corresponding line in frontends/src/jp/jp:
gettext.install('jp', "i18n", unicode=True)
The intent of these lines is to find the translated strings in the source tree
but then it doesn't work when installed properly. Of course an if statement
could be added to use the correct gettext.install but there is probably
cleaner solution to be done. Meanwhile, I follow the simple approach of using
the default system path in the Debian packaging as the package is supposed to
be installed, not just decompressed. The patch used can be found in the file
attached to this email.
Best regards,
Thomas Preud'homme
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: 0001-Search-.mo-files-in-default-system-locale-dir.patch
Type: text/x-patch
Taille: 1713 octets
Desc: non disponible
URL: <http://lists.goffi.org/pipermail/dev/attachments/20130329/8fbd464a/attachment.bin>
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: signature.asc
Type: application/pgp-signature
Taille: 836 octets
Desc: This is a digitally signed message part.
URL: <http://lists.goffi.org/pipermail/dev/attachments/20130329/8fbd464a/attachment.pgp>
Plus d'informations sur la liste de diffusion dev