-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ok, recent conversations on IRC tend me to believe that the lang_extract and lang_compile commands are going to disappear eventually for a xgettext howto doc.
Although the doc seems pretty good info, since only now I've come in touch with i18n/l10n and gettext, I still feel some tools will be needed. The reason that makes me feel like that is because I use Genshi for templating, and genshi does not compile it's template's to python files so, xgettext will probably not work, I've tried a few times without success. So, I've came up with an idea, provide an external package, say i18ntools or pylonsi18ntools, whatever, that will do the work of lang_* on pylons 0.9.3 but, it will support extracting from genshi. A user could then add that package to it's project lib dir and do the setuptools command bindings on it's setup.py It will include pygettext and msgfmt from python, although TG has made some modifications on pygettext that I should probably use, and also a commands file, which will have the setuptools commands. It might be possible to, if found on system, use xgettext instead of pygetext, but I haven't done nothing regarding this. A bit more about genshi, effords are beying made that genshi supports pre filters, and when it comes to that, there will be no need to use _() for the strings to be translated, all strings inside, say <title></title> will be extracted, and "on the fly" changing them to the correct translation, altough, I have no idea on how plurals will be handled. So, until then, I'll keep using ugettext and ungettext, and working on the i18ntools package, and in case there's enough interest probably add kid support too(using code from TG). I'm currently working on the extraction from genshi with help from http://genshi.edgewall.org/wiki/GenshiRecipes/Localization, but the regex presented there is too narrow. So far I've succeeded on extending it a bit more, I can now also match: _("A string which " "will become " "\"too big\" to 'keep it' " "in just one line." ) And it actually works :) The job now is narrow the code on that genshi localization recipe, because we will just extract strings between _(), and ungettext support is also not done yet. Any ideas or help is always wanted. I'll keep you posted. - -- Pedro Algarvio __ ___ ___ _______ ___ __ | Y .' _| _ .-----.' _| |_ .-----.----.-----. |. | | _| 1___| _ | _| _|__| _ | _| _ | |. | |__| |____ |_____|__| |____|__|_____|__| |___ | |: 1 | |: 1 | |_____| |::.. . | |::.. . | ufs [AT] ufsoft [DOT] org `-------' `-------' ufs [AT] sapo [DOT] pt -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFFhH4VniPxVTX2hA4RAvGHAJ4+c3OuwSeIRGi/BzKH0EEHOvtYFACgs4r+ 4gRGac5rnQgE4OL40ilO7gE= =Wq4S -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
