Commit 1c904706 authored by Robert Rollins's avatar Robert Rollins

All the user-visible strings should now be t()'d.

parent a2e652a3
......@@ -11,7 +11,7 @@
function date_ical_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time
// Ensure translations don't break at install time.
$t = get_t();
switch ($phase) {
......
......@@ -118,8 +118,8 @@ function date_ical_entity_info_alter(&$entity_info) {
function date_ical_libraries_info() {
$libraries['iCalcreator'] = array(
'name' => 'iCalcreator',
'vendor url' => 'http://kigkonsult.se/iCalcreator/index.php',
'download url' => 'http://kigkonsult.se/downloads/index.php#icalcreator',
'vendor url' => 'http://github.com/iCalcreator/iCalcreator',
'download url' => 'http://github.com/iCalcreator/iCalcreator',
'version arguments' => array(
'file' => 'iCalcreator.class.php',
'pattern' => "/define\( 'ICALCREATOR_VERSION', 'iCalcreator ([\d\.]+)' \);/",
......@@ -159,7 +159,7 @@ function date_ical_feeds_plugins() {
);
$info['DateIcalIcalcreatorParser'] = array(
'name' => 'iCal parser',
'description' => 'Use the iCalcreator library to parse iCal feeds.',
'description' => t('Use the iCalcreator library to parse iCal feeds.'),
'help' => 'Parse iCal feeds.',
'handler' => array(
'parent' => 'DateIcalFeedsParser',
......
......@@ -17,56 +17,56 @@ class DateIcalIcalcreatorParser extends DateIcalFeedsParser {
*/
static protected $sources = array(
'summary' => array(
'name' => 'Summary',
'description' => 'A short summary, or title, for the calendar component.',
'name' => t('Summary'),
'description' => t('A short summary, or title, for the calendar component.'),
'date_ical_parse_handler' => 'formatText',
),
'description' => array(
'name' => 'Description',
'description' => 'A more complete description of the calendar component than that provided by the "summary" property.',
'name' => t('Description'),
'description' => t('A more complete description of the calendar component than that provided by the "summary" property.'),
'date_ical_parse_handler' => 'formatText',
),
'dtstart' => array(
'name' => 'Date start',
'description' => 'Start time for the feed item.
If also using the "Date end" source, this MUST come before it in the mapping, due to the way iCal feeds are formatted.',
'name' => t('Date start'),
'description' => t('Start time for the feed item.
If also using the "Date end" source, this MUST come before it in the mapping, due to the way iCal feeds are formatted.'),
'date_ical_parse_handler' => 'formatDateTime',
),
'dtend' => array(
'name' => 'Date end',
'description' => 'End time for the feed item.',
'name' => t('Date end'),
'description' => t('End time for the feed item.'),
'date_ical_parse_handler' => 'formatDateTime',
),
'rrule' => array(
'name' => 'Repeat rule',
'description' => 'Describes when and how often this calendar component should repeat.
'name' => t('Repeat rule'),
'description' => ('Describes when and how often this calendar component should repeat.
The date field for the target node must be configrred to support repeating dates, using the Date Repeat Field module (a submodule of Date).
When using this source field, it MUST come after Date start (and Date end, if used) in the mapping.',
When using this source field, it MUST come after Date start (and Date end, if used) in the mapping.'),
'date_ical_parse_handler' => 'formatRrule',
),
'uid' => array(
'name' => 'UID',
'description' => 'UID of feed item',
'description' => t('UID of feed item'),
'date_ical_parse_handler' => 'formatText',
),
'url' => array(
'name' => 'URL',
'description' => 'URL for the feed item.',
'description' => t('URL for the feed item.'),
'date_ical_parse_handler' => 'formatText',
),
'location' => array(
'name' => 'Location text',
'description' => 'Text of the location property of the feed item.',
'name' => t('Location text'),
'description' => t('Text of the location property of the feed item.'),
'date_ical_parse_handler' => 'formatText',
),
'location:altrep' => array(
'name' => 'Location alternate representation',
'description' => 'Additional location information, usually a URL to a page with more info.',
'name' => t('Location alternate representation'),
'description' => t('Additional location information, usually a URL to a page with more info.'),
'date_ical_parse_handler' => 'formatParamText',
),
'categories' => array(
'name' => 'Categories',
'description' => 'Catagories of the feed item.',
'name' => t('Categories'),
'description' => t('Catagories of the feed item.'),
'date_ical_parse_handler' => 'formatCategories',
),
);
......@@ -280,8 +280,8 @@ class DateIcalIcalcreatorParser extends DateIcalFeedsParser {
$tz = new DateTimeZone($date_array['tz']);
}
catch (Exception $e) {
$source->log('parse', '"%tzid" is not recognized by PHP as a valid timezone, so UTC was used instead. Try implementing hook_date_ical_timezone_alter() in a custom module to fix this problem.',
array('%tzid' => $date_array['tz']), WATCHDOG_WARNING);
$source->log('parse', t('"%tzid" is not recognized by PHP as a valid timezone, so UTC was used instead. Try implementing hook_date_ical_timezone_alter() in a custom module to fix this problem.',
array('%tzid' => $date_array['tz'])), array(), WATCHDOG_WARNING);
drupal_set_message(t('"%tzid" is not recognized by PHP as a valid timezone, so UTC was used instead. Try implementing hook_date_ical_timezone_alter() in a custom module to fix this problem.',
array('%tzid' => $date_array['tz'])), 'warning');
}
......
......@@ -59,9 +59,8 @@ class date_ical_plugin_style_ical_feed extends views_plugin_style {
'#type' => 'textfield',
'#title' => t('iCal Calendar Name'),
'#default_value' => $this->_get_option('cal_name'),
'#description' => t('This will appear as the title of the iCal feed. If ' .
'left blank, the View Title will be used. If that is also blank, the site ' .
'name will be inserted as the iCal feed title.'),
'#description' => t('This will appear as the title of the iCal feed. If left blank, the View Title will be used.
If that is also blank, the site name will be inserted as the iCal feed title.'),
);
$form['no_calname'] = array(
'#type' => 'checkbox',
......@@ -196,8 +195,9 @@ class date_ical_plugin_style_ical_feed extends views_plugin_style {
module_load_include('inc', 'date_api', 'date_api_ical');
module_load_include('inc', 'date_repeat', 'date_repeat_calc');
list($rrule, $exceptions, $additions) = date_repeat_split_rrule($event['rrule']);
// Add the rrule itself. We need to massage the data a bit, since iCalcreator expects RRULEs to be
// in a different format than the Date API gives them to us.
// Add the rrule itself. We need to massage the data a bit, since
// iCalcreator expects RRULEs to be in a different format than how
// Date API gives them to us.
$rrule = self::convert_rrule_for_icalcreator($rrule);
$vevent->setRrule($rrule);
// Process exceptions if there are any.
......@@ -304,7 +304,7 @@ class date_ical_plugin_style_ical_feed extends views_plugin_style {
}
else {
// The iCalcreator library isn't available, so we can't output anything.
$output = 'Please install the iCalcreator library to enable iCal output.';
$output = t('Please install the iCalcreator library to enable iCal output.');
}
// These steps shouldn't be run when doing a Preview on the View config page.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment