Jump to content

Wikifunctions talk:Main Page/Archive/2026/01

From Wikifunctions

request Wikifunctions:Catalogue to access the catalogue translated page

Please update ->

[[Wikifunctions:Catalogue|<translate><!--T:12--> ''more functions…''</translate>]]

into something as ->

[[Special:MyLanguage/Wikifunctions:Catalogue|<translate><!--T:12--> ''more functions…''</translate>]]

Thanks. -- Christian 🇫🇷 FR (talk) 16:41, 4 January 2026 (UTC)

Done --Ameisenigel (talk) 19:57, 6 January 2026 (UTC)
hi, please where done ? T12 seems unchanged on page -> https://www.wikifunctions.org/w/index.php?title=Template:Main_page&action=edit -- Christian 🇫🇷 FR (talk) 07:53, 7 January 2026 (UTC)
Oh, I have just added it to T:9. Now added to T:12 as well. --Ameisenigel (talk) 17:59, 7 January 2026 (UTC)
ok T12 working. thanks, --Christian 🇫🇷 FR (talk) 20:34, 7 January 2026 (UTC)
This section was archived on a request by: Ameisenigel (talk) 19:57, 6 January 2026 (UTC)

List of sample functions

Suggested changeset:
is prime (Z12427)
is pangram (Latin alphabet) (Z12626)
Caesar cipher (Latin alphabet) (Z12812)
simple tense of verb (Z19514)
Bayes' theorem conditional probability P(A|B) (Z20000)
reverse string (Z10012) (trivial string op, already have palindrome)
has substring (Z10070) (trivial string op, already have pangram)
is Gregorian year leap year? (Z20181) (trivial date op)
how many days between two days in the year (Z20733) (trivial date op, already have age i.e. subtraction for years)
is a palindrome (Z10096) is palindrome (grapheme level) (Z10553) (clearer semantics)
Get day of week from date (Z13163) day of the week (Z20421) (better typing for input)
English cardinal (Z13587) cardinal in chosen language (Z16437) (i18n)
minimum of natural number list (Z19509) arithmetic mean of Natural numbers as Rational (Z30840) (slightly more interesting idk)
age (Z20756) distance (km) between 2 QIDs (Haversine) (Z26841) (trivial on dates, useful on locations)
blood compatibility (Z14469) (more representation for science)
Rational number as items of continued frac (Z19952) (more representation for math)
fetch first lexeme from item ref. and lang, P5137 (Z22696) (more representation for NLG)
describing entity w. adjective/class (monolingual) (Z29591) (more representation for NLG; this is the experiment embedded on Help:Multilingual)
Euler characteristic of polyhedron (Z31173) (more representation for math)
+ maybe some or all of: display Wikidata geo-coordinate as Plus Code (Z26151), UTC time of sunset for Wikidata location on date (Z28005), competition winner (Z28217), country (QID) of location item (Z29921), relevant Grammatical number enum for language (Z30195)

Also the randomisation doesn't seem to be set up correctly?
Are embedded function calls robust enough to be used on the main page? We could easily fill out Sample objects from list (Z22226), adding a seed parameter, to replace {{Random function}}. YoshiRulz (talk) 01:28, 18 January 2026 (UTC)

I designed the current main page and have been campaigning for an update for a year. The "Welcome!" section is also completely outdated. Feeglgeef (talk) 01:43, 18 January 2026 (UTC)

This gives no affordances to new users. There are already suggested functions and a link to the Catalogue. YoshiRulz (talk) 19:03, 22 January 2026 (UTC)

presentation: Main page in french holds News in english

Hi all , Although the template::Main page /fr is correctly rendered, the main page as called from the upper left logo of user interface in FRench still holds the News section in ENglish. Seems the FR translated template is not called correctly around:

