added translation for Czech, provided by @info-path, fixes #424

This commit is contained in:
El RIDO 2019-06-23 12:06:36 +02:00
parent c9680ed741
commit 8dc9db90c9
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
8 changed files with 185 additions and 3 deletions

View file

@ -130,6 +130,17 @@ class I18nTest extends PHPUnit_Framework_TestCase
$this->assertEquals('104 ur', I18n::_('%d hours', 104), '104 hours in Slowene');
}
public function testBrowserLanguageCsDetection()
{
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'cs;q=0.8,en-GB;q=0.6,en-US;q=0.4,en;q=0.2';
I18n::loadTranslations();
$this->assertEquals('cs', I18n::_('en'), 'browser language cs');
$this->assertEquals('1 hodin', I18n::_('%d hours', 1), '1 hour in Czech');
$this->assertEquals('2 hodiny', I18n::_('%d hours', 2), '2 hours in Czech');
$this->assertEquals('5 minut', I18n::_('%d minutes', 5), '5 minutes in Czech');
$this->assertEquals('14 minut', I18n::_('%d minutes', 14), '14 minutes in Czech');
}
public function testBrowserLanguageAnyDetection()
{
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = '*';