Page MenuHomePhabricator

Pass per-field error messages to Vue via ResourceLoader
Closed, ResolvedPublic

Description

A message key for each of the below mentioned errors is passed to the application in the ResourceLoader:

FieldErrorEventMessage
LemmaEmptysubmit"Lemma field is empty; please make an entry."
LemmaOver X Charsinput"Lemma field is too long; please make a shorter entry."
Lexeme LanguageEmptysubmit"Lexeme's language field is empty; please make an entry."
Spelling VariantEmptysubmit"The spelling variant field is empty; please make an entry."
Lexical CategoryEmptysubmit"The lexical category field is empty; please make an entry. "

Note - the message keys do not exist yet in WikibaseLexeme.git.

Event Timeline

unassigning myself and returning to the To Do column in order to make progress on other tasks until we have the message texts

I've updated the messages from the earlier ticket to be more aligned with the prototype @noarave

The only thing is, as discussed earlier and stated it T308654 I've entered a preliminary message for Lemma being over X characters. When we know the character limit we can update that message:

From: Lemma field is too long; please make a shorter entry.

To: Lemma field is too long; please make an entry shorter than X characters.

@Erdinc_Ciftci_WMDE I converted "Lemma field is empty" to "The Lemma field is empty", relying on the last two messages (for spelling variant & lexical category). I hope that's okay, otherwise let me know and i'll change it back

Weirdly my Grammarly premium didn't suggest that, maybe it's a missing word in their dictionary or something. That being said, it looks fine to me as you changed it! @noarave

Change 797147 had a related patch set uploaded (by Noa wmde; author: Noa wmde):

[mediawiki/extensions/WikibaseLexeme@master] LexiData: add new messages for inline errors per field

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

Is there a reason why it’s “the lexeme’s language field” but “the lemma field”, “the lexical category field”, “the spelling variant field”? To me that feels strange – perhaps we can remove “lexeme” from the language version as well.

@Lucas_Werkmeister_WMDE Lexem's language is the field's name though. I agree it's a bit awkward but it's part of a pattern.

Change 797147 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] LexiData: add new messages for inline errors per field

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

@Aaharoni-WMF and @Nikki mentioned that the error messages with "please make a shorter entry." don't really work and feel out of place.
In addition "Lemma field is too long" is factually not correct because the field is not too long but the input is too long. There is also inconsistency with the use of "the" at the beginning of the messages. Some use it some don't.
We need to revise the messages.

Adding @danshick-wmde for microcopy help.

Amire80 edited subscribers, added: Amire80; removed: Aaharoni-WMF.

There is also inconsistency with the use of "the" at the beginning of the messages. Some use it some don't.

I think we included the “the” in all the messages in the merged change on Gerrit, we just didn’t edit the table in the task description.

ItamarWMDE changed the task status from Open to Stalled.Jun 1 2022, 8:28 AM

@Lydia_Pintscher We are currently blocked on this, and would need new copy to proceed.

I suggest the following:

"Lemma field cannot be empty."
"Lemma field cannot exceed X characters."
"Lexeme language field cannot be empty."
"Spelling variant field cannot be empty."
"Lexical category field cannot be empty."

I suggest the following:

"Lemma field cannot be empty."
"Lemma field cannot exceed X characters."
"Lexeme language field cannot be empty."
"Spelling variant field cannot be empty."
"Lexical category field cannot be empty."

By the way, it's not clear to me whether these messages appear after submission or (as is more common these days) during text entry using JS or some such.

By the way, it's not clear to me whether these messages appear after submission or (as is more common these days) during text entry using JS or some such.

Most of them appear after you try to submit the form; the lemma maximum length is shown as soon as the input length exceeds the limit (and hidden as soon as the lemma is short enough again).

Lydia_Pintscher changed the task status from Stalled to Open.Jun 7 2022, 9:29 AM

I suggest the following:

"Lemma field cannot be empty."
"Lemma field cannot exceed X characters."
"Lexeme language field cannot be empty."
"Spelling variant field cannot be empty."
"Lexical category field cannot be empty."

Thank you, Dan! Let's go with these.

Noa just mentioned that "Lemma field cannot exceed X characters." is still about the field and not its input. So let's go with "Lemma cannot exceed X characters."

Change 803504 had a related patch set uploaded (by Noa wmde; author: Noa wmde):

[mediawiki/extensions/WikibaseLexeme@master] Lexical data: Improve copy for per-field errors

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

I suggest the following:

"Lemma field cannot be empty."
"Lemma field cannot exceed X characters."
"Lexeme language field cannot be empty."
"Spelling variant field cannot be empty."
"Lexical category field cannot be empty."

Thank you, Dan! Let's go with these.

This removes the “The” at the beginning again – if these are meant to be full sentences (with a full stop at the end), that sounds weird to me.

Native speaker has already spoken -- do whatever you like.

Change 803504 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Lexical data: Improve copy for per-field errors

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

Change 804613 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikibaseLexeme@master] Add {{PLURAL:}} to message

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

Change 804613 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Add {{PLURAL:}} to message

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