{{dir|{{#invoke:Caller title|lang|base=Template:Main_page}}|2=ltr|3=rtl}}.svg|20px|middle|link=|class=skin-invert-image]]</span><span>Learn and contribute</span></h3>

Deeper analysis is requested.Thank you. -- Christian 🇫🇷 FR (talk) 17:09, 22 January 2026 (UTC)

This is also true for any other language. If I select Deutsch in my local preferences, then the main page appears in DE as expected but the News section called "Neuigkeiten" remains in english; lack of consistency. -- Christian 🇫🇷 FR (talk) 17:41, 22 January 2026 (UTC)
Page https://www.wikifunctions.org/wiki/Template:Main_page/fr is correct and contains the translated news. So it seems the main page is generated another way (...?) -- Christian 🇫🇷 FR (talk) 11:01, 5 February 2026 (UTC)
@Christian you're right, I caught that a while back. I thought it was just a caching issue then, but it’s actually from how the template is included.
Hi @Sannita (WMF), looks like we made a slip-up here. Maybe we should have used the localized syntax for the template like this:
{{Main page/News/{{int:lang}}}} or any other appropriate way. --Mdktb (talk) 05:04, 18 February 2026 (UTC)
@Mdktb Can I ask you for the precise syntax to include, so that I can edit accordingly? Thanks. Sannita (WMF) (talk) 16:01, 18 February 2026 (UTC)
@Sannita (WMF), just replace {{Main page/News}} with {{Main page/News/{{#ifeq:{{PAGEID}}|1169|{{uselang}}|{{PAGELANGUAGE}}}}}}. --Mdktb (talk) 07:40, 19 February 2026 (UTC)
I'm afraid it's a little more complicated than that: currently the main page calls a Lua module, so the change would need to be to the Lua module. Sannita (WMF) (talk) 15:09, 19 February 2026 (UTC)
Hi @Sannita (WMF), the replacement above should work by default. Regarding the module and the specificities of certain languages, we can either modify the current module or create a new one that isn't tied to the main page template and works with any page. Which approach do you support more? --Mdktb (talk) 19:11, 19 February 2026 (UTC)
So, is this going to be fixed somehow? The simple fix above might not work for a couple of languages but it could have been there for a month, solving the rest. Or is someone working on some Lua solution instead? Mormegil (talk) 07:44, 17 March 2026 (UTC)
Sorry, it fell off my mind. I guess we should raise this point with the wider community and find a solution together. Sannita (WMF) (talk) 13:44, 18 March 2026 (UTC)
Hi @Mormegil @Sannita (WMF), this module does the trick and works with any page. As below:
{{Main page/News/{{#invoke:IncludeLang|main|page=Template:Main page/News|lang = {{int:lang}}}}}}
--Mdktb (talk) 18:34, 18 March 2026 (UTC)
@Mdktb So if I change the current code with this string, would it work? Sannita (WMF) (talk) 20:55, 18 March 2026 (UTC)
@Sannita (WMF) yes, it will work --Mdktb (talk) 21:11, 18 March 2026 (UTC)
@Mdktb As I was trying to explain the last time: News is recalled by the lua module that is invoked by the main page template, so this hack does not work, unless I make some horrible code. We need to find someone who can fix the lua module. Sannita (WMF) (talk) 21:35, 18 March 2026 (UTC)
@Sannita (WMF) I think it's working here --Mdktb (talk) 22:19, 18 March 2026 (UTC)
yes, coherent, new are in Deutsch in a Deutsch page. --Christian 🇫🇷 FR (talk) 13:37, 19 March 2026 (UTC)
First, please mark changes in this template for translation --Mdktb (talk) 22:27, 18 March 2026 (UTC)
just a remark: curiously page Template:Main_page/sandbox is in english but holds the News in french. -- Christian 🇫🇷 FR (talk) 13:35, 19 March 2026 (UTC)
@Wladek92 are you sure? The news shows up here in french? --Mdktb (talk) 14:36, 19 March 2026 (UTC)
I made the change. I don't know why I misunderstood the whole thing. Hopefully it will work. Sannita (WMF) (talk) 18:43, 19 March 2026 (UTC)
i see no difference , cache was purged for template as for FR main page and EN news are still present. But it is the case for any language, if i select in my preferences italiano, i get the main page Benvenuti su Wikifunctions with news in english. --Christian 🇫🇷 FR (talk) 23:21, 19 March 2026 (UTC)
yes i am sure. i must be conbected , with user language = fr in my preferences. of course if you add an argument uselang = en in rhe url you dont see french but i was not spoken of modifying the url. -- Christian 🇫🇷 FR (talk) 23:05, 19 March 2026 (UTC)