Page MenuHomePhabricator

MUL - Make Special:NewItem ready for `mul` language code
Closed, ResolvedPublic5 Estimated Story Points

Description

Problem:
Users can select mul as a language on the Special:NewItem page. If they fill out the description field and send the form, they will receive an error message, that says mul is not allowed for descriptions. We need to make this more intuitive.

Notes:

  • The reason is that we only allow the language code mul for Labels and Aliases and not for descriptions (T313027).
  • The UI language stays the preselected default.
  • The list of available languages will at some point be sorted alphabetically, including "multiple languages". But we decided to make this a separate task (T332702).
  • The task T330193 does a similar thing for Special:SetLabelDescriptionAliases.

Mockup:

image.png (575×1 px, 158 KB)

BDD:
If an editor selects mul on Special:NewItem then we deactivate the description field.

GIVEN an editor has opened Special:NewItem
WHEN the editor selects the language code mul
THEN the description field is disabled
AND the description field is emptied
AND the explanatory text (see "Copy") is shown below the disabled field (inline message)

If the user selects any another language on Special:NewItem then we go back to normal.

GIVEN an editor has opened Special:NewItem
AND the the language code mul is selected
WHEN the editor selects any other language code
THEN the description field is enabled
AND the explanatory text is hidden

Copy:

Descriptions are not supported for this language. Please provide a description in another language once the Item is created.

Acceptance criteria:

  • If an editor selects mul on Special:NewItem then we deactivate the description field.
  • If the user selects any another language on Special:NewItem then we go back to normal.

Event Timeline

If users disabled JavaScript they can still insert a mul description, so we need to show a proper error message if it actually happened. Special:SetDescription and Special:SetLabelDescriptionAliases also have this issue.

Manuel updated the task description. (Show Details)

Hi @Bugreporter, thank you for your comment! I have now added T330193: MUL - Make Special:SetLabelDescriptionAliases ready for `mul` language code. Special:SetDescription should already be sufficient in its current state (the users will see the standard API error message):

image.png (567×1 px, 41 KB)

The same should work for disabled JavaScript case on all the pages. Please let me know in case you think otherwise. Cheers!

@Sarai-WMDE @Manuel Can you please change the copy? The current copy does not seem correct. We are not letting people enter several descriptions in several languages as this currently implies.

Lydia_Pintscher changed the task status from Open to Stalled.Mar 1 2023, 1:06 PM

Setting to stalled until the copy is updated.

@Lydia_Pintscher That copy corresponds to a validation message that will be displayed under the disabled 'description' field in Special:NewItem in case that users select 'Multiple languages' as the initial language of said Item. The copy should make it clear for users that it's not possible to provide a description for MUL. Not sure if your comment was based on a misunderstanding, or if there's some logic we're missing out on. Suggestions welcome!

Hi @Lydia_Pintscher! It is not trivial to be consistent with the wording of the page and communicate what we need to communicate (one of the languages in the list is now called "multiple languages" after all). I believe that the original copy was not wrong in the context of the page, but I see the potential for confusion. I made a suggestion. It is more generic (and technically less correct, as "multiple languages" is not a language) but maybe it's easier to parse. Please unstall if it now works for you otherwise as @Sarai-WMDE mentioned: Suggestions welcome!

Thanks! Yes I think this works better.

Manuel changed the task status from Stalled to Open.Mar 10 2023, 10:47 AM

As discussed, I split out the sorting into a separate task (T332702).

Change 916113 had a related patch set uploaded (by Hoo man; author: Hoo man):

[mediawiki/extensions/Wikibase@master] Make Special:NewItem/ Special:NewProperty ready for "mul"

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

Change 916113 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Make Special:NewItem/ Special:NewProperty ready for "mul"

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

Great news, thx! My verification showed that this is 1. working very well and that it 2. looks fab! \o/