Comment 2 for bug 168838

Revision history for this message
Clytie Siddall (clytie) wrote :

Originator: NO

I'll add the msgctxt information here, as well.

msgctxt is the context feature added in recent versions of gettext. It
enables the developer to add contextual information, without mixing it up
with the string headers. It allows translators to use these strings more
effectively in translation memory. We hope it will encourage more
developers to follow Inkscape's example by providing context for messages
needing translation. :)

A summary:

 - PO files can now contain messages constrained to a certain context.
    Most often such a context is a menu, dialog or panel identification.
    The syntax in the PO file is
      msgctxt "context"
      msgid "original"
      msgstr "translation"
  - The xgettext program can be told through the --keyword flag which
    function/macro argument has the role of a context.
  - The (non-public) include file gettext.h defines macros pgettext,
dpgettext
    etc. that take a context argument.
  For more information, see the node "Contexts" in the manual.

http://www.gnu.org/software/gettext/manual/

I would also suggest that you use another newer gettext feature,
previous-msgid. This feature allows translators to diff between different
versions of strings. It is particularly useful when a string is complex or
long and detailed. When a string has changed the PO file looks like this
(simple and brief example):

#, string header
msgid-previous "This is the old string"
msgid "This is the new string"
msgstr "This is the old string translated"

The translation editor can highlight the changed words, in this case,
"old" and "new" in msgid-previous and msgid. It's a big help in updating
files. Without msgid-previous, when you notice a long help screen has been
changed (fuzzy), it actually takes less time to translate the whole thing
again, than it does to pick through it and try to work out what has
changed. So msgid-previous saves us translation time, and ensures we focus
on what has actually changed in the string.

I hope Inkscape will take advantage of these newer features in gettext. :)