Fix: Numbers works with ar_AR language

This commit is contained in:
Laurent Destailleur
2010-02-23 20:30:55 +00:00
parent e6c91a10d7
commit c601834e56
4 changed files with 10 additions and 23 deletions

View File

@@ -143,6 +143,7 @@ print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("LanguageParameter","
$var=!$var; $var=!$var;
$thousand=$langs->trans("SeparatorThousand"); $thousand=$langs->trans("SeparatorThousand");
if ($thousand == 'SeparatorThousand') $thousand=' '; // ' ' does not work on trans method if ($thousand == 'SeparatorThousand') $thousand=' '; // ' ' does not work on trans method
if ($thousand == 'None') $thousand='';
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentValueSeparatorThousand")."</td><td>".($thousand==' '?$langs->trans("Space"):$thousand)."</td></tr>\n"; print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentValueSeparatorThousand")."</td><td>".($thousand==' '?$langs->trans("Space"):$thousand)."</td></tr>\n";
// Decimals // Decimals
$var=!$var; $var=!$var;

View File

@@ -4,14 +4,13 @@
* Generation date 2009-08-11 13:27:01 * Generation date 2009-08-11 13:27:01
*/ */
// Date 2009-08-11 13:27:01 // Date 2009-08-11 13:27:01
// START - Lines generated via autotranslator.php tool. // START - Lines generated via autotranslator.php tool.
// Reference language: en_US // Reference language: en_US
CHARSET=UTF-8 CHARSET=UTF-8
DIRECTION=rtl DIRECTION=rtl
SeparatorDecimal=. SeparatorDecimal=.
SeparatorThousand=، SeparatorThousand=None
FormatDateShort=%d/%m/%Y FormatDateShort=%d/%m/%Y
FormatDateShortJava=dd/MM/yyyy FormatDateShortJava=dd/MM/yyyy
FormatHourShort=%H:%M FormatHourShort=%H:%M
@@ -26,9 +25,9 @@ ErrorFieldRequired=الميدان &#39;٪ ق&#39; مطلوب
ErrorFieldFormat=الميدان &#39;٪ ق&#39; سيئة القيمة ErrorFieldFormat=الميدان &#39;٪ ق&#39; سيئة القيمة
ErrorFileDoesNotExists=ملف ٪ ق لا يوجد ErrorFileDoesNotExists=ملف ٪ ق لا يوجد
ErrorFailedToOpenFile=فشل في فتح الملف ٪ ق ErrorFailedToOpenFile=فشل في فتح الملف ٪ ق
ErrorCanNotCreateDir=لا يمكن إنشاء دير ق ٪ ErrorCanNotCreateDir=لا يمكن إنشاء دير ق
ErrorCanNotReadDir=لا يمكن قراءة دير ق ٪ ErrorCanNotReadDir=لا يمكن قراءة دير ق
ErrorConstantNotDefined=معلمة ٪ ق لم تحدد ErrorConstantNotDefined=معلمة ٪s ق لم تحدد
ErrorUnknown=Unkown خطأ ErrorUnknown=Unkown خطأ
ErrorSQL=خطأ SQL ErrorSQL=خطأ SQL
ErrorLogoFileNotFound=شعار ملف &#39;٪ ق&#39; لم يتم العثور على ErrorLogoFileNotFound=شعار ملف &#39;٪ ق&#39; لم يتم العثور على
@@ -540,28 +539,12 @@ ShortThursday=تي
ShortFriday=واو ShortFriday=واو
ShortSaturday=دإ ShortSaturday=دإ
ShortSunday=دإ ShortSunday=دإ
// Date 2009-08-11 13:27:01
// STOP - Lines generated via parser
// START - Lines generated via autotranslator.php tool (2009-08-13 20:22:26).
// Reference language: en_US
Login=تسجيل الدخول Login=تسجيل الدخول
// STOP - Lines generated via autotranslator.php tool (2009-08-13 20:22:26).
// START - Lines generated via autotranslator.php tool (2009-08-13 20:38:53).
// Reference language: en_US
ErrorGoToGlobalSetup=اذهب إلى &#39;شركة / مؤسسة&#39; الإعداد لتثبيت هذا ErrorGoToGlobalSetup=اذهب إلى &#39;شركة / مؤسسة&#39; الإعداد لتثبيت هذا
ErrorFailedToSendMail=فشل إرسال البريد (ق = ٪ مرسل ، واستقبال = ٪) ErrorFailedToSendMail=فشل إرسال البريد (ق = ٪ مرسل ، واستقبال = ٪)
ErrorAttachedFilesDisabled=إرفاق ملفات الميزة المعوقين على هذا الخادم ErrorAttachedFilesDisabled=إرفاق ملفات الميزة المعوقين على هذا الخادم
GoToWikiHelpPage=الانترنت تساعد على قراءة (على ضرورة الوصول إلى الإنترنت) GoToWikiHelpPage=الانترنت تساعد على قراءة (على ضرورة الوصول إلى الإنترنت)
CompanyFoundation=الشركة / المؤسسة CompanyFoundation=الشركة / المؤسسة
FileTransferComplete=تم تحميل الملف بنجاح FileTransferComplete=تم تحميل الملف بنجاح
// STOP - Lines generated via autotranslator.php tool (2009-08-13 20:38:53).
// START - Lines generated via autotranslator.php tool (2009-08-19 21:04:44).
// Reference language: en_US
Paid=دفع Paid=دفع
// STOP - Lines generated via autotranslator.php tool (2009-08-19 21:04:44). // STOP - Lines generated via autotranslator.php tool (2009-08-19 21:04:44).

