Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fleshed out .po file sample

I almost feel stupid asking this, but... are there any good sample .po files out there? I have been reading the GNU gettext manual and while it specifies the general structure it doesn't go into as much detail as I would like. Plus I would really like an actual fleshed out .po file that utilizes its more advanced functions (like msgctxt, #| msgctxt etc) so that I can run tests against it.

Any tips on where to find something like this?

like image 245
Anders Arpi Avatar asked Dec 16 '22 21:12

Anders Arpi


2 Answers

Here is a simple one

# My comment
#. Programmer comment
#: location.c:23
#| msgctxt "Old context"
#| msgid "Won"
#, fuzzy
msgctxt "Disambiguation for context"
msgid "One"
msgstr "Een"

I think that covers everything. There are other things like obsolete units, c-format markers. I think I've placed previous messages #| in the correct place and you might want to check the format.

like image 81
Dwayne Avatar answered Feb 16 '23 08:02

Dwayne


Look for some big open-source project, like openSUSE (Linux distro) - po files are available on http://svn.opensuse.org/svn/opensuse-i18n/trunk/, I'm sure you'll find there every possible function used.

like image 26
jderda Avatar answered Feb 16 '23 06:02

jderda