2
0
forked from Wavyzz/dolibarr

Fix: traduction du calendrier eldy

This commit is contained in:
Regis Houssin
2007-06-04 15:44:49 +00:00
parent 6806f4bd9e
commit b20ed1aef4
7 changed files with 72 additions and 24 deletions

View File

@@ -93,8 +93,8 @@ if ($_POST['action'] == 'classin' && $user->rights->commande->creer)
if ($_POST['action'] == 'add' && $user->rights->commande->creer) if ($_POST['action'] == 'add' && $user->rights->commande->creer)
{ {
$datecommande=''; $datecommande='';
$datecommande = @mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $datecommande = dolibarr_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
$datelivraison = @mktime(12, 0, 0, $_POST['liv_month'],$_POST['liv_day'],$_POST['liv_year']); $datelivraison = dolibarr_mktime(12, 0, 0, $_POST['liv_month'],$_POST['liv_day'],$_POST['liv_year']);
$commande = new Commande($db); $commande = new Commande($db);
$commande->socid=$_POST['socid']; $commande->socid=$_POST['socid'];
@@ -202,7 +202,7 @@ if ($_POST['action'] == "setabsolutediscount" && $user->rights->propale->creer)
if ($_POST['action'] == 'setdate_livraison' && $user->rights->commande->creer) if ($_POST['action'] == 'setdate_livraison' && $user->rights->commande->creer)
{ {
$datelivraison=@mktime(0, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); $datelivraison=dolibarr_mktime(0, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']);
$commande = new Commande($db); $commande = new Commande($db);
$commande->fetch($_GET['id']); $commande->fetch($_GET['id']);
$result=$commande->set_date_livraison($user,$datelivraison); $result=$commande->set_date_livraison($user,$datelivraison);

View File

@@ -2401,11 +2401,11 @@ class Form
* Affiche date en popup * Affiche date en popup
*/ */
if ($conf->use_javascript && $conf->use_popup_calendar) if ($conf->use_javascript && $conf->use_popup_calendar)
{ {
//print "e".$set_time." t ".$conf->format_date_short; //print "e".$set_time." t ".$conf->format_date_short;
if ($set_time > 0) if ($set_time > 0)
{ {
$formated_date=dolibarr_print_date($set_time,$conf->format_date_short); $formated_date=dolibarr_print_date($set_time,$conf->format_date_short);
} }
// Calendrier popup version eldy // Calendrier popup version eldy

View File

@@ -379,3 +379,18 @@ CurrencyCHF=Swiss Francs
CurrencyEUR=Euros CurrencyEUR=Euros
CurrencyGBP=GB Pounds CurrencyGBP=GB Pounds
CurrencyUSD=Dollar US CurrencyUSD=Dollar US
# Week day
Monday=Monday
Tuesday=Tuesday
Wednesday=Wednesday
Thursday=Thursday
Friday=Friday
Saturday=Saturday
Sunday=Sunday
ShortMonday=M
ShortTuesday=T
ShortWednesday=W
ShortThursday=T
ShortFriday=F
ShortSaturday=S
ShortSunday=S

View File

@@ -383,3 +383,18 @@ CurrencyCHF=Francs suisses
CurrencyEUR=Euros CurrencyEUR=Euros
CurrencyGBP=Livre sterling CurrencyGBP=Livre sterling
CurrencyUSD=Dollar US CurrencyUSD=Dollar US
# Week day
Monday=Lundi
Tuesday=Mardi
Wednesday=Mercredi
Thursday=Jeudi
Friday=Vendredi
Saturday=Samedi
Sunday=Dimanche
ShortMonday=L
ShortTuesday=M
ShortWednesday=M
ShortThursday=J
ShortFriday=V
ShortSaturday=S
ShortSunday=D

View File

@@ -72,7 +72,13 @@ function displayBox($selectedDate,$month,$year){
?> ?>
<table class="dp" cellspacing="0" cellpadding="0" border=0> <table class="dp" cellspacing="0" cellpadding="0" border=0>
<tr> <tr>
<td colspan=6 class="dpHead"><?php echo date("F, Y", $thedate) ?></td> <td colspan=6 class="dpHead">
<?php
$selectMonth = date("F", $thedate);
$selectYear = date("Y", $thedate);
echo $langs->trans($selectMonth).", ".$selectYear;
?>
</td>
<td class="dpHead"><button type="buttton" class="dpInvisibleButtons" id="DPCancel" onClick="closeDPBox();">X</button></td> <td class="dpHead"><button type="buttton" class="dpInvisibleButtons" id="DPCancel" onClick="closeDPBox();">X</button></td>
</tr> </tr>
<tr> <tr>
@@ -83,13 +89,13 @@ function displayBox($selectedDate,$month,$year){
<td class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php echo $month?>','<?php echo $year+1?>','<?php echo $xyz ?>')">&gt;&gt;</td> <td class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php echo $month?>','<?php echo $year+1?>','<?php echo $xyz ?>')">&gt;&gt;</td>
</tr> </tr>
<tr class="dpDayNames"> <tr class="dpDayNames">
<td width="14.286%">S</td> <td width="14.286%"><?php echo $langs->trans("ShortSunday") ?></td>
<td width="14.286%">M</td> <td width="14.286%"><?php echo $langs->trans("ShortMonday") ?></td>
<td width="14.286%">T</td> <td width="14.286%"><?php echo $langs->trans("ShortTuesday") ?></td>
<td width="14.286%">W</td> <td width="14.286%"><?php echo $langs->trans("ShortWednesday") ?></td>
<td width="14.286%">R</td> <td width="14.286%"><?php echo $langs->trans("ShortThursday") ?></td>
<td width="14.286%">F</td> <td width="14.286%"><?php echo $langs->trans("ShortFriday") ?></td>
<td width="14.286%">S</td> <td width="14.286%"><?php echo $langs->trans("ShortSaturday") ?></td>
</tr> </tr>
<?php <?php
$firstdate=getdate($thedate); $firstdate=getdate($thedate);
@@ -122,14 +128,14 @@ function displayBox($selectedDate,$month,$year){
if($mydate["wday"]!=0){ if($mydate["wday"]!=0){
for($i=6;$i>=$mydate["wday"];$i--) for($i=6;$i>=$mydate["wday"];$i--)
echo "<TD>&nbsp;</TD>"; echo "<TD>&nbsp;</TD>";
echo "</TR"; echo "</TR>";
} }
?> ?>
<tr><td id="dpExp" class="dpExplanation" colspan="7"><?php <tr><td id="dpExp" class="dpExplanation" colspan="7"><?php
if($selDate) if($selDate)
{ {
$tempDate=getdate($selDate); $tempDate=getdate($selDate);
print $tempDate["month"]." "; print $langs->trans($tempDate["month"])." ";
print sprintf("%02s",$tempDate["mday"]); print sprintf("%02s",$tempDate["mday"]);
print ", ".$tempDate["year"]; print ", ".$tempDate["year"];
} }

View File

@@ -556,15 +556,15 @@ function dolibarr_stringtotime($string)
/** /**
\brief Retourne une date fabriqu<71>e depuis infos. \brief Retourne une date fabriqu<71>e depuis infos.
Remplace la fonction mktime non impl<70>ment<6E>e sous Windows si ann<6E>e < 1970 Remplace la fonction mktime non impl<70>ment<6E>e sous Windows si ann<6E>e < 1970
\param x X \param hour Heure
\param y Y \param minute Minute
\param z Z \param second Seconde
\param month Mois \param month Mois
\param day Jour \param day Jour
\param year Ann<6E>e \param year Ann<6E>e
\return date Date \return date Date
*/ */
function dolibarr_mktime($x,$y,$z,$month,$day,$year) function dolibarr_mktime($hour,$minute,$second,$month,$day,$year)
{ {
$montharray=array(1=>'january',2=>'february',3=>'march',4=>'april',5=>'may',6=>'june', $montharray=array(1=>'january',2=>'february',3=>'march',4=>'april',5=>'may',6=>'june',
7=>'july',8=>'august',9=>'september',10=>'october',11=>'november',12=>'december'); 7=>'july',8=>'august',9=>'september',10=>'october',11=>'november',12=>'december');
@@ -581,7 +581,7 @@ function dolibarr_mktime($x,$y,$z,$month,$day,$year)
} }
else else
{ {
return mktime($x,$y,$z,$month,$day,$year); return mktime($hour,$minute,$second,$month,$day,$year);
} }
} }

View File

@@ -206,7 +206,19 @@ function dpClickDay(year,month,day,format)
function dpHighlightDay(year,month,day){ function dpHighlightDay(year,month,day){
var displayinfo=getObjectFromID("dpExp"); var displayinfo=getObjectFromID("dpExp");
var months=Array("January","February","March","April","May","June","July","August","September","October","November","December"); var months=Array("January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
);
displayinfo.innerHTML=months[month-1]+" "+day+", "+year; displayinfo.innerHTML=months[month-1]+" "+day+", "+year;
} }