Hi guys,
I've put together the following doc for the introduction of message contexts. It's still a bit raw but I'd improve it for the wiki version.
Could you please have a look and help proofread it? I'd like to ensure I didn't miss an important step.
Thanks in advance.
Frédéric Delanoy
PS: BTW what is the reference version? en_US.po or en.po?
*********
Adding one/more message contexts (ADD LINK TO EXTERNAL DOC) (QUICK MC EXPLANATION)
Prerequisite: enable maintainer mode using ./configure --enable-maintainer-mode (you might have to add some development packages; check with your distribution for infos).
1. Locate strings to be "altered"
Say you have in your localized po file:
#: file1.rc:123 file2.rc:456 msgid "ambiguous word" msgstr "translation"
and you want to disambiguate, you'd do the following
2. Find appropriate translations - check the respective rc entries (in file1.rc line 123) FOO "ambiguous word"
(in file2.rc line 456) BAR "ambiguous word"
and find their meaning/context (e.g. using some code browsing tools, like cscope to find references; running the program is recommanded, ...)
3. Add the messages contexts - The following syntax is used: "translation" -> "#msgctxt#your context#translation"
- You end up with sthg like
FOO "#msgctxt#context #ambiguous word#"
Similarly
BAR "#msgctxt#context 2#ambiguous word#"
3. Run 'make depend && make' 4. Edit your po file to add the new translations 5. Ideally, remove the "#, fuzzy" automatically inserted in the En_US.po reference file (and En.rc ). 6. Run 'make' again and test your changes.
Am 24.04.2011 11:03, schrieb Frédéric Delanoy:
Hi guys,
I've put together the following doc for the introduction of message contexts. It's still a bit raw but I'd improve it for the wiki version.
I'd say just put it on the wiki and we'll see what happens. It's better than getting forgotten on the mailinglist.