-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 07.08.2012 21:20, schrieb Roberto Longobardi: > Hi all, > I have implemented I18N in one of my plugins > <http://trac-hacks.org/wiki/TestManagerForTracPlugin> some time ago, but > there's still one thing that does not work, localization of Genshi > templates. > > I thought someone on this list may wish to help me with this. > > The build process works fine, i.e. strings are correctly extracted from > the templates and added to catalogs. > I can make the translations in the locale-specific catalogs and then > compile them. > > Strings in python files are correctly displayed according to the user > browser's locale, but Genshi templates are still always displayed in > English, even if their strings appear translated in the catalogs. > > Is there maybe something more I have to do to explicitly "tell Genshi" > to process templates according to localization?
Remember, that you wrote the following when adding i18n support to your api.py: bind 'testmanager' catalog to the specified locale directory ? Well, your templates miss exactly that hint on your plugins message "domain": <html xmlns="http://www.w3.org/1999/xhtml" 5 xmlns:xi="http://www.w3.org/2001/XInclude" 6 xmlns:i18n="http://genshi.edgewall.org/i18n" 7 xmlns:py="http://genshi.edgewall.org/"> 8 9 <xi:include href="admin.html" /> 10 11 <head> better: <html xmlns="http://www.w3.org/1999/xhtml" 5 xmlns:xi="http://www.w3.org/2001/XInclude" 6 xmlns:i18n="http://genshi.edgewall.org/i18n" 7 xmlns:py="http://genshi.edgewall.org/" 8 i18n:domain="testmanager"> 9 <xi:include href="admin.html" /> 10 11 <head> Hope, this will get you going. Steffen Hoffmann -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAi9uEACgkQ31DJeiZFuHdqfwCfZn40ZyK1+HeK2Q1aBu/Lp7Zy /boAn2Ire+ZHNUgZ01jBTqAux5zlhF7a =siS4 -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en.
