[Vtigercrm-developers] Translations

Abos webmaster at vtigercrmfrance.org
Sun May 14 10:30:19 PDT 2006


On file
/module/Calendar/CalendarLayout.php

Line 7
function calendar_layout(& $param_arr)
{

Add
    global $mod_strings;



Line 25/26 change for :
<td class="dvtSelectedCell" id="pi" 
onclick="fnLoadValues('pi','mi','mnuTab','mnuTab2')" align="center" 
nowrap="nowrap" width="75"><b>$mod_strings[Events]</b></td>
                                    <td class="dvtUnSelectedCell" 
style="width: 100px;" id="mi" 
onclick="fnLoadValues('mi','pi','mnuTab2','mnuTab')" align="center" 
nowrap="nowrap"><b>$mod_strings[Todos]</b></td>
                                   


Line96

function get_cal_header_data(& $cal_arr)
{
    global $mod_strings;


Line 108 change for

<a 
onClick='gshow(\"addEvent\",\"".$cal_arr['calendar']->date_time->get_formatted_date()."\",\"".$cal_arr['calendar']->date_time->get_formatted_date()."\",\"".$hour_startat."\",\"".$hour_endat."\")' 
href='javascript:void(0)'>".$mod_strings['Add Event']."</a>
                   

Line 114 change for

<td align='right' width='25%'><b>".$mod_strings[View]." : </b>";


Line 124 to 133 change for

function getEventViewOption(& $cal)
{
   
    global $mod_strings;
    $view = "<select name='view' class='importBox' id='viewBox' 
onchange='fnRedirect(\"".$cal['calendar']->view."\",\"".$cal['calendar']->date_time->hour."\",\"".$cal['calendar']->date_time->day."\",\"".$cal['calendar']->date_time->month."\",\"".$cal['calendar']->date_time->year."\")'>";
    $view .="<option value='hourview' 
selected='selected'>".$mod_strings['Hour View']."</option>
        <option value='listview'>".$mod_strings['List View']."</option>
        </select>";
    return $view;
}


Line 639 to 655

function getEventTodoInfo(& $cal, $mode)
{
    global $mod_strings;
    $event_todo = Array();
    $event_todo['event']=getListView($cal, $mode);
    $event_todo['todo'] = getTodosList($cal, $mode);
    $event_todo_info = "";
    $event_todo_info .= "".$mod_strings['Total Events'].": 
".$event_todo['event']['totalevent'];
    if($event_todo['event']['pendingevent'] != null)
         $event_todo_info .= ", ".$event_todo['event']['pendingevent']." 
Pending";
    $event_todo_info .=" / ";
    $event_todo_info .="".$mod_strings['Total Todos']." : 
".$event_todo['todo']['totaltodo'];
    if($event_todo['todo']['pendingtodo'] != null)
        $event_todo_info .= ", ".$event_todo['todo']['pendingtodo']." 
".$mod_strings['Pending']."";
   
    return $event_todo_info;
}

Line 657 to  706 change for

function constructListView($entry_list)
{
    global $mod_strings;
    $list_view = "";
    $header = Array('0'=>'#',
                        '1'=>$mod_strings['Start Time'],
                        '2'=>$mod_strings['End Time'],
                        '3'=>$mod_strings['Event Type'],
                        '4'=>$mod_strings['Event Details'],
                        '5'=>$mod_strings['Actions'],
                        '6'=>$mod_strings['Current Status'],
                        );
        $header_width = Array('0'=>'5',
                              '1'=>'10',
                              '2'=>'10',
                              '3'=>'10',
                              '4'=>'40',
                              '5'=>'10',
                              '6'=>'15',
                             );
    $list_view .="<br><table style='background-color: rgb(204, 204, 
204);' class='small' align='center' border='0' cellpadding='5' 
cellspacing='1' width='98%'>
                        <tr>";
    $header_rows = count($header);
        for($i=0;$i<$header_rows;$i++)
        {
                $list_view .="<td class='lvtCol' 
width='".$header_width[$i]."'>".$header[$i]."</td>";
        }
        $list_view .="</tr>";
    $rows = count($entry_list);
    if($rows != 0)
    {
        for($i=0;$i<count($entry_list);$i++)
        {
            $list_view .="<tr class='lvtColData' 
onmouseover='this.className=\"lvtColDataHover\"' 
onmouseout='this.className=\"lvtColData\"' bgcolor='white'>";
            foreach($entry_list[$i] as $key=>$entry)
            {
                $list_view .="<td>".$entry."</td>";
            }
            $list_view .="</tr>";
        }
    }
    else
    {
        $list_view .="<tr style='height: 25px;' bgcolor='white'>";
                    $list_view .="<td 
colspan='".$header_rows."'><i>".$mod_strings['None Scheduled']."</i></td>";
                $list_view .="</tr>";
    }
    $list_view .="</table>";
    echo $list_view;
}


Add those strings in mod lang file


'Events'=>'Events',
'Add Event'=>'Add Event',
'Todos'=>'Todos',
'View'=>'View',
'Total Events'=>'Total Events',
'Total Todos'=>'Total Todos',
'Pending'=>'Pending',
'Hour View'=>'Hour View',
'List View'=>'List View',
'None Scheduled'=>'None Scheduled',
'Start Time'=>'Start Time',
'End Time'=>'End Time',
'Actions'=>'Actions',
'Event Type'=>'Event Type',
'Event Details'=>'Event Details',
'Current Status'=>'Current Status',

Let me know if you prefer other format for changes.
To be continued ....




More information about the vtigercrm-developers mailing list