Page MenuHomeWildfire Games

typography corrections in quotes
ClosedPublic

Authored by Nescio on Jun 1 2018, 4:35 PM.

Details

Summary

0 A.D. has (partial?) Unicode support, therefore user-facing text strings should be properly typeset, rather than be limited to ascii-only characters; see also https://trac.wildfiregames.com/wiki/EnglishStyleGuide#Unicode

This patch replaces:

  • programmer's quotes (") with proper opening (“) and closing (”) quotation marks
    • actually book titles ought to be italicized instead, but I don't know if that's already possible
  • hyphens (-) with em-dashes (—) for attribution of a quote source; also displays a new line (\n) for better readability
  • hyphens (-) with en-dashes (–) in number ranges
  • hyphens (-) with en-dashes (–) when punctuating a sentence

Example how it looks like in game:

Test Plan

Ought to be unproblematic.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 6193
Build 10289: Vulcan BuildJenkins
Build 10288: arc lint + arc unit

Event Timeline

Nescio created this revision.Jun 1 2018, 4:35 PM
Owners added a subscriber: Restricted Owners Package.Jun 1 2018, 4:35 PM
Vulcan added a subscriber: Vulcan.Jun 1 2018, 4:39 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/606/display/redirect

Nescio updated this revision to Diff 6693.Jun 1 2018, 4:47 PM
Nescio edited the summary of this revision. (Show Details)
Vulcan added a comment.Jun 1 2018, 4:49 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/607/display/redirect

Nescio updated this revision to Diff 6694.Jun 1 2018, 4:50 PM
Nescio edited the summary of this revision. (Show Details)
Vulcan added a comment.Jun 1 2018, 4:53 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/608/display/redirect

Nescio updated this revision to Diff 6695.Jun 1 2018, 4:57 PM
Nescio edited the summary of this revision. (Show Details)
Vulcan added a comment.Jun 1 2018, 4:59 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/609/display/redirect

Nescio updated this revision to Diff 6731.Jun 5 2018, 8:52 PM
Nescio edited the summary of this revision. (Show Details)

Replaced programmer's quotes ("catclaws") with proper opening and closing quotation marks (“...”). Also corrected a few minor things (e.g. Oresteia I → Agamemnon).

Vulcan added a comment.Jun 5 2018, 8:56 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/634/display/redirect

Stan added a reviewer: Itms.Dec 29 2018, 2:18 PM
elexis added a subscriber: elexis.Dec 29 2018, 2:37 PM

I suspect not every transifex author will notice or reproduce the three different symbols (same with the x multiplie symbol in D1707).
If the difference is not negligible, they should be informed to take special care to doublecheck every of these symbols. For example a trac page could list them and one could maybe post an announcement on transifex or the like. Or use %(hyphen-type1)s and so forth

For example a trac page could list them

Good idea; I've now included them in the table under https://trac.wildfiregames.com/wiki/EnglishStyleGuide#Unicode

Nescio updated this revision to Diff 7715.Apr 10 2019, 10:31 AM
Nescio retitled this revision from Quotes to typography corrections in quotes.
Nescio edited the summary of this revision. (Show Details)
Nescio edited the test plan for this revision. (Show Details)

Updated because of D1818.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/1188/display/redirect

I am afraid using those correct typography symbols (which cannot be found easily on the majority of PC keyboards) is going to cause big issues for translators, and cause inconsistencies when developers keep using the usual ascii symbols. On the other hand, using correct typography would be nice, and we have indeed no technical limitations here.

I think this requires way more safeguards than only a wiki page. Maybe linters, or something like D1674...

Gallaecio, what do you think?

As for translations, different languages can have different typographic conventions. Some 0 A.D. translations already use proper punctuation, e.g. l10n/de.public-gui-gamesetup.po:

#: gui/text/quotes.txt:1
msgid ""
"\"Zeus \\[…] established his law: wisdom comes through suffering. \\[…] So "
"men against their will learn to practice moderation. \\[…] Such grace is "
"harsh and violent.\" - Aeschylus (\"Oresteia\", I. 176-183)"
msgstr "„Zeus \\[…] stellte sein Gesetz auf: Weisheit erlangt man durch Leiden.\\[…] Dadurch lernen Menschen gegen ihren Willen, Bescheidenheit zu praktizieren. \\[…] Solch Eleganz ist rau und gewalttätig.“ – Aischylos („Orestie“, I. 176-183)"

As for keyboards, whilst the basic “English (US)” keyboard only uses two levels and thus supports only ascii characters, most operating systems nowadays allow selecting and using different keyboard layouts, including hundreds of four-level (normal, Shift, AltGr, AltGr+Shift) variants. E.g. on the “English (intl., with AltGr dead keys)” the [ and ] keys produce [, {, «, “ and ], }, », ”, respectively.

Gallaecio accepted this revision.Aug 3 2019, 1:33 PM
In D1547#74624, @Itms wrote:

I am afraid [this] is going to cause big issues for translators

They’ll see the character correctly both in Transifex and most (all?) localization tools they may use if translating online.

The only issue is that they’ll have to mark all affected strings as translated again (if they are already using the right punctuation for their language) or update them to use the new symbols. For the latter, they can copy-paste from the source string if they don’t have already a proper input system setup in their computer. The most significant bother is having to review again all affected strings, but that’s translator’s life for you. I think it’s justified.

[I am afraid this is going to] cause inconsistencies when developers keep using the usual ascii symbols. […] I think this requires way more safeguards than only a wiki page. Maybe linters, or something like D1674... Gallaecio, what do you think?

I agree that it would be great to have some linting tools that detect some of these cases, but writing such a linter is probably not trivial (analyzing only user-visible strings, handling edge cases), and in any case it should be done in a separate changeset and not block this patch.

This revision is now accepted and ready to land.Aug 3 2019, 1:33 PM

@Gallaecio, feel free to commit this and other patches that have been accepted. I can't.
Also, you might be interested in D2006 and D2110.

This revision was automatically updated to reflect the committed changes.