[Wikidata-bugs] [Maniphest] T325728: Defined language codes containing -x- generate errors when used for lexemes

2023-12-23 Thread Bugreporter
Bugreporter added a comment.


  The code is here: 
https://gerrit.wikimedia.org/g/mediawiki/extensions/WikibaseLexeme/+/HEAD/src/DataAccess/ChangeOp/Validation/LexemeTermLanguageValidator.php

TASK DETAIL
  https://phabricator.wikimedia.org/T325728

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Bugreporter
Cc: Bugreporter, Lucas_Werkmeister_WMDE, Nikki, Danny_Benjafield_WMDE, 
Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, Akuckartz, 
Nandana, Lahi, Gq86, GoranSMilovanovic, Mahir256, QZanden, LawExplorer, 
_jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T325728: Defined language codes containing -x- generate errors when used for lexemes

2022-12-21 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment.


  JS version of Special:NewLexeme:
  F35883438: image.png 
  Errors if you create the lexeme with the no-JS version of Special:NewLexeme 
and then try to edit it (I’ve pasted the screenshots together in Gimp):
  F35883955: T325728.png 

TASK DETAIL
  https://phabricator.wikimedia.org/T325728

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, Nikki, Astuthiodit_1, karapayneWMDE, Invadibot, 
maantietaja, ItamarWMDE, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, 
Mahir256, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, 
aude, Mbch331
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org


[Wikidata-bugs] [Maniphest] T325728: Defined language codes containing -x- generate errors when used for lexemes

2022-12-21 Thread Nikki
Nikki created this task.
Nikki added projects: Wikidata Lexicographical data, Wikidata.

TASK DESCRIPTION
  **Steps to replicate the issue** (include links if applicable):
  
  Part 1:
  
  - Define a custom language code in LocalSettings.php which contains `-x-`, 
e.g. `aa-x-localset`.
  - Start adding a lexeme.
  - Select the custom language code as the spelling variant.
  - Try to create the lexeme.
  
  Part 2:
  
  - Disable Javascript.
  - Start adding a lexeme.
  - Select the custom language code as the spelling variant.
  - Create the lexeme.
  - Try to edit the lemma or add a form or sense using the custom code.
  
  **What happens?**:
  
  Part 1:
  The language code can be selected in the spelling variant field, but the 
lexeme can't be created with the error `Invalid Item ID "localset" in field 
"lemma" at "aa-x-localset".`
  
  Part 2:
  The lexeme can be created, but the lemma can't be edited, and forms and 
senses can't be added, with a similar error.
  
  **What should have happened instead?**:
  
  Any custom language codes defined in LocalSettings.php (or Names.php) should 
be allowed. The QID check should only apply to language codes not already known 
to MediaWiki.
  
  While Wikimedia is not currently using codes containing `-x-`, codes such as 
`map-bms` and `roa-tara` might one day be changed to use `-x-`, and third party 
users of the extension should not be prevented from defining/adding custom BCP 
47-compliant language codes.
  
  **Software version** (skip for WMF-hosted wikis like Wikipedia):
  
  **Other information** (browser name/version, screenshots, etc.):
  
  Example line to add to LocalSettings.php
  `$wgExtraLanguageNames["aa-x-localset"] = "aa-x-localset";`

TASK DETAIL
  https://phabricator.wikimedia.org/T325728

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Nikki
Cc: Nikki, Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, 
Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, Mahir256, QZanden, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
___
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org