Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Add InvalidLanguageIndicator and use it in glosses | mediawiki/extensions/WikibaseLexeme | master | +347 -5 |
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Lydia_Pintscher | T196162 Adding a new Sense | |||
Resolved | Lydia_Pintscher | T198036 Validating the language of a Gloss | |||
Resolved | Ladsgroup | T198203 Check gloss language codes in UI |
Event Timeline
@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.
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
Change 459796 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Add InvalidLanguageIndicator and use it in glosses