Topic on Talk:VisualEditor/Diffs

Incorrect translation

6
T0T0R (talkcontribs)

When modifying a mathematical formula in French, the visual editor displays "Formule mathématique modifié" instead of "Formule mathématique modifiée".

I tried to see if I could contribute to the translations of this tool but I could not find exactly where i have to modify the code.

Shirayuki (talkcontribs)
T0T0R (talkcontribs)

Thanks for your answer.

It took me several hours to try to figure out how to access to the translation, but I think I finally managed to find it.

So I pushed this modification in Gerrit, is it how you are supposed to do it ?

(I originally wanted to insert the link to Gerrit here but apparently it is considered as spamming, so here is the title: Fix French translation for message key:"visualeditor-changedesc-unknown")

Regards,

Shirayuki (talkcontribs)
Whatamidoing (WMF) (talkcontribs)

Did this get resolved? If not, @Verdy p might be able to help.

Verdy p (talkcontribs)

The current translation was changed according to the change made also in English: "Attribut $1 modifié".

Initially it was "$1 modifié". So superficially it was correct.

As this is a variable and there's no info about its grammatical gender provided or easily detectable or predictable from $1, there was no feminine indication. But when adding "Attribut" before, there's no problem: "modifié" is linked to "Attribut" which is unambiguously masculine.

The only way to solve it would be either to have a separate translatable unit allowing to specify an extra attribute for selecting the appropriate translation unit. But for now such support does not exist in the code. This is a case known as "patchwork message", whose translatability is not evident and there's no easy or evident solution. Something is tried and looks OK the first time, but later we see some unexpected usage (that were not documented). Only such bug report here can help find a better solution. However this is a minor bug and does not affect the usability.

An intial fix was made using "Élément $1 modifié", but actually it was incorrect because the "/qqq" doc says that it is normally an attribute name. Now if you see "Formule mathématique" for $1, this is not an attribute and the existing doc is incorrect (it says that it is an HTML attribute name like lang or dir), the existing code has reused a message in a way that is still undocumented. May be there should be additional quotation marks in English and French and a separate translation unit added for what appears to be the name of a property type, or describing the type of a pseudo-element of Mediawiki itself (a tag extension like <math></math>). Note that there's also a genzral problem for the capitalization of translatable units (that is tregularly used and abused in English, without taking care about their actual contextual reuse in other translatable messages).

If you still don't see "Attribut $1 modifié", that's because there's a delay in installing the update on the wiki (normally every week but there were extra delays during some holidays, due to lower presence of admins, and because there are also additional priority things to do at start of year, such as archiving, and other critical tests and security fixes, as wikis are more likely to be attacked during holidays: the message was last fixed by T0T0R and rapidly modified by me on 13 December to replace "Élément" by "Attribut", as documented), or it was not reimported and forgotten.

Developers should take more care about how they reuse existing messages, and then add better documentation. Frequently, when I can, I add some documentation about usage, but others can contribute as well to "/qqq" doc pages in translatewiki.net. Also frequently I submit bug reports to developers when there are obvious ambiguities or translation problems. Many developers forget things as they just know and use English and keep bad assumptions.

Posting these bug reports helps to make them more aware of such problems (there are various kinds of problems depending on the target language, notably for languages with complex rules like Slavic and Celtic languages: Mediawiki in Russian is quite horrible, frequently not using natural language, just to avoid some grammatical problems, and translations are non-verbal, enumeration like, with too many punctuation signs; the situation is worse for Celtic languages with contextual mutations).

And unfortunately the existing linguistic support for such cases is still minimal or insufficient in MediaWiki; this may change with ongoing works for Abstract Wikipedia and Wikifunctions). Basically what is needed in Mediawiki translations is the possibility to not just add translated text, but also add some "metadata tags", and possibily add variants with other metadata for "linguistics tags", and then a standard Mediawiki function that can be called to use these tags as "selectors", plus a repository of linguistic tags for each language (such tags would include any grammatical feature: noun/verb/adjective/adverb/etc., conjugation time or mode, plural, gender, grammatic formal/informal registers or styles, abbreviation/long forms, possible "synonyms" to avoid ugly repetitions or aliterations, "gluability" for contractions, detachable particles in German verbs, or terminologic domains... like those already existing and used in Wiktionary). But also for now there's still no such repository of what is needed for correct distinctions of terms or forms (something is started in Wikidata for lexemes, but there are lots to do).