Shaarli's translation
* translation system and unit tests * Translations everywhere Dont use translation merge It is not available with PHP builtin gettext, so it would have lead to inconsistency.
This commit is contained in:
parent
72cfe44436
commit
12266213d0
51 changed files with 2252 additions and 246 deletions
tests
|
@ -384,18 +384,18 @@ class UtilsTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testHumanBytes()
|
||||
{
|
||||
$this->assertEquals('2kiB', human_bytes(2 * 1024));
|
||||
$this->assertEquals('2kiB', human_bytes(strval(2 * 1024)));
|
||||
$this->assertEquals('2MiB', human_bytes(2 * (pow(1024, 2))));
|
||||
$this->assertEquals('2MiB', human_bytes(strval(2 * (pow(1024, 2)))));
|
||||
$this->assertEquals('2GiB', human_bytes(2 * (pow(1024, 3))));
|
||||
$this->assertEquals('2GiB', human_bytes(strval(2 * (pow(1024, 3)))));
|
||||
$this->assertEquals('374B', human_bytes(374));
|
||||
$this->assertEquals('374B', human_bytes('374'));
|
||||
$this->assertEquals('232kiB', human_bytes(237481));
|
||||
$this->assertEquals('Unlimited', human_bytes('0'));
|
||||
$this->assertEquals('Unlimited', human_bytes(0));
|
||||
$this->assertEquals('Setting not set', human_bytes(''));
|
||||
$this->assertEquals('2'. t('kiB'), human_bytes(2 * 1024));
|
||||
$this->assertEquals('2'. t('kiB'), human_bytes(strval(2 * 1024)));
|
||||
$this->assertEquals('2'. t('MiB'), human_bytes(2 * (pow(1024, 2))));
|
||||
$this->assertEquals('2'. t('MiB'), human_bytes(strval(2 * (pow(1024, 2)))));
|
||||
$this->assertEquals('2'. t('GiB'), human_bytes(2 * (pow(1024, 3))));
|
||||
$this->assertEquals('2'. t('GiB'), human_bytes(strval(2 * (pow(1024, 3)))));
|
||||
$this->assertEquals('374'. t('B'), human_bytes(374));
|
||||
$this->assertEquals('374'. t('B'), human_bytes('374'));
|
||||
$this->assertEquals('232'. t('kiB'), human_bytes(237481));
|
||||
$this->assertEquals(t('Unlimited'), human_bytes('0'));
|
||||
$this->assertEquals(t('Unlimited'), human_bytes(0));
|
||||
$this->assertEquals(t('Setting not set'), human_bytes(''));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -403,9 +403,9 @@ class UtilsTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testGetMaxUploadSize()
|
||||
{
|
||||
$this->assertEquals('1MiB', get_max_upload_size(2097152, '1024k'));
|
||||
$this->assertEquals('1MiB', get_max_upload_size('1m', '2m'));
|
||||
$this->assertEquals('100B', get_max_upload_size(100, 100));
|
||||
$this->assertEquals('1'. t('MiB'), get_max_upload_size(2097152, '1024k'));
|
||||
$this->assertEquals('1'. t('MiB'), get_max_upload_size('1m', '2m'));
|
||||
$this->assertEquals('100'. t('B'), get_max_upload_size(100, 100));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue