Page MenuHomePhabricator

Language code for Wikifunctions natural language objects mixes different types of codes
Closed, ResolvedPublic

Description

The "code" field for natural language objects in Wikifunctions mixes different types of codes. Some are MediaWiki language codes, some are BCP 47 language codes. These are not fully compatible with each other, which makes it unclear how they should be interpreted, and in some cases, unclear what is meant.

MediaWiki contains mappings from its language codes to BCP 47-compatible ones in https://gerrit.wikimedia.org/g/mediawiki/core/+/master/includes/language/LanguageCode.php. The codes in DEPRECATED_LANGUAGE_CODE_MAPPING plus egl are also MediaWiki languages, the rest are generally only used to create valid HTML lang attributes and not otherwise understood by MediaWiki.

Examples:

https://www.wikifunctions.org/view/de/Z1624

  • Code: ar-001
  • Note: ar-001 is a BCP 47-compatible code used by CLDR but not MediaWiki.

https://www.wikifunctions.org/view/de/Z1124

  • Code: en-x-simple
  • Code aliases: simple
  • Note: The MediaWiki code is simple. The equivalent BCP 47 code is en-simple. en-x-simple is a BCP 47-compatible code using a private use subtag.

https://www.wikifunctions.org/view/de/Z1679

  • Code: roa-tara
  • Note: roa-tara is a MediaWiki code without an assigned BCP 47 code.

https://www.wikifunctions.org/view/de/Z1782

  • Code: cbk-zam
  • Note: cbk-zam is a MediaWiki code without an assigned BCP 47 code.

https://www.wikifunctions.org/view/de/Z1826

  • Code: map-bms
  • Note: map-bms is a MediaWiki code without an assigned BCP 47 code.

https://www.wikifunctions.org/view/de/Z1503

  • Code: bho
  • Code aliases: bh
  • Note: bho is the BCP 47 code and preferred MediaWiki code. bh is a MediaWiki code which means Bihari in BCP 47.

https://www.wikifunctions.org/view/de/Z1346

https://www.wikifunctions.org/view/en/Z1229

  • Code: zh-classical
  • Note: zh-classical is a deprecated MediaWiki code. The BCP 47 code and preferred MediaWiki code is lzh (= Z1152).
  • Note: Duplication solved on Wikifunctions, cf. Z1152 & Z1229 discussion

https://www.wikifunctions.org/view/de/Z1849

  • Code: nrm
  • Note: This is a MediaWiki code. The equivalent BCP 47 code is nrf. nrm means Narom in BCP 47.

Details

TitleReferenceAuthorSource BranchDest Branch
Update function-schemata sub-module to HEAD (86cfa0b)repos/abstract-wiki/wikifunctions/function-evaluator!215jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (86cfa0b)repos/abstract-wiki/wikifunctions/function-orchestrator!171apinesync-function-schematamain
Update function-schemata sub-module to HEAD (97ea4cd)repos/abstract-wiki/wikifunctions/wikilambda-cli!33jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (97ea4cd)repos/abstract-wiki/wikifunctions/function-orchestrator!142jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (97ea4cd)repos/abstract-wiki/wikifunctions/function-evaluator!179jforrestersync-function-schematamain
definitions: Fold Z1229/zh-classical into Z1152/lzh, delete the formerrepos/abstract-wiki/wikifunctions/function-schemata!98wsungdev-98main
definitions: Update nan/nan-*repos/abstract-wiki/wikifunctions/function-schemata!97wsungdev-97main
Customize query in GitLab

Event Timeline

Merge request 97 had a related commit uploaded (by wsung; author: wsung):

[abstract-wiki/wikifunctions/function-schemata/@main] definitions: Fold Z1501/zh-min-nan into Z1221/nan, delete the former

https://gitlab.wikimedia.org/repos/abstract-wiki/wikifunctions/function-schemata/-/merge_requests/97

Change 1002570 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (97ea4cd)

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

Change 1002570 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (97ea4cd)

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

I've gone through this bit of a disaster of a ticket and split out the actionable items into their own tasks. Yet again, please do not create messes like this that don't get resolved and instead confuse issues together.

Of the remaining items:

  • Yes, we have BCP47-compatible tags that aren't supported by MW but we support. I don't think there's anything to action?
    • ar-001
    • en-x-simple
  • Yes, we have potentially BCP47-incompatible tags that MW supports; until there's a BCP47 tag to make primary, I don't think there's anything to action?
    • roa-tara
    • cbk-zam
    • map-bms
  • I don't know which nrf people think MW's nrm should be merged into, be it Z1169/nrf-gg or Z1337/nrf-je.

If that covers everything, we can close this task and make progress on the individual suggestions rather than being blocked.

Yes, we have potentially BCP47-incompatible tags that MW supports

In https://gerrit.wikimedia.org/g/mediawiki/core/+/3b94ef0e93553e4440acb9236cb3459fc192270a/includes/language/LanguageCode.php#81:

  • roa-tara is mapped to nap-x-tara
  • map-bms is mapped to jv-x-bms
  • cbk-zam is mapped to cbk
  • nrm is mapped to nrf

In my opinion we should use these mapped BCP47-compatible codes only.

Change #1017060 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2024-03-05-140533 to 2024-04-04-132719

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

Change #1017061 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2024-02-26-150300 to 2024-04-03-210033

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

Change #1017060 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2024-03-05-140533 to 2024-04-04-132719

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

Change #1017061 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2024-02-26-150300 to 2024-04-03-210033

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

Change #1031090 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (ed0033d)

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

Change #1031090 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (ed0033d)

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

OK, at this point I believe each of the individual proposals has its own task, some of which are done. Let's create tasks for these in future.