Module talk:I18n/complex date
Appearance
Error at Olhadoko erreka
I'm getting "Lua error in package.lua at line 80: module 'Module:Linguistic' not found." Plaba123 (talk) 18:58, 21 November 2018 (UTC)
- That's because @Jarekt: synced this with Commons, but @Pppery: made a breaking change by RfD'ing Module:Linguistic. Not sure how to resolve that... Thanks. Mike Peel (talk) 21:04, 21 November 2018 (UTC)
- It amusingly highlights that we have at least one code path that is not executed as otherwise we would have had similar errors already, and I think I saw a few others of similar sort reviewing the module earlier:--Izno (talk) 21:39, 21 November 2018 (UTC)
if state.precision > 10 then -- precision > month return 'du $date1 au $date2' else -- "DE septebmbre" / "D'octobre" return require("Module:Linguistic").of(date1, 'fr') .. " à $date2" end
- @Izno: In fact, you've underestimated the amount of never-executed code here by a lot: the entire module is basically copied from commons but useless here, as (taking that code as an example) there is no reason for an English Wikipedia article to format a date in French. {{3x|p}}ery (talk) 00:20, 22 November 2018 (UTC)
- I think there needs to be a broader discussion over whether this kind of "multilingual" module should be allowed on the English Wikipedia (I'd argue no). {{3x|p}}ery (talk) 00:31, 22 November 2018 (UTC)
- @Pppery: Can you copy that back over to commons so that this won't happen again? Thanks. Mike Peel (talk) 00:32, 22 November 2018 (UTC)
- No, because I'm not a commons admin. {{3x|p}}ery (talk) 00:34, 22 November 2018 (UTC)
- @Pppery: Can you copy that back over to commons so that this won't happen again? Thanks. Mike Peel (talk) 00:32, 22 November 2018 (UTC)
- It amusingly highlights that we have at least one code path that is not executed as otherwise we would have had similar errors already, and I think I saw a few others of similar sort reviewing the module earlier:
Errors in date handling.
Using Special:Permalink/882254323:
{{#invoke:WikidataIB |getValue |ps=1 |P582 |qid=Q2269}}
→ Module:I18n/complex_date:15: attempt to call field '_Ordinal' (a nil value)
The same call on Commons produces "19th century".
I'll re-synchronise from Commons.
{{#invoke:WikidataIB |getValue |ps=1 |P582 |qid=Q2269}}
→ 1820{{#invoke:WikidataIB |getValue |ps=1 |P582 |qid=Q2269 |lang=fr}}
→ 1820{{#invoke:WikidataIB |getValue |ps=1 |P582 |qid=Q2269 |lang=zh}}
→ 1820年
That is now working as of this timestamp. I strongly recommend that future changes are fully tested before implementation. --RexxS (talk) 14:46, 24 February 2019 (UTC)
- @RexxS: I don't think this worked in any version of the module before the one you just created. Pppery, the demodulator 22:07, 25 February 2019 (UTC)