View File

@@ -2389,7 +2389,8 @@ function price($amount, $html=0, $outlangs='', $trunc=1, $rounding=-1)
if ($outlangs->trans("SeparatorDecimal") != "SeparatorDecimal") $dec=$outlangs->trans("SeparatorDecimal"); if ($outlangs->trans("SeparatorDecimal") != "SeparatorDecimal") $dec=$outlangs->trans("SeparatorDecimal");
if ($outlangs->trans("SeparatorThousand")!= "SeparatorThousand") $thousand=$outlangs->trans("SeparatorThousand"); if ($outlangs->trans("SeparatorThousand")!= "SeparatorThousand") $thousand=$outlangs->trans("SeparatorThousand");
//print "amount=".$amount." html=".$html." trunc=".$trunc." nbdecimal=".$nbdecimal." dec=".$dec." thousand=".$thousand; if ($thousand == 'None') $thousand='';
//print "amount=".$amount." html=".$html." trunc=".$trunc." nbdecimal=".$nbdecimal." dec='".$dec."' thousand='".$thousand."'<br>";
//print "amount=".$amount."-"; //print "amount=".$amount."-";
$amount = str_replace(',','.',$amount); // should be useless $amount = str_replace(',','.',$amount); // should be useless
@@ -2450,6 +2451,8 @@ function price2num($amount,$rounding='',$alreadysqlnb=0)
$dec=','; $thousand=' '; $dec=','; $thousand=' ';
if ($langs->trans("SeparatorDecimal") != "SeparatorDecimal") $dec=$langs->trans("SeparatorDecimal"); if ($langs->trans("SeparatorDecimal") != "SeparatorDecimal") $dec=$langs->trans("SeparatorDecimal");
if ($langs->trans("SeparatorThousand")!= "SeparatorThousand") $thousand=$langs->trans("SeparatorThousand"); if ($langs->trans("SeparatorThousand")!= "SeparatorThousand") $thousand=$langs->trans("SeparatorThousand");
if ($thousand == 'None') $thousand='';
//print "amount=".$amount." html=".$html." trunc=".$trunc." nbdecimal=".$nbdecimal." dec='".$dec."' thousand='".$thousand."'<br>";
// Convert value to universal number format (no thousand separator, '.' as decimal separator) // Convert value to universal number format (no thousand separator, '.' as decimal separator)
if ($alreadysqlnb != 1) // If not a PHP number or unknown, we change format if ($alreadysqlnb != 1) // If not a PHP number or unknown, we change format

View File

@@ -305,7 +305,7 @@ class Translate {
if (empty($this->tab_loaded[$newdomain])) $this->tab_loaded[$newdomain]=2; // Marque ce fichier comme non trouve if (empty($this->tab_loaded[$newdomain])) $this->tab_loaded[$newdomain]=2; // Marque ce fichier comme non trouve
} }
// Clear SeparatorDecimal, SeparatorThousand // Check to be sure that SeparatorDecimal differs from SeparatorThousand
if (! empty($this->tab_translate["SeparatorDecimal"]) && ! empty($this->tab_translate["SeparatorThousand"]) if (! empty($this->tab_translate["SeparatorDecimal"]) && ! empty($this->tab_translate["SeparatorThousand"])
&& $this->tab_translate["SeparatorDecimal"] == $this->tab_translate["SeparatorThousand"]) $this->tab_translate["SeparatorThousand"]=''; && $this->tab_translate["SeparatorDecimal"] == $this->tab_translate["SeparatorThousand"]) $this->tab_translate["SeparatorThousand"]='';