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 474973 - Lack of context to translate
Lack of context to translate
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: applets
SVN TRUNK
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2007-09-08 21:26 UTC by Jorge González
Modified: 2007-11-15 16:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Proposed replacement of the "Request to %s" string (1.19 KB, patch)
2007-11-10 14:52 UTC, Gabor Kelemen
needs-work Details | Review
Proposed replacement of the "%s stopped..." strings (3.60 KB, patch)
2007-11-10 14:54 UTC, Gabor Kelemen
needs-work Details | Review
Update to the first patch (1.15 KB, patch)
2007-11-10 15:24 UTC, Gabor Kelemen
committed Details | Review
Update to the second patch. (3.55 KB, patch)
2007-11-10 15:26 UTC, Gabor Kelemen
committed Details | Review
Proposal to kill "%s because %s" (5.35 KB, patch)
2007-11-10 16:51 UTC, Gabor Kelemen
committed Details | Review

Description Jorge González 2007-09-08 21:26:33 UTC
There is a complete lack of context to translate the strings:
msgid "has stopped the %s from taking place : "
msgid "Multiple applications have stopped the %s from taking place."
msgid "Request to %s"

For what can be seen in bug #474920 there is no context at all, so the "normal" translation is completely wrong into Spanish. I've already fixed this, thanks to pacho, but in adition I had to look into the source code.

The strings belog to gpm-inhibit & gpm-manager.

PS: perhaps the first string has two extra spaces?
Comment 1 Richard Hughes 2007-09-17 15:51:10 UTC
>msgid "has stopped the %s from taking place : "

Totem has stopped the suspend from taking place

>msgid "Multiple applications have stopped the %s from taking place."

Multiple applications have stopped the hiberate from taking place.

>msgid "Request to %s"

Request to suspend.

Feel free to add translator comments to the source fiels where this is ambigous.

Thanks.
Comment 2 Gabor Kelemen 2007-11-07 15:44:54 UTC
Wow, these are in the top 10 ugliest string surgeries I have seen. Not to mention that it was not trivial to translate these properly (well, actually, they still suck in Hungarian). Please, kill all these strings and replace them with proper sentences, like:

%s has stopped the suspend from taking place
%s has stopped the hibernate from taking place
%s has stopped the sleep from taking place
(are there any other possible actions?)

There is also a similar sentence in gpm-info.c, in gpm_info_explain_reason, "%s because %s". This could be replaced with "%s %s", and the reasons on the place of the second %s could start with "because".

It's also worth reading this: http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#split-sentences
Comment 3 Richard Hughes 2007-11-07 18:04:19 UTC
>Wow, these are in the top 10 ugliest string surgeries I have seen.

Sure, not pretty, sorry. It's difficult to do it efficiently and be translatable, I think I err on the former too much. Seriously, if you guys come up with an initial patch of what you would want in an ideal world (even if it doesn't compile) I'll fix it up and commit it.

Cheers guys.

Richard.
Comment 4 Gabor Kelemen 2007-11-10 14:52:00 UTC
Created attachment 98869 [details] [review]
Proposed replacement of the "Request to %s" string

Here is an initial draft to solve the "Request to %s" problem, this adds a new string for each possible action.
Comment 5 Gabor Kelemen 2007-11-10 14:54:34 UTC
Created attachment 98870 [details] [review]
Proposed replacement of the "%s stopped..." strings

Draft to make "%s has stopped the %s from                                              taking place" strings more translator-friendly.
Comment 6 Richard Hughes 2007-11-10 15:03:21 UTC
Gabor, these look fine - but could you please stick to the intent and brace format used in the rest of the file pls:

if (something == 0) {
      do_somtething ();
} else if (somehting == 1) {
      do_something_else ();
}

Cheers dude.

Richard.
Comment 7 Gabor Kelemen 2007-11-10 15:09:24 UTC
Some comments to the patches: they are marked needs-work (altough they compile), because I'm not sure all actions are covered, nor that this is the most efficient way to do this, perhaps defining some enums and switching between them would be simpler than all this if-else-strcmp thing. 
Comment 8 Gabor Kelemen 2007-11-10 15:24:55 UTC
Created attachment 98871 [details] [review]
Update to the first patch
Comment 9 Gabor Kelemen 2007-11-10 15:26:45 UTC
Created attachment 98872 [details] [review]
Update to the second patch.

Do not leak bold strings, remove unneeded parameters and update indentation
Comment 10 Gabor Kelemen 2007-11-10 16:51:15 UTC
Created attachment 98873 [details] [review]
Proposal to kill "%s because %s"

Initial draft to kill the "%s because %s" string. 
This splits the sentence in two new sentences: first is the first %s, second is "Reason: %s". To do this, I have added  a period to the first sentences and capitalized the second sentences, hopefully all of them. 
Also marked two strings for translation ("clicked tray") and changed them to look a bit better.
Comment 11 Richard Hughes 2007-11-14 18:20:41 UTC
Gabor, please commit all your patches to trunk. Many thanks.
Comment 12 Gabor Kelemen 2007-11-15 16:17:43 UTC
Committed as rev 2569.