Page MenuHomePhabricator

store normalized language codes in the babel database table
Closed, ResolvedPublic

Description

Currently, if a user writes "He" as a language code in the #babel box, it is stored as "He" in the babel database table, and "he" is stored as "he". This is done not quite right, because the user's intention is the same—Hebrew. Querying for select * from babel where babel_lang = 'he'; will not get results with "He" and this is wrong.

Codes should be normalized to he for storage.

The task T101086, but this task here is simpler ;)

Event Timeline

Change 364347 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/Babel@master] Normalize language code before storing it in the database

https://gerrit.wikimedia.org/r/364347

Change 364347 merged by jenkins-bot:
[mediawiki/extensions/Babel@master] Normalize language code before storing it in the database

https://gerrit.wikimedia.org/r/364347