updated SRI hashes, added missing formula for slowene plurals and unit test for it, updated credits and changelog

This commit is contained in:
El RIDO
2017-01-01 14:35:39 +01:00
parent 910c3b3f9d
commit 4a036aea80
12 changed files with 32 additions and 10 deletions

View File

@@ -84,6 +84,21 @@ class I18nTest extends PHPUnit_Framework_TestCase
$this->assertEquals('21 минуту', I18n::_('%d minutes', 21), '21 minutes in russian');
}
public function testBrowserLanguageSlDetection()
{
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'sl;q=0.8,en-GB;q=0.6,en-US;q=0.4,en;q=0.2';
I18n::loadTranslations();
$this->assertEquals('sl', I18n::_('en'), 'browser language sl');
$this->assertEquals('0 ura', I18n::_('%d hours', 0), '0 hours in slowene');
$this->assertEquals('1 uri', I18n::_('%d hours', 1), '1 hour in slowene');
$this->assertEquals('2 ure', I18n::_('%d hours', 2), '2 hours in slowene');
$this->assertEquals('3 ur', I18n::_('%d hours', 3), '3 hours in slowene');
$this->assertEquals('11 ura', I18n::_('%d hours', 11), '11 hours in slowene');
$this->assertEquals('101 uri', I18n::_('%d hours', 101), '101 hours in slowene');
$this->assertEquals('102 ure', I18n::_('%d hours', 102), '102 hours in slowene');
$this->assertEquals('104 ur', I18n::_('%d hours', 104), '104 hours in slowene');
}
public function testBrowserLanguageAnyDetection()
{
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = '*';