english language standardization

This commit is contained in:
Grand Philippe 2013-02-25 18:21:12 +01:00
parent 79c2e17cbb
commit 44dee53350
13 changed files with 17 additions and 24 deletions

View File

@ -279,7 +279,6 @@ class Entrepot extends CommonObject
include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
$tmp=getCountry($this->country_id,'all');
$this->pays=$tmp['label']; // deprecated
$this->country=$tmp['label'];
$this->country_code=$tmp['code'];

View File

@ -81,7 +81,7 @@ if ($_GET["id"])
print '<td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$entrepot->town.'</td></tr>';
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
print $entrepot->pays;
print $entrepot->country;
print '</td></tr>';
// Statut

View File

@ -93,7 +93,7 @@ if ($id > 0)
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Address").'</td><td class="valeur">'.nl2br($object->address).'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Zip").' '.$langs->trans("Town").'</td><td class="valeur">'.$object->zip.' '.$object->town.'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Country").'</td><td class="valeur">'.$object->pays.'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Country").'</td><td class="valeur">'.$object->country.'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("EMail").'</td><td class="valeur">'.$object->email.'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.$object->naiss.'&nbsp;</td></tr>';

View File

@ -123,11 +123,11 @@ if ($socid)
print '<td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$soc->town."</td></tr>";
// Country
if ($soc->pays) {
if ($soc->country) {
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
$img=picto_from_langcode($soc->country_code);
print ($img?$img.' ':'');
print $soc->pays;
print $soc->country;
print '</td></tr>';
}

View File

@ -65,12 +65,12 @@ if (! empty($country))
if ($resql)
{
print '<ul>';
while($pays = $db->fetch_object($resql))
while($country = $db->fetch_object($resql))
{
print '<li>';
// Si traduction existe, on l'utilise, sinon on prend le libellé par défaut
print ($pays->code && $langs->trans("Country".$pays->code)!="Country".$pays->code?$langs->trans("Country".$pays->code):($pays->libelle!='-'?$pays->libelle:'&nbsp;'));
print '<span class="informal" style="display:none">'.$pays->rowid.'-idcache</span>';
print ($country->code && $langs->trans("Country".$country->code)!="Country".$country->code?$langs->trans("Country".$country->code):($country->libelle!='-'?$country->libelle:'&nbsp;'));
print '<span class="informal" style="display:none">'.$country->rowid.'-idcache</span>';
print '</li>';
}
print '</ul>';

View File

@ -154,7 +154,7 @@ class ActionsCardCompany extends ActionsCardCommon
}
else
{
$this->tpl['tva_intra'] = $s.'<a href="'.$langs->transcountry("VATIntraCheckURL",$this->object->id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
$this->tpl['tva_intra'] = $s.'<a href="'.$langs->transcountry("VATIntraCheckURL",$this->object->country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
}
}
else
@ -193,7 +193,7 @@ class ActionsCardCompany extends ActionsCardCommon
}
else
{
$this->tpl['tva_intra'] = $s.'<a href="'.$langs->transcountry("VATIntraCheckURL",$this->object->id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
$this->tpl['tva_intra'] = $s.'<a href="'.$langs->transcountry("VATIntraCheckURL",$this->object->country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
}
}
else

View File

@ -375,8 +375,6 @@ class Address
$this->note = $obj->note;
// deprecated
$this->pays_code = $this->country_code;
$this->pays = $this->country;
$this->tel = $this->phone;
$result = 1;

View File

@ -2500,11 +2500,11 @@ class Societe extends CommonObject
// We define country_id, country_code and country
$country_id=$country_code=$country_label='';
if (! empty($conf->global->MAIN_INFO_SOCIETE_PAYS))
if (! empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY))
{
$tmp=explode(':',$conf->global->MAIN_INFO_SOCIETE_PAYS);
$tmp=explode(':',$conf->global->MAIN_INFO_SOCIETE_COUNTRY);
$country_id=$tmp[0];
if (! empty($tmp[1])) // If $conf->global->MAIN_INFO_SOCIETE_PAYS is "id:code:label"
if (! empty($tmp[1])) // If $conf->global->MAIN_INFO_SOCIETE_COUNTRY is "id:code:label"
{
$country_code=$tmp[1];
$country_label=$tmp[2];
@ -2521,7 +2521,6 @@ class Societe extends CommonObject
$this->country_code=$country_code;
$this->country=$country_label;
if (is_object($langs)) $this->country=($langs->trans('Country'.$country_code)!='Country'.$country_code)?$langs->trans('Country'.$country_code):$country_label;
$this->pays=$this->country; // TODO deprecated
$this->tel=empty($conf->global->MAIN_INFO_SOCIETE_TEL)?'':$conf->global->MAIN_INFO_SOCIETE_TEL; // TODO deprecated
$this->phone=empty($conf->global->MAIN_INFO_SOCIETE_TEL)?'':$conf->global->MAIN_INFO_SOCIETE_TEL;

View File

@ -128,7 +128,7 @@ if ($_GET["socid"])
print '<tr><td>'.$langs->trans('Zip').'</td><td width="20%">'.$soc->zip."</td>";
print '<td>'.$langs->trans('Town').'</td><td>'.$soc->town."</td></tr>";
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$soc->pays.'</td>';
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$soc->country.'</td>';
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->country_code,0,$soc->id,'AC_TEL').'</td>';
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->country_code,0,$soc->id,'AC_FAX').'</td></tr>';

View File

@ -894,7 +894,7 @@ else
}
else
{
$s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$object->id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
$s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$object->country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
}
}
print $s;
@ -1339,7 +1339,7 @@ else
}
else
{
$s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$object->id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
$s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$object->country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
}
}
print $s;
@ -1673,7 +1673,7 @@ else
}
else
{
$s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$object->id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
$s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$object->country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
}
}
print $s;

