Template talk:WOTD

On my browser, the image hides up the beginning of the letter "W" on "Word of the day". I shrank it to 52px instead of 62 px, and that problem was solved, see User:Keene/Sandbox. --Keene 03:01, 1 January 2008 (UTC)


 * What is 'my browser' ? My tests show no problems, no matter how I play with window size. Robert Ullmann 15:08, 2 January 2008 (UTC)


 * Note that on IE 6, it looks crappy because IE can't display the image properly (you are seeing a white background over the box border? the image background is transparent.) Look at it in Firefox. Robert Ullmann 15:15, 2 January 2008 (UTC)


 * Some users don't have that option. If I'm at work, I have to use IE6.  Many American schools are using IE6 because updating would cost money.  If there is a problem with display in IE6, then it affects a large fraction of our users. --EncycloPetey 17:13, 2 January 2008 (UTC)


 * Keene is right, I can't make out a single letter of today's (apparently short) WOTD :

we need at last one empty line in between (I'm working on a network, using the non-specified standard browser for Word) Matricularius 11:17, 28 February 2008 (UTC)

Redlink or no redlink
Would it make sense to put an #ifexist function around the audio so that it doesn't show up unless an audio file exists? --Yair rand 00:46, 12 March 2010 (UTC)

Date
"Word of the day for December 28" So, how about "28 December 2014" or "Sunday, 28 December 2014" or better "28 December 2014 (Sunday)"?
 * 1) At least in Europe we have the year 2014, not the year 28 (AD), and I think one shouldn't care about uncommon US-American and e.g. Muslim year numbering.
 * 2) The word of which december day is it? At least the number of the day should be added, though the day (today: Sunday) could be added, too.

BTW: The second version would also be similar to www.bbc.co.uk ("Sunday, 28 December") & www.bbc.co.uk/radio4/programmes/schedules/fm ("Sunday 28 December 2014"). -IP, 11:14, 28 December 2014 (UTC)

Add to Wikipedia Userpage
How can I add the "Word of the Day" to my Wikipedia userpage? I tried several different template formats and searched, but nothing worked. SabreWolfy (talk) 08:16, 9 August 2015 (UTC)
 * Hi, I replied on your user page. Smuconlaw (talk) 17:15, 6 January 2016 (UTC)

Alignment issue
Hi,. I updated this template recently and it seems to be working well, except that there is an alignment issue on the Main Page – the Foreign Word of the Day box no longer appear directly below the WOTD box. I can't figure out what has gone wrong. Can you help? Thanks. — SGconlaw (talk) 16:24, 12 July 2018 (UTC)
 * I went through your recent revisions, and the position of the FWOTD changed in . — Eru·tuon 17:24, 12 July 2018 (UTC)
 * Ah, thanks. It was my addition of . For some reason, it looks like there is supposed to be a missing table closing markup in the template. — SGconlaw (talk) 17:38, 12 July 2018 (UTC)
 * Hmm, so maybe it's a table that holds the FWOTD underneath the WOTD. — Eru·tuon 20:28, 12 July 2018 (UTC)

Yesterday and Tomorrow links broken
Seemingly on every Wiktionary:Word of the day/ page, the “Yesterday” and “Tomorrow”links are broken. They lead to say ”Wiktionary:Word_of_the_day//December_13” (note the extra forward slash. That kind of makes navigating the archive a bit difficult.

The slash at the end of the line where it says “December 31” and “January 1” seems to be the issue.

If I had to guess, it’s if the “expr” block actually evaluates to anything that the slash is necessary. That expr block doesn’t account for if the page is a subpage of Wiktionary:Word of the day, does not have “/Archive” and does not have a year. If all three of those conditions are met, that entire first ifeq block in the expr block evaluates to “” (blank). Next, if today is not December 31, (or Jan 1 on yesterday link), the second ifeq block also evaluates to “” (blank), leaving a blank expr block that results in “” (blank). The following would fix that issue for all days including a separate issue regarding Jan 1 for yesterday, and Dec 31 for tomorrow (both would result in either: “expr:-1” or “expr:+1” resulting in “day/-1/December 31” and “day/1/January 1” respectively.) tomorrow&amp;nbsp;→ for tomorrow, and something similar for yesterday. I checked it in ExpandTemplates and Wiktionary:Word of the day/2017/December 10, Wiktionary:Word of the day/December 10, Main Page, and Wiktionary:Word of the day/Archive/2017/December 20, all link properly (well, aside from the fact that Wiktionary:Word of the day/2017/December 11, and similar don’t exist, and that the number for next day defaults to current day.) Days like “day/December 31” (with unnamed 5 = 31, and 4 = December) link to “day/January 1”.

The template right now also assumes that if the page contains Archive, that it also contains a year. This leads to “Expression error: Unrecognized word "december"” or similar being output.

This fix is ugly, clunky, way too convoluted, but generally works (at least somewhat better than currently). I’m sure this can be reduced in size, but, I’m not sure how. Actually, since Wiktionary supports Scribunto, wouldn’t this work much better in a module? (it’d at least halve the code size as the value of the expr block could be stored in a variable, and hence not be repeated again.)

