[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] Improve plural rules detection

From: Michele Locati
Subject: [bug-gettext] Improve plural rules detection
Date: Mon, 29 Apr 2019 16:57:12 +0200

When invoking msginit, we call cldr-plurals by passing to it the
language code, extracted from the locale code by the
language_of_locale funciton.

This may lead to some issues.
For example, if the locale code is pt_PT, the language code will be
pt, but the CLDR plural rules for pt and for pt_PT are different (see

So, what about passing to cldr-plurals the locale code instead of the
language code, and letting cldr-plurals look for the applicable rule?

The attached patch implements that.
In particular, if for example the locale ID is it_IT, cldr-plurals
will look for pluralRules XML nodes with the locales containig
"it_IT". If no such node exists, cldr-plurals will look for "it".


Attachment: 0001-Improve-plural-rules-detection.patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]