After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 567103 - Migrate gnome-games to use msgctxt
Migrate gnome-games to use msgctxt
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: glchess
trunk
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-09 00:45 UTC by Leonardo Ferreira Fontenelle
Modified: 2009-07-04 14:12 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Migrate from Q_ to C_ (247.63 KB, patch)
2009-01-09 00:46 UTC, Leonardo Ferreira Fontenelle
none Details | Review
Migrated Q_ to C_ (3.74 KB, patch)
2009-01-09 01:04 UTC, Leonardo Ferreira Fontenelle
none Details | Review
Create and use a C_ function for message contexts (10.20 KB, patch)
2009-06-20 20:09 UTC, Claude Paroz
none Details | Review

Description Leonardo Ferreira Fontenelle 2009-01-09 00:45:02 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
Comment 1 Leonardo Ferreira Fontenelle 2009-01-09 00:46:39 UTC
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).
Comment 2 Leonardo Ferreira Fontenelle 2009-01-09 01:04:18 UTC
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.
Comment 3 Christian Persch 2009-01-09 17:34:37 UTC
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.
Comment 4 Leonardo Ferreira Fontenelle 2009-01-09 19:02:50 UTC
I fear that's too much for my limited skills.
Comment 5 Christian Persch 2009-01-10 15:34:56 UTC
Fixed in svn trunk.
Comment 6 Simos Xenitellis 2009-02-01 12:32:28 UTC
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.
Comment 7 Simos Xenitellis 2009-02-01 12:43:28 UTC
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.
Comment 8 Christian Persch 2009-02-02 20:19:01 UTC
Reopening since apparently it's not all done (comment 15 and 16).
Comment 9 Christian Persch 2009-05-01 14:00:34 UTC
Moving to glchess component for remaining work as per comment 6.
Comment 10 Claude Paroz 2009-06-16 20:35:09 UTC
Orca has such a C_ function, see http://git.gnome.org/cgit/orca/tree/src/orca/orca_i18n.py.in
Comment 11 Claude Paroz 2009-06-20 20:09:20 UTC
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.
Comment 12 Christian Persch 2009-06-22 13:18:59 UTC
Have you checked that intltool can extract those strings from the python files correctly ?
Comment 13 Claude Paroz 2009-06-22 18:52:03 UTC
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
Comment 14 Claude Paroz 2009-07-01 18:23:18 UTC
Would be cool to have this in before 2.28 string freeze.
Comment 15 Robert Ancell 2009-07-04 14:12:50 UTC
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.