More multi-lingual compatible

This commit is contained in:
skeeter 2001-04-22 21:39:42 +00:00
parent 98f47a7003
commit 5ae06fcf21
5 changed files with 81 additions and 51 deletions

View File

@ -181,16 +181,16 @@ class calendar extends calendar_
switch ($status_short) switch ($status_short)
{ {
case 'A': case 'A':
$status = 'Accepted'; $status = lang('Accepted');
break; break;
case 'R': case 'R':
$status = 'Rejected'; $status = lang('Rejected');
break; break;
case 'T': case 'T':
$status = 'Tentative'; $status = lang('Tentative');
break; break;
case 'U': case 'U':
$status = 'No Response'; $status = lang('No Response');
break; break;
} }
return $status; return $status;
@ -1503,7 +1503,7 @@ class calendar extends calendar_
{ {
$repeat_days .= ', '; $repeat_days .= ', ';
} }
$repeat_days .= $day; $repeat_days .= $day.' ';
} }
function view_event($event) function view_event($event)
@ -1659,7 +1659,7 @@ class calendar extends calendar_
$p->parse('output','list',True); $p->parse('output','list',True);
// Repeated Events // Repeated Events
$str = $event->rpt_type; $str = lang($event->rpt_type);
if($event->recur_type <> RECUR_NONE) if($event->recur_type <> RECUR_NONE)
{ {
$str .= ' ('; $str .= ' (';
@ -1674,33 +1674,43 @@ class calendar extends calendar_
if($event->recur_type == RECUR_WEEKLY || $event->recur_type == RECUR_DAILY) if($event->recur_type == RECUR_WEEKLY || $event->recur_type == RECUR_DAILY)
{ {
$repeat_days = ''; $repeat_days = '';
if (!!($event->recur_data & M_SUNDAY) == True) if($phpgw_info['user']['preferences']['calendar']['weekdaystarts'] == 'Sunday')
{ {
$this->view_add_day(lang('Sunday '),$repeat_days); if (!!($event->recur_data & M_SUNDAY) == True)
{
$this->view_add_day(lang('Sunday'),$repeat_days);
}
} }
if (!!($event->recur_data & M_MONDAY) == True) if (!!($event->recur_data & M_MONDAY) == True)
{ {
$this->view_add_day(lang('Monday '),$repeat_days); $this->view_add_day(lang('Monday'),$repeat_days);
} }
if (!!($event->recur_data & M_TUESDAY) == True) if (!!($event->recur_data & M_TUESDAY) == True)
{ {
$this->view_add_day(lang('Tuesay '),$repeat_days); $this->view_add_day(lang('Tuesay'),$repeat_days);
} }
if (!!($event->recur_data & M_WEDNESDAY) == True) if (!!($event->recur_data & M_WEDNESDAY) == True)
{ {
$this->view_add_day(lang('Wednesday '),$repeat_days); $this->view_add_day(lang('Wednesday'),$repeat_days);
} }
if (!!($event->recur_data & M_THURSDAY) == True) if (!!($event->recur_data & M_THURSDAY) == True)
{ {
$this->view_add_day(lang('Thursday '),$repeat_days); $this->view_add_day(lang('Thursday'),$repeat_days);
} }
if (!!($event->recur_data & M_FRIDAY) == True) if (!!($event->recur_data & M_FRIDAY) == True)
{ {
$this->view_add_day(lang('Friday '),$repeat_days); $this->view_add_day(lang('Friday'),$repeat_days);
} }
if (!!($event->recur_data & M_SATURDAY) == True) if (!!($event->recur_data & M_SATURDAY) == True)
{ {
$this->view_add_day(lang('Saturday '),$repeat_days); $this->view_add_day(lang('Saturday'),$repeat_days);
}
if($phpgw_info['user']['preferences']['calendar']['weekdaystarts'] == 'Monday')
{
if (!!($event->recur_data & M_SUNDAY) == True)
{
$this->view_add_day(lang('Sunday'),$repeat_days);
}
} }
if($repeat_days <> '') if($repeat_days <> '')
{ {
@ -1774,10 +1784,12 @@ class calendar extends calendar_
$increment = $phpgw_info['user']['preferences']['calendar']['interval']; $increment = $phpgw_info['user']['preferences']['calendar']['interval'];
$interval = (int)(60 / $increment); $interval = (int)(60 / $increment);
$str = '<center>'.$phpgw->common->show_date($date['raw'],'l, F d, Y').'<br>'; $str = '<center>'.lang($phpgw->common->show_date($date['raw'],'l'));
$str .= ', '.lang($phpgw->common->show_date($date['raw'],'F'));
$str .= ' '.$phpgw->common->show_date($date['raw'],'d, Y').'<br>';
$str .= '<table width="85%" border="0" cellspacing="0" cellpadding="0" cols="'.((24 * $interval) + 1).'">'; $str .= '<table width="85%" border="0" cellspacing="0" cellpadding="0" cols="'.((24 * $interval) + 1).'">';
$str .= '<tr><td height="1" colspan="'.((24 * $interval) + 1).'" bgcolor="black"><img src="'.$this->image_dir.'/pix.gif"></td></tr>'; $str .= '<tr><td height="1" colspan="'.((24 * $interval) + 1).'" bgcolor="black"><img src="'.$this->image_dir.'/pix.gif"></td></tr>';
$str .= '<tr><td width="15%">Participant</td>'; $str .= '<tr><td width="15%">'.lang('Participant').'</td>';
for($i=0;$i<24;$i++) for($i=0;$i<24;$i++)
{ {
for($j=0;$j<$interval;$j++) for($j=0;$j<$interval;$j++)

View File

@ -92,7 +92,7 @@
if ($matches == 1) if ($matches == 1)
{ {
$quantity = '1 match found.'; $quantity = lang('1 match found').'.';
} }
elseif ($matches > 0) elseif ($matches > 0)
{ {

View File

@ -86,7 +86,7 @@
{ {
echo ' <input type="hidden" name="filter" value="'.$filter.'">'."\n"; echo ' <input type="hidden" name="filter" value="'.$filter.'">'."\n";
} }
echo ' <input type="submit" value="Refresh">'."\n"; echo ' <input type="submit" value="'.lang('refresh').'">'."\n";
echo ' </form>'."\n"; echo ' </form>'."\n";
echo '</center>'."\n"; echo '</center>'."\n";

View File

@ -10,26 +10,38 @@
* option) any later version. * * option) any later version. *
\**************************************************************************/ \**************************************************************************/
/* $Id$ */ /* $Id$ */
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_nextmatchs_class" => True); if (isset($friendly) && $friendly)
{
if (isset($friendly) && $friendly){ $phpgw_flags = Array(
$phpgw_info["flags"]["noheader"] = True; 'currentapp' => 'calendar',
$phpgw_info["flags"]["nonavbar"] = True; 'enable_nextmatchs_class' => True,
$phpgw_info["flags"]["noappheader"] = True; 'noheader' => True,
$phpgw_info["flags"]["noappfooter"] = True; 'nonavbar' => True,
$phpgw_info["flags"]["nofooter"] = True; 'noappheader' => True,
} else { 'noappfooter' => True,
$friendly = 0; 'nofooter' => True
} );
include("../header.inc.php"); }
else
{
$friendly = 0;
$phpgw_flags = Array(
'currentapp' => 'calendar',
'enable_nextmatchs_class' => True
);
}
$view = "year"; $phpgw_info['flags'] = $phpgw_flags;
include('../header.inc.php');
if ($friendly) { $view = 'year';
echo '<body bgcolor="' . $phpgw_info["theme"]["bg_color"] . '">';
} if ($friendly)
{
echo '<body bgcolor="'.$phpgw_info['theme']['bg_color'].'">';
}
?> ?>
<center> <center>
@ -37,30 +49,30 @@
<tr> <tr>
<?php <?php
if (!$friendly) if (!$friendly)
echo "<td align=\"left\"><A HREF=\"" . $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/year.php',"year=" . ($year - 1)) . "\">&lt;&lt;</A>"; echo '<td align="left"><a href="'.$phpgw->link('/calendar/year.php','year='.($year-1)).'">&lt;&lt;</a>';
?> ?>
</td> </td>
</td> </td>
<td colspan="<?php echo ($friendly?"6":"4"); ?>" align="center"> <td colspan="<?php echo ($friendly?'6':'4'); ?>" align="center">
<font face=\"".$phpgw_info["theme"][font]."\" size="+1"><? echo $year; ?></font> <font face=\"".$phpgw_info["theme"][font]."\" size="+1"><?php echo $year; ?></font>
</td> </td>
<?php <?php
if (! $friendly) if (! $friendly)
echo "<td align=\"right\"><A HREF=\"" . $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/year.php',"year=" . ($year + 1)) . "\">&gt;&gt;</A>"; echo '<td align="right"><a href="'.$phpgw->link('/calendar/year.php','year='.($year+1)).'">&gt;&gt;</a>';
?> ?>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
<?php <?php
if(!$friendly) $link = "day.php"; else $link = ""; if(!$friendly) $link = 'day.php'; else $link = '';
for($i=1;$i<13;$i++) { for($i=1;$i<13;$i++) {
echo "<td valign=\"top\">"; echo '<td valign="top">';
if(!$friendly) if(!$friendly)
echo $phpgw->calendar->mini_calendar($i,$i,$year,"day.php"); echo $phpgw->calendar->mini_calendar($i,$i,$year,'day.php');
else else
echo $phpgw->calendar->mini_calendar($i,$i,$year); echo $phpgw->calendar->mini_calendar($i,$i,$year);
echo "</td>"; echo '</td>';
if($i==6) echo "</tr><tr valign=\"top\">"; if($i==6) echo '</tr><tr valign="top">';
} }
?> ?>
</tr> </tr>
@ -68,12 +80,12 @@
</center> </center>
<?php <?php
if (! $friendly) { if (! $friendly)
echo "&nbsp;<A HREF=\"" . $phpgw->link("year.php","friendly=1&" {
. "&year=$year") . "\"TARGET=\"cal_printer_friendly\" onMouseOver=\"window." echo '&nbsp;<a href="'.$phpgw->link('/calendar/year.php','friendly=1&year='.$year)
. "status = '" . lang("Generate printer-friendly version") . "'\">[" .'" target="cal_printer_friendly" onMouseOver="window.status = '."'"
. lang("Printer Friendly") . "]</A>"; .lang('Generate printer-friendly version')."'".'">['.lang('Printer Friendly').']</a>';
} }
if(!isset($friendly) || $friendly == False) if(!isset($friendly) || $friendly == False)
{ {
$phpgw->common->phpgw_footer(); $phpgw->common->phpgw_footer();

View File

@ -1,6 +1,7 @@
1 match found calendar en 1 match found 1 match found calendar en 1 match found
1 message has been deleted email en 1 message has been deleted 1 message has been deleted email en 1 message has been deleted
a calendar en a calendar en a
accepted calendar en Accepted
access common en Access access common en Access
access not permitted common en Access not permitted access not permitted common en Access not permitted
access type common en Access type access type common en Access type
@ -389,6 +390,7 @@ no common en No
no_file_name filemanager en No filename was specified no_file_name filemanager en No filename was specified
no matches found. calendar en No matches found. no matches found. calendar en No matches found.
no matchs found admin en No matchs found no matchs found admin en No matchs found
no repsonse calendar en No Response
none common en None none common en None
non-standard email en Non-Standard non-standard email en Non-Standard
normal common en Normal normal common en Normal
@ -416,6 +418,7 @@ pager addressbook en Pager
parcel addressbook en Parcel parcel addressbook en Parcel
parent category common en Parent Category parent category common en Parent Category
parent project todo en parent project parent project todo en parent project
particpant calendar en Participant
participants calendar en Participants participants calendar en Participants
password common en Password password common en Password
password has been updated common en Password has been updated password has been updated common en Password has been updated
@ -461,10 +464,12 @@ record owner addressbook en Record owner
re-edit event calendar en Re-Edit Event re-edit event calendar en Re-Edit Event
re-enter password admin en Re-enter password re-enter password admin en Re-enter password
re-enter your password preferences en Re-Enter your password re-enter your password preferences en Re-Enter your password
refresh calendar en Refresh
region admin en Region region admin en Region
regions admin en Regions regions admin en Regions
regions weather en Regions regions weather en Regions
region weather en Region region weather en Region
rejected calendar en Rejected
remove all users from this group admin en Remove all users from this group remove all users from this group admin en Remove all users from this group
rename common en Rename rename common en Rename
rename_to filemanager en Rename to rename_to filemanager en Rename to
@ -546,6 +551,7 @@ switch to bookkeeping en Switch to
table admin en Table table admin en Table
tables weather en Tables tables weather en Tables
target language transy en Target Language target language transy en Target Language
tentative calendar en Tentative
text only preferences en Text only text only preferences en Text only
that category name has been used already ! admin en That category name has been used already ! that category name has been used already ! admin en That category name has been used already !
that loginid has already been taken admin en That loginid has already been taken that loginid has already been taken admin en That loginid has already been taken