Page MenuHomePhabricator

Check gloss language codes in UI
Closed, ResolvedPublic

Event Timeline

WMDE-leszek added a subscriber: WMDE-leszek.

@Lydia_Pintscher please define what error message should say, and how it should look like

@WMDE-leszek I think the BDD in the story (T198036) is enough:

GIVEN I am on a Lexeme page
AND I edit a Gloss
WHEN I enter a language that is not considered valid
THEN the field is highlighted in red
AND the save button is grayed out

I think we can use the HTML5 constraint validation API for this – the only MediaWiki Grade A browsers that don’t support it according to caniuse.com are Chrome 13-14 (supported since Chrome 15) and Safari 5 (supported since Safari 5.1). (Some features are missing in a few more browser versions, but we should only need a baseline: setCustomValidity( 'unknown language code' ) and the :valid/:invalid selectors.)

Of course, that assumes that we use a proper form for editing glosses… do we?

Of course, that assumes that we use a proper form for editing glosses… do we?

Of course we don’t, what was I thinking.

Well, we don’t really need there to be a form, that just means we’ll have to do manual work to disable the “save” button.

Ladsgroup moved this task from To Do to Doing on the Wikidata-Senses-Iteration4 board.

I give this a try.

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptSep 11 2018, 10:37 AM

This is a basic POC:

Change 459796 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/WikibaseLexeme@master] [WIP] Start InvalidLanguageIndicator and use it in glosses

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

Ladsgroup removed Ladsgroup as the assignee of this task.Sep 11 2018, 2:52 PM
Restricted Application added a project: User-Addshore. · View Herald TranscriptSep 17 2018, 11:52 AM
Addshore added a subscriber: Addshore.
Addshore moved this task from incoming to in progress on the Wikidata board.Sep 18 2018, 2:24 PM

Change 459796 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Add InvalidLanguageIndicator and use it in glosses

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

Lydia_Pintscher closed this task as Resolved.Sep 26 2018, 9:27 AM