Page MenuHomePhabricator

Validating the language of a Gloss
Closed, ResolvedPublic5 Estimated Story Points

Description

Problem:
Currently any input is accepted for the language of a Gloss. We should restrict this in order to make it easier to re-use and to be able to do language fallbacks etc.

Acceptance criteria:

  • I can not enter a language for a Gloss that is not in the list we validate against (list of label languages).
  • I can enter any language that is on the list we validate against.

BDD
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

Event Timeline

RazShuty set the point value for this task to 5.Jun 26 2018, 11:24 AM
Vvjjkkii renamed this task from Validating the language of a Gloss to beaaaaaaaa.Jul 1 2018, 1:01 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed the point value for this task.
JJMC89 renamed this task from beaaaaaaaa to Validating the language of a Gloss.Jul 1 2018, 3:52 AM
JJMC89 raised the priority of this task from High to Needs Triage.
JJMC89 updated the task description. (Show Details)
JJMC89 set the point value for this task to 5.

Is client-side validation (T198203: Check gloss language codes in UI) required for this? It’s not (yet?) implemented for form representations either.

I'd say yes. Is there a good reason not do it?

@Lydia_Pintscher The patch should be landing on beta at some point today.

Just as we were merging it @Lucas_Werkmeister_WMDE pointed out 1 thing:

I was just editing some glosses for an unrelated task with this patch still checked out, and I found it to be a bit overly intrusive – the warning pops up too often while you’re entering a language code (because “e” is not a valid language code even though “en” is).

Should we investigate it popping up less? / only when the user moves focus away from the language field? / after a short time period?

Yeah if it is annoying we should try to see if there are ways to make it less annoying. If you or UX have ideas please go ahead.