Michael created this task.
Michael added projects: Wikidata Lexicographical data, Wikidata, 
Special:NewLexeme revival (Special:NewLexeme revival - sprint 5).

TASK DESCRIPTION
  This task ties together the work that was in TBC and T305539 
<https://phabricator.wikimedia.org/T305539>, and so it depends on them being 
done first.
  
  To make language code inference work, an action is needed that is probably 
triggered by the selected value of the LanguageLookup changing.
  
  This action should probably do the following things:
  
  1. set the `language` store field to whatever was selected in the 
LanguageLookup
  2. set the `languageCodePropertyValue` store field to `undefined`
  3. use the repository/service created in T305539 
<https://phabricator.wikimedia.org/T305539> to retrieve the language code 
property data from the API
  4. if a language code was returned by the api, then validate it
  5. set the `languageCodePropertyValue` store field accordingly, see the table 
below
  
  Finally, the App components need to be told how to react to the 
`languageCodePropertyValue`, see the below:
  
  | Conceptual state                                                            
           | `language` store field | `languageCodePropertyValue` store field | 
app state                                                                       
|
  | 
--------------------------------------------------------------------------------------
 | ---------------------- | --------------------------------------- | 
------------------------------------------------------------------------------- 
|
  | No language Item selected (initial state)                                   
           | falsy                  | `undefined`                             | 
No spelling variant lookup, no warning message                                  
|
  | Loading language code request                                               
           | `'Q123'`               | `undefined`                             | 
No spelling variant lookup, no warning message (maybe loading indicator shown?) 
|
  | No language code                                                            
           | `'Q123'`               | `null`                                  | 
Yes spelling variant lookup, no warning message.                                
|
  | Invalid language code (meaning the retrieved code is not in the list of 
allowed codes) | `'Q123'`               | `false`                               
  | Yes spelling variant lookup, yes warning message.                           
    |
  | Valid language code                                                         
           | `'Q123'`               | `'en-ca'`                               | 
No spelling variant lookup, no warning message.                                 
|
  |

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

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

To: Michael
Cc: Michael, Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, 
Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, Mahir256, QZanden, 
LawExplorer, _jensen, rosalieper, Bodhisattwa, 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

Reply via email to