? ? Pending

User tests: Successful: Unsuccessful:

avatar saharin88
saharin88
5 May 2020

Not taken into account 21, 31, etc.

avatar saharin88 saharin88 - open - 5 May 2020
avatar saharin88 saharin88 - change - 5 May 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 May 2020
Category Administration Language & Strings
avatar brianteeman
brianteeman - comment - 5 May 2020

@Bakual is this a crowdin thing?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28941.

avatar Bakual
Bakual - comment - 5 May 2020

No, it's not related to Crowdin and it's also not needed in the english strings.
The variable can be used in ukranian (or any language) regardless if it is present or not in the english string.

avatar saharin88
saharin88 - comment - 5 May 2020

No, it's not related to Crowdin and it's also not needed in the english strings.
The variable can be used in ukranian (or any language) regardless if it is present or not in the english string.

Yes, I was wrong, everything is right there (method return MORE suffix if 21, 31, etc).

зображення

avatar saharin88 saharin88 - change - 5 May 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-05-05 15:46:34
Closed_By saharin88
Labels Added: ? ?
avatar saharin88 saharin88 - close - 5 May 2020
avatar Bakual
Bakual - comment - 5 May 2020

Actually, you have to adjust the getPluralSuffixes function in your language pack to something like this:

if ($count % 10 == 1)
{
    return array('1');
}
.... more cases here

Ukranian has some quite complex plural rules as it looks (see https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_plural_rules.html#uk)

avatar infograf768
infograf768 - comment - 6 May 2020

As of 3.9.18 this is the localise.php for the Ukrainian pack

	public static function getPluralSuffixes($count)
	{
		if($count == 0)
		{
			$return = [ '0' ];
		}
		else
		{
			$return = [ $count % 10 == 1 && $count % 100 != 11 ? '1' : ($count % 10 >= 2 && $count % 10 <= 4 && ($count % 100 < 10 || $count % 100 >= 20) ? '2' : 'MORE') ];
		}

		return $return;
	}

Add a Comment

Login with GitHub to post a comment