It is ridiculous to be unable to fix a bad translation such as "Since sin 0 = sin π = 0" to "Como o pecado 0 = sin π = 0". This happens on
https://en.wikipedia.org/wiki/Proof_that_%CF%80_is_irrational
when translating to Portuguese.
Description
Related Objects
Event Timeline
Sorry, there's nothing the software can do about cases like this one.
The original article has "sin" as plain text. It's in a {{nowrap}} template, but this is just typesetting, so essentially it's still plain text and not an actual formula. ContentTranslation has no way to know that somebody does not allow users to change it. And "sin" happens to translate to "pecado" in Portuguese (as every Nick Cave fan should know).
A math formula should be in <math> tags, and then Content Translation knows how to transfer it properly. The page to which you linked already has several <math> elements with \sin, and this should have been done everywhere.
I'm not sure what you mean by "anything it will not allow users to change"... In the article, "Since sin 0 = sin π = 0 and cos 0 = – cos π = 1 (here we use the above-mentioned characterization of π as a zero of the sine function)" is just text, and it's possible to change it in translation. It's not marked up in any way. And anything that is not marked up in a special will be auto-translated. The formulas should have been in <math> tags. Am I missing anything?
In the automatic translation "Como o pecado 0 = sin π = 0", the word "pecado" was not editable at all.
Oh... I got it better now. That's because the Portuguese Wikipedia does have a template named "nowrap", and the content of that template gets translated, but because it's a template that we don't want the users to touch, is marked contenteditable="false".
In this particular case the better solution would still be better to use <math> in the first place before translation, but in many other articles editing the translated template content can be relevant. I'm not sure we'll be able to allow editing it until we integrate Content Translation with Visual Editor (T105447), however, but maybe @santhosh will have a better idea?
Checked with CX2 version - translation en->pt Proof that π is irrational.
CX2 handles {{nowrap}} template successfully. With Yandex MT option, the matching template is found:
The source wiki text:
Since {{nowrap|sin 0 {{=}} sin {{pi}} {{=}} 0}} and {{nowrap|cos 0 {{=}} – cos {{pi}} {{=}} 1}}
which is displayed as
Since sin 0 = sin π = 0 and cos 0 = – cos π = 1
The translation is:
The template is editable:
So, the issue reported in the task is Resolved.
Notes:
(1) A well-known problem - many formulas are not displayed in the source article when it's loaded on ContentTranslation source article panel.
(2) The matched template to {{Nowrap}} is {{Predefiniçāo}}. When Editar is clicked, 'Nowrap' template title is displayed. which might be confusing to users. Filed as T210673: CX2: Matching template names displayed in source language .
(3) The following wikitext with sin' (a math function) will be interpreted as plain text (of course):
The [[Table of derivatives#Derivatives of trigonometric functions|derivatives]] of the [[sine]] and [[cosine]] function are given by sin' = cos and cos' = −sin. Hence the [[product rule]] implies