[Wikidata-bugs] [Maniphest] T310581: Make LanguageCode::bcp47() available in Lua

2024-03-30 Thread Tacsipacsi
Tacsipacsi added a comment. Not really. Given `simplewiki`, T253387 should give `simple` and `wikipedia`, as `simple` is a valid “non-standard language code” (i.e. a language code that is known to MediaWiki but isn’t valid, or has a slightly

[Wikidata-bugs] [Maniphest] T310581: Make LanguageCode::bcp47() available in Lua

2024-03-28 Thread Michael
Michael added a project: Wikibase-Lua. Michael added a comment. I wonder if this has some overlap with T253387 ? TASK DETAIL https://phabricator.wikimedia.org/T310581 EMAIL PREFERENCES

[Wikidata-bugs] [Maniphest] T310581: Make LanguageCode::bcp47() available in Lua

2024-03-26 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment. In T310581#9660792 , @Tacsipacsi wrote: > In T310581#9660648 , @Lucas_Werkmeister_WMDE wrote: > >> Apparently @cscott recently added

[Wikidata-bugs] [Maniphest] T310581: Make LanguageCode::bcp47() available in Lua

2024-03-26 Thread Tacsipacsi
Tacsipacsi added a comment. In T310581#9660648 , @Lucas_Werkmeister_WMDE wrote: > Apparently @cscott recently added toBcp47Code() , but as a non-static instance

[Wikidata-bugs] [Maniphest] T310581: Make LanguageCode::bcp47() available in Lua

2024-03-26 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment. Apparently @cscott recently added toBcp47Code() , but as a non-static instance method. I think the expensiveness argument from earlier needs to be reevaluated anyway,

[Wikidata-bugs] [Maniphest] T310581: Make LanguageCode::bcp47() available in Lua

2023-11-03 Thread Pppery
Pppery added a parent task: T50176: Requested Scribunto/Lua built-in methods/functions (tracking). TASK DETAIL https://phabricator.wikimedia.org/T310581 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Pppery Cc: Izno, cscott, mxn, Zebulon84,

[Wikidata-bugs] [Maniphest] T310581: Make LanguageCode::bcp47() available in Lua

2023-01-29 Thread Tacsipacsi
Tacsipacsi added a comment. Introducing a lightweight also makes sense, although I don’t think `mw.language.newFromBcp47()` would be used a lot – usually the language comes from MediaWiki (page language, content language, `{{int:lang}}` hack etc.), and then converted to BCP47 for usage in

[Wikidata-bugs] [Maniphest] T310581: Make LanguageCode::bcp47() available in Lua

2023-01-27 Thread cscott
cscott added a comment. My only caution is that using strings to represent languages can be quite error-prone, given that there are different "string codes" floating around for the same language. In an ideal world, I'd say you should create a light-weight language object in lua that you

[Wikidata-bugs] [Maniphest] T310581: Make LanguageCode::bcp47() available in Lua

2022-06-14 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment. Hm, that’s a very good point. Let’s just limit this task to `mw.language.bcp47()` for now, then? TASK DETAIL https://phabricator.wikimedia.org/T310581 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To:

[Wikidata-bugs] [Maniphest] T310581: Make LanguageCode::bcp47() available in Lua

2022-06-14 Thread Tacsipacsi
Tacsipacsi changed the subtype of this task from "Task" to "Feature Request". Tacsipacsi added a comment. Thanks for filing this task! I was planning to do it for months, but didn’t get around doing it… The problem with a field or instance method is that the number of distinct language

[Wikidata-bugs] [Maniphest] T310581: Make LanguageCode::bcp47() available in Lua

2022-06-14 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment. I can imagine three possible interfaces (not counting name variations): htmlCode = mw.language.bcp47( languageCode ) htmlCode = mw.language.new( languageCode ).bcp47 htmlCode = mw.language.new( languageCode ):bcp47() That is, a

[Wikidata-bugs] [Maniphest] T310581: Make LanguageCode::bcp47() available in Lua

2022-06-14 Thread Maintenance_bot
Maintenance_bot added a project: Wikidata. TASK DETAIL https://phabricator.wikimedia.org/T310581 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Maintenance_bot Cc: Lucas_Werkmeister_WMDE, mrephabricator, Astuthiodit_1, karapayneWMDE, Invadibot,