bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

msgmerge


From: Lalo Martins
Subject: msgmerge
Date: Wed, 11 Sep 2002 22:17:44 -0300
User-agent: Mutt/1.4i

Hi there :-)

I'm using gettext to translate dynamic webpage templates. I had to write my
own xgettext-like script for that.

In it, I'm "abusing" reference lines like this:

#: from plone_content/document_edit_form.pt
#.   <input attributes="tabindex tabindex/next;" tabindex="" value="Save" 
class="context" type="submit" name="Change" />
#.
#: from plone_content/file_edit_form.pt
#: from plone_content/image_edit_form.pt
#.   <input attributes="tabindex tabindex/next;" tabindex="" value="Save" 
class="context" name="change" type="submit" />
#.
#: from plone_content/metadata_edit_form.pt
#.   <input attributes="tabindex tabindex/next;" tabindex="" value="Save" 
class="context" type="submit" name="change_and_view" />
#.
#: 4 more references
msgid "Save"
msgstr "Save"

(where the #. lines are examples copied from the source.)

I can't use the normal reference format, as the parser I'm using doesn't
provide line number information. Also, it is important for us to signal many
references when they exist. Well, perhaps not in this example ;-)

But when I run this trough msgmerge, it becomes:

#.   <input attributes="tabindex tabindex/next;" tabindex="" value="Save" 
class="context" type="submit" name="Change" />
#.
#.   <input attributes="tabindex tabindex/next;" tabindex="" value="Save" 
class="context" name="change" type="submit" />
#.
#.   <input attributes="tabindex tabindex/next;" tabindex="" value="Save" 
class="context" type="submit" name="change_and_view" />
#.
#: from  plone_content/document_edit_form.pt
#: plone_content/file_edit_form.pt plone_content/image_edit_form.pt
#: plone_content/metadata_edit_form.pt
msgid "Save"
msgstr "Salvar"

That's not too bad, but it's a pity to lose the context of which is which.

Can this be helped? Or perhaps there is a better way for me to do what I want?

[]s,
                                               |alo
                                               +----
--
            Those who trade freedom for security
               lose both and deserve neither.
--
http://www.laranja.org/                mailto:address@hidden
         pgp key: http://www.laranja.org/pessoal/pgp

Eu jogo RPG! (I play RPG)         http://www.eujogorpg.com.br/
Python Foundry Guide http://www.sf.net/foundry/python-foundry/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]