Current, languages are sorted by creation date.
Desired, sorted alphabetically.
| AAlhazwani-WMF | |
| Jan 26 2024, 2:59 PM |
| F58347356: CleanShot 2025-02-03 at 15.38.15@2x.png | |
| Feb 3 2025, 2:45 PM |
| F58347328: CleanShot 2025-02-03 at 15.38.15@2x.png | |
| Feb 3 2025, 2:45 PM |
| F58347321: CleanShot 2025-02-03 at 15.37.03@2x.png | |
| Feb 3 2025, 2:45 PM |
| F58025230: CleanShot 2024-12-17 at 11.01.21@2x.png | |
| Dec 17 2024, 10:04 AM |
| F57885400: CleanShot 2024-12-12 at 10.46.44@2x.png | |
| Dec 12 2024, 9:50 AM |
| F57885009: CleanShot 2024-12-12 at 10.41.58@2x.png | |
| Dec 12 2024, 9:50 AM |
| F41719821: CleanShot 2024-01-26 at 15.58.44@2x.jpg | |
| Jan 26 2024, 2:59 PM |
| F41719805: CleanShot 2024-01-26 at 15.52.14@2x.jpg | |
| Jan 26 2024, 2:59 PM |
Current, languages are sorted by creation date.
Desired, sorted alphabetically.
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| AboutLanguagesDialog: Languages are now alphabetically sorted | mediawiki/extensions/WikiLambda | master | +35 -10 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | • Sharvaniharan | T383163 [25Q3] Fix High-Priority Paper-cuts | |||
| Resolved | DSmit-WMF | T355951 Languages are not alphabetically sorted in the about dialog |
Should it definitely be alphabetical? By label in current view? By language code? Or in descending likely priority based on user's location, like ULS?
i was updating the task description with the latest updates to the about widget because i thought this was fixed, but i later discovered that is fixed only under certain conditions.
for instance, if we check Z12812 with the UI language set to english everything appears to be correct:
but if we check the same object with the UI language set to lombard, this is what happens:
It's probably not practical, but could we grab the babel information from the user page? For example, when I was logged in, it would fetch https://www.wikifunctions.org/wiki/User:Feeglgeef and get English, Hungarian, Latin, German, Spanish, and Dagbani.
yeah, that's how wikidata[1] suggests languages inside their label box.
for this first iteration we opted for using the mediawiki fallback language API[2] given that was "for free". that said, we would def like to give editors more control over the suggested languages.
[1]: https://www.wikidata.org/wiki/Help:Navigating_Wikidata/User_Options#Babel_extension
[2]: https://www.mediawiki.org/wiki/Manual:Language#Fallback_languages
What is now expected here as an outcome @AAlhazwani-WMF In the previous comments that isn't entirely clear to me yet.
hey @DSmit-WMF my comment is still valid https://phabricator.wikimedia.org/T355951#10399965.
if we check https://www.wikifunctions.org/view/en/Z10000 the 'other languages' are correctly sorted alphabetically (UI lang set to EN)
while if we check https://www.wikifunctions.org/view/it/Z10000 the 'other languages' are not sorted alphabetically (UI lang set to IT). or better, they are sorted alphabetically but based on the locale. first all the languages with the lang label in EN, and then at the bottom the languages with lang label in IT.
what i think it's happening is that we are not sorting the whole list whether the language label is available in the user locale or not. that's why with the UI lang set to IT, you first see all the languages with the fallback label in english, and then at the bottom of the list the languages for which a language label is available in italian
Change #1118504 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):
[mediawiki/extensions/WikiLambda@master] AboutLanguagesDialog: Languages are now alphabetically sorted
Change #1118504 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] AboutLanguagesDialog: Languages are now alphabetically sorted