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 249844 - "New" submenu entries need to have fully qualified names
"New" submenu entries need to have fully qualified names
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.6.x (obsolete)
Other All
: Normal normal
: Future
Assigned To: Harish Krishnaswamy
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2003-10-20 00:41 UTC by Christian Rose
Modified: 2008-08-06 15:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for the bug:New Sub menu entries should have fully qualified names (8.33 KB, patch)
2004-03-12 20:17 UTC, umesh tiwari
none Details | Review
Proposed patch (5.93 KB, patch)
2008-08-02 04:21 UTC, Matthew Barnes
none Details | Review
Revised patch (6.49 KB, patch)
2008-08-02 23:47 UTC, Matthew Barnes
committed Details | Review
proposed evo patch (10.56 KB, patch)
2008-08-06 13:02 UTC, Milan Crha
committed Details | Review

Description Christian Rose 2003-10-20 00:41:56 UTC
English is one of few languages that doesn't differ between genders for
nouns. In many other languages, it's absolutely essential to use the
correct gender and correct gender adjectives for the noun.

Thus, the "New" menu and "New" button in Evolution are *very* problematic
for translation, as the adjective "new" can (and in the case of Evolution
very much does) refer to many different types of objects and words, words
that are nouns and that have different genders, and that thus needs
different variants of the adjective "new" to be anything remotely similar
to correct language.

Because of this, the entire concept of having a single "New" menu and a
single "New" button for creating many different types of objects is
fundamentally flawed from a linguistic point of view.

Still, the current situation in Evolution could be improved would the "New"
menu entries be altered so that their meaning could be self-contained. So
instead of the current menu layout:

New -> Mail Message
New -> All Day Appointment
New -> Contact
New -> Contact List
New -> Appointment
New -> Meeting
New -> Post Message
New -> Task
New -> Folder
New -> Shortcut
New -> Evolution Window

one would also add "New" to the submenu entry names to make them fully
qualifed and make it possible to at least translate the messages in the
submenus correctly:

New -> New Mail Message
New -> New All Day Appointment
New -> New Contact
New -> New Contact List
New -> New Appointment
New -> New Meeting
New -> New Post Message
New -> New Task
New -> New Folder
New -> New Shortcut
New -> New Evolution Window
Comment 1 Gerardo Marin 2004-01-28 05:57:54 UTC
Retargeting 1.5.3->1.5.4 bug reports. Sorry for the spam.
Comment 2 Not Zed 2004-02-06 06:03:18 UTC
what does outlook do in foreign languages?
Comment 3 Mikael Hallendal 2004-02-06 11:40:14 UTC
Outlook seems to do it as current Evolution ie.

New -> Mail Message
New -> All Day Appointment

which looks really silly in swedish since you get the grammar wrong as
Christian explained.
Comment 4 umesh tiwari 2004-03-12 20:17:04 UTC
Created attachment 43408 [details] [review]
Patch for the bug:New Sub menu entries should have fully qualified names
Comment 5 Gerardo Marin 2004-03-13 20:24:36 UTC
Please submit your patch to evolution-patches mailing list.
You may need to subscribe. Please see http://lists.ximian.com
Comment 6 Not Zed 2004-03-17 09:25:26 UTC
i dunno if this really falls into ui/product-design, but can you guys
comment either way?

i'm inclined to just take the patch fwiw.
Comment 7 Bryan W Clark 2004-03-31 21:54:49 UTC
Ugh, Christian makes a good point as usual.  However adding the word
"New" to every menu item decreases the readability in English.  It
prevents the eye from quickly scanning the item names as they all
start with the same 3 letters and a space.  If the translators wanted
to translate those items into "New ..." for each language where it
makes sense then I think that would be the best idea.  However for
English this would be a step back.
Comment 8 JP Rosevear 2004-04-28 02:50:28 UTC
I'm going to go with Bryan's comments here, we can revisit in 2.1.0
time frame.
Comment 9 Christian Rose 2004-07-12 16:59:17 UTC
Regarding Bryan's comment, I don't think it's currently possible for a
translator to diverge from the original here.

"Task" cannot be translated into the equivalent of "New Task", since
gettext allows any unique string to be translated only once for the
whole gettext domain/application (since translations are hash
key/value pairs where the unique original string is the key), and a
string like "Task" and the other ones are likely to occur in other
places aswell, where translating them with "New..." may be incorrect.

