From 2d7f5e9a9f862d2a3c623478000768bc29714ca1 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Thu, 17 Feb 2022 20:44:49 +0100 Subject: [PATCH] allow for Lojban (jbo) to be the "any" language pick The available language list is generated by reading the i18n directory descriptor one entry at a time, so if the jbo.json happens to be the first file written to the directory it will be on top of the list and get picked. This is an edge case, most users browsers won't be set to that, but we need to cover this allowed and valid use case in the language detection. --- tst/I18nTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tst/I18nTest.php b/tst/I18nTest.php index 7d549ba..a70f6b3 100644 --- a/tst/I18nTest.php +++ b/tst/I18nTest.php @@ -145,7 +145,7 @@ class I18nTest extends PHPUnit_Framework_TestCase { $_SERVER['HTTP_ACCEPT_LANGUAGE'] = '*'; I18n::loadTranslations(); - $this->assertTrue(strlen(I18n::_('en')) == 2, 'browser language any'); + $this->assertTrue(strlen(I18n::_('en')) >= 2, 'browser language any'); } public function testVariableInjection()