Page MenuHomePhabricator

Math formulas display the code in addition to the formula in the translation
Open, MediumPublic

Description

When adding a math formula to the translation, the math formula is rendered but it also includes the code for it, which is displayed as translated. This quick link to test let's you translate an example article and check the published result for this issue:

The expected result would be to have just the formula rendered in the translation, not rendering the the source code of such formula. Note that in the rendering of the math formula source, some words are shown as translated (see "p rimer"), although those translations are not included in the translation contents when inspected or published.

Interestingly, the math formula source is no longer displayed when the display options are adjusted to "inline" or "block", as illustrated below:


In addition, an unmodified content warning is shown which makes no sense since math formulas are not expected to be edited. Math formulas should be excluded for this check.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 15 2019, 11:45 AM
Pginer-WMF triaged this task as Medium priority.May 15 2019, 12:21 PM

Editing articles with math has entire set of problems, like lots of newline characters generated (T196151), formulas missing from source article (T203728) not being saved (T222699) and this leak of code into translation.

From your recording, there seems to be a workaround for code leaking problems, which could be helpful when debugging the underlying issues. Another similar workaround I found was when I was translating from English to Serbian using Google Translate. With MT, only "<img>" text was displayed T214256. Switching to "Copy original content" acts just like "Start with empty paragraph". But when "Copy original content" is the default option, everything works.