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 683973 - Splitted sentence is untranslatable
Splitted sentence is untranslatable
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.5.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-09-13 16:31 UTC by Jiro Matsuzawa
Modified: 2012-09-14 15:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
embed: don't split a translatable string (1.26 KB, patch)
2012-09-13 18:24 UTC, Cosimo Cecchi
none Details | Review
embed: don't split a translatable string (1.50 KB, patch)
2012-09-13 23:32 UTC, Cosimo Cecchi
committed Details | Review

Description Jiro Matsuzawa 2012-09-13 16:31:07 UTC
The following message cannot be translated into some languages (e.g. Japanese).

src/embed.js:
239     _addSystemSettingsLabel: function() {
240         let details = new Gtk.Label({ label: _("You can add your online accounts in") +
241                                       " <a href=\"system-settings\">" + _("System Settings") + "</a>",

Splitting one sentence into some parts makes the sentence untranslatable.
Please see the following i18n guideline:
https://live.gnome.org/TranslationProject/DevGuidelines/Never%20split%20sentences

I know the GNOME goal to remove markup [1]. But splitting sentences should be more problematic.

[1] https://live.gnome.org/GnomeGoals/RemoveMarkupInMessages
Comment 1 Cosimo Cecchi 2012-09-13 18:24:48 UTC
Created attachment 224253 [details] [review]
embed: don't split a translatable string
Comment 2 Cosimo Cecchi 2012-09-13 18:27:29 UTC
Hi Jiro, thanks for the report.
Would the attached patch solve the bug for you? It keeps the string split, but the main part is now "You can add your online accounts in %s", with "System Settings" being formatted into the %s. This way, you can change its position in the final string without the need to embed markup into the translation.

Let me know, I am ready to ask a string freeze break for this.
Comment 3 Jiro Matsuzawa 2012-09-13 21:55:24 UTC
(In reply to comment #2)
> Hi Jiro, thanks for the report.
> Would the attached patch solve the bug for you? It keeps the string split, but
> the main part is now "You can add your online accounts in %s", with "System
> Settings" being formatted into the %s. This way, you can change its position in
> the final string without the need to embed markup into the translation.
> 
> Let me know, I am ready to ask a string freeze break for this.

Hi Cosimo, thank you.
I've confirmed that the patch fixes the problem.
Could you please ask a string freeze break?
Comment 4 André Klapper 2012-09-13 23:00:45 UTC
I am afraid that this won't work in some languages where the case (dative in english or locative in Czech) has a different declination than the nominative case that the separate string implies.
In Czech this specific example creates no problems ("Nastavení systému" in both cases), but I am extremely sure that in some other Slavic language this will be a problem.

To provide an example in Czech where it wouldn't work I'm using the name of the Czech capital, the city of Prague:
 nominative:                       "Prague" = "Praha"
 locative (or dative in English):  "in Prague" = "v Praze"
Comment 5 Cosimo Cecchi 2012-09-13 23:32:16 UTC
Created attachment 224287 [details] [review]
embed: don't split a translatable string

---

After talking a bit with Andre on IRC we think this is a better patch; it has additional comments to explain the contexts in which the strings should be translated.
Comment 6 Cosimo Cecchi 2012-09-14 15:14:41 UTC
Attachment 224287 [details] pushed as 4cda0b3 - embed: don't split a translatable string

Pushed after i18n approval.