Add language selection in the configure page of the default theme

This commit is contained in:
ArthurHoaro 2017-05-25 13:26:05 +02:00
parent d637976329
commit f39580c6fd
10 changed files with 383 additions and 223 deletions

View file

@ -183,7 +183,8 @@ class LanguagesTest extends \PHPUnit_Framework_TestCase
$this->conf->set('translation.mode', 'gettext');
$this->conf->set('translation.extensions.test', 'tests/utils/languages/');
new Languages('en', $this->conf);
$this->assertEquals('car', t('car', 'car', 1, 'test'));
$txt = 'car'; // ignore me poedit
$this->assertEquals('car', t($txt, $txt, 1, 'test'));
$this->assertEquals('Search', t('Search', 'Search', 1, 'test'));
}
@ -195,7 +196,8 @@ class LanguagesTest extends \PHPUnit_Framework_TestCase
$this->conf->set('translation.mode', 'php');
$this->conf->set('translation.extensions.test', 'tests/utils/languages/');
new Languages('en', $this->conf);
$this->assertEquals('car', t('car', 'car', 1, 'test'));
$txt = 'car'; // ignore me poedit
$this->assertEquals('car', t($txt, $txt, 1, 'test'));
$this->assertEquals('Search', t('Search', 'Search', 1, 'test'));
}
}

View file

@ -155,7 +155,8 @@ class LanguagesFrTest extends \PHPUnit_Framework_TestCase
$this->conf->set('translation.mode', 'gettext');
$this->conf->set('translation.extensions.test', 'tests/utils/languages/');
new Languages('en', $this->conf);
$this->assertEquals('voiture', t('car', 'car', 1, 'test'));
$txt = 'car'; // ignore me poedit
$this->assertEquals('voiture', t($txt, $txt, 1, 'test'));
$this->assertEquals('Fouille', t('Search', 'Search', 1, 'test'));
}
@ -167,7 +168,8 @@ class LanguagesFrTest extends \PHPUnit_Framework_TestCase
$this->conf->set('translation.mode', 'php');
$this->conf->set('translation.extensions.test', 'tests/utils/languages/');
new Languages('en', $this->conf);
$this->assertEquals('voiture', t('car', 'car', 1, 'test'));
$txt = 'car'; // ignore me poedit
$this->assertEquals('voiture', t($txt, $txt, 1, 'test'));
$this->assertEquals('Fouille', t('Search', 'Search', 1, 'test'));
}
}