Translation po file questions
Christian Stimming
stimming at tuhh.de
Mon May 12 12:56:01 CDT 2003
Thanks for your questions. If you find any useful answers, you can add
them to doc/README.translators.txt and submit the updated
README.translators.txt to gnucash-patches. We will happily include an
updated translators FAQ in our CVS.
Jon Lapham schrieb:
> 1) The po/pt_BR.po file in the current CVS has: "POT-Creation-Date:
> 2002-11-13 23:49+0100\n". Is this pathetically out of date? Should I
> recreate this file somehow? Are the po files automatically updated with
> some master po file, or is it the responsibility of the translator?
This is not "pathetically" out of date. Less than 5% of the strings
might have changed since then. Anyway, these files are updated
*sometimes* by the packager, but IN GENERAL this is the responsibility
of the translator. *You* can (and should) simply decide: "This po file
is from an old POT file. I recreate it, i.e. I will run msgmerge now."
Simply go ahead. (If in doubt, see gettext manual about how to update
your po file. You get your up-to-date pot file by 'cd po; rm
gnucash.pot; make gnucash.pot')
In general the programmers (we) are responsible for the strings itself
and thus the pot file, and the translators (you) are responsible for the
po file (except maybe for file format problems, in which case we will
notify you of them). Let me repeat that again: You, the translator, can
tell us really anything you want us to do with your po file, and we, the
programmers, will accept it. The po file is absolutely yours.
> 2) How do I locate the place in the gnucash source code where a text
> chunk is to be translated. For exemple, in the current CVS version of
> po/pt_BR.po I see this:
>
> # src/gnome/window-register.c:866 src/gnome/window-register.c:1457
> # src/gnome/window-register.c:1638
> #: src/gnome/glade/register.glade.h:33
> msgid "Move to the blank transaction at the bottom of the register"
> msgstr "Ir para a transação em branco no final do registo"
>
> I do not see the text in window-register.c anywhere, and I do not have a
> register.glade.h file. Maybe this is a just a symptom of the
> "POT-Creation-Date" being very out of date?
The missing window-register.c has moved somewhere else. Recreate your po
file from the pot file (i.e. run msgmerge), and there you are.
On the other hand the bla.glade.h files are created on-the-fly from the
respective file bla.glade (by some tool whose name I forgot). If you
want to look up that string, go into that glade file. Glade's XML file
format is sometimes relatively readable.
> 3) How do I translate stuff that looks like this? I'm guessing this is
> some sort of formatting code?
> msgid "%P %%"
>
> If it is standard C fomatting code, "%P" is used to format pointers... I
> guess I just translate this as "%P %%" and not think too much about it?
Not always. This depends whether that msgid has the comment
#, c-format
in front of it, in which case this is standard C formatting code (see
gettext documentation). The specific case mentiones has a comment
no-c-format (it's from a glade file), so it is treated as normal text
and you should translate it according to your language's conventions
about percent signs.
> 4) What does the underscore mean, in msgids like this:
> msgid "Chec_k & Repair"
>
> I'm assuming the underscore defines the shortcut key (press "k" in this
> example), the portuguese translation of this is "Verificar & Corrigir",
> which does not have a "k". Can I simply choose some other letter?
Yes and yes -- this is the shortcut key, and you simply can choose some
other letter i.e. the translator has the full freedom here -- except
that you should probably respect your GNOME language team's conventions
about which shortcuts to use, if this is a common menu item. Doesn't
matter too much, however.
Christian
More information about the gnucash-devel
mailing list