Jump to content

Wikifunctions:Status updates/2025-07-19

From Wikifunctions
Wikifunctions Status updates Translate

Abstract Wikipedia via mailing list Volunteer Response Team Abstract Wikipedia on IRC Wikifunctions on Telegram Wikifunctions on Mastodon Wikifunctions on Twitter Wikifunctions on Facebook Wikifunctions on YouTube Wikifunctions website Translate

Wikidata-based enumerations are here

Wikifunctions now has a new kind of Types: Wikidata-based enumerations, also known as light-weight enumerations. They behave similarly to proper Wikifunctions enumerations, with the exception that the individual values for each such enumeration are defined not in Wikifunctions but in Wikidata. We had announced their development in March. They have been available on wiki for a short while, and with the testing period over, we are now happy to open them up for broader usage!

For starters, three new light-weight enumerations have already been created:

These are the sets of grammatical genders used in some languages. All these enumerations have been created following discussions on the Type proposals page. (There are two more, Wikidata time precision and Wikidata calendar model, which are used for the Wikidata time type, but we will talk about these in a future update).

What are the advantages of using Wikidata-based enumerations? There’s a conceptual advantage, and a very practical advantage.

Conceptually, they allow us to tie information much closer to Wikidata: instead of having to create Wikifunction’s representation of January, which we then need to somehow link to Wikidata’s representation of January, we just use Wikidata’s representation. This also means we don’t have to convert from one to the other when we use values of Wikidata-based enumerations to work on Wikidata-based functions.

Practically, this also means that we can reuse the labels that are already available on the Wikidata items. Instead of having to provide labels in hundreds of languages for values such as the grammatical gender 'feminine', we just reuse the existing labels in more than a hundred languages. So if you want to use the function that inverts the grammatical gender in Italian, the label of the input and of the result are taken from Wikidata, thus making the function available in Italian without any further translation work, making the platform more efficient. That’s also an example of a function using the new Types.

All Wikidata-based enumerations can use the same equality Function. Note that even though two values of two different Wikidata-based enumerations might be based on the same Wikidata item, they are not the same, as they belong to different Types. In fact, you would need to convert them if you wanted to use them with another Type.

(We are wondering if it would make sense to replace some of the existing enumerations with a Wikidata-based enumeration (e.g. Gregorian calendar month), but some of these are so deep in the weeds of a whole host of Types that it is unclear whether the necessary work to redo so many Functions and types is worth it.)

Already proposals are being written and discussed about creating more Wikidata-based enumerations, such as Hijri calendar month, Grammatical gender (animate / inanimate), Timezone, and others. There are plenty of grammatical features that are great examples for enumerations: besides grammatical gender, cases, tenses, grammatical number, and so much more comes to mind. It is great to see an already simplified proposal page for Hijiri calendar month. We plan to act swiftly on proposals that show a sufficient level of support.

Let the new Types thrive!

Recording of NLG SIG meeting

On Tuesday we had a lively NLG SIG meeting. Cory Massaro was presenting a sketch on how we could work towards representing abstract text on Wikifunctions. The recording is available on Commons.

Recent Changes in the software

A number of smaller fixes and preparatory pieces of work this week.

As part of our Quarterly work to support HTML output for embedded Functions (T398963), we've been working on a way to sanitise this HTML that allows for local links, which is more than MediaWiki allows out-of-the-box (T398987); this work will continue and hopefully wrap up next week.

We have adjusted how Objects interact with MediaWiki, having them set their primary labels in each language as a parser 'page property', which should allow much simpler re-use in Scribunto modules and gadgets without having to parse the page each time. This should in particular allow the community-maintained {{Z}} template to be simplified and restored to working again (T399081).

We've adjusted the layout of the front-end component that shows part of an Object, so that long labels such as from Wikidata do not overflow.

We made some further changes to our middleware to emit HTTP 4xx and 5xx error codes as appropriate (T393522), so that we can better track issues in production (T390548). We've tweaked the code flow around getting a diff for an Object to avoid a back-end debug warning about using the fallback mechanism implicitly.

As part of wider MediaWiki language support work, we have added three new languages: Z1974/agr, Z1975/aig (T397356), and Z1976/ayh (T397355).

Fixing label and description lengths

Last week we asked for help to fix long labels and descriptions, and thank you for getting the ball rolling! A hundred labels and descriptions have been fixed since last week; thanks to all the contributors who helped! All Hebrew and Italian entries have been fixed, and plenty of Yoruba, Hausa, English and German entries were fixed too, but quite a few of those remain still: English still has more than 700 and German more than 400. But in Hausa only five are left, and a single one in Yoruba!

There are more than a hundred long entries each in French and Igbo to fix. A few other languages have only a few long labels left: there are sixteen in Indonesian, twelve in Ukrainian, nine in Kurdish, eight in Dutch, three each in Breton and Polish, and one each in Swedish, Turkish, and Grebo.

We ask the community please to help us clean those up! The page listing overlong labels and descriptions has been updated.

We have seen a bit of discussion about whether the limits are too tight. Please chime in, in particular with concrete proposals.

News in Types: Three sets of grammatical genders

As mentioned above, we have three new types for sets of grammatical genders:

You can find more information in the lead section of this update. We are looking forward to adding more types in rapid succession in the following weeks.

Fresh Functions weekly: 41 new Functions

This week we had 41 new functions. Here is a list of functions with implementations and passing tests to get a taste of what functions have been created. Thanks everybody for contributing!

A complete list of all functions sorted by when they were created is available.