Page MenuHomePhabricator

{{PLURAL}} should support a language parameter
Closed, DeclinedPublic

Description

While editing a Ukrainian Main page on betawikiversity I encountered a problem that PLURAL parser function works incorrectly. After about 2 minutes I realised that that is because it behaves using English plural rules not Ukrainian.

There should be a parameter available for setting which language the function is to behave using rules of.

It looks somewhat similar to {{#time:}} parser function having a parameter for setting a language of date to be output in so it should not be too hard to implement.

Event Timeline

Base raised the priority of this task from to Needs Triage.
Base updated the task description. (Show Details)
Base subscribed.

The current summary is about a specific proposed solution rather than the problem at hand; that's generally discouraged.

Did the page in question have "uk" as content language? Were you using "uk" as your interface language? Did you test on any page where the answer is "yes" to either or both?

The page in question is https://beta.wikiversity.org/wiki/Головна_сторінка

  • The page content language is en
  • The interface language I use is uk
  • I did not test it in a page where the both answers are "yes" because I don't know such on betawikiversity (in fact I was just passing by the page, I don't actually work on v:uk:)

I understand that you imply that we should wait for a feature of per-page content language setting.

But that feature is something that is being wanted for ages so I'd rather have a rough but sure way of strict setting language for the parser function like

{{PLURAL:{{{some parameter}}}|one, 1-many form|2-4-many form|5-9-many form|lang=uk}}

or just

{{PLURAL:{{{some parameter}}}|one, 1-many form|2-4-many form|5-9-many form|uk}}

rather than wait for the Second Coming per-page content language feature.

(Besides even if one indeed is finally implemented with the current structure of betawikiversity which does not use a prefix system like Wikimedia Incubator does it would probably still be impossible or very hard to set content language per page anyways.)

This is a slippery slope. If this is done, then someone asks it for GRAMMAR, then GENDER, then #time and so on. The proper fix is setting the page content language. The feature exists, it just needs some push to get it enabled.

Nemo_bis claimed this task.

The goal (using PLURAL in Ukrainian on the betawikiversity main page) can be achieved in few days if you ask to enable the Translate extension.

For the general case, see T69223.

Above statement is incorrect. The ability to change page language has nothing to do with the Translate extension (which you are welcome to use). You just need the core feature enabled.

In the Ukrainian Wikipedia PLURAL work correctly.

In the Ukrainian Wikipedia PLURAL work correctly.

Sure, because content language for all pages is "uk". See above.