diff options
author | jwangen <jwangen> | 2002-10-05 07:10:10 +0000 |
---|---|---|
committer | jwangen <jwangen> | 2002-10-05 07:10:10 +0000 |
commit | 0d9dd6372798c485234bcb071d797843eb43094f (patch) | |
tree | cda31d766017ede39b672f6036c90ab9bcb37b2a | |
parent | 305ebf2eed3fda0fc8df67d73d89781d8455d181 (diff) | |
download | phpicalendar-0d9dd6372798c485234bcb071d797843eb43094f.tar.gz phpicalendar-0d9dd6372798c485234bcb071d797843eb43094f.tar.bz2 phpicalendar-0d9dd6372798c485234bcb071d797843eb43094f.zip |
Added saving parsed cals to a file for quicker processing.
Prepared language files for translation.
-rw-r--r-- | config.inc.php | 34 | ||||
-rw-r--r-- | functions/ical_parser.php | 47 | ||||
-rw-r--r-- | functions/init.inc.php | 10 | ||||
-rw-r--r-- | functions/list_icals.php | 2 | ||||
-rw-r--r-- | languages/danish.inc.php | 22 | ||||
-rw-r--r-- | languages/dutch.inc.php | 22 | ||||
-rw-r--r-- | languages/english.inc.php | 13 | ||||
-rw-r--r-- | languages/french.inc.php | 20 | ||||
-rw-r--r-- | languages/german.inc.php | 13 | ||||
-rw-r--r-- | languages/italian.inc.php | 62 | ||||
-rw-r--r-- | languages/japanese.inc.php | 25 | ||||
-rw-r--r-- | languages/norwegian.inc.php | 23 | ||||
-rw-r--r-- | languages/polish.inc.php | 19 | ||||
-rw-r--r-- | languages/spanish.inc.php | 94 |
14 files changed, 298 insertions, 108 deletions
diff --git a/config.inc.php b/config.inc.php index 45cb61b..173dac3 100644 --- a/config.inc.php +++ b/config.inc.php @@ -1,29 +1,35 @@ <?php +// Configuration file for PHP iCalendar 0.6 +// +// To set values, change the text between the single quotes +// Follow instructions to the right for detailed information + $style_sheet = 'silver'; // Themes support -$calendar_path = './calendars'; // path to directory with calendars -$default_view = 'day'; // default view for calendars = 'day', 'week', 'month' -$default_cal = 'Home'; // exact filename of calendar without .ics -$language = 'english'; // Language support - 'English', 'Polish', 'German', 'French', 'Dutch', 'Danish', 'Italian', 'Japanese', 'Norwegian' +$calendar_path = './calendars'; // Path to directory with calendars +$default_view = 'day'; // Default view for calendars = 'day', 'week', 'month' +$default_cal = 'Home'; // Exact filename of calendar without .ics +$language = 'english'; // Language support - 'English', 'Polish', 'German', 'French', 'Dutch', 'Danish', 'Italian', 'Japanese', 'Norwegian', 'Spanish' $week_start_day = 'sunday'; // Day of the week your week starts on $day_start = '0700'; // Start time for day grid -$gridLength = '15'; // grid distance in minutes for day view, multiples of 15 preferred -$month_event_lines = '1'; // number of lines to wrap each event title in month view, 0 means display all lines. -$tomorrows_events_lines = '1'; // number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines. +$gridLength = '15'; // Grid distance in minutes for day view, multiples of 15 preferred +$month_event_lines = '1'; // Number of lines to wrap each event title in month view, 0 means display all lines. +$tomorrows_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines. // Yes/No questions --- 'yes' means Yes, anything else means no. 'yes' must be lowercase. -$use_sessions = 'yes'; // For speedy performance on web servers, not good for localhost use. This has not yet been implemented. -$display_custom_goto = 'no'; // in the 'Jump To' box, display the custom 'go to day' box. -$display_ical_list = 'yes'; // in the 'Jump To' box, display the pop-up menu with the list of all calendars in the $calendar_path directory. -$allow_webcals = 'yes'; // Allow http:// and webcal:// prefixed URLs to be used as the $cal for remote viewing of "subscribe-able" calendars. This does not have to be enabled to allow specific ones below. +$save_parsed_cals = 'yes'; // Recommended 'yes'. Saves a copy of the cal in /tmp after it's been parsed. Improves performence. +$use_sessions = 'yes'; // This has not yet been implemented. +$display_custom_goto = 'no'; // In the 'Jump To' box, display the custom 'go to day' box. +$display_ical_list = 'yes'; // In the 'Jump To' box, display the pop-up menu with the list of all calendars in the $calendar_path directory. +$allow_webcals = 'no'; // Allow http:// and webcal:// prefixed URLs to be used as the $cal for remote viewing of "subscribe-able" calendars. This does not have to be enabled to allow specific ones below. -$blacklisted_cals[] = ''; // fill in between the quotes the name of the calendars +$blacklisted_cals[] = ''; // Fill in between the quotes the name of the calendars $blacklisted_cals[] = ''; // you wish to 'blacklist' or that you don't want to show up in your calendar $blacklisted_cals[] = ''; // list. This should be the exact calendar filename without .ics -$blacklisted_cals[] = ''; // The parser will *not* parse any cal that is in this list (it will not be Web accessible) +$blacklisted_cals[] = ''; // the parser will *not* parse any cal that is in this list (it will not be Web accessible) // add more lines as necessary -$list_webcals[] = ''; // fill in between the quotes exact URL of a calendar that you wish +$list_webcals[] = ''; // Fill in between the quotes exact URL of a calendar that you wish $list_webcals[] = ''; // to show up in your calendar list. You must prefix the URL with http:// $list_webcals[] = ''; // or webcal:// and the filename should contain the .ics suffix $list_webcals[] = ''; // $allow_webcals does *not* need to be "yes" for these to show up and work diff --git a/functions/ical_parser.php b/functions/ical_parser.php index da967a7..0f118fe 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -35,15 +35,39 @@ $this_day = $day_array2[3]; $this_month = $day_array2[2]; $this_year = $day_array2[1]; +// reading the file if it's allowed +$parse_file = true; +if ($is_webcal == false && $save_parsed_cals == 'yes') { + $realcal_mtime = filemtime($filename); + $parsedcal = '/tmp/parsedcal-'.$cal_filename.'-'.$this_year.'-'.$realcal_mtime; + if (file_exists($parsedcal)) { + $parsedcal_mtime = filemtime($parsedcal); + if ($realcal_mtime == $parsedcal_mtime) { + $fd = fopen($parsedcal, 'r'); + $contents = fread($fd, filesize($parsedcal)); + fclose($fd); + $master_array = unserialize($contents); + if ($master_array['-1'] == 'valid cal file') { + $parse_file = false; + $calendar_name = $master_array['calendar_name']; + } + } + } +} + // Start the session //session_start(); //if (($aYear != $this_year) || ($use_sessions != 'yes') || (!is_array($aArray))) { //echo 'not using sessions'; +if ($parse_file) { // open the iCal file, read it into a string $contents = @file($filename); -if ($contents[0] != 'BEGIN:VCALENDAR'."\n") exit(error('Calendar '.$filename.' is invalid. Please try a different calendar')); +if ($contents[0] != 'BEGIN:VCALENDAR'."\n") exit(error($error_invalidcal_lang, $filename)); + +// Set a value so we can check to make sure $master_array contains valid data +$master_array['-1'] = 'valid cal file'; // auxiliary array for determining overlaps of events $overlap_array = array (); @@ -243,8 +267,14 @@ foreach($contents as $line) { $start_date_time = strtotime($start_date); $this_month_start_time = strtotime($this_year.$this_month.'01'); - $start_range_time = strtotime('-1 month -2 day', $this_month_start_time); - $end_range_time = strtotime('+2 month +2 day', $this_month_start_time); + if ($save_parsed_cals == 'yes' && !$is_webcal) { + $start_range_time = strtotime($this_year.'-01-01 -1 month -2 days'); + $end_range_time = strtotime($this_year.'-12-31 +1 month +2 days'); + } else { + $start_range_time = strtotime('-1 month -2 day', $this_month_start_time); + $end_range_time = strtotime('+2 month +2 day', $this_month_start_time); + } + // NOTE: This part not in use for the time being. We are choosing to fill out 3 months time. // depending on which view we're looking at, we do one month or one week @@ -568,6 +598,7 @@ foreach($contents as $line) { } elseif (strstr($field, 'X-WR-CALNAME')) { $calendar_name = $data; + $master_array['calendar_name'] = $calendar_name; } elseif (strstr($field, 'DTSTART;VALUE=DATE')) { $allday_start = $data; @@ -627,7 +658,17 @@ if (is_array($master_array)) { } } +// write the new master array to the file +if (isset($master_array) && is_array($master_array) && $save_parsed_cals == 'yes' && $is_webcal == FALSE) { + $write_me = serialize($master_array); + $fd = fopen($parsedcal, 'w'); + fwrite($fd, $write_me); + fclose($fd); + touch($parsedcal, $realcal_mtime); +} +// this bracket is the end of the if ($parse_file) statment +} // Store information in the session /*if ($use_sessions == 'yes') { diff --git a/functions/init.inc.php b/functions/init.inc.php index 5da8a3c..50b4298 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -26,7 +26,7 @@ $lang_file = './languages/'.$language.'.inc.php'; if (file_exists($lang_file)) { include($lang_file); } else { - exit(error('Requested lanugage "'.$language.'" is not a supported language. Please use the configuration file to choose a supported language.')); + exit(error('The requested lanugage "'.$language.'" is not a supported language. Please use the configuration file to choose a supported language.')); } if (isset($HTTP_GET_VARS['getdate']) && ($HTTP_GET_VARS['getdate'] !== '')) { @@ -38,7 +38,7 @@ if (isset($HTTP_GET_VARS['getdate']) && ($HTTP_GET_VARS['getdate'] !== '')) { $is_webcal = FALSE; -if (isset($HTTP_GET_VARS['cal'])) { +if (isset($HTTP_GET_VARS['cal']) && $HTTP_GET_VARS['cal'] != '') { $cal_decoded = urldecode($HTTP_GET_VARS['cal']); if (substr($cal_decoded, 0, 7) == 'http://' || substr($cal_decoded, 0, 9) == 'webcal://') { $is_webcal = TRUE; @@ -60,18 +60,18 @@ if ($is_webcal) { $filename = $cal_filename; $subscribe_path = $cal_webcalPrefix; } else { - exit(error('Remote calendars are not allowed on this server and the calendar located at '.$HTTP_GET_VARS['cal'].' is not in the list of allowed calendars. Please use the "Back" button to return.')); + exit(error($error_remotecal_lang, $HTTP_GET_VARS['cal'])); } } else { $cal_displayname = str_replace('32', ' ', $cal_filename); $cal = urlencode($cal_filename); if (in_array($cal_filename, $blacklisted_cals)) { - exit(error($cal_filename.' is restricted on this server. Please use the "Back" button to return.')); + exit(error($error_restrictedcal_lang, $cal_filename)); } else { if (!isset($filename)) { $filename = $calendar_path.'/'.$cal_filename.'.ics'; if (!file_exists($filename)) { - $dir_handle = @opendir($calendar_path) or die('Unable to open path: '.$calendar_path); + $dir_handle = @opendir($calendar_path) or die(error($error_path_lang, $calendar_path)); while ($file = readdir($dir_handle)) { if (substr($file, -4) == '.ics') { $cal = urlencode(substr($file, 0, -4)); diff --git a/functions/list_icals.php b/functions/list_icals.php index c2635aa..70a3202 100644 --- a/functions/list_icals.php +++ b/functions/list_icals.php @@ -10,7 +10,7 @@ if ($display_ical_list == "yes") { print "<form>\n<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value+'$query');\">\n"; // open file - $dir_handle = @opendir($calendar_path) or die("Unable to open $calendar_path"); + $dir_handle = @opendir($calendar_path) or die(error($error_path_lang, $calendar_path)); // build the <option> tags while ($file = readdir($dir_handle)) { diff --git a/languages/danish.inc.php b/languages/danish.inc.php index 13840b6..fc3c27e 100644 --- a/languages/danish.inc.php +++ b/languages/danish.inc.php @@ -1,7 +1,7 @@ <? // Danish language include -// For version 0.5 PHP iCalendar +// For version 0.6 PHP iCalendar // // Translation by Henrik H¿jmark (styxx@worldonline.dk) // @@ -25,7 +25,7 @@ $last_year_lang = 'Forrige År'; $subscribe_lang = 'Abonnér'; $download_lang = 'Hent'; $powered_by_lang = 'Drevet af'; -$version_lang = '0.5'; +$version_lang = '0.6'; $event_lang = 'Aftale'; $event_start_lang = 'Start Tidspunkt'; $event_end_lang = 'Slut Tidspunkt'; @@ -47,18 +47,13 @@ $goweek_lang = 'Go to This Week'; $gomonth_lang = 'Go to This Month'; $goyear_lang = 'Go to This Year'; -// Date display since setlocale isnt perfect. +// new since last translation $daysofweek_lang = array ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); $daysofweekshort_lang = array ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); $daysofweekreallyshort_lang = array ('S','M','T','W','T','F','S'); $monthsofyear_lang = array ('January','February','March','April','May','June','July','August','September','October','November','December'); $monthsofyearshort_lang = array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); - - -// Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php -setlocale (LC_TIME, 'dk_DK'); - // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = 'H:i'; @@ -86,4 +81,15 @@ Notes about dateFormat_* us know. We will be happy to modify this if needed. */ +// Error messages - %s will be replaced with a variable +$error_title_lang = 'Error!'; +$error_window_lang = 'There was an error!'; +$error_calendar_lang = 'The calendar "%s" was being processed when this error occurred.'; +$error_path_lang = 'Unable to open the path: "%s"'; +$error_back_lang = 'Please use the "Back" button to return.'; +$error_remotecal_lang = 'This server blocks remote calendars which have not been approved.'; +$error_restrictedcal_lang = 'You have tried to access a calendar that is restricted on this server.'; +$error_invalidcal_lang = 'Invalid calendar file. Please try a different calendar.'; + + ?>
\ No newline at end of file diff --git a/languages/dutch.inc.php b/languages/dutch.inc.php index eb67fa7..5abec6f 100644 --- a/languages/dutch.inc.php +++ b/languages/dutch.inc.php @@ -1,7 +1,7 @@ <?php // Dutch language include -// For version 0.5 PHP iCalendar +// For version 0.6 PHP iCalendar // // Translation by Lieven Gekiere (Lieven@gekiere.com) // @@ -25,7 +25,7 @@ $last_year_lang = 'Vorig Jaar'; $subscribe_lang = 'Abonneer'; $download_lang = 'Download'; $powered_by_lang = 'Gemaakt met'; -$version_lang = '0.5'; +$version_lang = '0.6'; $event_lang = 'Activiteit'; $event_start_lang = 'Start Tijd'; $event_end_lang = 'Eind Tijd'; @@ -47,18 +47,13 @@ $goweek_lang = 'Go to This Week'; $gomonth_lang = 'Go to This Month'; $goyear_lang = 'Go to This Year'; -// Date display since setlocale isnt perfect. // new since last translation +// new since last translation $daysofweek_lang = array ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); $daysofweekshort_lang = array ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); $daysofweekreallyshort_lang = array ('S','M','T','W','T','F','S'); $monthsofyear_lang = array ('January','February','March','April','May','June','July','August','September','October','November','December'); $monthsofyearshort_lang = array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); - - -// Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php -setlocale (LC_TIME, 'nl_BE'); - // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = 'G:i'; @@ -86,4 +81,15 @@ Notes about dateFormat_* us know. We will be happy to modify this if needed. */ +// Error messages - %s will be replaced with a variable +$error_title_lang = 'Error!'; +$error_window_lang = 'There was an error!'; +$error_calendar_lang = 'The calendar "%s" was being processed when this error occurred.'; +$error_path_lang = 'Unable to open the path: "%s"'; +$error_back_lang = 'Please use the "Back" button to return.'; +$error_remotecal_lang = 'This server blocks remote calendars which have not been approved.'; +$error_restrictedcal_lang = 'You have tried to access a calendar that is restricted on this server.'; +$error_invalidcal_lang = 'Invalid calendar file. Please try a different calendar.'; + + ?>
\ No newline at end of file diff --git a/languages/english.inc.php b/languages/english.inc.php index dfd7f6c..d347f5a 100644 --- a/languages/english.inc.php +++ b/languages/english.inc.php @@ -45,17 +45,12 @@ $goweek_lang = 'Go to This Week'; $gomonth_lang = 'Go to This Month'; $goyear_lang = 'Go to This Year'; -// Date display since setlocale isnt perfect. $daysofweek_lang = array ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); $daysofweekshort_lang = array ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); $daysofweekreallyshort_lang = array ('S','M','T','W','T','F','S'); $monthsofyear_lang = array ('January','February','March','April','May','June','July','August','September','October','November','December'); $monthsofyearshort_lang = array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); -// Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php -// These do not work on Mac OS X, but are fine on other builds of *nix. -setlocale (LC_TIME, 'en_EN'); - // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = 'g:i A'; @@ -86,11 +81,11 @@ Notes about dateFormat_* // Error messages - %s will be replaced with a variable $error_title_lang = 'Error!'; $error_window_lang = 'There was an error!'; -$error_calendar_lang = 'The calendar %s caused this error.'; -$error_path_lang = 'Unable to open the path: %s'; +$error_calendar_lang = 'The calendar "%s" was being processed when this error occurred.'; +$error_path_lang = 'Unable to open the path: "%s"'; $error_back_lang = 'Please use the "Back" button to return.'; -$error_remotecal_lang = 'You cannot view remote calendars on this server which are not approved.'; -$error_restrictedcal_lang = 'You have tried to access calendar that is restricted on this server.'; +$error_remotecal_lang = 'This server blocks remote calendars which have not been approved.'; +$error_restrictedcal_lang = 'You have tried to access a calendar that is restricted on this server.'; $error_invalidcal_lang = 'Invalid calendar file. Please try a different calendar.'; ?>
\ No newline at end of file diff --git a/languages/french.inc.php b/languages/french.inc.php index 01bdda8..a3ade1e 100644 --- a/languages/french.inc.php +++ b/languages/french.inc.php @@ -1,7 +1,7 @@ <?php // French language include -// For version 0.5 PHP iCalendar +// For version 0.6 PHP iCalendar // // Translation by La Shampouineuse (info@lashampoo.com) // @@ -25,7 +25,7 @@ $last_year_lang = 'Année précédente'; $subscribe_lang = 'Souscrire'; $download_lang = 'Télécharger'; $powered_by_lang = 'Produit avec'; -$version_lang = '0.5'; +$version_lang = '0.6'; $event_lang = 'Événement'; $event_start_lang = 'Début'; $event_end_lang = 'Fin'; @@ -54,11 +54,6 @@ $daysofweekreallyshort_lang = array ('S','M','T','W','T','F','S'); $monthsofyear_lang = array ('January','February','March','April','May','June','July','August','September','October','November','December'); $monthsofyearshort_lang = array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); - - -// Set Location for date formatting, check out: http://www.php.net/manual/fr/function.setlocale.php -setlocale (LC_TIME,'fr_FR'); - // For time formatting, check out: http://www.php.net/manual/fr/function.date.php $timeFormat = 'H:i'; @@ -86,4 +81,15 @@ Notes about dateFormat_* us know. We will be happy to modify this if needed. */ +// Error messages - %s will be replaced with a variable +$error_title_lang = 'Error!'; +$error_window_lang = 'There was an error!'; +$error_calendar_lang = 'The calendar "%s" was being processed when this error occurred.'; +$error_path_lang = 'Unable to open the path: "%s"'; +$error_back_lang = 'Please use the "Back" button to return.'; +$error_remotecal_lang = 'This server blocks remote calendars which have not been approved.'; +$error_restrictedcal_lang = 'You have tried to access a calendar that is restricted on this server.'; +$error_invalidcal_lang = 'Invalid calendar file. Please try a different calendar.'; + + ?> diff --git a/languages/german.inc.php b/languages/german.inc.php index c11d9d4..4378e6d 100644 --- a/languages/german.inc.php +++ b/languages/german.inc.php @@ -1,7 +1,7 @@ <? // German language include -// For version 0.5 PHP iCalendar +// For version 0.6 PHP iCalendar // // Translation by David Reindl (dre@andare.ch) // @@ -24,7 +24,7 @@ $last_year_lang = 'Vorhergehendes Jahr'; $subscribe_lang = 'Abonnieren'; $download_lang = 'Herunterladen'; $powered_by_lang = 'Powered by'; -$version_lang = '0.5'; +$version_lang = '0.6'; $event_lang = 'Eintrag'; $event_start_lang = 'Beginn'; $event_end_lang = 'Ende'; @@ -88,5 +88,14 @@ Notes about dateFormat_* us know. We will be happy to modify this if needed. */ +// Error messages - %s will be replaced with a variable +$error_title_lang = 'Error!'; +$error_window_lang = 'There was an error!'; +$error_calendar_lang = 'The calendar "%s" was being processed when this error occurred.'; +$error_path_lang = 'Unable to open the path: "%s"'; +$error_back_lang = 'Please use the "Back" button to return.'; +$error_remotecal_lang = 'This server blocks remote calendars which have not been approved.'; +$error_restrictedcal_lang = 'You have tried to access a calendar that is restricted on this server.'; +$error_invalidcal_lang = 'Invalid calendar file. Please try a different calendar.'; ?>
\ No newline at end of file diff --git a/languages/italian.inc.php b/languages/italian.inc.php index 72ec708..a99185d 100644 --- a/languages/italian.inc.php +++ b/languages/italian.inc.php @@ -1,9 +1,10 @@ <? // Italian language include -// For version 0.5 PHP iCalendar +// For version 0.6 PHP iCalendar // -// Translation by Luca Cacciagrano (clooka@clac.it) +// First translation by Luca Cacciagrano (clooka@clac.it) +// Updated translation by Daniele Nicolucci (jollino@discussioni.org) // // Submit new translations to chad@chadsdomain.com @@ -25,38 +26,32 @@ $last_year_lang = 'Anno Precedente'; $subscribe_lang = 'Sottoscrivi'; $download_lang = 'Scarica'; $powered_by_lang = 'Powered by'; -$version_lang = '0.5'; +$version_lang = '0.6'; $event_lang = 'Evento'; $event_start_lang = 'Inizio'; $event_end_lang = 'Fine'; $this_months_lang = 'Eventi di questo mese'; $date_lang = 'Data'; $summary_lang = 'Sommario'; - -// new since last translation -$all_day_lang = 'All day event'; -$notes_lang = 'Notes'; -$this_years_lang = 'This Year\'s Events'; -$today_lang = 'Today'; -$this_week_lang = 'This Week'; -$this_month_lang = 'This Month'; -$jump_lang = 'Jump to'; -$tomorrows_lang = 'Tomorrow\'s Events'; -$goday_lang = 'Go to Today'; -$goweek_lang = 'Go to This Week'; -$gomonth_lang = 'Go to This Month'; -$goyear_lang = 'Go to This Year'; +$all_day_lang = 'Eventi giornalieri'; +$notes_lang = 'Note'; +$this_years_lang = 'Eventi di quest\'anno'; +$today_lang = 'Oggi'; +$this_week_lang = 'Questa settimana'; +$this_month_lang = 'Questo mese'; +$jump_lang = 'Vai a'; +$tomorrows_lang = 'Eventi di domani'; +$goday_lang = 'Vai a oggi'; +$goweek_lang = 'Vai a questa settimana'; +$gomonth_lang = 'Vai a questo mese'; +$goyear_lang = 'Vai a quest\'anno'; // Date display since setlocale isnt perfect. // new since last translation -$daysofweek_lang = array ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); -$daysofweekshort_lang = array ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); -$daysofweekreallyshort_lang = array ('S','M','T','W','T','F','S'); -$monthsofyear_lang = array ('January','February','March','April','May','June','July','August','September','October','November','December'); -$monthsofyearshort_lang = array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); - - -// Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php -setlocale (LC_TIME, 'it_IT'); +$daysofweek_lang = array ('Domenica','Lunedí','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'); +$daysofweekshort_lang = array ('Dom','Lun','Mar','Mer','Gio','Ven','Sab'); +$daysofweekreallyshort_lang = array ('D','L','M','M','G','V','S'); +$monthsofyear_lang = array ('Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'); +$monthsofyearshort_lang = array ('Gen','Feb','Mar','Apr','Mag','Giu','Lug','Ago','Set','Ott','Nov','Dic'); // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = 'G:i'; @@ -65,7 +60,7 @@ $timeFormat = 'G:i'; $dateFormat_day = '%A, %e %B'; $dateFormat_week = '%e %B'; $dateFormat_week_list = '%a, %e %b'; -$dateFormat_week_jump = '%b %e';// new since last translation +$dateFormat_week_jump = '%e %B'; $dateFormat_month = '%B %Y'; $dateFormat_month_list = '%A, %e %B'; @@ -85,4 +80,15 @@ Notes about dateFormat_* us know. We will be happy to modify this if needed. */ -?>
\ No newline at end of file +// Error messages - %s will be replaced with a variable +$error_title_lang = 'Error!'; +$error_window_lang = 'There was an error!'; +$error_calendar_lang = 'The calendar "%s" was being processed when this error occurred.'; +$error_path_lang = 'Unable to open the path: "%s"'; +$error_back_lang = 'Please use the "Back" button to return.'; +$error_remotecal_lang = 'This server blocks remote calendars which have not been approved.'; +$error_restrictedcal_lang = 'You have tried to access a calendar that is restricted on this server.'; +$error_invalidcal_lang = 'Invalid calendar file. Please try a different calendar.'; + + +?> diff --git a/languages/japanese.inc.php b/languages/japanese.inc.php index 4377536..0af3d78 100644 --- a/languages/japanese.inc.php +++ b/languages/japanese.inc.php @@ -1,7 +1,7 @@ <?php // English language include -// For version 0.5 PHP iCalendar +// For version 0.6 PHP iCalendar // // Translation by Jared Wangen (jared@silter.org) // With the help of Eri Hayashiguchi @@ -28,7 +28,7 @@ $download_lang = 'ダウンãƒãƒ¼ãƒ‰'; $published_lang = '公開日:'; $powered_by_lang = 'Powered by'; -$version_lang = '0.5'; +$version_lang = '0.6'; $event_lang = '件å'; $event_start_lang = '開始日'; $event_end_lang = '終了日'; @@ -47,11 +47,11 @@ $this_month_lang = '今月'; $this_year_lang = '今年'; $jump_lang = 'Jump to'; -$tomorrows_lang = 'Tomorrow\'s Events'; -$goday_lang = 'Go to Today'; -$goweek_lang = 'Go to This Week'; -$gomonth_lang = 'Go to This Month'; -$goyear_lang = 'Go to This Year'; +$tomorrows_lang = '翌日ã®äºˆå®š'; +$goday_lang = '今日ã«è¡Œã'; +$goweek_lang = '今週ã«è¡Œã'; +$gomonth_lang = '今月ã«è¡Œã'; +$goyear_lang = '今年ã«è¡Œã'; $daysofweek_lang = array ('日曜日','月曜日','ç«æ›œæ—¥','水曜日','木曜日','金曜日','土曜日'); $daysofweekshort_lang = array ('日曜','月曜','ç«æ›œ','水曜','木曜','金曜','土曜'); @@ -89,4 +89,15 @@ Notes about dateFormat_* us know. We will be happy to modify this if needed. */ +// Error messages - %s will be replaced with a variable +$error_title_lang = 'Error!'; +$error_window_lang = 'é–“é•ã„ãŒã‚ã£ãŸ!'; +$error_calendar_lang = 'The calendar "%s" was being processed when this error occurred.'; +$error_path_lang = 'Unable to open the path: "%s"'; +$error_back_lang = 'Please use the "Back" button to return.'; +$error_remotecal_lang = 'ã“ã®ã‚µãƒ¼ãƒãƒ¼ã¯é 隔カレンダーを妨ã’る承èªã•ã‚Œãªã‹ã£ãŸã€‚'; +$error_restrictedcal_lang = 'ã‚ãªãŸã¯ã‚«ãƒ¬ãƒ³ãƒ€ãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã‚’試ã¿ãŸã“ã®ã‚µãƒ¼ãƒãƒ¼ã§ é™ã‚‰ã‚Œã¦ã„ã‚‹'; +$error_invalidcal_lang = 'カレンダーファイルã¯ç„¡åŠ¹ã§ã‚ã‚‹ã“ã¨ã€‚ 別ã®ã‚«ãƒ¬ãƒ³ãƒ€ãƒ¼ã‚’試ã¿ãªã•ã„。'; + + ?>
\ No newline at end of file diff --git a/languages/norwegian.inc.php b/languages/norwegian.inc.php index 4cfd037..e60bbf8 100644 --- a/languages/norwegian.inc.php +++ b/languages/norwegian.inc.php @@ -1,7 +1,7 @@ <?php // Norwegian language include -// For version 0.5 PHP iCalendar +// For version 0.6 PHP iCalendar // // Translation by Geir Kielland (geir.kielland@jus.uio.no) // @@ -25,7 +25,7 @@ $last_year_lang = 'Forrige År'; $subscribe_lang = 'Abonnér'; $download_lang = 'Last Ned'; $powered_by_lang = 'Powered by'; -$version_lang = '0.5'; +$version_lang = '0.6'; $event_lang = 'Hendelse'; $event_start_lang = 'Start Tid'; $event_end_lang = 'Slutt Tid'; @@ -34,8 +34,6 @@ $date_lang = 'Dato'; $summary_lang = 'Sammendrag'; $all_day_lang = 'Hele dagen'; $notes_lang = 'Notater'; - -// new since last translation $this_years_lang = 'Hendelser dette året'; $today_lang = 'I dag'; $this_week_lang = 'Denne uken'; @@ -47,7 +45,6 @@ $goweek_lang = 'Gå til denne uken'; $gomonth_lang = 'Gå til denne måneden'; $goyear_lang = 'Gå til dette året'; -// Date display since setlocale isnt perfect. // new since last translation $daysofweek_lang = array('Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'); $daysofweekshort_lang = array ('Søn','Man','Tir','Ons','Tor','Fre','Lør'); $daysofweekreallyshort_lang = array ('S','M','T','O','T','F','L'); @@ -55,9 +52,6 @@ $monthsofyear_lang = array ('Januar','Februar','Mars','April','Mai','Juni','Ju $monthsofyearshort_lang = array ('Jan','Feb','Mar','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Des'); -// Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php -setlocale (LC_TIME, 'no_NO'); - // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = 'H:i'; @@ -65,7 +59,7 @@ $timeFormat = 'H:i'; $dateFormat_day = '%A, %e. %B '; $dateFormat_week = '%e. %B'; $dateFormat_week_list = '%a, %e. %b'; -$dateFormat_week_jump = '%b %e'; // new since last translation +$dateFormat_week_jump = '%b %e'; $dateFormat_month = '%B %Y'; $dateFormat_month_list = '%A, %e. %B'; @@ -85,4 +79,15 @@ Notes about dateFormat_* us know. We will be happy to modify this if needed. */ +// Error messages - %s will be replaced with a variable +$error_title_lang = 'Error!'; +$error_window_lang = 'There was an error!'; +$error_calendar_lang = 'The calendar "%s" was being processed when this error occurred.'; +$error_path_lang = 'Unable to open the path: "%s"'; +$error_back_lang = 'Please use the "Back" button to return.'; +$error_remotecal_lang = 'This server blocks remote calendars which have not been approved.'; +$error_restrictedcal_lang = 'You have tried to access a calendar that is restricted on this server.'; +$error_invalidcal_lang = 'Invalid calendar file. Please try a different calendar.'; + + ?> diff --git a/languages/polish.inc.php b/languages/polish.inc.php index 5e94142..c837646 100644 --- a/languages/polish.inc.php +++ b/languages/polish.inc.php @@ -1,7 +1,7 @@ <? // Polish language include -// For version 0.5 PHP iCalendar +// For version 0.6 PHP iCalendar // // Translation by Stanislaw Cieslicki (stahoo@poczta.onet.pl) // @@ -25,7 +25,7 @@ $last_year_lang = 'ZeszÅ‚y rok'; $subscribe_lang = 'Subskrybuj'; $download_lang = 'Pobież'; $powered_by_lang = 'Powered by'; -$version_lang = '0.5'; +$version_lang = '0.6'; $event_lang = 'Zadanie'; $event_start_lang = 'PoczÄ…tek'; $event_end_lang = 'Koniec'; @@ -47,17 +47,12 @@ $goweek_lang = 'Go to This Week'; $gomonth_lang = 'Go to This Month'; $goyear_lang = 'Go to This Year'; -// Date display since setlocale isnt perfect. $daysofweek_lang = array ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); $daysofweekshort_lang = array ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); $daysofweekreallyshort_lang = array ('S','M','T','W','T','F','S'); $monthsofyear_lang = array ('January','February','March','April','May','June','July','August','September','October','November','December'); $monthsofyearshort_lang = array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); - -// Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php -setlocale (LC_TIME, 'pl_PL'); - // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = 'G:i'; @@ -85,4 +80,14 @@ Notes about $dateFormat_* us know. We will be happy to modify this if needed. */ +// Error messages - %s will be replaced with a variable +$error_title_lang = 'Error!'; +$error_window_lang = 'There was an error!'; +$error_calendar_lang = 'The calendar "%s" was being processed when this error occurred.'; +$error_path_lang = 'Unable to open the path: "%s"'; +$error_back_lang = 'Please use the "Back" button to return.'; +$error_remotecal_lang = 'This server blocks remote calendars which have not been approved.'; +$error_restrictedcal_lang = 'You have tried to access a calendar that is restricted on this server.'; +$error_invalidcal_lang = 'Invalid calendar file. Please try a different calendar.'; + ?>
\ No newline at end of file diff --git a/languages/spanish.inc.php b/languages/spanish.inc.php new file mode 100644 index 0000000..2889897 --- /dev/null +++ b/languages/spanish.inc.php @@ -0,0 +1,94 @@ +<? + +// Spanish language include +// For version 0.6 PHP iCalendar +// +// Translation by XIPS (buzon@xips.es) +// +// Submit new translations to chad@chadsdomain.com + + + +$day_lang = "Día"; +$week_lang = "Semana"; +$month_lang = "Mes"; +$year_lang = "Año"; +$calendar_lang = "Calendario"; +$next_day_lang = "Día siguiente"; +$next_month_lang = "Mes siguiente"; +$next_week_lang = "Semana siguiente"; +$next_year_lang = "Año siguiente"; +$last_day_lang = "Día anterior"; +$last_month_lang = "Mes anterior"; +$last_week_lang = "Semana anterior"; +$last_year_lang = "Año anterior"; +$subscribe_lang = "Suscribir"; +$download_lang = "Descargar"; +$powered_by_lang = "Powered by"; +$version_lang = "0.6"; + +// from here down, translate +$event_lang = 'Event'; +$event_start_lang = 'Start Time'; +$event_end_lang = 'End Time'; +$this_months_lang = 'This Month\'s Events'; +$date_lang = 'Date'; +$summary_lang = 'Summary'; +$all_day_lang = 'All day event'; +$notes_lang = 'Notes'; +$this_years_lang = 'This Year\'s Events'; +$today_lang = 'Today'; +$this_week_lang = 'This Week'; +$this_month_lang = 'This Month'; +$jump_lang = 'Jump to'; +$tomorrows_lang = 'Tomorrow\'s Events'; +$goday_lang = 'Go to Today'; +$goweek_lang = 'Go to This Week'; +$gomonth_lang = 'Go to This Month'; +$goyear_lang = 'Go to This Year'; + +$daysofweek_lang = array ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); +$daysofweekshort_lang = array ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); +$daysofweekreallyshort_lang = array ('S','M','T','W','T','F','S'); +$monthsofyear_lang = array ('January','February','March','April','May','June','July','August','September','October','November','December'); +$monthsofyearshort_lang = array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); + +// For time formatting, check out: http://www.php.net/manual/en/function.date.php +$timeFormat = 'g:i A'; + +// For date formatting, see note below +$dateFormat_day = '%A, %B %e'; +$dateFormat_week = '%B %e'; +$dateFormat_week_list = '%a, %b %e'; +$dateFormat_week_jump = '%b %e'; +$dateFormat_month = '%B %Y'; +$dateFormat_month_list = '%A, %B %e'; + +/* +Notes about dateFormat_* + The pieces are similar to that of the PHP function strftime(), + however only the following is supported at this time: + + %A - the full week day name as specified in $daysofweek_lang + %a - the shortened week day name as specified in $daysofweekshort_lang + %B - the full month name as specified in $monthsofyear_lang + %b - the shortened month name as specified in $monthsofyearshort_lang + %e - the day of the month as a decimal number (1 to 31) + %Y - the 4-digit year + + If this causes problems with representing your language accurately, let + us know. We will be happy to modify this if needed. +*/ + +// Error messages - %s will be replaced with a variable +$error_title_lang = 'Error!'; +$error_window_lang = 'There was an error!'; +$error_calendar_lang = 'The calendar "%s" was being processed when this error occurred.'; +$error_path_lang = 'Unable to open the path: "%s"'; +$error_back_lang = 'Please use the "Back" button to return.'; +$error_remotecal_lang = 'This server blocks remote calendars which have not been approved.'; +$error_restrictedcal_lang = 'You have tried to access a calendar that is restricted on this server.'; +$error_invalidcal_lang = 'Invalid calendar file. Please try a different calendar.'; + + +?> |