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 675929 - Splitted translatable string in po file!
Splitted translatable string in po file!
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Power
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Richard Hughes
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-12 10:15 UTC by Bruno Brouard
Modified: 2012-06-12 13:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bruno Brouard 2012-05-12 10:15:08 UTC
Splitting translatable strings is always broken for some languages.
-------------------------------------------------------------------

Have a look at the following discussion, on gnome-i18n list :

> Hello translator teams,
>
> Did you notice this strange coding technique :
> (in 
> http://git.gnome.org/browse/gnome-control-center/plain/panels/power/cc-power-panel.c)
>
> /* TRANSLATORS: this is a link to the "Brightness and Lock" control center panel */
>    tmp = g_strdup_printf ("<span size=\"small\">%s "
>                           "<a href=\"screen\">%s</a>  %s</span>",
>                           _("Tip:"),
>                           _("Brightness Settings"),
>                           _("affect how much power is used"));
>
> which leads to three separate messages in po file?
>
> Do you think i have to submit a bug report or does it work for any other 
> languages?

Splitting translatable strings is always broken for some languages, so
yes please, report a bug.
In this case, only the outer markup can be hidden to translators (span).
I understand that including the href in the translatable part is far
from ideal, but this is an unavoidable compromise. Optionally, the
"screen" part could also be separated to avoid translators touching it,
but may require another tmp string.

Claude
-- www.2xlibre.net
Comment 1 André Klapper 2012-05-15 08:01:10 UTC
The canonical reference is https://live.gnome.org/TranslationProject/DevGuidelines/Never%20split%20sentences and should be in such a bug report
Comment 2 Bastien Nocera 2012-06-12 13:13:00 UTC
commit b9e356412fad645fc55f4790f2022ef192bd1a8a
Author: Bastien Nocera <hadess@hadess.net>
Date:   Tue Jun 12 14:03:25 2012 +0100

    power: Fix reference to "Screen" settings
    
    This also fixes the use of a split string, as mentioned in
    bug #675929.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670567