Fix: Translation

This commit is contained in:
Laurent Destailleur 2014-07-19 16:03:55 +02:00
parent dbae31b982
commit 7a8f244ae9
2 changed files with 20 additions and 20 deletions

View File

@ -7,21 +7,21 @@ DIRECTION=لیتر
FONTFORPDF=DejaVuSans FONTFORPDF=DejaVuSans
FONTSIZEFORPDF=10 FONTSIZEFORPDF=10
SeparatorDecimal=. SeparatorDecimal=.
SeparatorThousand=، SeparatorThousand=None
FormatDateShort=٪ M /٪ د /٪ Y FormatDateShort=%m/%d/%Y
FormatDateShortInput=٪ M /٪ د /٪ Y FormatDateShortInput=%m/%d/%Y
FormatDateShortJava=MM / DD / YYYY FormatDateShortJava=MM/dd/yyyy
FormatDateShortJavaInput=MM / DD / YYYY FormatDateShortJavaInput=MM/dd/yyyy
FormatDateShortJQuery=ماه / روز / سا FormatDateShortJQuery=yy/dd/mm
FormatDateShortJQueryInput=ماه / روز / سا FormatDateShortJQueryInput=yy/dd/mm
FormatHourShort=٪ I:٪ M٪ P FormatHourShort=%I:%M
FormatHourShortDuration=٪ H:٪ M FormatHourShortDuration=%H:%M
FormatDateTextShort=٪ B٪ د،٪ Y FormatDateTextShort=%b %d %Y
FormatDateText=٪ B٪ د،٪ Y FormatDateText=%B %d %Y
FormatDateHourShort=٪ M /٪ د /٪ Y٪ I:٪ M٪ P FormatDateHourShort=%m/%d/%Y %I:%M:%S %p
FormatDateHourSecShort=٪ M /٪ د /٪ Y٪ I:٪ M:٪ S٪ P FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p
FormatDateHourTextShort=٪ B٪ د،٪ Y،٪ I:٪ M٪ P FormatDateHourTextShort=%b %d %Y %I:%M %p
FormatDateHourText=٪ B٪ د،٪ Y،٪ I:٪ M٪ P FormatDateHourText=%B %d %Y %H:%M %p
DatabaseConnection=اتصال به پایگاه داده DatabaseConnection=اتصال به پایگاه داده
NoTranslation=بدون ترجمه NoTranslation=بدون ترجمه
NoRecordFound=هیچ سابقه ای پیدا نشد NoRecordFound=هیچ سابقه ای پیدا نشد

View File

@ -146,7 +146,7 @@ class LangTest extends PHPUnit_Framework_TestCase
{ {
if (! preg_match('/^[a-z]+_[A-Z]+$/',$code)) continue; if (! preg_match('/^[a-z]+_[A-Z]+$/',$code)) continue;
print 'Check language file for code='.$code."\n"; print 'Check language file for lang code='.$code."\n";
$tmplangs=new Translate('',$conf); $tmplangs=new Translate('',$conf);
$langcode=$code; $langcode=$code;
$tmplangs->setDefaultLang($langcode); $tmplangs->setDefaultLang($langcode);
@ -154,19 +154,19 @@ class LangTest extends PHPUnit_Framework_TestCase
$result=$tmplangs->trans("SeparatorDecimal"); $result=$tmplangs->trans("SeparatorDecimal");
print __METHOD__." SeparatorDecimal=".$result."\n"; print __METHOD__." SeparatorDecimal=".$result."\n";
$this->assertContains($result,array('.',',','/',' ','','None'), 'Error for code '.$code); $this->assertContains($result,array('.',',','/',' ','','None'), 'Error for decimal separator for lang code '.$code); // Note that ، that is coma for RTL languages is not supported
$result=$tmplangs->trans("SeparatorThousand"); $result=$tmplangs->trans("SeparatorThousand");
print __METHOD__." SeparatorThousand=".$result."\n"; print __METHOD__." SeparatorThousand=".$result."\n";
$this->assertContains($result, array('.',',','/',' ','','None','Space'), 'Error for code '.$code); $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
// Test java string contains only d,M,y,/,-,. and not m,... // Test java string contains only d,M,y,/,-,. and not m,...
$result=$tmplangs->trans("FormatDateShortJava"); $result=$tmplangs->trans("FormatDateShortJava");
print __METHOD__." FormatDateShortJava=".$result."\n"; print __METHOD__." FormatDateShortJava=".$result."\n";
$this->assertRegExp('/^[dMy\/\-\.]+$/',$result); $this->assertRegExp('/^[dMy\/\-\.]+$/',$result,'FormatDateShortJava');
$result=$tmplangs->trans("FormatDateShortJavaInput"); $result=$tmplangs->trans("FormatDateShortJavaInput");
print __METHOD__." FormatDateShortJavaInput=".$result."\n"; print __METHOD__." FormatDateShortJavaInput=".$result."\n";
$this->assertRegExp('/^[dMy\/\-\.]+$/',$result); $this->assertRegExp('/^[dMy\/\-\.]+$/',$result,'FormatDateShortJavaInput');
unset($tmplangs); unset($tmplangs);
} }