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 567105 - Migrate gok to use msgctxt
Migrate gok to use msgctxt
Status: RESOLVED FIXED
Product: gok
Classification: Deprecated
Component: general
2.25.x
Other Linux
: Normal major
: ---
Assigned To: David Bolter
David Bolter
Depends on:
Blocks:
 
 
Reported: 2009-01-09 01:09 UTC by Leonardo Ferreira Fontenelle
Modified: 2009-02-16 11:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Migrated to msgctxt (4.02 KB, patch)
2009-01-09 01:30 UTC, Leonardo Ferreira Fontenelle
none Details | Review
Migrate to msgctxt ver. 2 (8.47 KB, patch)
2009-01-15 11:39 UTC, Gerd Kohlberger
none Details | Review
Fix msgids (4.51 KB, patch)
2009-02-15 10:32 UTC, Gerd Kohlberger
none Details | Review

Description Leonardo Ferreira Fontenelle 2009-01-09 01:09:11 UTC
http://live.gnome.org/GnomeGoals/MsgctxtMigration
Comment 1 Leonardo Ferreira Fontenelle 2009-01-09 01:30:13 UTC
Created attachment 126069 [details] [review]
Migrated to msgctxt

I'm not a hacker; please review this patch carefully.
Comment 2 Gerd Kohlberger 2009-01-15 11:37:22 UTC
Thanks Leonardo. I've made a few changes to your patch:

- removed some code that searched for the old context separator "|" in the strings.
- changed the context in gok_keyboard_get_alpha_by_frequency() to "freq-level #" instead of "level #". The problem was that the "level 2" and "level 3" strings of gok_keyboard_get_alpha() and gok_keyboard_get_alpha_by_frequency() were merged in the .po file, but it should be possible to translate each one individually.

Tested with en and de locales.
Comment 3 Gerd Kohlberger 2009-01-15 11:39:04 UTC
Created attachment 126497 [details] [review]
Migrate to msgctxt ver. 2
Comment 4 Leonardo Ferreira Fontenelle 2009-01-15 20:35:38 UTC
@Gerd Kohlberger: Will you commit your own patch? Do you want me to commit it?
Comment 5 Gerd Kohlberger 2009-01-16 09:56:36 UTC
I've committed the patch.

2009-01-16  Gerd Kohlberger  <gerdk@svn.gnome.org>

	* gok/gok-keyboard.c: Migrate to msgctxt (GNOME Goal).
	* configure.in: Bump glib and intltool versions.

	Patch by Leonardo Ferreira Fontenelle. Fixes bug #567105.
Comment 6 David Bolter 2009-01-16 14:41:17 UTC
Thanks Leonardo and Gerd! Great to have this fix.
Comment 7 Claude Paroz 2009-02-14 13:15:07 UTC
Sorry, but the result is not acceptable, because empty msgids (msgid "") are not valid. The sequence msgid ""/msgstr"" is of special meaning in po files and is only used in the header. msgmerge output is invalid when this sequence appear inside translatable body (See http://l10n.gnome.org/POT/gok.HEAD/gok.HEAD.sv.po)
Moreover translation status will always contain untranslated strings for language which do not fill these entries.

The solution, even non ideal, is to fill these with some code (e.g. "no-level-2", "no-level-3") and explain how to translate in the comment. The code should then check if this value is changed after getting in with gettext to determine is the value is filled or not (if _("no-level-2") == "no-level-2", level2 should be considered empty).
Comment 9 Gerd Kohlberger 2009-02-14 13:51:54 UTC
Thanks for the explanation Claude. I saw the thread on gnome-i18n, but wasn't sure what's going on. Your suggestions seems fine. I'll start working on a patch so we can fix this before string freeze.
Comment 10 Gerd Kohlberger 2009-02-15 10:32:48 UTC
Created attachment 128764 [details] [review]
Fix msgids

This adds 'no-level' flags. Please review the translator comments.
Comment 11 Claude Paroz 2009-02-16 08:22:55 UTC
Yes, that's fine, thanks! The only minor thing I would change is the first parameter to C_ macro (contextual marker). It can be "level" and "freq-level" instead of "level 2", "level 3",...
Comment 12 Gerd Kohlberger 2009-02-16 11:11:31 UTC
Fixed in trunk. Claude, I left the context strings as they are for now.