Page MenuHomePhabricator

[LEX] Wikibase Lexeme should not localize languages names supported by cldr
Open, Needs TriagePublic

Description

Wikibase Lexeme has its own facility to localize language names (which is partly redundant to the localization provided by the cldr extension). This facility should not be used for languages supported by cldr, once these language names are localized there. For languages supported by the cldr extension, see $additionalLocalizedLanguagesin WikibaseLexeme.mediawiki-services.php or for a more up to date list $languageNames in CldrNamesEn.php.

This concerns the localization messages like wikibase-lexeme-language-name-… defined in i18n/language-names/….json and used in LexemeLanguageNameLookup.

A/C:

  • Localization messages with keys like wikibase-lexeme-language-name-XXX, where XXX is a language supported by the cldr extension, are removed from i18n/language-names/en.json.
  • $additionalLocalizedLanguages is removed from WikibaseLexeme.mediawiki-services.php

Event Timeline

hoo renamed this task from Wikibase Lexeme should not localized languages names supported by cldr to Wikibase Lexeme should not localize languages names supported by cldr.Dec 6 2023, 11:08 PM

The LexemeLanguageNameLookup feature originally are supposed to used to override the localization of mis code from cldr, but later also used to support other language codes, which should be moved to cldr LocalNames. Maybe we no longer need a dedicated group of i18n files once we have done that.

Perhaps it is better to use Wikidata items as the source of truth? They are more flexible than CLDR

Perhaps it is better to use Wikidata items as the source of truth? They are more flexible than CLDR

But also more prone to vandalism than I18n in translatewiki, or the current de facto way (localizing in code directly).

But also more prone to vandalism than I18n in translatewiki

In a way this is a variation on security through obscurity. As in more people know how to edit Wikidata than how to edit TWN (or rather that TWN exists). Yes, TWN requires editors to be pre-approved, but this has never stopped low quality translations and vandalism (I mean it has surely stopped some, but it has also not stopped a lot other)

ArthurTaylor renamed this task from Wikibase Lexeme should not localize languages names supported by cldr to [LEX] Wikibase Lexeme should not localize languages names supported by cldr.Feb 12 2024, 10:03 AM
ArthurTaylor moved this task from Incoming to [DOT] By Project on the wmde-wikidata-tech board.

Prio note: I think it’s currently not 100% clear what this task is proposing. Do we want to remove the wikibase-lexeme-language-name-XXX messages, where XXX is a language supported by the cldr extension, but keep the other wikibase-lexeme-language-name-YYY messages for languages not supported by cldr (in CldrNames or LocalNames)? Or do we want to remove all of them, trying to upstream the translations into cldr, and remove the whole $additionalLocalizedLanguages facility?

The eventual place of language name localization should be MediaWiki core or a dedicated library (with data fed from CLDR), see also T281067: merge CLDR extension to core. So existing translations in WikibaseLexeme should be migrated (for now to CLDR extension).

Prio Notes:

Prio note: I think it’s currently not 100% clear what this task is proposing. Do we want to remove the wikibase-lexeme-language-name-XXX messages, where XXX is a language supported by the cldr extension, but keep the other wikibase-lexeme-language-name-YYY messages for languages not supported by cldr (in CldrNames or LocalNames)? Or do we want to remove all of them, trying to upstream the translations into cldr, and remove the whole $additionalLocalizedLanguages facility?

We talked about this now, and for now we’re going to limit the scope of this task to just removing the duplicate language names in WikibaseLexeme which already exist in CLDR. It would be nice to move the other translations into CLDR too, but that’s not part of this task. (But it would be nice to create a list of the language codes that are translated in WikibaseLexeme and not in CLDR, and put those into a separate task for later migration.)

Impact AreaAffected
production / end users
monitoring
development efforts
onboarding efforts
additional stakeholders