Fix: Translation of currency works better now.
This commit is contained in:
parent
c73c31434d
commit
64c9991efd
@ -393,87 +393,97 @@ print "</tr>\n";
|
|||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
$handle=opendir($dir);
|
|
||||||
|
|
||||||
$var=True;
|
$var=true;
|
||||||
while (($file = readdir($handle))!==false)
|
foreach ($conf->file->dol_document_root as $dirroot)
|
||||||
{
|
{
|
||||||
if (preg_match('/\.modules\.php$/i',$file) && substr($file,0,4) == 'pdf_')
|
$dir = $dirroot . "/includes/modules/facture/";
|
||||||
|
|
||||||
|
if (is_dir($dir))
|
||||||
{
|
{
|
||||||
$var = !$var;
|
$handle=opendir($dir);
|
||||||
$name = substr($file, 4, strlen($file) -16);
|
if ($handle)
|
||||||
$classname = substr($file, 0, strlen($file) -12);
|
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'><td width="100">';
|
|
||||||
echo "$name";
|
|
||||||
print "</td><td>\n";
|
|
||||||
|
|
||||||
require_once($dir.$file);
|
|
||||||
$module = new $classname($db);
|
|
||||||
print $module->description;
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
// Active
|
|
||||||
if (in_array($name, $def))
|
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
while (($file = readdir($handle))!==false)
|
||||||
if ($conf->global->FACTURE_ADDON_PDF != "$name")
|
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
if (preg_match('/\.modules\.php$/i',$file) && substr($file,0,4) == 'pdf_')
|
||||||
print img_tick($langs->trans("Disable"));
|
{
|
||||||
print '</a>';
|
$var = !$var;
|
||||||
|
$name = substr($file, 4, strlen($file) -16);
|
||||||
|
$classname = substr($file, 0, strlen($file) -12);
|
||||||
|
|
||||||
|
print '<tr '.$bc[$var].'><td width="100">';
|
||||||
|
echo "$name";
|
||||||
|
print "</td><td>\n";
|
||||||
|
|
||||||
|
require_once($dir.$file);
|
||||||
|
$module = new $classname($db);
|
||||||
|
print $module->description;
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
// Active
|
||||||
|
if (in_array($name, $def))
|
||||||
|
{
|
||||||
|
print "<td align=\"center\">\n";
|
||||||
|
if ($conf->global->FACTURE_ADDON_PDF != "$name")
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||||
|
print img_tick($langs->trans("Disable"));
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print img_tick($langs->trans("Enabled"));
|
||||||
|
}
|
||||||
|
print "</td>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "<td align=\"center\">\n";
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">'.$langs->trans("Activate").'</a>';
|
||||||
|
print "</td>";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Defaut
|
||||||
|
print "<td align=\"center\">";
|
||||||
|
if ($conf->global->FACTURE_ADDON_PDF == "$name")
|
||||||
|
{
|
||||||
|
print img_tick($langs->trans("Default"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
// Info
|
||||||
|
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||||
|
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||||
|
$htmltooltip.='<br>'.$langs->trans("Height").'/'.$langs->trans("Width").': '.$module->page_hauteur.'/'.$module->page_largeur;
|
||||||
|
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||||
|
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
|
||||||
|
$htmltooltip.='<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
|
||||||
|
$htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
|
||||||
|
$htmltooltip.='<br>'.$langs->trans("Escompte").': '.yn($module->option_escompte,1,1);
|
||||||
|
$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
|
||||||
|
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
|
||||||
|
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftInvoices").': '.yn($module->option_draft_watermark,1,1);
|
||||||
|
|
||||||
|
|
||||||
|
print '<td align="center">';
|
||||||
|
print $html->textwithpicto('',$htmltooltip,1,0);
|
||||||
|
print '</td>';
|
||||||
|
print '<td align="center">';
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print "</tr>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
closedir($handle);
|
||||||
{
|
|
||||||
print img_tick($langs->trans("Enabled"));
|
|
||||||
}
|
|
||||||
print "</td>";
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
print "<td align=\"center\">\n";
|
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">'.$langs->trans("Activate").'</a>';
|
|
||||||
print "</td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Defaut
|
|
||||||
print "<td align=\"center\">";
|
|
||||||
if ($conf->global->FACTURE_ADDON_PDF == "$name")
|
|
||||||
{
|
|
||||||
print img_tick($langs->trans("Default"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
// Info
|
|
||||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
|
||||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
|
||||||
$htmltooltip.='<br>'.$langs->trans("Height").'/'.$langs->trans("Width").': '.$module->page_hauteur.'/'.$module->page_largeur;
|
|
||||||
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
|
||||||
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
|
|
||||||
$htmltooltip.='<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
|
|
||||||
$htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
|
|
||||||
$htmltooltip.='<br>'.$langs->trans("Escompte").': '.yn($module->option_escompte,1,1);
|
|
||||||
$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
|
|
||||||
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
|
|
||||||
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftInvoices").': '.yn($module->option_draft_watermark,1,1);
|
|
||||||
|
|
||||||
|
|
||||||
print '<td align="center">';
|
|
||||||
print $html->textwithpicto('',$htmltooltip,1,0);
|
|
||||||
print '</td>';
|
|
||||||
print '<td align="center">';
|
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>';
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
print "</tr>\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($handle);
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -255,18 +255,33 @@ CivilityMTRE=Master
|
|||||||
|
|
||||||
##### Currencies #####
|
##### Currencies #####
|
||||||
Currencyeuros=Euros
|
Currencyeuros=Euros
|
||||||
CurrencyAUD=AU Dollar
|
CurrencyAUD=AU Dollars
|
||||||
CurrencyCAD=CAN Dollar
|
CurrencySingAUD=AU Dollar
|
||||||
|
CurrencyCAD=CAN Dollars
|
||||||
|
CurrencySingCAD=CAN Dollar
|
||||||
CurrencyCHF=Swiss Francs
|
CurrencyCHF=Swiss Francs
|
||||||
|
CurrencySingCHF=Swiss Franc
|
||||||
CurrencyEUR=Euros
|
CurrencyEUR=Euros
|
||||||
|
CurrencySingEUR=Euro
|
||||||
CurrencyFRF=French Francs
|
CurrencyFRF=French Francs
|
||||||
|
CurrencySingFRF=French Franc
|
||||||
CurrencyGBP=GB Pounds
|
CurrencyGBP=GB Pounds
|
||||||
|
CurrencySingGBP=GB Pound
|
||||||
CurrencyMAD=Dirham
|
CurrencyMAD=Dirham
|
||||||
|
CurrencySingMAD=Dirham
|
||||||
CurrencyMGA=Ariary
|
CurrencyMGA=Ariary
|
||||||
CurrencyMUR=Mauritius rupee
|
CurrencySingMGA=Ariary
|
||||||
CurrencyNOK=Norwegian krone
|
CurrencyMUR=Mauritius rupees
|
||||||
|
CurrencySingMUR=Mauritius rupee
|
||||||
|
CurrencyNOK=Norwegian krones
|
||||||
|
CurrencySingNOK=Norwegian krone
|
||||||
CurrencyTND=Tunisian dinars
|
CurrencyTND=Tunisian dinars
|
||||||
|
CurrencySingTND=Tunisian dinar
|
||||||
CurrencyUSD=US Dollars
|
CurrencyUSD=US Dollars
|
||||||
|
CurrencySingUSD=US Dollar
|
||||||
CurrencyXAF=CFA Francs BEAC
|
CurrencyXAF=CFA Francs BEAC
|
||||||
|
CurrencySingXAF=CFA Franc BEAC
|
||||||
CurrencyXOF=CFA Francs BCEAO
|
CurrencyXOF=CFA Francs BCEAO
|
||||||
|
CurrencySingXOF=CFA Franc BCEAO
|
||||||
CurrencyXPF=CFP Francs
|
CurrencyXPF=CFP Francs
|
||||||
|
CurrencySingXPF=CFP Franc
|
||||||
|
|||||||
@ -256,20 +256,36 @@ CivilityMTRE=Maître
|
|||||||
##### Currencies #####
|
##### Currencies #####
|
||||||
Currencyeuros=Euros
|
Currencyeuros=Euros
|
||||||
CurrencyAUD=Dollars Aus.
|
CurrencyAUD=Dollars Aus.
|
||||||
|
CurrencySingAUD=Dollar Aus.
|
||||||
CurrencyCAD=Dollars Can.
|
CurrencyCAD=Dollars Can.
|
||||||
|
CurrencySingCAD=Dollar Can.
|
||||||
CurrencyCHF=Francs suisses
|
CurrencyCHF=Francs suisses
|
||||||
|
CurrencySingCHF=Franc suisse
|
||||||
CurrencyEUR=Euros
|
CurrencyEUR=Euros
|
||||||
|
CurrencySingEUR=Euro
|
||||||
CurrencyFRF=Francs Français
|
CurrencyFRF=Francs Français
|
||||||
|
CurrencySingFRF=Franc Français
|
||||||
CurrencyGBP=Livres sterling
|
CurrencyGBP=Livres sterling
|
||||||
|
CurrencySingGBP=Livre sterling
|
||||||
CurrencyMAD=Dirham
|
CurrencyMAD=Dirham
|
||||||
|
CurrencySingMAD=Dirham
|
||||||
CurrencyMGA=Ariary
|
CurrencyMGA=Ariary
|
||||||
|
CurrencySingMGA=Ariary
|
||||||
CurrencyMUR=Roupies mauritiennes
|
CurrencyMUR=Roupies mauritiennes
|
||||||
|
CurrencySingMUR=Roupie mauritienne
|
||||||
CurrencyNOK=Couronnes norvégiennes
|
CurrencyNOK=Couronnes norvégiennes
|
||||||
|
CurrencySingNOK=Couronne norvégienne
|
||||||
CurrencySUR=Roubles
|
CurrencySUR=Roubles
|
||||||
CurrencyTND=Dinar tunisiens
|
CurrencySingSUR=Rouble
|
||||||
CurrencyTRL=Livre turques
|
CurrencyTND=Dinars tunisiens
|
||||||
|
CurrencySingTND=Dinar tunisien
|
||||||
|
CurrencyTRL=Livres turques
|
||||||
|
CurrencySingTRL=Livre turque
|
||||||
CurrencyUSD=Dollars US
|
CurrencyUSD=Dollars US
|
||||||
|
CurrencySingUSD=Dollar US
|
||||||
CurrencyXAF=Francs CFA BEAC
|
CurrencyXAF=Francs CFA BEAC
|
||||||
|
CurrencySingXAF=Franc CFA BEAC
|
||||||
CurrencyXOF=Francs CFA BCEAO
|
CurrencyXOF=Francs CFA BCEAO
|
||||||
|
CurrencySingXOF=Franc CFA BCEAO
|
||||||
CurrencyXPF=Francs CFP
|
CurrencyXPF=Francs CFP
|
||||||
|
CurrencySingXPF=Franc CFP
|
||||||
|
|||||||
@ -368,20 +368,16 @@ class Translate {
|
|||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
$newstr=$key;
|
$newstr=$key;
|
||||||
if (preg_match('/CurrencyShort([A-Z]+)$/i',$key,$reg))
|
if (preg_match('/CurrencySing([A-Z][A-Z][A-Z])$/i',$key,$reg))
|
||||||
{
|
{
|
||||||
global $db;
|
$newstr=$this->getLabelFromKey($db,$reg[1],'c_currencies','code_iso','labelsing');
|
||||||
//$newstr=$this->getLabelFromKey($db,$reg[1],'c_currencies','code_iso','labelshort');
|
|
||||||
$newstr=$this->getLabelFromKey($db,$reg[1],'c_currencies','code_iso','code');
|
|
||||||
}
|
}
|
||||||
else if (preg_match('/Currency([A-Z]+)$/i',$key,$reg))
|
else if (preg_match('/Currency([A-Z][A-Z][A-Z])$/i',$key,$reg))
|
||||||
{
|
{
|
||||||
global $db;
|
|
||||||
$newstr=$this->getLabelFromKey($db,$reg[1],'c_currencies','code_iso','label');
|
$newstr=$this->getLabelFromKey($db,$reg[1],'c_currencies','code_iso','label');
|
||||||
}
|
}
|
||||||
else if (preg_match('/SendingMethod([0-9A-Z]+)$/i',$key,$reg))
|
else if (preg_match('/SendingMethod([0-9A-Z]+)$/i',$key,$reg))
|
||||||
{
|
{
|
||||||
global $db;
|
|
||||||
$newstr=$this->getLabelFromKey($db,$reg[1],'expedition_methode','code','libelle');
|
$newstr=$this->getLabelFromKey($db,$reg[1],'expedition_methode','code','libelle');
|
||||||
}
|
}
|
||||||
return $newstr;
|
return $newstr;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user