[PATCH] Maby a new Norwegian translation...

Christian Stimming stimming at tuhh.de
Tue Mar 7 16:27:06 EST 2006


Hi Tor,

Am Dienstag, 7. März 2006 04:51 schrieb Tor Harald Thorland:
> Christian or someone, can yoy please have a look at the attached updated
> nb.po file.... This is at least the 3. time i get this error on this
> message def. (it happend some months ago as well,,,) There must be
> something with this message that gtranslator dont like. 

Actually, yes, there is something that gtranslator obviously doesn't support: 
gnucash uses a ngettext(3) message here, which does not only have a 
msgid "..."
 but also a 
msgid_plural "..."
, and it doesn't only have one msgstr but several, depending on the plural 
forms of your language. This feature of gettext is admittantly not used very 
often, but it is really nice and we use it in 3-4 places in gnucash. Open the 
po/de.po file in a text editor and search for "ngettext" (mentioned in the 
source code comment) to see how these msgids are supposed to look like. 

Gtranslator, on the other hand, obviously doesn't support this construct: it 
erroneously dropped the msgid_plural marker from your po file, which will 
result in an erroneous string. I'm afraid you have to switch to a different 
po file editor if the latest gtranslator still doesn't support this. Actually 
it doesn't even not support it, but it additionally messes up the file format 
for these entries... hopefully the gtranslator guys have fixed that at some 
point in time, although I couldn't verify the status of the ngettext support 
in gtranslator anywhere on the web.

As a workaround in your current file, it would be sufficient to manually 
remove all the obsolete strings (last part of the file), which I now did with 
the file that I committed to SVN.

Christian

> I checked the 
> file with msgfmt -c --statistics a couple of times before i got to this
> stage, and also after I'd merged the pot & po file.
>
> So.. is it an explanation of it? If you have, could you please add this
> file as a new one to svn..
>
> Thanks!
> Tor Harald
>
> tortho at inspiron:~/source/gnucash/po$ msgfmt -c --statistics nb.po
> nb.po:19792: duplicate message definition
> nb.po:3636: ...this is the location of the first definition
> msgfmt: found 1 fatal error



More information about the gnucash-devel mailing list