Issues

Issue #1417 resolved

make gettext doesn't generate translation string for parametrs of function

Anonymous created an issue

Hello, we are using html output from sphix for quite a while and we are extremely pleased, that it works so well. Now we wanted to have localised versions of documentation.

def add_key(self, key):
    """
    :param key: new key
    :type key: str

    usecase::

          class.add_key("item")

    Normal continuing of docstring...
    """

So we set up gettext and used make gettext to generate messages. It worked withouth problem, until we realised, that parameters of functions, methods and so on are not genereated. Is this how it should be? We get to messages just a last line, so something like this. Parametrs are missing.

msgid "Normal continuing of docstring..."
msgstr ""

msgid "Usecase::"
msgstr ""

Is there a easy way how to change this and append parameters? Thank you for awesome program.

Comments (12)

  1. AlfonzM

    Hello,

    yes you are right msgid "new key" is missing in generated pot file. Maybe we have some bad settings or something, but I guess that when txt output or html output works, gettext should be similiar, am I right?

  2. Georg Brandl repo owner

    Thanks for the confirmation. Unfortunately it's a bit more involved than that, but Takayuki-san has the most insight there and should be able to come up with a fix.

  3. Takayuki Shimizukawa
    • changed status to open

    Sorry I've re-confirmed with the explicit versions.

    • Sphinx-1.1.3 : the issue is reproduced. It's a limitation of the Sphinx-1.1.3.
    • Sphinx-1.2.1 : the issue is not reproduced. The problem was fixed since 1.2.
  4. AlfonzM

    Hello,

    oh..well we use Sphinx on Ubuntu and most of computers have 12.04 and probably also version 1.1.3. We will try to upgrade, anyway thanks for this information.

  5. Log in to comment