Page MenuHomePhabricator

Make Serbian (sr-el) language available for terms (labels/descriptions/aliases)
Open, Needs TriagePublic8 Estimated Story Points

Description

As a Wikidata editor, I want Serbian (sr-el) to appear under my languages in the termbox when I add sr-el to my babel template, so that I can add labels and descriptions.

See Wikidata:Contact the development team#sr-el

Problem:
sr-el is not properly picked up by the termbox as a preferred language if it is on the user's user page.

BDD
GIVEN a user page with a babel template listing sr-el as a spoken language by the user
WHEN viewing an Item page
THEN sr-el is available for viewing and editing in the termbox as a preferred language

Acceptance criteria:

  • users with sr-el in their babel box can edit terms in sr-el as a preferred language

Notes:

Event Timeline

Note that we already use sr-ec and sr-el for terms (see language stats). The problem here is not that the codes are missing, it's that adding those codes to your Babel box does not cause them to appear in the term box.

I notice that after adding sr-ec and sr-el to the Babel box, the Babel box shows sr-Cyrl and sr-Latn and puts the user into categories for sr-Cyrl and sr-Latn. I suspect what's happening is that the codes get turned into sr-cyrl and sr-latn at some point before being passed to the term box and, since we don't support sr-cyrl or sr-latn, the term box fails to find a matching language and can't display them.

The opposite happens when loading a page using ?uselang=, both ?uselang=sr-el and ?uselang=sr-latn display the sr-el terms in the first row.

Thanks for the investigation, @Nikki! Yeah, I was confused when I saw this task because they *should* be available already. So if you have any idea how to fix it @Lydia_Pintscher, a fix would be appreciated!

Task Inspection notes:

Install Babel and add sr-el.
What does UserPreferredContentLanguagesLookup getLanguages() return? Does it have sr-el?
If not, look at places that pass data into UserPreferredContentLanguagesLookup. Look at the filtering or getAllUserLanguages.
If yes, look at places that consume that response.

Check if the language appears with JS disabled (differences between the lists of languages in the ui and on the server).