Hi, Sphinx users! Did some of you succeeded in internationalizing and localizing a Sphinx extension? My first naïve attempt failed, i.e. extension seems to work as expected, but translation did not occurred.
I've put its sources in GitHub repository: https://github.com/vincent-ferotin/sphinxcontrib-secualert so all could review and point what's missing and/or wrong... The extension is essentially copied from sphinx.ext.todo. It introduces 2 new directives: ``.. secualert::``, related to a security alert item, and ``.. secualertlist::``, for listing all previously described alerts. Messages translations stand in /sphinxcontrib/secualert/locale directory. I followed http://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_message_catalog and http://www.sphinx-doc.org/en/master/extdev/i18n.html#sphinx.locale.get_translation to setup extension with its own translated catalogs. Also, I'd taken care of including *.po and *.mo in package setup. But I probably missed something, as shown in project example (/example/ dir.), where translation failed for 'fr' (our 'fr_FR') language... Does anybody could help fixing this, please? (I quickly review all extensions in https://bitbucket.org/birkenfeld/sphinx-contrib but none seems to be localized.) Thanks in advance, V.F. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/d/optout.
