Revision: 2270
http://mrbs.svn.sourceforge.net/mrbs/?rev=2270&view=rev
Author: cimorrison
Date: 2012-01-29 18:08:46 +0000 (Sun, 29 Jan 2012)
Log Message:
-----------
Added some comments and internationalised some text strings
Modified Paths:
--------------
mrbs/trunk/web/functions_ical.inc
mrbs/trunk/web/import.php
mrbs/trunk/web/lang.en
Modified: mrbs/trunk/web/functions_ical.inc
===================================================================
--- mrbs/trunk/web/functions_ical.inc 2012-01-29 17:47:35 UTC (rev 2269)
+++ mrbs/trunk/web/functions_ical.inc 2012-01-29 18:08:46 UTC (rev 2270)
@@ -349,6 +349,7 @@
// Given an RFC 5545 recurrence rule, returns an array giving the MRBS repeat
// details. Indexed by rep_type, rep_num_weeks, rep_opt, end_date
+// Returns FALSE on failure with error messahes being returned in the array
$errors
function get_repeat_details($rrule, $start_time, &$errors)
{
global $RFC_5545_days;
Modified: mrbs/trunk/web/import.php
===================================================================
--- mrbs/trunk/web/import.php 2012-01-29 17:47:35 UTC (rev 2269)
+++ mrbs/trunk/web/import.php 2012-01-29 18:08:46 UTC (rev 2270)
@@ -6,6 +6,9 @@
require_once "mrbs_sql.inc";
+// Gets the id of the area/room with the LOCATION property value of $location,
+// creating an area and room if allowed.
+// Returns FALSE if it can't find an id or create an id, with an error message
in $error
function get_room_id($location, &$error)
{
global $area_room_order, $area_room_delimiter, $area_room_create;
@@ -46,12 +49,12 @@
}
elseif ($count == 0)
{
- $error = "Room '$location_room' does not exist and cannot be added - no
area given.";
+ $error = "'$location_room': " . get_vocab("room_does_not_exist_no_area");
return FALSE;
}
elseif ($count > 1)
{
- $error = "There is more than one room called '$location_room'. Cannot
choose which one without an area.";
+ $error = "'$location_room': " . get_vocab("room_not_unique_no_area");
return FALSE;
}
else // we've got a unique room name
@@ -146,6 +149,7 @@
}
+// Add a VEVENT to MRBS. Returns TRUE on success, FALSE on failure
function process_event($vevent)
{
global $import_default_type, $skip;
Modified: mrbs/trunk/web/lang.en
===================================================================
--- mrbs/trunk/web/lang.en 2012-01-29 17:47:35 UTC (rev 2269)
+++ mrbs/trunk/web/lang.en 2012-01-29 18:08:46 UTC (rev 2270)
@@ -417,48 +417,50 @@
$vocab["for_any_questions"] = "for any questions that aren't answered here.";
// Used in import.php
-$vocab["import_icalendar"] = "Import an iCalendar file";
-$vocab["area_room_settings"] = "Areas and rooms";
-$vocab["other_settings"] = "Other settings";
-$vocab["import_intro"] = "This form allows you to import an RFC
5545 compliant " .
- "iCalendar file into MRBS. Only those
repeating events " .
- "that have a recurrence rule with an
equivalent repeat type in " .
- "MRBS will be imported.";
-$vocab["file_name"] = "File";
-$vocab["import"] = "Import";
-$vocab["upload_failed"] = "Upload failed";
-$vocab["max_allowed_file_size"] = "The maximum allowed file size is";
-$vocab["no_file"] = "No file was uploaded";
-$vocab["badly_formed_ics"] = "Badly formed VCALENDAR file";
-$vocab["area_room_order"] = "Order";
-$vocab["area_room_order_note"] = "The order of the area and room names in
the LOCATION property";
-$vocab["area_room"] = "Area-Room";
-$vocab["room_area"] = "Room-Area";
-$vocab["area_room_delimiter"] = "Delimiter";
-$vocab["area_room_delimiter_note"] = "The string separating the area and room
names in the LOCATION property. " .
- "If no delimiter is found MRBS will look
for a unique room with the same " .
- "name as the LOCATION";
-$vocab["area_room_create"] = "Create rooms if necessary";
-$vocab["default_type"] = "Default type";
-$vocab["area_does_not_exist"] = "Non-existent area:";
-$vocab["room_does_not_exist"] = "Non-existent room:";
-$vocab["creating_new_area"] = "Creating new area:";
-$vocab["creating_new_room"] = "Creating new room:";
-$vocab["could_not_create_area"] = "Could not create area";
-$vocab["could_not_create_room"] = "Could not create room";
-$vocab["could_not_find_room"] = "Could not find room";
-$vocab["could_not_import"] = "Could not import";
-$vocab["no_LOCATION"] = "The VEVENT did not include a LOCATION
property";
-$vocab["invalid_RRULE"] = "Invalid RRULE: missing FREQ part";
-$vocab["more_than_one_BYDAY"] = "MRBS does not support more than one
BYDAY value when FREQ=";
-$vocab["negative_BYDAY"] = "MRBS does not support negative BYDAY
values";
-$vocab["BYDAY_equals_5"] = "MRBS does not support a BYDAY value of
5";
-$vocab["unsupported_FREQ"] = "MRBS does not support FREQ=";
-$vocab["unsupported_INTERVAL"] = "MRBS does not support INTERVAL>1 with
FREQ=";
-$vocab["unsupported_COUNT"] = "COUNT not yet supported by MRBS";
-$vocab["no_indefinite_repeats"] = "Indefinite repeats not yet supported by
MRBS";
-$vocab["events_imported"] = "events imported";
-$vocab["events_not_imported"] = "events not imported";
+$vocab["import_icalendar"] = "Import an iCalendar file";
+$vocab["area_room_settings"] = "Areas and rooms";
+$vocab["other_settings"] = "Other settings";
+$vocab["import_intro"] = "This form allows you to import an RFC
5545 compliant " .
+ "iCalendar file into MRBS. Only
those repeating events " .
+ "that have a recurrence rule with an
equivalent repeat type in " .
+ "MRBS will be imported.";
+$vocab["file_name"] = "File";
+$vocab["import"] = "Import";
+$vocab["upload_failed"] = "Upload failed";
+$vocab["max_allowed_file_size"] = "The maximum allowed file size is";
+$vocab["no_file"] = "No file was uploaded";
+$vocab["badly_formed_ics"] = "Badly formed VCALENDAR file";
+$vocab["area_room_order"] = "Order";
+$vocab["area_room_order_note"] = "The order of the area and room names
in the LOCATION property";
+$vocab["area_room"] = "Area-Room";
+$vocab["room_area"] = "Room-Area";
+$vocab["area_room_delimiter"] = "Delimiter";
+$vocab["area_room_delimiter_note"] = "The string separating the area and
room names in the LOCATION property. " .
+ "If no delimiter is found MRBS will
look for a unique room with the same " .
+ "name as the LOCATION";
+$vocab["area_room_create"] = "Create rooms if necessary";
+$vocab["default_type"] = "Default type";
+$vocab["room_does_not_exist_no_area"] = "room does not exist and cannot be
added - no area given";
+$vocab["room_not_unique_no_area"] = "room name is not unique. Cannot
choose which one without an area.";
+$vocab["area_does_not_exist"] = "Non-existent area:";
+$vocab["room_does_not_exist"] = "Non-existent room:";
+$vocab["creating_new_area"] = "Creating new area:";
+$vocab["creating_new_room"] = "Creating new room:";
+$vocab["could_not_create_area"] = "Could not create area";
+$vocab["could_not_create_room"] = "Could not create room";
+$vocab["could_not_find_room"] = "Could not find room";
+$vocab["could_not_import"] = "Could not import";
+$vocab["no_LOCATION"] = "The VEVENT did not include a LOCATION
property";
+$vocab["invalid_RRULE"] = "Invalid RRULE: missing FREQ part";
+$vocab["more_than_one_BYDAY"] = "MRBS does not support more than one
BYDAY value when FREQ=";
+$vocab["negative_BYDAY"] = "MRBS does not support negative BYDAY
values";
+$vocab["BYDAY_equals_5"] = "MRBS does not support a BYDAY value
of 5";
+$vocab["unsupported_FREQ"] = "MRBS does not support FREQ=";
+$vocab["unsupported_INTERVAL"] = "MRBS does not support INTERVAL>1 with
FREQ=";
+$vocab["unsupported_COUNT"] = "COUNT not yet supported by MRBS";
+$vocab["no_indefinite_repeats"] = "Indefinite repeats not yet supported
by MRBS";
+$vocab["events_imported"] = "events imported";
+$vocab["events_not_imported"] = "events not imported";
// Used in mysql.inc AND pgsql.inc
$vocab["failed_connect_db"] = "Fatal error: failed to connect to database";
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits