- Create new account
- Enable CX
- Go to CX
Observe the language button's label is "null"
Esanders | |
Aug 20 2018, 2:17 PM |
F25175735: image.png | |
Aug 20 2018, 2:17 PM |
Observe the language button's label is "null"
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Fix null being used as source language | mediawiki/extensions/ContentTranslation | master | +30 -5 |
Thank you @Esanders for reporting this.
I saw this error once in some unusual circumstances and wasn't able to reproduce it ever again. When you reported, I decided to look into what causes this problem.
This requires:
All of the above prerequisites aren't that unusual, especially for new users, who decide to try Content Translation soon after account creation. Probably most affected are new users of wikis where content language is English, because browser language is often also set to English.
We don't have any reasonable info about the user in such case. In the past, this case was resolved to using Spanish as source language. Here are the top languages from which users translate to English:
# | Translations | Language |
---|---|---|
1 | 1,365 | español |
2 | 1,174 | français |
3 | 741 | Deutsch |
4 | 453 | italiano |
5 | 417 | português |
Given the above analysis, I think we should fallback to Spanish as source language if English is the target language. If some non-English language is used as target, we should fallback to English, as most translation come from English anyway.
@Amire80, do you have other ideas?
Change 455210 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Fix null being used as source language
Change 455210 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Fix null being used as source language