[Wikidata-bugs] [Maniphest] [Commented On] T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage

2020-05-03 Thread Jarekt
Jarekt added a comment. There is an API to get languages users speak: https://commons.wikimedia.org//w/api.php?action=query&meta=babel&babuser=Jarekt. Maybe it would be possible to get babel preferences of the current user. TASK DETAIL https://phabricator.wikimedia.org/T68051 EMAIL PREFER

[Wikidata-bugs] [Maniphest] [Commented On] T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage

2020-04-24 Thread Jarekt
Jarekt added a comment. @matej_suchanek Sorry for nit-picking but that second sentence is in documentation of ` mw.wikibase.getLabel` function, and I did not noticed it when I was reading documentation of `mw.wikibase.getLabelWithLang`. There is a link to the other function, so it should not

[Wikidata-bugs] [Maniphest] [Commented On] T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage

2020-04-24 Thread matej_suchanek
matej_suchanek added a comment. In T68051#6080581 , @Jarekt wrote: > Function mw.wikibase.getLabelWithLang does on document what the language out

[Wikidata-bugs] [Maniphest] [Commented On] T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage

2020-04-24 Thread matej_suchanek
matej_suchanek added a comment. In T68051#6079807 , @Dvorapa wrote: >> suddenly 50M pages will be querying Q2's label > > Yes, but only during saving an edit, so this should be ok from my perspective. I just still have doubts about wh

[Wikidata-bugs] [Maniphest] [Commented On] T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage

2020-04-23 Thread Dvorapa
Dvorapa added a comment. > suddenly 50M pages will be querying Q2's label Yes, but only during saving an edit, so this should be ok from my perspective. TASK DETAIL https://phabricator.wikimedia.org/T68051 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailprefer

[Wikidata-bugs] [Maniphest] [Commented On] T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage

2020-04-22 Thread Jarekt
Jarekt added a comment. I checked and `_, lang = mw.wikibase.getLabelWithLang( 'Q2' )` is a better approach, since Q2 had labels in 287 langiuages and Q1 "only" in 189. So is this an acceptable way to look up language of the user? Every template on Commons calls {{int:Lang}}, often many time

[Wikidata-bugs] [Maniphest] [Commented On] T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage

2020-04-20 Thread Dvorapa
Dvorapa added a comment. In T68051#6070113 , @Jarekt wrote: > Can we just use `_, lang = mw.wikibase.getLabelWithLang( 'Q1' )` ? That line seems to always return the language of the viewer. I do not know if Q1 has a label for all support

[Wikidata-bugs] [Maniphest] [Commented On] T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage

2020-04-19 Thread Jarekt
Jarekt added a comment. Can we just use `_, lang = mw.wikibase.getLabelWithLang( 'Q1' )` ? That line seems to always return the language of the viewer. I do not know if Q1 has a label for all supported languages, but if not than we can add some. TASK DETAIL https://phabricator.wikimedia.or

[Wikidata-bugs] [Maniphest] [Commented On] T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage

2020-03-25 Thread Dvorapa
Dvorapa added a comment. `frame:callParserFunction("int","lang")` is the same as `{{int:Lang}}`. It is just a workaround, created by admins on projects which need this functionality. On other projects where admins did not create int:Lang message map none of these workarounds work. TASK DETA

[Wikidata-bugs] [Maniphest] [Commented On] T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage

2020-03-25 Thread Jarekt
Jarekt added a comment. At the moment most modules on Commons use `frame:callParserFunction("int","lang")` call to get users language. It is a solution that works fine on multilingual projects like Commons and Wikidata, but I am not sure if it is accessible on other projects. I assume that t

[Wikidata-bugs] [Maniphest] [Commented On] T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage

2019-07-21 Thread Iniquity
Iniquity added a comment. Is there any progress in this task? TASK DETAIL https://phabricator.wikimedia.org/T68051 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Iniquity Cc: Iniquity, Dvorapa, daniel, Ricordisamoa, Capankajsmilyo, zhuyifei1999,