Fix language files

This commit is contained in:
Laurent Destailleur 2021-09-28 16:47:09 +02:00
parent d3e5e3071b
commit 7c5dfa0ad2
5 changed files with 11 additions and 7 deletions

View File

@ -4,7 +4,7 @@ DIRECTION=ltr
# msungstdlight or cid0ct are for traditional Chinese (traditional does not render with Ubuntu pdf reader)
# stsongstdlight or cid0cs are for simplified Chinese
# To read Chinese pdf with Linux: sudo apt-get install poppler-data
FONTFORPDF=helvética
FONTFORPDF=helvetica
FONTSIZEFORPDF=10
SeparatorDecimal=,
SeparatorThousand=.

View File

@ -4,7 +4,7 @@ DIRECTION=ltr
# msungstdlight or cid0ct are for traditional Chinese (traditional does not render with Ubuntu pdf reader)
# stsongstdlight or cid0cs are for simplified Chinese
# To read Chinese pdf with Linux: sudo apt-get install poppler-data
FONTFORPDF=헬 베티 카
FONTFORPDF=cid0kr
FONTSIZEFORPDF=10
SeparatorDecimal=.
SeparatorThousand=None

View File

@ -4,7 +4,7 @@ DIRECTION=ltr
# msungstdlight or cid0ct are for traditional Chinese (traditional does not render with Ubuntu pdf reader)
# stsongstdlight or cid0cs are for simplified Chinese
# To read Chinese pdf with Linux: sudo apt-get install poppler-data
FONTFORPDF=Helvetica
FONTFORPDF=helvetica
FONTSIZEFORPDF=10
SeparatorDecimal=,
SeparatorThousand=None

View File

@ -4,7 +4,7 @@ DIRECTION=ltr
# msungstdlight or cid0ct are for traditional Chinese (traditional does not render with Ubuntu pdf reader)
# stsongstdlight or cid0cs are for simplified Chinese
# To read Chinese pdf with Linux: sudo apt-get install poppler-data
FONTFORPDF=Helvetica
FONTFORPDF=helvetica
FONTSIZEFORPDF=10
SeparatorDecimal=.
SeparatorThousand=,

View File

@ -184,17 +184,21 @@ class LangTest extends PHPUnit\Framework\TestCase
$tmplangs->setDefaultLang($langcode);
$tmplangs->load("main");
$result=$tmplangs->transnoentitiesnoconv("FONTFORPDF");
print __METHOD__." FONTFORPDF=".$result."\n";
$this->assertTrue(in_array($result, array('msungstdlight', 'stsongstdlight', 'helvetica', 'DejaVuSans', 'cid0jp', 'cid0kr', 'freemono')), 'Error bad value '.$result.' for FONTFORPDF in main.lang file '.$code);
$result=$tmplangs->transnoentitiesnoconv("DIRECTION");
print __METHOD__." DIRECTION=".$result."\n";
$this->assertTrue(in_array($result, array('rtl', 'ltr')), 'Error for vale of DIRECTION in main.lang file '.$code);
$this->assertTrue(in_array($result, array('rtl', 'ltr')), 'Error bad value for DIRECTION in main.lang file '.$code);
$result=$tmplangs->transnoentitiesnoconv("SeparatorDecimal");
print __METHOD__." SeparatorDecimal=".$result."\n";
$this->assertContains($result, array('.',',','/',' ','','None'), 'Error for decimal separator for lang code '.$code); // Note that ، that is coma for RTL languages is not supported
$this->assertContains($result, array('.',',','/',' ','','None'), 'Error on decimal separator for lang code '.$code); // Note that ، that is coma for RTL languages is not supported
$result=$tmplangs->transnoentitiesnoconv("SeparatorThousand");
print __METHOD__." SeparatorThousand=".$result."\n";
$this->assertContains($result, array('.',',','/',' ','','\'','None','Space'), 'Error for thousand separator for lang code '.$code); // Note that ، that is coma for RTL languages is not supported
$this->assertContains($result, array('.',',','/',' ','','\'','None','Space'), 'Error on thousand separator for lang code '.$code); // Note that ، that is coma for RTL languages is not supported
// Test java string contains only d,M,y,/,-,. and not m,...
$result=$tmplangs->transnoentitiesnoconv("FormatDateShortJava");