Inconsistant punctuation in translatable strings

Bug #1369445 reported by Yves-Gwenael Bourhis
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Aaron Sahlin

Bug Description

Some translatable strings include the punctuation, some do not.

Punctuation differs depending on the language:
http://www.wintranslation.com/2010/08/12/dtp-punctuation/
http://en.wikipedia.org/wiki/Punctuation#Other_languages

So it has to be included in the translatable string for proper translation to be possible.

example: In Greek, the question mark is written as the English semicolon, while the functions of the colon and semicolon are performed by a raised point (·), known as the ano teleia (άνω τελεία).
Therefore, having the colon (or any punctuation) outside the translatable string will render a wrong translation.

Some languages will even formulate the sentence differently if it's a question or affirmation, while some languages just make the difference with the punctuation. If the translator does not see the punctuation, he won't know how to formulate it if it requires a special formulation.

Some languages even add punctuation at the beginning of the sentence, a good example is the Spanish interrogative form where you have an upside-down question mark at the beginning of the sentence (and a normal one at the end).

Concerning the colon, in French we have to put a space before the colon. example:

    In English: <- It's that way
    En Français : <- C'est comme ça.

If the translator does not see the colon he can't guess he needs to add a spacing, and if the target language uses a different character, the colon will simply be wrong.

A pass on all translatable strings should be done in order to check the punctuation and move them from outside the translatable string to inside when the case is met.

Akihiro Motoki (amotoki)
tags: added: i18n
Revision history for this message
Cindy Lu (clu-m) wrote :

nice background info!

Changed in horizon:
status: New → Triaged
importance: Undecided → Low
Julie Pichon (jpichon)
Changed in horizon:
importance: Low → Medium
Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

$ git grep '%}:' **/*.html
from the top-level of the horizon tree shows that there are 80+ instances of the colon being outside of the translatable portion of the string

Revision history for this message
Julie Pichon (jpichon) wrote :

With Gary's tip as a starting point, sounds like this could be a low hanging fruit.

tags: added: low-hanging-fruit
Changed in horizon:
milestone: none → kilo-1
Aaron Sahlin (asahlin)
Changed in horizon:
assignee: nobody → Aaron Sahlin (asahlin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/124490

Changed in horizon:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/125206

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/125206
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=a1e770dc108bd101b79d5f9cf7de3238749556ff
Submitter: Jenkins
Branch: master

commit a1e770dc108bd101b79d5f9cf7de3238749556ff
Author: Aaron Sahlin <email address hidden>
Date: Tue Sep 30 16:25:04 2014 -0500

    Add ':' inside translatable (Part 2 of 2)

    Punctuation needs to be included in translation since punctuation differs
    depending on the language. Along with moving ':' also replaced &nbsp; with
    blank space insde trans or transblock tag.The initial review grew too large,
    so this patch has been broken into 2 reviews. Part 2 will cover the files in
    openstack_dashboard/dashboard/project while Part 1 coverered the rest.

    Change-Id: Ibf2036d5bbc4c478fcb912f6335104356e8f1317
    Partially-Closes-Bug: #1369445

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/124490
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=b84bfd111916c6debe3df4779a2e584d135ba834
Submitter: Jenkins
Branch: master

commit b84bfd111916c6debe3df4779a2e584d135ba834
Author: Aaron Sahlin <email address hidden>
Date: Tue Sep 30 15:47:04 2014 -0500

    Add ':' inside translatable (Part 1 of 2)

    Punctuation needs to be included in translation since punctuation differs
    depending on the language. Along with moving ':' also replaced &nbsp; with
    blank space insde trans tag. The initial review grew too large, so this
    patch has been broken into 2 reviews. Part 2 will cover the files in
    openstack_dashboard/dashboard/project while Part 1 will cover the rest.

    Change-Id: Ie7c2f7f66f065e0408e20d2f7351a5190fa208d7
    Partially-Closes-Bug: #1369445

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Both patches have been merged and now we can close this bug now.

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.