Lucas_Werkmeister_WMDE created this task.
Lucas_Werkmeister_WMDE added projects: Wikidata, 
MediaWiki-extensions-WikibaseView.

TASK DESCRIPTION
  As a Wikidata editor, I want to see the termbox in all the languages that 
I’ve declared in my babel, as well as in the user interface language (if that’s 
not already in the babel).
  
  **Problem:**
  Since 2014 (I38cc93a9db 
<https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/156548>, 
rEWBAf1f23c217189: Integrated fingerprintgroupview into entityview 
<https://phabricator.wikimedia.org/rEWBAf1f23c21718984420fc4285de65e07a2bb255066>),
 Wikibase has had code similar to this determining the languages for the 
termbox (and possibly other places, not sure what else uses them):
  
  name=wb.getUserLanguages()
    var userLanguages = mw.config.get( 'wbUserSpecifiedLanguages', [] ),
        isUlsDefined = mw.uls && $.uls && $.uls.data,
        languages;
    
    if ( !userLanguages.length && isUlsDefined ) {
        languages = mw.uls.getFrequentLanguageList().slice( 1, 4 );
    } else {
        languages = userLanguages.slice();
        languages.splice( userLanguages.indexOf( mw.config.get( 
'wgUserLanguage' ) ), 1 );
    }
    
    languages = filterInvalidTermsLanguages( languages );
    languages.unshift( mw.config.get( 'wgUserLanguage' ) );
  
  If the `wbUserSpecifiedLanguages` don’t include the `wgUserLanguage`, then 
`userLanguages.indexOf( mw.config.get( 'wgUserLanguage' ) )` will return -1, 
and the `splice()` call will remove the last element of the array (an arbitrary 
language), instead of (as intended) the user interface language (to be added to 
the front of the array with the `unshift()` call below).
  
  **Example:**
  Q42?uselang=en-gb <https://www.wikidata.org/wiki/Q42?uselang=en-gb> (assuming 
your babel doesn’t include `en-gb`; see also T297393#7910267 
<https://phabricator.wikimedia.org/T297393#7910267>.
  
  **Screenshots/mockups:**
  Original termbox, before JS runs:
  F35106197: image.png <https://phabricator.wikimedia.org/F35106197>
  JS-updated termbox, now without Portuguese:
  F35106199: image.png <https://phabricator.wikimedia.org/F35106199>
  
  **BDD**
  GIVEN 
  AND 
  WHEN
  AND
  THEN
  AND
  
  **Acceptance criteria:**
  
  -
  
  **Open questions:**

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

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

To: Lucas_Werkmeister_WMDE
Cc: Manuel, Lydia_Pintscher, Aklapper, Lucas_Werkmeister_WMDE, Astuthiodit_1, 
karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, Akuckartz, Nandana, Lahi, 
Gq86, GoranSMilovanovic, 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

Reply via email to