Changeset 204


Ignore:
Timestamp:
03/05/08 16:23:24 (16 years ago)
Author:
niltonneto
Message:

Ver Ticket #148:

  • Aplicação do patch para o pSync;
  • Tradução no alarme da agenda;
Location:
trunk/calendar
Files:
3 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/csv_import.php

    r2 r204  
    243243                        "usefull for the last pair, as they are worked from left to right.<p>". 
    244244                        "First example: <b>1${ASep}private${PSep}public</b><br>". 
    245                         "This will translate a '1' in the CVS field to 'privat' and everything else to 'public'.<p>". 
     245                        "This will translate a '1' in the CVS field to 'private' and everything else to 'public'.<p>". 
    246246                        "Patterns as well as the replacement can be regular expressions (the replacement is done via ereg_replace). ". 
    247247                        "If, after all replacements, the value starts with an '@' the whole value is eval()'ed, so you ". 
  • trunk/calendar/inc/class.bocalendar.inc.php

    r166 r204  
    138138                var $num_months; 
    139139                var $xmlrpc = False;    // not called via xmlrpc 
     140        var $async = false; 
    140141 
    141142                function bocalendar($session=0) 
     
    168169                        print_debug('BO Filter',$this->filter); 
    169170                        print_debug('Owner',$this->owner); 
     171 
     172                        if ($GLOBALS['argv']) { 
     173                          $this->async = true; 
     174                          $this->load_lang(); 
     175                        } 
    170176 
    171177                        $this->prefs['calendar']    = $GLOBALS['phpgw_info']['user']['preferences']['calendar']; 
     
    368374                } 
    369375 
     376          function load_lang() { 
     377            if(!$_SESSION['phpgw_info']['calendar']['langAlarm'])  
     378              { 
     379                $array_keys = array(); 
     380                $fn = '../../calendar/setup/phpgw_alarm_'.$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'].'.lang';                       
     381                echo $fn; 
     382                if (file_exists($fn)){ 
     383                  $fp = fopen($fn,'r'); 
     384                  while ($data = fgets($fp,16000))      { 
     385                    list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1));                       
     386                    $_SESSION['phpgw_info']['calendar']['langAlarm'][$message_id] =  $content; 
     387                  } 
     388                  fclose($fp); 
     389                } 
     390              } 
     391          } 
    370392                function list_methods($_type='xmlrpc') 
    371393                { 
     
    29903012                                        if (!$returncode)       // not nice, but better than failing silently 
    29913013                                        { 
    2992                                                 echo '<p><b>bocalendar::send_update</b>: '.lang("Failed sending message to '%1' #%2 subject='%3', sender='%4' !!!",$to,$userid,htmlspecialchars($subject), $sender)."<br>\n"; 
     3014                                                echo '<p><b>bocalendar::send_update</b>: '.lang("Failed sending message to '%1' #%2 subject='%3', sender='%4'!!!",$to,$userid,htmlspecialchars($subject), $sender)."<br>\n"; 
    29933015                                                echo '<i>'.$mail->ErrorInfo."</i><br>\n"; 
    29943016                                                echo lang('This is mostly caused by a not or wrongly configured SMTP server. Notify your administrator.')."</p>\n"; 
     
    33233345                } 
    33243346 
     3347          function translate($key,$vars=false, $not_found='*' ) 
     3348          { 
     3349            if ($this->async) 
     3350              return $GLOBALS['phpgw']->translation->translate_async($key, $vars); 
     3351            return lang($key, $vars); 
     3352          } 
     3353 
    33253354                /*! 
    33263355                @function event2array 
     
    33333362                function event2array($event) 
    33343363                { 
    3335                         $var['title'] = Array( 
    3336                                 'field'         => lang('Title'), 
     3364                  $var['title'] = Array( 
     3365                                'field'         => $this->translate('Title'), 
    33373366                                'data'          => $event['title'] 
    33383367                        ); 
     
    33413370                        // this will be printed even though its not needed. 
    33423371                        $var['description'] = Array( 
    3343                                 'field' => lang('Description'), 
     3372                                'field' => $this->translate('Description'), 
    33443373                                'data'  => $event['description'] 
    33453374                        ); 
    33463375 
    33473376                        $var['ex_participants'] = Array( 
    3348                                 'field' => lang('External Participants'), 
     3377                                'field' => $this->translate('External Participants'), 
    33493378                                'data'  => $event['ex_participants'] 
    33503379                        ); 
     
    33663395                        } 
    33673396                        $var['category'] = Array( 
    3368                                 'field' => lang('Category'), 
     3397                                'field' => $this->translate('Category'), 
    33693398                                'data'  => implode(', ',$cat_string) 
    33703399                        ); 
    33713400 
    33723401                        $var['location'] = Array( 
    3373                                 'field' => lang('Location'), 
     3402                                'field' => $this->translate('Location'), 
    33743403                                'data'  => $event['location'] 
    33753404                        ); 
    33763405 
    33773406                        $var['startdate'] = Array( 
    3378                                 'field' => lang('Start Date/Time'), 
     3407                                'field' => $this->translate('Start Date/Time'), 
    33793408                                'data'  => $GLOBALS['phpgw']->common->show_date($this->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset), 
    33803409                        ); 
    33813410 
    33823411                        $var['enddate'] = Array( 
    3383                                 'field' => lang('End Date/Time'), 
     3412                                'field' => $this->translate('End Date/Time'), 
    33843413                                'data'  => $GLOBALS['phpgw']->common->show_date($this->maketime($event['end']) - $GLOBALS['phpgw']->datetime->tz_offset) 
    33853414                        ); 
     
    34363465                        } 
    34373466                        $var['participants'] = Array( 
    3438                                 'field' => lang('Participants'), 
     3467                                'field' => $this->translate('Participants'), 
    34393468                                'data'  => $participants 
    34403469                        ); 
     
    35353564                        //$default_prefs = $GLOBALS['phpgw']->preferences->default['calendar']; jakjr 
    35363565 
    3537                         $subject = lang('Calendar Event') . ' - $$action$$: $$startdate$$ $$title$$'."\n"; 
     3566                        $subject = $this->translate('Calendar Event') . ' - $$action$$: $$startdate$$ $$title$$'."\n"; 
    35383567                        $defaults = array( 
    35393568                                'defaultcalendar' => 'week', 
     
    35423571                                'receive_updates' => 'no', 
    35433572                                'update_format'   => 'extended',        // leave it to extended for now, as iCal kills the message-body 
    3544                                 'notifyAdded'     => $subject . lang ('You have a meeting scheduled for %1','$$startdate$$'), 
    3545                                 'notifyCanceled'  => $subject . lang ('Your meeting scheduled for %1 has been canceled','$$startdate$$'), 
    3546                                 'notifyModified'  => $subject . lang ('Your meeting that had been scheduled for %1 has been rescheduled to %2','$$olddate$$','$$startdate$$'), 
    3547                                 'notifyResponse'  => $subject . lang ('On %1 %2 %3 your meeting request for %4','$$date$$','$$fullname$$','$$action$$','$$startdate$$'), 
    3548                                 'notifyAlarm'     => lang('Alarm for %1 at %2 in %3','$$title$$','$$startdate$$','$$location$$')."\n".lang ('Here is your requested alarm.'), 
     3573                                'notifyAdded'     => $subject . $this->translate ('You have a meeting scheduled for %1',array('$$startdate$$')), 
     3574                                'notifyCanceled'  => $subject . $this->translate ('Your meeting scheduled for %1 has been canceled',array('$$startdate$$')), 
     3575                                'notifyModified'  => $subject . $this->translate ('Your meeting that had been scheduled for %1 has been rescheduled to %2',array('$$olddate$$','$$startdate$$')), 
     3576                                'notifyResponse'  => $subject . $this->translate ('On %1 %2 %3 your meeting request for %4', array('$$date$$','$$fullname$$','$$action$$','$$startdate$$')), 
     3577                                'notifyAlarm'     => $this->translate('Alarm for %1 at %2 in %3',array('$$title$$','$$startdate$$','$$location$$')) . "\n" . $this->translate('Here is your requested alarm.'), 
    35493578                                'show_rejected'   => '0', 
    35503579                                'display_status'  => '1', 
  • trunk/calendar/inc/class.socalendar_sql.inc.php

    r86 r204  
    607607                                        . $event['category']."')",__LINE__,__FILE__); 
    608608                                $event['id'] = $this->stream->get_last_insert_id('phpgw_cal','cal_id'); 
     609                                $last_status = true; 
    609610                        } 
    610611 
     
    637638                                        . ($event['groups']?"groups='".(count($event['groups'])>1?implode(',',$event['groups']):','.$event['groups'][0].',')."', ":'') 
    638639                                        . 'reference='.(int)$event['reference'].' ' 
     640                                        . ',last_status = '.($last_status ? "'N'" : "'U'").',last_update = '.time()."000". ' ' 
    639641                                        . 'WHERE cal_id='.(int)$event['id']; 
    640642 
  • trunk/calendar/inc/class.uialarm.inc.php

    r29 r204  
    202202                                if ($to_delete) 
    203203                                { 
    204                                         $this->template->set_var('delete_button',$this->html->submit_button('delete','Delete',"return confirm('".lang("Are you sure\\nyou want to\\ndelete these alarms?")."')")); 
     204                                        $this->template->set_var('delete_button',$this->html->submit_button('delete','Delete',"return confirm('".lang("Are you sure want to delete these alarms?")."')")); 
    205205                                } 
    206206                                $this->template->parse('rows','buttons',True); 
  • trunk/calendar/inc/class.uicalendar.inc.php

    r57 r204  
    843843                                                'action_url_button'     => $this->page('delete','&cal_id='.$cal_id), 
    844844                                                'action_text_button'    => lang('Delete Single'), 
    845                                                 'action_confirm_button' => "onClick=\"return confirm('".lang("Are you sure\\nyou want to\\ndelete this single occurence ?\\n\\nThis will delete\\nthis entry for all users.")."')\"", 
     845                                                'action_confirm_button' => "onClick=\"return confirm('".lang('Are you sure want to delete this single occurence?\\nThis will delete this entry for all users.')."')\"", 
    846846                                                'action_extra_field'    => $this->html->input_hidden(array( 
    847847                                                        'delete_type' => 'single', 
     
    855855                                                'action_url_button'     => $this->page('delete','&cal_id='.$cal_id), 
    856856                                                'action_text_button'    => lang('Delete Series'), 
    857                                                 'action_confirm_button' => "onClick=\"return confirm('".lang("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.")."')\"", 
     857                                                'action_confirm_button' => "onClick=\"return confirm('".lang('Are you sure want to delete this entry?\\nThis will delete this entry for all users.')."')\"", 
    858858                                                'action_extra_field'    => $this->html->input_hidden('delete_type','series') 
    859859                                        ); 
     
    878878                                                'action_url_button'     => $this->page('delete','&cal_id='.$cal_id), 
    879879                                                'action_text_button'    => lang('Delete'), 
    880                                                 'action_confirm_button' => "onClick=\"return confirm('".lang("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.")."')\"", 
     880                                                'action_confirm_button' => "onClick=\"return confirm('".lang('Are you sure want to delete this entry?\\nThis will delete this entry for all users.')."')\"", 
    881881                                                'action_extra_field'    => '' 
    882882                                        ); 
     
    38253825                        $GLOBALS['phpgw_info']['flags']['noappheader'] = True; 
    38263826                        $GLOBALS['phpgw_info']['flags']['noappfooter'] = True; 
    3827                         $GLOBALS['phpgw_info']['flags']['app_header'] = $event['id'] ? lang('Calendar - Edit') : lang('Calendar - Add'); 
     3827                        $GLOBALS['phpgw_info']['flags']['app_header'] = $event['id'] ? lang('Editing event') : lang('Adding event'); 
    38283828                        $GLOBALS['phpgw']->common->phpgw_header(); 
    38293829 
     
    40854085                                                                                        '       <br>'.lang("Search for").':'. 
    40864086                                                                                        '       <input value="" id="cal_input_searchUser" size="35" autocomplete="off" onkeyup="javascript:optionFinderTimeout(this)"><br>'. 
    4087                                                                                         '       <b>'.lang("Available Users and Groups").'</b>'. 
     4087                                                                                        '       <b>'.lang("Available users and groups").'</b>'. 
    40884088                                                                                        '       <select id="user_list_in" style="width: 300px" multiple size="13"></select>'. 
    40894089                                                                                        '</td>'. 
     
    43434343                                        'action_url_button'     => $this->page('delete','&cal_id='.$event['id']), 
    43444344                                        'action_text_button'    => lang('Delete'), 
    4345                                         'action_confirm_button' => "onClick=\"return confirm('".lang("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.")."')\"", 
     4345                                        'action_confirm_button' => "onClick=\"return confirm('".lang('Are you sure want to delete this entry?\\nThis will delete this entry for all users.')."')\"", 
    43464346                                        'action_extra_field'    => '' 
    43474347                                ); 
  • trunk/calendar/inc/class.uiholiday.inc.php

    r2 r204  
    384384                        $p->set_file(Array('form'=>'delete_common.tpl','form_button'=>'form_button_script.tpl')); 
    385385                 
    386                         $p->set_var('messages',lang('Are you sure you want to delete this Country ?')."<br>".$this->bo->locales[0]); 
     386                        $p->set_var('messages',lang('Are you sure want to delete this Country?')."<br>".$this->bo->locales[0]); 
    387387 
    388388                        $var = Array( 
     
    424424                        $p->set_file(Array('form'=>'delete_common.tpl','form_button'=>'form_button_script.tpl')); 
    425425                 
    426                         $p->set_var('messages',lang('Are you sure you want to delete this holiday ?')."<br>".$holiday['name'].' ('.$this->bo->locales[0].') '.$this->bo->rule_string($holiday)); 
     426                        $p->set_var('messages',lang('Are you sure want to delete this holiday?')."<br>".$holiday['name'].' ('.$this->bo->locales[0].') '.$this->bo->rule_string($holiday)); 
    427427 
    428428                        $var = Array( 
  • trunk/calendar/setup/setup.inc.php

    r134 r204  
    1212 
    1313        $setup_info['calendar']['name']    = 'calendar'; 
    14         $setup_info['calendar']['version'] = '0.9.21'; 
     14        $setup_info['calendar']['version'] = '0.9.22'; 
    1515        $setup_info['calendar']['app_order'] = 3; 
    1616        $setup_info['calendar']['enable']  = 1; 
  • trunk/calendar/setup/tables_update.inc.php

    r166 r204  
    2020                $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.21'; 
    2121                return $GLOBALS['setup_info']['calendar']['currentver']; 
     22        } 
     23        $test[] = '0.9.20'; 
     24        function calendar_upgrade0_9_20() 
     25        { 
     26                $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.21'; 
     27                return $GLOBALS['setup_info']['calendar']['currentver']; 
    2228        }        
     29        $test[] = '0.9.21'; 
     30        function calendar_upgrade0_9_21() 
     31        { 
     32                /* 
     33                $GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_cal','last_status',array( 
     34                        'type' => 'char', 
     35                        'precision' => '1', 
     36                        'default' => 'N::bpchar')); 
     37                $GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_cal','last_update',array( 
     38                        'type' => 'int8', 
     39                        'precision' => '8', 
     40                        'default' => '(date_part(\'epoch\'::text, (\'now\'::text)::timestamp(3) with time zone) * (1000)::double precision)')); 
     41                */ 
     42                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN last_status char(1) DEFAULT 'N'::bpchar"); 
     43                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN last_update int8 DEFAULT (date_part('epoch'::text, ('now'::text)::timestamp(3) with time zone) * (1000)::double precision)"); 
     44 
     45                $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.22'; 
     46                return $GLOBALS['setup_info']['calendar']['currentver']; 
     47        } 
     48 
    2349?> 
Note: See TracChangeset for help on using the changeset viewer.