Page MenuHomePhabricator

Use language names instead of language codes in edit summaries
Open, Needs TriagePublic

Description

As a reviewer, I want to see the language which an edit affects as a language name in my own language, not as an opaque language code, so that I can understand the edit easier without having to memorize MediaWiki language codes. And I want this to happen consistently, for all messages, and ideally on most or all Wikibase installations.

Problem:
In automatic summaries for edits involving terms, Wikibase includes the language code in the message, in brackets. Wikidata overrides some of those messages with a hack which inserts the language name instead (see T196290#4465336 for details). We should incorporate this as a proper feature into Wikibase, available for all installations, applied to all messages, without any on-wiki hacks.

Example:
Changing a label uses the language name, but adding and removing one doesn’t. This is because Wikidata currently has local overrides for wikibase-entity-summary-wbsetlabel-set but not -add and -remove.

BDD
GIVEN I look at an edit that changed the terms of an item or property, or the lemmas of a lexeme, or the representations of a form, or the glosses of a sense, or any other kind of term anywhere; either on the diff page, or on recent changes, or on the watchlist, or anywhere else;
WHEN I read the automatic summary
THEN the language name in my current language is used, and the language code is not visible.

Acceptance criteria:

  • On any Wikibase installation with the CLDR extension installed (which provides language names in other languages), such as Wikidata, edit summaries use language names, not language codes.

Open questions:

  • What about wikis without CLDR? Without that extension, MediaWiki can only provide the language autonym (its name in that same language). However, if we surround the language name in a <span> and add the language code as title attribute, I feel like that might be enough to make the language accessible to users. (This could happen unconditionally – the language code can be useful on CLDR wikis as well.)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 31 2018, 4:18 PM

One way to fix this would be to change the messages from e. g.

Changed [$2] label

to

Changed <span title="$2">{{#language:$2|{{USERLANGUAGE}}}}</span> label

but that requires T4085: Add a {{USERLANGUAGE}} magic word.