Page MenuHomePhabricator

Allow translators to distinguish between two single apostrophes '' (markup) vs. " quotation marks in strings to be translated
Closed, ResolvedPublic

Authored By
Piramidion
Jan 13 2019, 5:15 PM
Referenced Files
F34636183: image.png
Sep 8 2021, 12:01 AM
F27876877: Screenshot from 2019-01-13 18-33-37.png
Jan 13 2019, 5:38 PM
F27876809: Untitled.png
Jan 13 2019, 5:25 PM
Tokens
"Orange Medal" token, awarded by Piramidion."Love" token, awarded by Mainframe98.

Description

I often encounter this problem myself, and see that other editors do too. Say, you can see an English message which contains a variable written as ''$1''. In the Translate extension it is not clear what these ('') do represent: the very double quotation marks, or the markup to make a text italic. Thus, the translators often misinterpret those, and sometimes a text like this turns out to be a «text like this» (or vice versa) in the translation to a target language, or text like this turns out to be a «text like this».

A way to fix this would be to separate the single quotation marks more, so that it would be clear that they're meant to make the text italic.

EDIT: I've also uploaded a file for a reference (this is from a Meta-wiki page named "User groups", the original English message is in italic, but that's not obvious for someone using the Translate extension):

Untitled.png (376×992 px, 24 KB)

Event Timeline

Interesting problem, thanks for reporting this! The font-family here (Firefox 64, Linux, on meta) is just defined as generic sans-serif coming from body:

Screenshot from 2019-01-13 18-33-37.png (758×961 px, 140 KB)

Wondering if there are better fonts that allow differentiation that could be applied to a more specific area than body.

Aklapper renamed this task from Provide a way to better distinguish between the single quotation marks used for markup and the double quotation marks in the Translate extension to Allow translators to distinguish between two single apostrophes '' (markup) vs. " quotation marks in strings to be translated.Jan 13 2019, 5:39 PM

I'm using Chrome on Windows, and the inspector shows me the same - font-family is sans-serif, coming from body (the sans-serif coming from html is stroke out for some reason - idk if this matters, I'm not a coder)

In my view that text should probably be set according to the user's editfont preference. Then it would match the font used in the editor, fixing this issue for people using monospace. Always showing that text in monospace would probably be unexpected for users with a non-monospace editfont. Special:Translate currently doesn't respect the editfont setting at all, so it would be good to fix that at the same time.

image.png (363×541 px, 22 KB)

There isn't really a good way to increase the spacing between characters short of changing the font.

I do see a monospace font (from browser defaults). Does some skin or browser set non-monospace font as default?

Respecting the preference seems like a good solution.

One can never trust the browser default CSS. Most browsers use monospace font for text areas, but (AFAIK) no standard mandates this; I recall Safari on iOS using a (proportional) sans-serif font by default.

Change 719641 had a related patch set uploaded (by AntiCompositeNumber; author: AntiCompositeNumber):

[mediawiki/extensions/Translate@master] ext.translate.editor: use editfont in sourcemessage & editor

https://gerrit.wikimedia.org/r/719641

Change 719641 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] ext.translate.editor: use editfont in sourcemessage & editor

https://gerrit.wikimedia.org/r/719641