AFAIK the only way to resolve this without rewriting the original
English strings would be to use context markers in these messages
(http://bugzilla.gnome.org/show_bug.cgi?id=97556), so that they can be
translated seperately from the other occurrences elsewhere of these
strings.
Comment 10 André Klapper 2005-06-03 14:27:25 UTC
...so moving milestone from 2.1 to 2.3 (pretty sure it will be moved further
into future as time goes by... ;-)
Comment 11 Calum Benson 2005-07-28 10:40:45 UTC
Apologies for any spam... cc'ing usability-maint on all Evolution usability
bugs. Filter on EVO-USABILITY-SPAM to ignore.
Comment 12 André Klapper 2006-01-09 02:13:15 UTC
at least retargetting from 2.3 to 2.5
Comment 13 André Klapper 2006-02-27 23:44:49 UTC
did not happen in 2.5 timeframe, changing target milestone to "future".
this will not be fixed in 2.6 because we're under string freeze.
Comment 14 Matthew Barnes 2007-09-29 01:44:31 UTC
Regarding comment #9, couldn't we prefix the translated "New" menu item strings to make them unique?

  e.g.  Q_("New|Mail Message")

See: http://library.gnome.org/devel/glib/unstable/glib-I18N.html#Q-:CAPS
Comment 15 Christian Rose 2007-09-29 10:34:18 UTC
Yes, except it would have to be:

  Q_("Mail Message|New")
  Q_("Contact|New")

etc. It is the word "New" that needs adopting to the context.
Comment 16 Matthew Barnes 2008-03-11 00:26:58 UTC
Bumping version to a stable release.
Comment 17 Matthew Barnes 2008-08-02 04:21:31 UTC
Created attachment 115717 [details] [review]
Proposed patch

Attempting to implement Christian's suggestion in comment #9.

Marks "New" submenu entries with a "New" translation prefix, so they can be distinguished from other uses of the same text in the application.

   e.g.  - menuDescription = _("_Task");
         + menuDescription = Q_("New|_Task");

So if the language calls for it, "New|_Task" could be translated to have a fully qualified name, as shown in comment #0.
Comment 18 Christian Rose 2008-08-02 18:42:34 UTC
gettext now natively supports adding context to strings, with the msgctxt() call. We will most likely switch to this gettext way of marking context elsewhere in GNOME (however this is not yet finally decided), but perhaps it would make sense to use the C_ macro instead of the Q_ macro when patching this (if requirements allow it). See http://live.gnome.org/GnomeGoals/MsgctxtMigration
Comment 19 Matthew Barnes 2008-08-02 23:47:40 UTC
Created attachment 115751 [details] [review]
Revised patch

Revised patch uses C_() instead of Q_().  Also finishes off the GNOME Goal, though I only found one string already using Q_() where the wiki claims two.
Comment 20 Srinivasa Ragavan 2008-08-04 03:23:27 UTC
Looks fine to commit.
Comment 21 Suman Manjunath 2008-08-04 03:43:43 UTC
Patch committed to SVN trunk as r35897
http://svn.gnome.org/viewvc/evolution?view=revision&revision=35897 

Please close the bug after announcing string change to gnome-doc-list and gnome-i18n.
Comment 22 Matthew Barnes 2008-08-04 03:59:45 UTC
Announced, and MsgctxtMigration page updated.
Comment 23 Milan Crha 2008-08-06 12:49:33 UTC
This change made compiler a bit unhappy:
addressbook-component.c: In function ‘impl__get_userCreatableItems’:
addressbook-component.c:229: warning: assignment discards qualifiers from pointer target type
addressbook-component.c:237: dtto
addressbook-component.c:245: dtto
memos-component.c: In function ‘impl__get_userCreatableItems’:
memos-component.c:1261: dtto
memos-component.c:1269: dtto
memos-component.c:1277: dtto
tasks-component.c: In function ‘impl__get_userCreatableItems’:
tasks-component.c:1326: dtto
tasks-component.c:1334: dtto
tasks-component.c:1342: dtto
mail-component.c: In function ‘impl__get_userCreatableItems’:
mail-component.c:917: dtto
mail-component.c:925: dtto

btw, you missed the calendar-component.c :)

When fixing these warnings, I got rid of this one too:
em-event.c: In function ‘em_event_target_new_custom_icon’:
em-event.c:198: warning: assignment discards qualifiers from pointer target type
Comment 24 Milan Crha 2008-08-06 13:02:47 UTC
Created attachment 115970 [details] [review]
proposed evo patch

for evolution;

I didn't find any better way that cast the return of C_ macro to 'char *'. Is there any better possibility?
Comment 25 Matthew Barnes 2008-08-06 14:23:01 UTC
That's weird that using C_() throws warnings but Q_() doesn't.  Both return a const gchar * (I thought).

Anyway, not worth worrying about a better way.  The Bonobo code is not long for this world.  ;)

Please commit, Milan.
Comment 26 Milan Crha 2008-08-06 15:45:07 UTC
Committed to trunk. Committed revision 35916.