Page MenuHomePhabricator

update TWLight locale directories for compound locales from xx-xxx to xx_Xxx
Open, Needs TriagePublic

Description

As we discovered here T287172#7230467, we need to update some of our locale directory names. The locale codes will stay the same, so we'll need to add a little logic to modify the directory names before using them as locale codes. Most importantly, we'll need to work with the Language-Team so that we don't have duplicate/mismatched locale directories coming in from translatewiki.

Event Timeline

PR Here:
https://github.com/WikipediaLibrary/TWLight/pull/765
We'll need to make sure that we're coordinating with the translatewiki folks before we merge this in.

So on our side we need a code map:

  • en-gb -> en-Gb (why isn't it en-GB?)
  • pt-br -> pt-Br
  • sr-ec -> sr-Ec (or sr-Cyrl?)
  • zh-hans -> zh-Hans

And probably need to add stuff in the future when new multipart languages get exported. Is that right?

So on our side we need a code map:

  • en-gb -> en-Gb (why isn't it en-GB?)

I agree that this is an obnoxious capitalization scheme

  • pt-br -> pt-Br
  • sr-ec -> sr-Ec (or sr-Cyrl?)
  • zh-hans -> zh-Hans

Yep, although please note that the separator is an underscore, not a dash.

And probably need to add stuff in the future when new multipart languages get exported. Is that right?

Yep; this has me wondering if we could use git-managed symlinks to make this lower maintenance on your side?

Change 707210 had a related patch set uploaded (by Nikerabbit; author: Nikerabbit):

[translatewiki@master] WikipediaLibrary: add code map

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

Nah, this is what the code maps are for. Let me know when you merge your PR and I will deploy the code map change.

Change 707210 merged by jenkins-bot:

[translatewiki@master] WikipediaLibrary: add code map

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

@Samwalton9 this is presumably resolved, though we should probably let this hang out in review until we look at the next commit from translatewiki.

Makes sense. I've confirmed that zh-hans is now displaying as expected in production, and we'll just confirm on Monday that the TranslateWiki update has come through correctly.