Page MenuHomePhabricator

[SW] SpecialPages "-parameterized" messages cannot be localized properly
Open, Needs TriagePublic

Description

As user of wikibases in a language other than English
I want to be able to correct grammatically correct language
So that mistakes are not made

Steps to reproduce

  1. Go to the czech page for setting labels: https://www.wikidata.org/wiki/Special:SetLabel?uselang=cs
  2. Observe that the title is "Nastavit štítek pro položka/vlastnost" and not "Nastavit štítek položce/vlastnosti"
  3. Go to ??? and observe that the the displayed words "položka"/"vlastnost" are taken from
    • "wikibase-entity-item": "položka",
    • "wikibase-entity-property": "vlastnost",

A/C (Suggested, to be confirmed by PM)

Open Questions:

  • How do we find out from where the item/property values are taken ?
  • How should the UX be in setting the specific messages?

Notes:

Original Description:

The messages

"special-setaliases-parameterized": "Set $1 aliases",
"special-setlabel-parameterized": "Set $1 label",
"special-setdescription-parameterized": "Set $1 description",
"special-setlabeldescriptionaliases-parameterized": "Set $1 label, description and aliases",.

are difficult to translate to other languages. The $1 parameter is usually "Item/Property" taken from

"wikibase-entity-item": "Item",
"wikibase-entity-property": "Property",

messages which are usually used in contexts like "what entity type."

While literal substitution works for English, in other languages it may be necessary to somehow change the word for item/property (e.g., Set item's label).

Event Timeline

Can you give an example in a language where this issue is apparent?

E.g. Czech (cs). https://www.wikidata.org/wiki/Special:SetLabel?uselang=cs is titled "Nastavit štítek pro položka/vlastnost". This is grammatically incorrect.

Ideally, the translation would be "Nastavit štítek položce/vlastnosti". But the displayed words "položka"/"vlastnost" are taken from

"wikibase-entity-item": "položka",
"wikibase-entity-property": "vlastnost",

which cannot (shouldn't) be changed.

One option is introducing dedicated optional messages specifically for this context.

Thanks for the example! I agree that entity-type-specific dedicated messages sound like a good solution; we can use a similar approach as in AutoCommentFormatter::getSummaryMessage() to fall back to the existing generic messages. (If the specific message only exists in English, it would still be used even if the generic message is available in the user language, but I think that’s just the generally accepted way that MediaWiki messages work.)

karapayneWMDE renamed this task from "-parameterized" messages cannot be localized properly to [SW] SpecialPages "-parameterized" messages cannot be localized properly.Nov 25 2024, 2:01 PM
karapayneWMDE updated the task description. (Show Details)
karapayneWMDE subscribed.

This looks like one for the suite team in that its being caused by federated property code