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

Fixing a 'simple' bug with .po files



Assalamou Alaikom,
I was notified by Nadim that there a problem in the full_wordlist_B.po file. The file couldn't be opened in the translation program for editing. So, I thought this would be helpful.
Just in case you face such a problem, here's a quick tip that could help:
- use the command:
msgfmt --statistics full_wordlist_B.po (ofcourse, replacing the file name as necessary)

- Check the error message, that could be something like what I found...
translate/wordlist/full_wordlist_B.po:1051: missing `msgstr' section
translate/wordlist/full_wordlist_B.po:1052: missing `msgstr' section
msgfmt: found 2 fatal errors
... which would tell you that there is something wrong at lines 1051 and 1052, i.e. msgstr is missing.

- Since you can't open the file with the translater application, you can simply use VI (this is the one I love, or actually feel comfortable with :) )

- When you open the file by typing "vi full_wordlist_B.po" (removing the double quotes), the editor will show up with the file and the line number you're currently at appearing at the bottom left of the screen.

- By scrolling the page down untill you see the line number near the 1050 you'll be able to dig and find the error.

- Press 'I' to beginning editing and do the changes as necessary and press ESC when you finish.

- Finally, save the file by typing ':wq' and that's it! You've just tracked and fixed a bug in a .po file :)

I hope this is helpfull, and sorry for talking alot.. hehe :)

regards,
Ossama Khayat
-- 
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze