Module talk:DateI18n

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

relation to Module:Date

[edit]

Module:DateI18n is a clone of Module:Date renamed so the name matches the name used on all the other projects. Module:Date should be retired. --Jarekt (talk) 17:57, 4 May 2019 (UTC)[reply]

Rewrite

[edit]

I just did a rewrite of Module:DateI18n to use Data:DateI18n.tab as main repository of language specific settings. Alert me if there are any issues. --Jarekt (talk) 12:25, 12 April 2020 (UTC)[reply]

@Jarekt: Something went wrong, see Template:Other date: see multiple displayed errors in red Lua error in Module:DateI18n at line 254: attempt to index field '?' (a nil value). Gumruch (talk) 23:20, 17 May 2022 (UTC)[reply]
Fixed @Gumruch: thanks for reporting, that was a tricky one as it only shown when your default language is Czech or Polish. --Jarekt (talk) 02:43, 18 May 2022 (UTC)[reply]
There is an issue at Category:Hackerbrücke: Lua error in Module:DateI18n at line 113: attempt to index field 'data' (a nil value). --93.201.168.23 20:38, 20 April 2023 (UTC)[reply]

Move alias and default values to module

[edit]

{{Edit request}}

@Jarekt: I've made some edits in Module:DateI18n/sandbox to handle all the parameter aliases and default values in the module. Assuming everything looks good to you, could you implement these changes?

The only test that fails in Module:DateI18n/sandbox/testcases also fails in Module:DateI18n/testcases, and it's because mw.language:formatDate, when asked for 2010-01-09 in Chechen, outputs "шeран" with a Latin "e" instead of "шеран" with a Cyrillic "е". —CalendulaAsteraceae (talkcontribs) 18:31, 27 November 2023 (UTC)[reply]

CalendulaAsteraceae, As this module is a keystone of so many other modules, I am trying not to change it much unless something is broken. Can you explain what issue are you trying to fix? I see some code beautification which I support. I see moving some aliases from Template:Date to the module, I am a bit weary of that since the module is used on so many Wikipedia projects others might have picked different aliases, for example language as 4th variable might make little sense on single language wikipedia and they might have used it for hour. So I would leave numbered aliases as is. I like the expanded language selection code. I do not like the use of Module:Arguments, that module seem very bloated and I do not see any benefit to using it, and none of the most used lua modules use it. Am I missing some advantage I do not know about? I was trying hard to make sure this module does not depend on any other modules, to ease portability. --Jarekt (talk) 03:49, 29 November 2023 (UTC)[reply]
@Jarekt: Good point about Module:Arguments and the numbered aliases; I've adjusted the code accordingly. The problem I'm trying to fix is that on single-language projects, including English Wikipedia, {{int:Lang}} just outputs ⧼Lang⧽, so it's important to check whether lang is actually a valid language code. What do you think of the current code in Module:DateI18n/sandbox and {{Date/sandbox}}? —CalendulaAsteraceae (talkcontribs) 15:32, 29 November 2023 (UTC)[reply]
✓ Done Thank you! Jarekt (talk) 02:57, 1 December 2023 (UTC)[reply]
@Jarekt: Thank you! Could you also edit {{Date}} like I have it in {{Date/sandbox}}? —CalendulaAsteraceae (talkcontribs) 03:00, 1 December 2023 (UTC)[reply]
✓ Done Thank you Jarekt (talk) 00:04, 25 December 2023 (UTC)[reply]