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.
This commit is contained in:
El RIDO 2022-02-17 20:44:49 +01:00
parent 75eede9870
commit 2d7f5e9a9f
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92

View File

@ -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()