On 2 October 2013 00:44, Beco <[email protected]> wrote: > On 1 October 2013 19:03, Boris Pek <[email protected]> wrote:
[big snip] > > $ msgfmt -c -v -o hallo.mo en_US-hallowelt.po pt_BR-hallowelt.po > > I get this fatal errors: > > pt_BR-hallowelt.po:6: duplicate message definition... > en_US-hallowelt.po:7: ...this is the location of the first definition > pt_BR-hallowelt.po:22: duplicate message definition... > en_US-hallowelt.po:23: ...this is the location of the first definition > pt_BR-hallowelt.po:27: duplicate message definition... > en_US-hallowelt.po:30: ...this is the location of the first definition > msgfmt: pt_BR-hallowelt.po: warning: PO file header missing or invalid > warning: charset conversion will not work > msgfmt: found 4 fatal errors > Ah! Forget it! :) Its just plain usage: --------------------------------------------------------- Want a third language? Create the directory: $mkdir -p pt/LC_MESSAGES Then first create a new po with: $msginit -l pt_BR -o pt_BR-hallowelt.po -i hallowelt-neue.pot ================> pt_BR-hallowelt.po <================ Edit the "po" file! Then, compile it to a mo file $msgfmt -c -v -o pt_BR-hallo.mo pt_BR-hallowelt.po ================> hallo.mo <================ Copy it to the correct location and change the name $cp pt_BR-hallo.mo pt/LC_MESSAGES/hallo.mo And its ready. Run it! ================> $ ./hallowelt pt <================ Ola, mundo! ================> $ ./hallowelt pt -h <================ uso: ./hallowelt LA [-h] onde LA = pt, en ou C ---------------- Ok! Problem solved. Now, about this one here: > -------- > > Second small question: > It seems that adding > > #define _( String ) gettext( String ) > > breaks xgettext > > Is there any trick to get it working with the define? I'm still trying to figure it out. Thanks, Beco -- Dr Beco A.I. researcher "Sometimes the heart sees what is invisible to the eye." (H. Jackson Brown Jr.) -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/caluyw2yyc-s-mnw97eef3jc7fscwyvdjqtadzoodzbmex3v...@mail.gmail.com

