Closed Bug 1501088 Opened 6 years ago Closed 6 years ago

Google Translate returns ' instead of actual quotes '

Categories

(Webtools Graveyard :: Pontoon, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: theo, Assigned: mathjazz)

Details

Attachments

(1 file, 1 obsolete file)

Google Translate seem to replace straight quotes with ' in the TM tab. It’s quite visible in French for instance, since the language is heavily using them.

Example here: https://pontoon.mozilla.org/fr/engagement/emails/2018/fundraising_oct.lang/?string=191537

I don’t know if it’s something we can fix, but filing a bug in case we can. It could be Bing would have done the same, but they used curly quotes ’
Assignee: nobody → m
Status: NEW → ASSIGNED
Priority: -- → P2
I've deployed a patch to stage, which passes "text" instead of the default "html" as the source string "format". That fixes the problem, but on the other hand translates HTML tags, e.g. <name> becomes <nom>.

:tchevalier, I'd like to ask you to test the behaviour on stage (patch deployed) and compare it with prod (old code) to see which one should we keep.
Flags: needinfo?(theo)
Thanks Matjaz!

After a quick test it seems both versions have their own downsides, it’s really hard to tell which is better.


Current behavior:

&brandShortName; > &amp; brandShortName;

<a data-l10n-name="url"> (no change)

Permission denied for <%1$S> to get property %2$S.%3$S from <%4$S>.
Autorisation refusée à &lt;% 1 $ S&gt; d&#39;obtenir la propriété% 2 $ S.% 3 $ S à partir de &lt;% 4 $ S&gt;.



New behavior, with the patch:

&brandShortName; > & brandShortName; (still an extra space, but looks better)

For things like tags with attributes and values (like <a data-l10n-name="url">) it seem to behave without consistency: sometimes keeping it as in English, sometimes translating the value, sometimes adding a space in the attribute, etc. But at first glance, in most cases they are not changed.

Permission denied for <%1$S> to get property %2$S.%3$S from <%4$S>.
Autorisation refusée à <% 1 $ S> d'obtenir la propriété% 2 $ S.% 3 $ S à partir de <% 4 $ S>.

NOTE: In this case it seems it breaks the Machinery tab, you can’t click on any suggestion.

Works, you can click on Google Translate suggestion: https://pontoon.mozilla.org/fr/firefox/all-resources/?search=%3C&string=70137
Broken, you can’t click on Google Translate suggestion: https://mozilla-pontoon-staging.herokuapp.com/fr/firefox/all-resources/?search=%3C&string=70137
Flags: needinfo?(theo)
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: