Procedure for adding message contexts to PO messages?
Hi, I'm quite green wrt PO files and was reviewing French PO file after recent rc -> po migration. So I read somewhat about PO format and Wine's "PO support code". I wonder how to add message contexts, and thought it might be this way: 1. Add msgctxt "myContext" next to the associated msgid "myMsgid" string in en.po 2. Replace myMsgid by #msgctxt#myContext#myMsgid in the relevant rc file (e.g. IDS_MY_KEY, "#msgctxt#myContext#myMsgid") 3. Translate Is that the correct procedure? Or am I missing something? I suppose, if there are multiple contexts (which should always be the case when introducing contexts, otherwise "#." extracted comments should be used IMHO), rc files key should be duplicated as well, so we'd rather have sthg like that? (originally) IDS_MY_KEY, "myMsgid" becomes IDS_MY_KEY1, "#msgctxt#myContext1#myMsgid" IDS_MY_KEY2, "#msgctxt#myContext2#myMsgid" with source code references adapted, or maybe IDS_MY_KEY, "myMsgid" IDS_MY_KEY1, "#msgctxt#myContext1#myMsgid" where IDS_MY_KEY uses the most common, "default" context. This would also minimize the amount of changes to be done in source files. Thanks for clarifications, Frédéric PS: For interested people, here's the "reference" I found : http://pology.nedohodnik.net/doc/user/ch-poformat.html
2011/1/11 Frédéric Delanoy <frederic.delanoy(a)gmail.com>:
Hi,
I'm quite green wrt PO files and was reviewing French PO file after recent rc -> po migration. So I read somewhat about PO format and Wine's "PO support code".
I wonder how to add message contexts, and thought it might be this way: ... Thanks for clarifications,
Hi. Could someone please comment on this, so I can go on with the translation? My intention is certainly not to use message contexts all around, but to know how to do it correctly when they make sense. Thanks in advance, Frédéric Delanoy
Frédéric Delanoy <frederic.delanoy(a)gmail.com> writes:
Could someone please comment on this, so I can go on with the translation?
My intention is certainly not to use message contexts all around, but to know how to do it correctly when they make sense.
If you think there are places that need a context, send a patch to the rc files with an explanation. You don't have to worry about changing other po files, it's all done automatically. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Frédéric Delanoy