Page MenuHomePhabricator

Deal with duplicate Z60s e.g. where MW has two language codes
Closed, ResolvedPublic

Description

Found the following cases:

Problem updating Z1253:
The provided content's label clashes with ZObject 'Z1202' for the label in 'en'.

Problem updating Z1477:
The provided content's label clashes with ZObject 'Z1097' for the label in 'en'.

Problem updating Z1528:
The provided content's label clashes with ZObject 'Z1193' for the label in 'en'.

Problem updating Z1653:
The provided content's label clashes with ZObject 'Z1498' for the label in 'en'.

Problem updating Z1669:
The provided content's label clashes with ZObject 'Z1265' for the label in 'en'.

Problem updating Z1706:
The provided content's label clashes with ZObject 'Z1196' for the label in 'en'.

Problem updating Z1742:
The provided content's label clashes with ZObject 'Z1132' for the label in 'en'.

Problem updating Z1762:
The provided content's label clashes with ZObject 'Z1503' for the label in 'en'.

Problem updating Z1852:
The provided content's label clashes with ZObject 'Z1755' for the label in 'en'.

Options after a conversation with JForrester:

  • Change the name and treat them as separate things
  • Change the language definition (Z60) and include an alias list of language codes (not T262091)

Event Timeline

Third option: Delete the clashes for now, add support later.

My proposal is that we adjust the data model for Z60 to be something like this:

{
	"Z1K1": "Z2",
	"Z2K1": "Z1202",
	"Z2K2": {
		"Z1K1": "Z60",
		"Z60K1": "yue",
		"Z60K2": [
			"zh-yue",
			"zh-hk"
		]
	},
	"Z2K3": {
		"Z1K1": "Z12",
		"Z12K1": [
			{
				"Z1K1": "Z11",
				"Z11K1": "Z1002",
				"Z11K2": "Cantonese"
			},
			{
				"Z1K1": "Z11",
				"Z11K1": "Z1202",
				"Z11K2": "粵語"
			}
		]
	},
	"Z2K4": {
		"Z1K1": "Z32",
		"Z32K1": [
			{
				"Z1K1": "Z31",
				"Z31K1": "Z1002",
				"Z31K2": [
					"Hongkongese",
					"HK Chinese",
					"What my Mum speaks"
				]
			},
			{
				"Z1K1": "Z31",
				"Z31K1": "Z1003",
				"Z31K2": [
					"Hongkongése",
					"Chinoise HK"
				]
			}
		]
	}
}

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

[mediawiki/services/function-schemata@master] Z60/Natural language: Add optional Z60K2 for a list of strings for secondary language codes

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

Change 705845 merged by jenkins-bot:

[mediawiki/services/function-schemata@master] Z60/Natural language: Add optional Z60K2 for a list of strings for secondary language codes

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

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

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (b4ac6528e)

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

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

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (df62559a8)

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

Change 704981 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (df62559a8)

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

Change 708588 merged by jenkins-bot:

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (b4ac6528e)

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

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

[mediawiki/services/function-schemata@master] definitions: Add duplicates to Z60/Language definitions as alias codes and de-dupe

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

Change 710112 merged by jenkins-bot:

[mediawiki/services/function-schemata@master] definitions: Add duplicates to Z60/Language definitions as alias codes and de-dupe

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

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

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

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

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

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (bbc6033)

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

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

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (bbc6033)

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

Change 710620 merged by jenkins-bot:

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (bbc6033)

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

Change 710619 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (bbc6033)

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

Change 710618 merged by jenkins-bot:

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

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

OK, remaining things to do:

  • Change the SecondaryDataUpdater code to read/write the labels twice, under both the main and the alias code(s).
  • Change the front-end (Vue) code to display the secondary language code(s) as well as the main one.

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

[mediawiki/services/function-schemata@master] Follow-up 2472e6f87: Also define Z60/Natural language K2/code aliases

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

Change 714413 merged by jenkins-bot:

[mediawiki/services/function-schemata@master] Follow-up 2472e6f87: Also define Z60/Natural language K2/code aliases

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

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

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (ec321dc)

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

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

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

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

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

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (ec321dc)

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

Change 714819 merged by jenkins-bot:

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

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

Change 714820 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (ec321dc)

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

Change 714818 merged by jenkins-bot:

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (ec321dc)

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