Page MenuHomePhabricator

Implement Vue inlanguage directive
Closed, ResolvedPublic

Description

Inspired by termbox ([inlanguage.ts](https://gerrit.wikimedia.org/r/plugins/gitiles/wikibase/termbox/+/master/src/client/directives/inlanguage.ts)), but gets the direction from $.uls.data.getDir(), not from the store.
Additionally, language codes need to be mapped to their bcp47-compatible equivalents - this knowledge was only recently (re)gained in T231476: Termbox (v2) does not map nonstandard language codes to standard ones for HTML/T231475

NOTE: This implies a hard dependency of Data Bridge on ULS. In Wikimedia production, all Wikibase Client wikis also use ULS, but we should document this dependency somewhere.

Notes

  • mediaWiki.language.bcp47() seems to be an option for language code mapping in client implementations

Event Timeline

Change 533873 had a related patch set uploaded (by Matthias Geisler; owner: Matthias Geisler):
[mediawiki/extensions/Wikibase@master] bridge: Reuse inlanguage directive

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

Where do we put our documentation about dependencies?

Change 533894 had a related patch set uploaded (by Matthias Geisler; owner: Matthias Geisler):
[mediawiki/extensions/Wikibase@master] bridge: Introduce UlsDirectionalityRepository

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

Change 533936 had a related patch set uploaded (by Matthias Geisler; owner: Matthias Geisler):
[mediawiki/extensions/Wikibase@master] bridge: wire directionality repository

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

Change 533894 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: Introduce UlsDirectionalityRepository

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

Change 533873 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: Reuse inlanguage directive

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

Change 533936 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: wire language info repository

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