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 520296 - Add i18n context to translatable string
Add i18n context to translatable string
Status: RESOLVED FIXED
Product: accerciser
Classification: Applications
Component: general
unspecified
Other All
: Normal major
: ---
Assigned To: Eitan Isaacson
Accerciser Developers
Depends on:
Blocks:
 
 
Reported: 2008-03-04 13:54 UTC by Wouter Bolsterlee (uws)
Modified: 2009-01-26 14:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Wouter Bolsterlee (uws) 2008-03-04 13:54:10 UTC
#: ../src/lib/accerciser/plugin/plugin_manager.py:375
      tvc = gtk.TreeViewColumn(_('View'))

View is ambiguous, since it can be both a verb and a noun. Please add translation context and a translator comment.
Comment 1 Wouter Bolsterlee (uws) 2008-03-04 13:57:44 UTC
There's another "View" string in the UI code (menu name) with a totally different meaning. Luckily there's an accelerator underscore there, otherwise this would definitely cause tranlation problems in Dutch:

#: ../src/lib/accerciser/ui_manager.py:23
msgid "_View"

Oh, and you can't expect translators to look in the source code for clarification—I'm an exception ;)
Comment 2 Eitan Isaacson 2008-03-05 22:14:11 UTC
The following translator comments have been added to trunk and to the gnome-2-22 branch:
# Translators: This is the viewport in which the plugin appears,
# it is a noun.
Comment 3 Wouter Bolsterlee (uws) 2008-03-05 23:18:28 UTC
A translator comment is not enough for many languages, e.g. for Dutch "View" may be translated as "Beeld" (noun) or "Tonen" (verb). The string itself should have context, e.g. something like Q_() or the pgettext() support in newer gettext versions.

The word "View" in accerciser is currently used in both versions—the only reason it's not a problem right now because "_View" != "View", so that I can translate it into the correct Dutch versions.

Reopening.
Comment 4 Wouter Bolsterlee (uws) 2008-05-20 10:26:16 UTC
Can this be fixed in trunk please? I'd suggest   Q_("menu|_View")  for the menu item, and  Q_("viewport|View")  for the viewport.
Comment 5 Wouter Bolsterlee (uws) 2008-09-17 21:01:09 UTC
Too bad this cannot go in anymore before 2.24 because of the string freeze. This bug should really be resolved in the next cycle.
Comment 6 Eitan Isaacson 2008-10-10 23:17:05 UTC
Wouter, I apologize for missing this in the last development cycle. I put your suggestions in trunk. Just re-open it again if I did not get what you mean :)
Comment 7 Wouter Bolsterlee (uws) 2008-10-11 11:59:19 UTC
Thanks,   return _(s).split('|', 1)[-1]   looks right to me.
Comment 8 Wouter Bolsterlee (uws) 2008-10-11 12:03:06 UTC
Oh, and while we're at it (too lazy to open a new report), please do the same for "Bookmarks", even though this is a less problematic case (since the 3rd person perspective is not used anywhere in the UI). So:

  #: ../src/lib/accerciser/ui_manager.py:22
  msgid "_Bookmarks"

...should be "menu|_Bookmarks", just like the view menu, which was already fixed:

  #: ../src/lib/accerciser/ui_manager.py:23
  msgid "menu|_View"

Thanks!
Comment 9 Wouter Bolsterlee (uws) 2009-01-25 19:49:36 UTC
Eitan, could you address my comments from comment #8 before we enter string freeze? Thanks a lot.
Comment 10 Eitan Isaacson 2009-01-26 14:31:38 UTC
Thanks Wouter. This has been updated in trunk.
Comment 11 Wouter Bolsterlee (uws) 2009-01-26 14:37:23 UTC
Thanks, I've noticed gnome-1i8n for you.
Comment 12 Eitan Isaacson 2009-01-26 14:38:06 UTC
Oops! Forgot it is string announcement period.
Comment 13 Wouter Bolsterlee (uws) 2009-01-26 14:45:34 UTC
No problem, I already did it for you. The internet is a collective brain :)