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)
{
case 'A':
$status = 'Accepted';
$status = lang('Accepted');
break;
case 'R':
$status = 'Rejected';
$status = lang('Rejected');
break;
case 'T':
$status = 'Tentative';
$status = lang('Tentative');
break;
case 'U':
$status = 'No Response';
$status = lang('No Response');
break;
}
return $status;
@ -1503,7 +1503,7 @@ class calendar extends calendar_
{
$repeat_days .= ', ';
}
$repeat_days .= $day;
$repeat_days .= $day.' ';
}
function view_event($event)
@ -1659,7 +1659,7 @@ class calendar extends calendar_
$p->parse('output','list',True);
// Repeated Events
$str = $event->rpt_type;
$str = lang($event->rpt_type);
if($event->recur_type <> RECUR_NONE)
{
$str .= ' (';
@ -1674,33 +1674,43 @@ class calendar extends calendar_
if($event->recur_type == RECUR_WEEKLY || $event->recur_type == RECUR_DAILY)
{
$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)
{
$this->view_add_day(lang('Monday '),$repeat_days);
$this->view_add_day(lang('Monday'),$repeat_days);
}
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)
{
$this->view_add_day(lang('Wednesday '),$repeat_days);
$this->view_add_day(lang('Wednesday'),$repeat_days);
}
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)
{
$this->view_add_day(lang('Friday '),$repeat_days);
$this->view_add_day(lang('Friday'),$repeat_days);
}
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 <> '')
{
@ -1774,10 +1784,12 @@ class calendar extends calendar_
$increment = $phpgw_info['user']['preferences']['calendar']['interval'];
$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 .= '<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($j=0;$j<$interval;$j++)

View File

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

View File

@ -86,7 +86,7 @@
{
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 '</center>'."\n";

View File

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

View File

@ -1,6 +1,7 @@
1 match found calendar en 1 match found
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 not permitted common en Access not permitted
access type common en Access type
@ -389,6 +390,7 @@ no common en No
no_file_name filemanager en No filename was specified
no matches found. calendar en No matches found.
no matchs found admin en No matchs found
no repsonse calendar en No Response
none common en None
non-standard email en Non-Standard
normal common en Normal
@ -416,6 +418,7 @@ pager addressbook en Pager
parcel addressbook en Parcel
parent category common en Parent Category
parent project todo en parent project
particpant calendar en Participant
participants calendar en Participants
password common en Password
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-enter password admin en Re-enter password
re-enter your password preferences en Re-Enter your password
refresh calendar en Refresh
region admin en Region
regions admin en Regions
regions weather en Regions
region weather en Region
rejected calendar en Rejected
remove all users from this group admin en Remove all users from this group
rename common en Rename
rename_to filemanager en Rename to
@ -546,6 +551,7 @@ switch to bookkeeping en Switch to
table admin en Table
tables weather en Tables
target language transy en Target Language
tentative calendar en Tentative
text only preferences en Text only
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