GNOME Bugzilla – Bug 567103
Migrate gnome-games to use msgctxt
Last modified: 2009-07-04 14:12:50 UTC
Currently there are messages in gnome-games using the old "context|id" context handling, and it's a GNOME Goal to migrate to gettext's msgctxt: http://live.gnome.org/GnomeGoals/MsgctxtMigration
Created attachment 126066 [details] [review] Migrate from Q_ to C_ This patch does not affect the relevant messages in python files -- because I don't know how to do it (yet).
Created attachment 126068 [details] [review] Migrated Q_ to C_ This attachment fix an issue in the previous attachment (it included needless changes to a message catalog). Still doesn't touch Python files.
This doesn't look right: -{"Medium", N_("gnomine|Medium")}, +{"Medium", C_("gnomine", "Medium")}, You replace N_ by C_. But N_ only annotates the string for extraction, so you need NC_ here. And then find out where this string is actually translated with gettext/_() and fix that to use g_dpgettext2 instead. That will probably necessitate changes to games-scores.
I fear that's too much for my limited skills.
Fixed in svn trunk.
What's remaining from gnome-games is 'glchess', and the messages at http://svn.gnome.org/viewvc/gnome-games/trunk/glchess/src/lib/chess/__init__.py?view=markup I have a patch for the cosmetic changes, however it requires some small code changes as well.
As noted in the mailing list, there is a Python issue with msgctxt, http://bugs.python.org/issue2504 Would it be acceptable, for the purposes of the msgctxt migration, to define a 'C_' function that returns the string in the old form 'context|Message'? Then, the existing code would continue to work.
Reopening since apparently it's not all done (comment 15 and 16).
Moving to glchess component for remaining work as per comment 6.
Orca has such a C_ function, see http://git.gnome.org/cgit/orca/tree/src/orca/orca_i18n.py.in
Created attachment 137083 [details] [review] Create and use a C_ function for message contexts This patch should care for the remaining old-style messages with context in glchess.
Have you checked that intltool can extract those strings from the python files correctly ?
Yes, I did. C_ is extracted from the 0.40.1 version, AFAIK. See http://bazaar.launchpad.net/%7Eintltool/intltool/trunk/revision/658#intltool-update.in
Would be cool to have this in before 2.28 string freeze.
Committed to head http://git.gnome.org/cgit/gnome-games/commit/?id=484d28995afff4f46ec7d8aecb2333ea27f94ae0 This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.