Page MenuHomePhabricator

update input placeholders on no-JS page
Closed, ResolvedPublic

Description

Problem:
On the JS version of the page we have input placeholders for the input fields like "noun" since editors are expected to put in text. On the no-JS page they are required to put in Item IDs. We need to update the placeholder text to reference IDs instead.

BDD
GIVEN the no-JS page
THEN the input placeholder texts mention Q-IDs

Acceptance criteria:

  • the respective item IDs (and labels) to be used in the placeholder message should be retrieved from the info panel example lexeme configuration
  • input placeholder texts on the no-JS version of the page mention Q-IDs instead of labels of the respective Items
  • input placeholder texts on the JS version of the page continue to use the labels of the respective Items

Copy:

  • "The Lexeme's language, e.g. 'Q1860'"
  • "The Lexeme's lexical category, e.g. 'Q24905'"

Note

  • We hope to use the same translation message for both the JS and no-JS versions, just with different arguments.

Event Timeline

  • input placeholder texts on the JS version of the page continue to use the labels of the respective Items

Clarification from the backlog refinement: this means a change to the JS version of the page too. Currently, the message has a certain label hard-coded (“e.g. 'English'”); we want to change that to dynamically use the label of the language item of the example lexeme used in the info panel (T298157), and once the message becomes “e.g. '$1'”, we can (hopefully) use the same message for JS and no-JS (hence the note in the task description).

Per the note in T302877, we’ll probably introduce new messages for this (since we don’t want to add the code to look up the right label to the old special page); I think we can relatively nicely insert item or itemid into the old message key wikibaselexeme-newlexeme-language-placeholder to produce wikibaselexeme-newlexeme-language-item-placeholder (likewise for wikibaselexeme-newlexeme-lexicalcategory(-item)-placeholder).

Per the note in T302877, we’ll probably introduce new messages for this (since we don’t want to add the code to look up the right label to the old special page); I think we can relatively nicely insert item or itemid into the old message key wikibaselexeme-newlexeme-language-placeholder to produce wikibaselexeme-newlexeme-language-item-placeholder (likewise for wikibaselexeme-newlexeme-lexicalcategory(-item)-placeholder).

We might have to find another pattern for the message keys, since the lemma placeholder should also change to include the lemma of the example lexeme. (That’s not strictly speaking part of this task, since it’s the same between JS and no-JS pages, but I think we should implement it at the same time.) Maybe …-placeholder-with-example works for all three message keys?

Maybe …-placeholder-with-example works for all three message keys?

is adding something like no-js into the message key for differentiation too incoherent for translators?

Well, we want to use the messages for both JS and no-JS, so that would be misleading.

oh i seem to have misunderstood "we’ll probably introduce new messages for this"

Yes, my hope is that the new messages will completely replace the old ones in NewLexemeAlpha, and then we can remove the old messages together with the old special page. (But until then, we need both to exist at the same time, so we need something in the name to distinguish them – but ideally something that won’t look too out of place once the new messages are the only ones left, either.)

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

[mediawiki/extensions/WikibaseLexeme@master] Update messages for new lexeme placeholders

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

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

[mediawiki/core@master] Support placeholder in OOUI HTMLComboboxField

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

Change 792124 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Update messages for new lexeme placeholders

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

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

[mediawiki/extensions/WikibaseLexeme@master] Use placeholders with example data in JS Special:NewLexemeAlpha

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

Change 792214 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Use placeholders with example data in JS Special:NewLexemeAlpha

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

Change 792157 merged by jenkins-bot:

[mediawiki/core@master] Support placeholder in OOUI HTMLComboboxField

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