View File

@ -533,10 +533,8 @@ function getContactsForThirdParty($authentication,$idthirdparty)
'state_code' => $contact->state_code?$contact->state_code:'',
'state' => $contact->state?$contact->state:'',
'fk_pays' => $contact->fk_pays?$contact->fk_pays:'',
'country_id' => $contact->country_id?$contact->country_id:'',
'country_code' => $contact->country_code?$contact->country_code:'',
'pays' => $contact->pays?$contact->pays:'',
'country' => $contact->country?$contact->country:'',
'socid' => $contact->socid?$contact->socid:'',

View File

@ -196,7 +196,6 @@ if ($result >= 0)
$member->address=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS];
$member->zip=$ldapuser[$conf->global->LDAP_FIELD_ZIP];
$member->town=$ldapuser[$conf->global->LDAP_FIELD_TOWN];
$member->pays=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; // deprecated
$member->country=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY];
$member->country_id=$countries[$hashlib2rowid[strtolower($member->country)]]['rowid'];
$member->country_code=$countries[$hashlib2rowid[strtolower($member->country)]]['code'];

View File

@ -282,7 +282,7 @@ class AdherentTest extends PHPUnit_Framework_TestCase
$template = '%DOL_MAIN_URL_ROOT%,%ID%,%CIVILITE%,%FIRSTNAME%,%LASTNAME%,%FULLNAME%,%COMPANY%,'.
'%ADDRESS%,%ZIP%,%TOWN%,%COUNTRY%,%EMAIL%,%NAISS%,%PHOTO%,%LOGIN%,%PASSWORD%,%PRENOM%,'.
'%NOM%,%SOCIETE%,%ADDRESS%,%CP%,%TOWN%,%PAYS%';
'%NOM%,%SOCIETE%,%ADDRESS%,%ZIP%,%TOWN%,%COUNTRY%';
$expected = DOL_MAIN_URL_ROOT.','.$localobject->id.',0,New firstname,New name,New firstname New name,'.
'New company,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->naiss,'day').',,'.