Meh, I tried my best, it’s hard to debug things on mobile. I was scared the edit page would reload on me and I’d lose this entire comment. Yikes. — EmptySora (talk) 05:16, 11 December 2019 (UTC)


 * Sorry if this is semi-incoherent, I rewrote and removed portions of that comment multiple times as I was finding out what caused the slash issue. — EmptySora (talk) 05:39, 11 December 2019 (UTC)


 * Thanks. I'm aware of the issue. It's actually a temporary problem, because we are migrating from using pages with the format " ", to those with the format " ". Thus, in the new year the links will all work properly. I have been thinking about whether it is necessary to provide for backwards compatibility but haven't found the time to examine the matter in detail yet. — SGconlaw (talk) 07:59, 11 December 2019 (UTC)
 * I should mention that I only know how to use Wikitext templates, and not Scribunto (is this the same as Lua?). Someone else will have to work on that (and continue to maintain the template) if it is desired to convert the whole template to Scribunto. — SGconlaw (talk) 08:01, 11 December 2019 (UTC)


 * Just modified /sandbox to reflect the above. You can use:


 * in Special:ExpandTemplates to test it (checked: “Wiktionary:Word of the day/December 10”, “Wiktionary:Word of the day/2019/December 10”, “Wiktionary:Word of the day/Archive/2019/December 10”, “Main Page” and it works.
 * are the archive subpages supposed to link to non /archive?


 * and I just noticed you replied... it’s way too late for me to be doing edits...
 * Backwards compatibility is nice, especially should something break. Scribunto is the MW extension that allows programming languages to be used (modules), currently only supports Lua, so yes. If I have time, I can draft such a module.
 * I don’t think people should have to wait until New Years to have functional navlinks... maybe keep it as a temporary thing until New Years? — EmptySora (talk) 08:12, 11 December 2019 (UTC)


 * Personally, I hate that code. It’s nonsensical that you have to use that to account for a single erroneous page convention. Anything to NOT use that code would make my day. — EmptySora (talk) 08:15, 11 December 2019 (UTC)


 * thanks, am at work now, so let me have a look at what you've put in the Sandbox when I get home later. Also:
 * As regards your question "are the archive subpages supposed to link to non /archive?", I'm afraid you have to explain as I'm not sure what you mean.
 * The template also needs to work properly with "Template:Word of the day" and "Word of the day/Archive". I noticed this but, as mentioned above, haven't had time yet to look into the issue.
 * Note that the "edit" link at the top right corner also needs to work properly.
 * Happy for you to try and do a Lua conversion at some stage, but note that it would then be good if you can stick around and help to maintain the template because I won't be able to, at least not in the short term. I'd like to learn how to use Lua at some stage but have a feeling there may be quite a long learning curve for me.
 * — SGconlaw (talk) 08:25, 11 December 2019 (UTC)

Assuming I'm not crazy (I very well could be, it's 4:22AM here on the east coast of the US), in the very least, my edit doesn't break things, IE: if "Template:Word of the day" and "Word of the day/Archive" already didn't work, I can't guarantee mine fixes it. All I did was make it such that on subpages of Wiktionary:Word of the day, the links work relatively fine (mainly by wrapping Wiktionary:Word of the day/December 31 - Wiktionary:Word of the day/January 1 properly such that /1January, and /-1December don't end up in there; and by making the "//" issue go away (ie: Wiktionary:Word of the day/December 10 links to Wiktionary:Word of the day/December 11, not Wiktionary:Word of the day//December 11)) That's really all I did.

As for the "/archive" thing I mentioned, should "Wiktionary:Word of the day/Archive/2019/December 10" be linking to "Wiktionary:Word of the day/2019/December 11" (as it would currently, even without my edit), or "Wiktionary:Word of the day/Archive/2019/December 11"?

There's an issue with the "edit" link? Did my edit in the sandbox break it? Judging from whats there, it's probably the same issue that was with tomorrow/yesterday links.

As for Lua, I suck at it too, and any language that remotely resembles Visual Basic. I was thinking that while an outright rewrite of the entire template would be impossible right off the bat... what we could do is instead migrate various pieces of the template into the lua module (ie: Module:WOTD) and then someone who is a lot better at it can pull the rest of it. Ideally, we should be able to have Template:WOTD look like: &lt;noinclude&gt;&lt;/noinclude&gt; or something along those lines. (like at Wikipedia:Template:Infobox)

Here's a start: The audio section could be changed from...

to...

Has the added benefit of being able to easily add/remove file extensions/language codes without risking breaking anything or making that mess of a pyramid any worse. Also, it checks to see if any extension per each language code exists (ie: it checks for any en-US audio files, then en-UK, then en-AU instead of mixing them around. Consistency ftw~!) Haven't tested that script, but it doesn't have any blatant errors, well, aside from the fact that Module:Arguments doesn't exist here (see: Wikipedia:Module:Arguments), but that's just a Wikipedia:Special:Export and Special:Import away from not being an issue, assuming someone has import rights, if that's a thing. Worst case scenario we do a broken copy and paste, those are always fun. *cough cough*

Ideally, the yesterday/tomorrow/edit/etc. links would be the next to go into a module after this. -- EmptySora (talk) 09:48, 11 December 2019 (UTC)

"View" link
Hi,, I tried to add a "View" link to the top right corner of the template as sometimes it's useful to be able to jump to a specific WOTD (for example, "Word of the day/2020/May 5") without entering the edit page. However, I realize my edit isn't going to achieve the right effect if the link is clicked on from an archive page such as "Word of the day/Archive/2019/December". Any idea on how to fix this? How does the line  automatically determine the correct year? — SGconlaw (talk) 15:47, 5 May 2020 (UTC)
 * Well, there's already the complicated bit in that apparently retrieves the title of the correct page. (Hard to remember exactly how it works, though I edited it before.) Copying it should do the job. — Eru·tuon 06:27, 7 May 2020 (UTC)
 * ah, thanks. I didn’t know we had . — SGconlaw (talk) 07:46, 7 May 2020 (UTC)
 * Sorry, I'm not explaining well. I mean the code in the first parameter to in the source code of  that somehow figured out the right WotD page name. — Eru·tuon
 * yes, I saw your edits to the template. — SGconlaw (talk) 08:18, 7 May 2020 (UTC)

Archived feedback: March 2020
I don't know where to report this, but the Word of the Day RSS feed is giving me the entries for 2019 rather than 2020.
 * any idea how to fix this? I suspect it’s because the format for the WOTD page changed from “Word of the day/March 17” to “Word of the day/2020/March 17”. — SGconlaw (talk) 16:09, 17 March 2020 (UTC)
 * Based on this, it looks like MediaWiki:Ffeed-wotd-page controls the page name for the WotD feeds. After this edit, I guess the feeds will start using the correct page. — Eru·tuon 17:37, 17 March 2020 (UTC)
 * cool, thanks. (For future reference, we may want to archive this discussion to "Template talk:WOTD".) — SGconlaw (talk) 18:18, 17 March 2020 (UTC)

“Tomorrow” link not working properly on the Main Page
Hi,, I’ve noticed something odd. When I view the page “Word of the day/2020/December 31” and click on the “tomorrow” link, it correctly displays “Word of the day/2021/January 1”. However, when I look at the Main Page and click on that link, I am sent to “Word of the day/2020/January 1” instead. Any idea what’s wrong? — SGconlaw (talk) 09:10, 31 December 2020 (UTC)

Recent edits
what is your recent amendment intended for? It is producing an unintended result on pages like “Word of the day/Archive/2023/December”. — Sgconlaw (talk) 04:50, 12 December 2023 (UTC)


 * @Sgconlaw sorry about this. It is supposed to appear on pages like WT:Word of the day/January 23, because it took me some time to work out what they were for. I'll fix the erroneous appearance of this template on archive page right away. This, that and the other (talk) 05:45, 12 December 2023 (UTC)
 * @Sgconlaw I think it is fixed. I'm done editing WOTD stuff for now; sorry again. This, that and the other (talk) 06:02, 12 December 2023 (UTC)
 * thanks! Another thing I've been meaning to fix but have not got to yet is the fact that the "yesterday" and "tomorrow" links don't work properly on pages like "Word of the day/January 1" and when there is a change of year (31 December/1 January). — Sgconlaw (talk) 13:43, 12 December 2023 (UTC)

in some cases (for example, at "Word of the day/Archive/2023/December"), the edit link at the top right corner of the template is linking to the wrong page. For example, the link is —it is missing a slash between the year and month. — Sgconlaw (talk) 22:02, 12 December 2023 (UTC)


 * @Sgconlaw both should be addressed now. This, that and the other (talk) 00:14, 13 December 2023 (UTC)
 * that’s great! Thanks! — Sgconlaw (talk) 04:49, 13 December 2023 (UTC)

Template doesn't handle change of year properly
happy New Year (where I am, anyway)! Wondering if you can figure this out, as I've failed to. As I mentioned previously, the "yesterday" and "tomorrow" links don't work properly when there is a change of year (31 December to 1 January). For example, the "tomorrow" link at the WOTD for 31 December 2023 currently on the Home Page is linking to "Word of the day/2023/January 1" instead of "Word of the day/2024/January 1". I assume the problem lies with. — Sgconlaw (talk) 19:05, 31 December 2023 (UTC)


 * @Sgconlaw should be resolved now. This, that and the other (talk) 02:20, 1 January 2024 (UTC)
 * @Sgconlaw also, Happy New Year to you as well! This, that and the other (talk) 02:21, 1 January 2024 (UTC)
 * fantastic! Thanks. — Sgconlaw (talk) 04:24, 1 January 2024 (UTC)