1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-30 06:51:29 +00:00

- gettext: merge patch from Sunil Mohan Adapa which rewrites plural parser to not use eval()

- fix typo in aforementioned patch which caused plurals to never load
- update code again to newer PHP constructor syntax
This commit is contained in:
Andrew Dolgov
2020-09-18 14:05:34 +03:00
parent 4f5ae94b62
commit 3588d5186e
3 changed files with 484 additions and 59 deletions

View File

@@ -69,10 +69,10 @@ function get_list_of_locales($locale) {
* sr_CS.UTF-8@latin, sr_CS@latin, sr@latin, sr_CS.UTF-8, sr_CS, sr.
*/
$locale_names = array();
$lang = NULL;
$country = NULL;
$charset = NULL;
$modifier = NULL;
$lang = null;
$country = null;
$charset = null;
$modifier = null;
if ($locale) {
if (preg_match("/^(?P<lang>[a-z]{2,3})" // language code
."(?:_(?P<country>[A-Z]{2}))?" // country code