Fix: Translation of countries
This commit is contained in:
parent
b71190f5ee
commit
dd4efa416a
@ -100,7 +100,7 @@ $tabsql[6] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.t
|
|||||||
$tabsql[7] = "SELECT a.id as rowid, a.id as code, a.libelle AS libelle, a.deductible, a.actioncompta, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a";
|
$tabsql[7] = "SELECT a.id as rowid, a.id as code, a.libelle AS libelle, a.deductible, a.actioncompta, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a";
|
||||||
$tabsql[8] = "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_typent";
|
$tabsql[8] = "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_typent";
|
||||||
$tabsql[9] = "SELECT code, code_iso, label as libelle, active FROM ".MAIN_DB_PREFIX."c_currencies";
|
$tabsql[9] = "SELECT code, code_iso, label as libelle, active FROM ".MAIN_DB_PREFIX."c_currencies";
|
||||||
$tabsql[10]= "SELECT t.rowid, t.taux, p.libelle as pays, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid";
|
$tabsql[10]= "SELECT t.rowid, t.taux, p.libelle as pays, p.code as pays_code, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid";
|
||||||
$tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t";
|
$tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t";
|
||||||
$tabsql[12]= "SELECT c.rowid as rowid, code, sortorder, c.libelle, c.libelle_facture, nbjour, fdm, decalage, active FROM ".MAIN_DB_PREFIX."cond_reglement AS c";
|
$tabsql[12]= "SELECT c.rowid as rowid, code, sortorder, c.libelle, c.libelle_facture, nbjour, fdm, decalage, active FROM ".MAIN_DB_PREFIX."cond_reglement AS c";
|
||||||
$tabsql[13]= "SELECT id as rowid, code, c.libelle, type, active FROM ".MAIN_DB_PREFIX."c_paiement AS c";
|
$tabsql[13]= "SELECT id as rowid, code, c.libelle, type, active FROM ".MAIN_DB_PREFIX."c_paiement AS c";
|
||||||
@ -620,17 +620,27 @@ if ($_GET["id"])
|
|||||||
{
|
{
|
||||||
$showfield=1;
|
$showfield=1;
|
||||||
$valuetoshow=$obj->$fieldlist[$field];
|
$valuetoshow=$obj->$fieldlist[$field];
|
||||||
|
|
||||||
if ($valuetoshow=='all') {
|
if ($valuetoshow=='all') {
|
||||||
$valuetoshow=$langs->trans('All');
|
$valuetoshow=$langs->trans('All');
|
||||||
}
|
}
|
||||||
if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field]=='fdm') {
|
else if ($fieldlist[$field]=='pays') {
|
||||||
|
$key=$langs->trans("Country".strtoupper($obj->pays_code));
|
||||||
|
$valuetoshow=($key != "Country".strtoupper($obj->pays_code))?$key:$obj->pays;
|
||||||
|
}
|
||||||
|
else if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field]=='fdm') {
|
||||||
$valuetoshow=yn($valuetoshow);
|
$valuetoshow=yn($valuetoshow);
|
||||||
}
|
}
|
||||||
if ($fieldlist[$field]=='price') {
|
else if ($fieldlist[$field]=='price') {
|
||||||
$valuetoshow=price($valuetoshow);
|
$valuetoshow=price($valuetoshow);
|
||||||
}
|
}
|
||||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='pays_id') {
|
else if ($fieldlist[$field]=='price') {
|
||||||
|
$valuetoshow=price($valuetoshow);
|
||||||
|
}
|
||||||
|
else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]=='llx_c_pays') {
|
||||||
|
$key=$langs->trans("Country".strtoupper($obj->code));
|
||||||
|
$valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code))?$key:$obj->$fieldlist[$field];
|
||||||
|
}
|
||||||
|
else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='pays_id') {
|
||||||
$showfield=0;
|
$showfield=0;
|
||||||
}
|
}
|
||||||
if ($showfield) print '<td>'.$valuetoshow.'</td>';
|
if ($showfield) print '<td>'.$valuetoshow.'</td>';
|
||||||
|
|||||||
@ -212,28 +212,19 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
// Message of the day
|
|
||||||
$var=true;
|
$var=true;
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>';
|
||||||
|
|
||||||
|
// Hide need help link on login page
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
|
||||||
if ($conf->fckeditor->enabled)
|
print $html->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1);
|
||||||
{
|
print '</td>';
|
||||||
// Editeur wysiwyg
|
print '<td width="20"> </td>';
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
print '</tr>';
|
||||||
$doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,158,'dolibarr_notes','In',false);
|
|
||||||
$doleditor->Create();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea name="main_motd" cols="90" rows="'.ROWS_5.'">'.dol_htmlentitiesbr_decode($conf->global->MAIN_MOTD).'</textarea>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
|
// Message on login page
|
||||||
// Message d'accueil'
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
||||||
if ($conf->fckeditor->enabled)
|
if ($conf->fckeditor->enabled)
|
||||||
@ -249,13 +240,21 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Hide need help link on login page
|
// Message of the day on home page
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
||||||
print $html->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1);
|
if ($conf->fckeditor->enabled)
|
||||||
print '</td>';
|
{
|
||||||
print '<td width="20"> </td>';
|
// Editeur wysiwyg
|
||||||
print '</tr>';
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
|
$doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,158,'dolibarr_notes','In',false);
|
||||||
|
$doleditor->Create();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<textarea name="main_motd" cols="90" rows="'.ROWS_5.'">'.dol_htmlentitiesbr_decode($conf->global->MAIN_MOTD).'</textarea>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -344,7 +343,8 @@ else
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td>'.$langs->trans("Activated").'</td><td> </td></tr>';
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td>'.$langs->trans("Activated").'</td><td> </td></tr>';
|
||||||
$var=true;
|
$var=true;
|
||||||
foreach ($searchform as $key => $value) {
|
foreach ($searchform as $key => $value)
|
||||||
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'"><td width="35%">'.$searchformtitle[$key].'</td><td>' . ($searchformconst[$key]?$langs->trans("yes"):$langs->trans("no")).'</td>';
|
print '<tr '.$bc[$var].'"><td width="35%">'.$searchformtitle[$key].'</td><td>' . ($searchformconst[$key]?$langs->trans("yes"):$langs->trans("no")).'</td>';
|
||||||
print '<td align="left">'.$langs->trans("IfModuleEnabled",$langs->transnoentitiesnoconv($searchformmodule[$key]));
|
print '<td align="left">'.$langs->trans("IfModuleEnabled",$langs->transnoentitiesnoconv($searchformmodule[$key]));
|
||||||
@ -353,13 +353,14 @@ else
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Message of the day
|
|
||||||
$var=true;
|
$var=true;
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
|
|
||||||
|
// Link to help center
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td>';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
|
||||||
print nl2br($conf->global->MAIN_MOTD);
|
print yn($conf->global->MAIN_HELPCENTER_DISABLELINK);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Message login
|
// Message login
|
||||||
@ -368,10 +369,10 @@ else
|
|||||||
print nl2br($conf->global->MAIN_HOME);
|
print nl2br($conf->global->MAIN_HOME);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Link to help center
|
// Message of the day
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td>';
|
||||||
print yn($conf->global->MAIN_HELPCENTER_DISABLELINK);
|
print nl2br($conf->global->MAIN_MOTD);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user