CC-1960: Internationalize Airtime / Support translations

-added gettext wrapper functions for all strings in view/scripts, and forms
This commit is contained in:
denise 2012-11-15 10:59:06 -05:00
parent f0e2d5d295
commit b173b6dda4
78 changed files with 481 additions and 423 deletions

View File

@ -31,6 +31,17 @@ Zend_Validate::setDefaultNamespaces("Zend");
$front = Zend_Controller_Front::getInstance(); $front = Zend_Controller_Front::getInstance();
$front->registerPlugin(new RabbitMqPlugin()); $front->registerPlugin(new RabbitMqPlugin());
//localization configuration
$lang = 'en_US.utf8';
putenv("LC_ALL=$lang");
putenv("LANG=$lang");
$res = setlocale(LC_MESSAGES, $lang);
$domain = 'airtime';
bindtextdomain($domain, '/usr/share/airtime/locale');
textdomain($domain);
bind_textdomain_codeset($domain,'UTF-8');
/* The bootstrap class should only be used to initialize actions that return a view. /* The bootstrap class should only be used to initialize actions that return a view.
Actions that return JSON will not use the bootstrap class! */ Actions that return JSON will not use the bootstrap class! */

View File

@ -23,7 +23,7 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
$text->setAttrib('class', 'input_text'); $text->setAttrib('class', 'input_text');
$text->addFilter('StringTrim'); $text->addFilter('StringTrim');
$text->addValidator('date', false, array('HH:mm')); $text->addValidator('date', false, array('HH:mm'));
$text->addValidator('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => 'Invalid character entered')); $text->addValidator('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => _('Invalid character entered')));
$text->setRequired(false); $text->setRequired(false);
$text->setDecorators(array('ViewHelper')); $text->setDecorators(array('ViewHelper'));
$this->addElement($text); $this->addElement($text);
@ -55,12 +55,12 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
} }
if (trim($day) == "") { if (trim($day) == "") {
$this->getElement('add_show_rebroadcast_date_absolute_'.$i)->setErrors(array("Day must be specified")); $this->getElement('add_show_rebroadcast_date_absolute_'.$i)->setErrors(array(_("Day must be specified")));
$valid = false; $valid = false;
} }
if (trim($time) == "") { if (trim($time) == "") {
$this->getElement('add_show_rebroadcast_time_absolute_'.$i)->setErrors(array("Time must be specified")); $this->getElement('add_show_rebroadcast_time_absolute_'.$i)->setErrors(array(_("Time must be specified")));
$valid = false; $valid = false;
} }
@ -83,7 +83,7 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
$rebroad_start = new DateTime($rebroad_start); $rebroad_start = new DateTime($rebroad_start);
if ($rebroad_start < $show_end) { if ($rebroad_start < $show_end) {
$this->getElement('add_show_rebroadcast_time_absolute_'.$i)->setErrors(array("Must wait at least 1 hour to rebroadcast")); $this->getElement('add_show_rebroadcast_time_absolute_'.$i)->setErrors(array(_("Must wait at least 1 hour to rebroadcast")));
$valid = false; $valid = false;
$noError = false; $noError = false;
} }

View File

@ -7,13 +7,13 @@ class Application_Form_AddShowLiveStream extends Zend_Form_SubForm
public function init() public function init()
{ {
$cb_airtime_auth = new Zend_Form_Element_Checkbox("cb_airtime_auth"); $cb_airtime_auth = new Zend_Form_Element_Checkbox("cb_airtime_auth");
$cb_airtime_auth->setLabel("Use Airtime Authentication:") $cb_airtime_auth->setLabel(_("Use Airtime Authentication:"))
->setRequired(false) ->setRequired(false)
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($cb_airtime_auth); $this->addElement($cb_airtime_auth);
$cb_custom_auth = new Zend_Form_Element_Checkbox("cb_custom_auth"); $cb_custom_auth = new Zend_Form_Element_Checkbox("cb_custom_auth");
$cb_custom_auth ->setLabel("Use Custom Authentication:") $cb_custom_auth ->setLabel(_("Use Custom Authentication:"))
->setRequired(false) ->setRequired(false)
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($cb_custom_auth); $this->addElement($cb_custom_auth);
@ -23,7 +23,7 @@ class Application_Form_AddShowLiveStream extends Zend_Form_SubForm
$custom_username->setAttrib('class', 'input_text') $custom_username->setAttrib('class', 'input_text')
->setAttrib('autocomplete', 'off') ->setAttrib('autocomplete', 'off')
->setAllowEmpty(true) ->setAllowEmpty(true)
->setLabel('Custom Username') ->setLabel(_('Custom Username'))
->setFilters(array('StringTrim')) ->setFilters(array('StringTrim'))
->setValidators(array( ->setValidators(array(
new ConditionalNotEmpty(array("cb_custom_auth"=>"1")))) new ConditionalNotEmpty(array("cb_custom_auth"=>"1"))))
@ -36,7 +36,7 @@ class Application_Form_AddShowLiveStream extends Zend_Form_SubForm
->setAttrib('autocomplete', 'off') ->setAttrib('autocomplete', 'off')
->setAttrib('renderPassword','true') ->setAttrib('renderPassword','true')
->setAllowEmpty(true) ->setAllowEmpty(true)
->setLabel('Custom Password') ->setLabel(_('Custom Password'))
->setFilters(array('StringTrim')) ->setFilters(array('StringTrim'))
->setValidators(array( ->setValidators(array(
new ConditionalNotEmpty(array("cb_custom_auth"=>"1")))) new ConditionalNotEmpty(array("cb_custom_auth"=>"1"))))
@ -60,12 +60,12 @@ class Application_Form_AddShowLiveStream extends Zend_Form_SubForm
if ($data['cb_custom_auth'] == 1) { if ($data['cb_custom_auth'] == 1) {
if (trim($data['custom_username']) == '') { if (trim($data['custom_username']) == '') {
$element = $this->getElement("custom_username"); $element = $this->getElement("custom_username");
$element->addError("Username field cannot be empty."); $element->addError(_("Username field cannot be empty."));
$isValid = false; $isValid = false;
} }
if (trim($data['custom_password']) == '') { if (trim($data['custom_password']) == '') {
$element = $this->getElement("custom_password"); $element = $this->getElement("custom_password");
$element->addError("Password field cannot be empty."); $element->addError(_("Password field cannot be empty."));
$isValid = false; $isValid = false;
} }
} }

View File

@ -7,13 +7,13 @@ class Application_Form_AddShowRR extends Zend_Form_SubForm
{ {
// Add record element // Add record element
$this->addElement('checkbox', 'add_show_record', array( $this->addElement('checkbox', 'add_show_record', array(
'label' => 'Record from Line In?', 'label' => _('Record from Line In?'),
'required' => false, 'required' => false,
)); ));
// Add record element // Add record element
$this->addElement('checkbox', 'add_show_rebroadcast', array( $this->addElement('checkbox', 'add_show_rebroadcast', array(
'label' => 'Rebroadcast?', 'label' => _('Rebroadcast?'),
'required' => false, 'required' => false,
)); ));
} }

View File

@ -28,7 +28,7 @@ class Application_Form_AddShowRebroadcastDates extends Zend_Form_SubForm
$text->setAttrib('class', 'input_text'); $text->setAttrib('class', 'input_text');
$text->addFilter('StringTrim'); $text->addFilter('StringTrim');
$text->addValidator('date', false, array('HH:mm')); $text->addValidator('date', false, array('HH:mm'));
$text->addValidator('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => 'Invalid character entered')); $text->addValidator('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => _('Invalid character entered')));
$text->setRequired(false); $text->setRequired(false);
$text->setDecorators(array('ViewHelper')); $text->setDecorators(array('ViewHelper'));
$this->addElement($text); $this->addElement($text);
@ -60,12 +60,12 @@ class Application_Form_AddShowRebroadcastDates extends Zend_Form_SubForm
} }
if (trim($days) == "") { if (trim($days) == "") {
$this->getElement('add_show_rebroadcast_date_'.$i)->setErrors(array("Day must be specified")); $this->getElement('add_show_rebroadcast_date_'.$i)->setErrors(array(_("Day must be specified")));
$valid = false; $valid = false;
} }
if (trim($time) == "") { if (trim($time) == "") {
$this->getElement('add_show_rebroadcast_time_'.$i)->setErrors(array("Time must be specified")); $this->getElement('add_show_rebroadcast_time_'.$i)->setErrors(array(_("Time must be specified")));
$valid = false; $valid = false;
} }
@ -92,7 +92,7 @@ class Application_Form_AddShowRebroadcastDates extends Zend_Form_SubForm
$rebroad_start->add(new DateInterval("P".$day."D")); $rebroad_start->add(new DateInterval("P".$day."D"));
if ($rebroad_start < $show_end) { if ($rebroad_start < $show_end) {
$this->getElement('add_show_rebroadcast_time_'.$i)->setErrors(array("Must wait at least 1 hour to rebroadcast")); $this->getElement('add_show_rebroadcast_time_'.$i)->setErrors(array(_("Must wait at least 1 hour to rebroadcast")));
$valid = false; $valid = false;
$noError = false; $noError = false;
} }

View File

@ -8,7 +8,7 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
//Add type select //Add type select
$this->addElement('select', 'add_show_repeat_type', array( $this->addElement('select', 'add_show_repeat_type', array(
'required' => true, 'required' => true,
'label' => 'Repeat Type:', 'label' => _('Repeat Type:'),
'class' => ' input_select', 'class' => ' input_select',
'multiOptions' => array( 'multiOptions' => array(
"0" => "weekly", "0" => "weekly",
@ -22,7 +22,7 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
'multiCheckbox', 'multiCheckbox',
'add_show_day_check', 'add_show_day_check',
array( array(
'label' => 'Select Days:', 'label' => _('Select Days:'),
'required' => false, 'required' => false,
'multiOptions' => array( 'multiOptions' => array(
"0" => "Sun", "0" => "Sun",
@ -37,7 +37,7 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
// Add end date element // Add end date element
$this->addElement('text', 'add_show_end_date', array( $this->addElement('text', 'add_show_end_date', array(
'label' => 'Date End:', 'label' => _('Date End:'),
'class' => 'input_text', 'class' => 'input_text',
'value' => date("Y-m-d"), 'value' => date("Y-m-d"),
'required' => false, 'required' => false,
@ -50,7 +50,7 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
// Add no end element // Add no end element
$this->addElement('checkbox', 'add_show_no_end', array( $this->addElement('checkbox', 'add_show_no_end', array(
'label' => 'No End?', 'label' => _('No End?'),
'required' => false, 'required' => false,
'checked' => true, 'checked' => true,
)); ));
@ -76,7 +76,7 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
$end_epoch = strtotime($end_timestamp); $end_epoch = strtotime($end_timestamp);
if ($end_epoch < $start_epoch) { if ($end_epoch < $start_epoch) {
$this->getElement('add_show_end_date')->setErrors(array('End date must be after start date')); $this->getElement('add_show_end_date')->setErrors(array(_('End date must be after start date')));
return false; return false;
} }

View File

@ -7,7 +7,7 @@ class Application_Form_AddShowStyle extends Zend_Form_SubForm
{ {
// Add show background-color input // Add show background-color input
$this->addElement('text', 'add_show_background_color', array( $this->addElement('text', 'add_show_background_color', array(
'label' => 'Background Colour:', 'label' => _('Background Colour:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
@ -26,7 +26,7 @@ class Application_Form_AddShowStyle extends Zend_Form_SubForm
// Add show color input // Add show color input
$this->addElement('text', 'add_show_color', array( $this->addElement('text', 'add_show_color', array(
'label' => 'Text Colour:', 'label' => _('Text Colour:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));

View File

@ -22,7 +22,7 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
// Add name element // Add name element
$this->addElement('text', 'add_show_name', array( $this->addElement('text', 'add_show_name', array(
'label' => 'Name:', 'label' => _('Name:'),
'class' => 'input_text', 'class' => 'input_text',
'required' => true, 'required' => true,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
@ -33,7 +33,7 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
// Add URL element // Add URL element
$this->addElement('text', 'add_show_url', array( $this->addElement('text', 'add_show_url', array(
'label' => 'URL:', 'label' => _('URL:'),
'class' => 'input_text', 'class' => 'input_text',
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
@ -42,7 +42,7 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
// Add genre element // Add genre element
$this->addElement('text', 'add_show_genre', array( $this->addElement('text', 'add_show_genre', array(
'label' => 'Genre:', 'label' => _('Genre:'),
'class' => 'input_text', 'class' => 'input_text',
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
@ -51,7 +51,7 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
// Add the description element // Add the description element
$this->addElement('textarea', 'add_show_description', array( $this->addElement('textarea', 'add_show_description', array(
'label' => 'Description:', 'label' => _('Description:'),
'required' => false, 'required' => false,
'class' => 'input_text_area', 'class' => 'input_text_area',
'validators' => array(array('StringLength', false, array(0, $maxLens['description']))) 'validators' => array(array('StringLength', false, array(0, $maxLens['description'])))

View File

@ -13,7 +13,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
$startDate = new Zend_Form_Element_Text('add_show_start_date'); $startDate = new Zend_Form_Element_Text('add_show_start_date');
$startDate->class = 'input_text'; $startDate->class = 'input_text';
$startDate->setRequired(true) $startDate->setRequired(true)
->setLabel('Date/Time Start:') ->setLabel(_('Date/Time Start:'))
->setValue(date("Y-m-d")) ->setValue(date("Y-m-d"))
->setFilters(array('StringTrim')) ->setFilters(array('StringTrim'))
->setValidators(array( ->setValidators(array(
@ -32,7 +32,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
->setValidators(array( ->setValidators(array(
'NotEmpty', 'NotEmpty',
array('date', false, array('HH:mm')), array('date', false, array('HH:mm')),
array('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => 'Time format should be HH:mm')) array('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => _('Time format should be HH:mm')))
))->setDecorators(array('ViewHelper')); ))->setDecorators(array('ViewHelper'));
$startTime->setAttrib('alt', 'time'); $startTime->setAttrib('alt', 'time');
$this->addElement($startTime); $this->addElement($startTime);
@ -41,7 +41,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
$endDate = new Zend_Form_Element_Text('add_show_end_date_no_repeat'); $endDate = new Zend_Form_Element_Text('add_show_end_date_no_repeat');
$endDate->class = 'input_text'; $endDate->class = 'input_text';
$endDate->setRequired(true) $endDate->setRequired(true)
->setLabel('Date/Time End:') ->setLabel(_('Date/Time End:'))
->setValue(date("Y-m-d")) ->setValue(date("Y-m-d"))
->setFilters(array('StringTrim')) ->setFilters(array('StringTrim'))
->setValidators(array( ->setValidators(array(
@ -60,14 +60,14 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
->setValidators(array( ->setValidators(array(
'NotEmpty', 'NotEmpty',
array('date', false, array('HH:mm')), array('date', false, array('HH:mm')),
array('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => 'Time format should be HH:mm')))) array('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => _('Time format should be HH:mm')))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$endTime->setAttrib('alt', 'time'); $endTime->setAttrib('alt', 'time');
$this->addElement($endTime); $this->addElement($endTime);
// Add duration element // Add duration element
$this->addElement('text', 'add_show_duration', array( $this->addElement('text', 'add_show_duration', array(
'label' => 'Duration:', 'label' => _('Duration:'),
'class' => 'input_text', 'class' => 'input_text',
'value' => '01h 00m', 'value' => '01h 00m',
'readonly' => true, 'readonly' => true,
@ -76,7 +76,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
// Add repeats element // Add repeats element
$this->addElement('checkbox', 'add_show_repeats', array( $this->addElement('checkbox', 'add_show_repeats', array(
'label' => 'Repeats?', 'label' => _('Repeats?'),
'required' => false, 'required' => false,
'decorators' => array('ViewHelper') 'decorators' => array('ViewHelper')
)); ));
@ -96,7 +96,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
$showEndDateTime = new DateTime($end_time); $showEndDateTime = new DateTime($end_time);
if ($validateStartDate) { if ($validateStartDate) {
if ($showStartDateTime->getTimestamp() < $nowDateTime->getTimestamp()) { if ($showStartDateTime->getTimestamp() < $nowDateTime->getTimestamp()) {
$this->getElement('add_show_start_time')->setErrors(array('Cannot create show in the past')); $this->getElement('add_show_start_time')->setErrors(array(_('Cannot create show in the past')));
$valid = false; $valid = false;
} }
// if edit action, check if original show start time is in the past. CC-3864 // if edit action, check if original show start time is in the past. CC-3864
@ -104,7 +104,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
if ($originalStartDate->getTimestamp() < $nowDateTime->getTimestamp()) { if ($originalStartDate->getTimestamp() < $nowDateTime->getTimestamp()) {
$this->getElement('add_show_start_time')->setValue($originalStartDate->format("H:i")); $this->getElement('add_show_start_time')->setValue($originalStartDate->format("H:i"));
$this->getElement('add_show_start_date')->setValue($originalStartDate->format("Y-m-d")); $this->getElement('add_show_start_date')->setValue($originalStartDate->format("Y-m-d"));
$this->getElement('add_show_start_time')->setErrors(array('Cannot modify start date/time of the show that is already started')); $this->getElement('add_show_start_time')->setErrors(array(_('Cannot modify start date/time of the show that is already started')));
$this->disableStartDateAndTime(); $this->disableStartDateAndTime();
$valid = false; $valid = false;
} }
@ -113,7 +113,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
// if end time is in the past, return error // if end time is in the past, return error
if ($showEndDateTime->getTimestamp() < $nowDateTime->getTimestamp()) { if ($showEndDateTime->getTimestamp() < $nowDateTime->getTimestamp()) {
$this->getElement('add_show_end_time')->setErrors(array('End date/time cannot be in the past')); $this->getElement('add_show_end_time')->setErrors(array(_('End date/time cannot be in the past')));
$valid = false; $valid = false;
} }
@ -123,15 +123,15 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
$hours = $matches[1]; $hours = $matches[1];
$minutes = $matches[2]; $minutes = $matches[2];
if ($formData["add_show_duration"] == "00h 00m") { if ($formData["add_show_duration"] == "00h 00m") {
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration 00h 00m')); $this->getElement('add_show_duration')->setErrors(array(_('Cannot have duration 00h 00m')));
$valid = false; $valid = false;
} elseif (strpos($formData["add_show_duration"], 'h') !== false && $hours >= 24) { } elseif (strpos($formData["add_show_duration"], 'h') !== false && $hours >= 24) {
if ($hours > 24 || ($hours == 24 && $minutes > 0)) { if ($hours > 24 || ($hours == 24 && $minutes > 0)) {
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration greater than 24h')); $this->getElement('add_show_duration')->setErrors(array(_('Cannot have duration greater than 24h')));
$valid = false; $valid = false;
} }
} elseif ( strstr($formData["add_show_duration"], '-') ) { } elseif ( strstr($formData["add_show_duration"], '-') ) {
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration < 0m')); $this->getElement('add_show_duration')->setErrors(array(_('Cannot have duration < 0m')));
$valid = false; $valid = false;
} }
} else { } else {
@ -247,7 +247,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
if ($overlapping) { if ($overlapping) {
$valid = false; $valid = false;
$this->getElement('add_show_duration')->setErrors(array('Cannot schedule overlapping shows')); $this->getElement('add_show_duration')->setErrors(array(_('Cannot schedule overlapping shows')));
break 1; break 1;
} else { } else {
$repeatShowStart->setTimezone($localTimezone); $repeatShowStart->setTimezone($localTimezone);
@ -261,7 +261,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
} }
} else { } else {
$valid = false; $valid = false;
$this->getElement('add_show_duration')->setErrors(array('Cannot schedule overlapping shows')); $this->getElement('add_show_duration')->setErrors(array(_('Cannot schedule overlapping shows')));
} }
} elseif ($formData["add_show_rebroadcast"]) { } elseif ($formData["add_show_rebroadcast"]) {
/* Check first show /* Check first show
@ -284,18 +284,18 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
$overlapping = Application_Model_Schedule::checkOverlappingShows($rebroadcastShowStart, $rebroadcastShowEnd, $update, $instanceId); $overlapping = Application_Model_Schedule::checkOverlappingShows($rebroadcastShowStart, $rebroadcastShowEnd, $update, $instanceId);
if ($overlapping) { if ($overlapping) {
$valid = false; $valid = false;
$this->getElement('add_show_duration')->setErrors(array('Cannot schedule overlapping shows')); $this->getElement('add_show_duration')->setErrors(array(_('Cannot schedule overlapping shows')));
break; break;
} }
} }
} else { } else {
$valid = false; $valid = false;
$this->getElement('add_show_duration')->setErrors(array('Cannot schedule overlapping shows')); $this->getElement('add_show_duration')->setErrors(array(_('Cannot schedule overlapping shows')));
} }
} else { } else {
$overlapping = Application_Model_Schedule::checkOverlappingShows($show_start, $show_end, $update, $instanceId); $overlapping = Application_Model_Schedule::checkOverlappingShows($show_start, $show_end, $update, $instanceId);
if ($overlapping) { if ($overlapping) {
$this->getElement('add_show_duration')->setErrors(array('Cannot schedule overlapping shows')); $this->getElement('add_show_duration')->setErrors(array(_('Cannot schedule overlapping shows')));
$valid = false; $valid = false;
} }
} }

View File

@ -7,7 +7,7 @@ class Application_Form_AddShowWho extends Zend_Form_SubForm
{ {
// Add hosts autocomplete // Add hosts autocomplete
$this->addElement('text', 'add_show_hosts_autocomplete', array( $this->addElement('text', 'add_show_hosts_autocomplete', array(
'label' => 'Search Users:', 'label' => _('Search Users:'),
'class' => 'input_text ui-autocomplete-input', 'class' => 'input_text ui-autocomplete-input',
'required' => false 'required' => false
)); ));
@ -21,7 +21,7 @@ class Application_Form_AddShowWho extends Zend_Form_SubForm
//Add hosts selection //Add hosts selection
$hosts = new Zend_Form_Element_MultiCheckbox('add_show_hosts'); $hosts = new Zend_Form_Element_MultiCheckbox('add_show_hosts');
$hosts->setLabel('DJs:') $hosts->setLabel(_('DJs:'))
->setMultiOptions($options); ->setMultiOptions($options);
$this->addElement($hosts); $this->addElement($hosts);

View File

@ -18,7 +18,7 @@ class Application_Form_AddUser extends Zend_Form
$this->addElement($hidden); $this->addElement($hidden);
$login = new Zend_Form_Element_Text('login'); $login = new Zend_Form_Element_Text('login');
$login->setLabel('Username:'); $login->setLabel(_('Username:'));
$login->setAttrib('class', 'input_text'); $login->setAttrib('class', 'input_text');
$login->setRequired(true); $login->setRequired(true);
$login->addFilter('StringTrim'); $login->addFilter('StringTrim');
@ -26,7 +26,7 @@ class Application_Form_AddUser extends Zend_Form
$this->addElement($login); $this->addElement($login);
$password = new Zend_Form_Element_Password('password'); $password = new Zend_Form_Element_Password('password');
$password->setLabel('Password:'); $password->setLabel(_('Password:'));
$password->setAttrib('class', 'input_text'); $password->setAttrib('class', 'input_text');
$password->setRequired(true); $password->setRequired(true);
$password->addFilter('StringTrim'); $password->addFilter('StringTrim');
@ -34,21 +34,21 @@ class Application_Form_AddUser extends Zend_Form
$this->addElement($password); $this->addElement($password);
$firstName = new Zend_Form_Element_Text('first_name'); $firstName = new Zend_Form_Element_Text('first_name');
$firstName->setLabel('Firstname:'); $firstName->setLabel(_('Firstname:'));
$firstName->setAttrib('class', 'input_text'); $firstName->setAttrib('class', 'input_text');
$firstName->addFilter('StringTrim'); $firstName->addFilter('StringTrim');
$firstName->addValidator('NotEmpty'); $firstName->addValidator('NotEmpty');
$this->addElement($firstName); $this->addElement($firstName);
$lastName = new Zend_Form_Element_Text('last_name'); $lastName = new Zend_Form_Element_Text('last_name');
$lastName->setLabel('Lastname:'); $lastName->setLabel(_('Lastname:'));
$lastName->setAttrib('class', 'input_text'); $lastName->setAttrib('class', 'input_text');
$lastName->addFilter('StringTrim'); $lastName->addFilter('StringTrim');
$lastName->addValidator('NotEmpty'); $lastName->addValidator('NotEmpty');
$this->addElement($lastName); $this->addElement($lastName);
$email = new Zend_Form_Element_Text('email'); $email = new Zend_Form_Element_Text('email');
$email->setLabel('Email:'); $email->setLabel(_('Email:'));
$email->setAttrib('class', 'input_text'); $email->setAttrib('class', 'input_text');
$email->addFilter('StringTrim'); $email->addFilter('StringTrim');
$email->setRequired(true); $email->setRequired(true);
@ -56,33 +56,33 @@ class Application_Form_AddUser extends Zend_Form
$this->addElement($email); $this->addElement($email);
$cellPhone = new Zend_Form_Element_Text('cell_phone'); $cellPhone = new Zend_Form_Element_Text('cell_phone');
$cellPhone->setLabel('Mobile Phone:'); $cellPhone->setLabel(_('Mobile Phone:'));
$cellPhone->setAttrib('class', 'input_text'); $cellPhone->setAttrib('class', 'input_text');
$cellPhone->addFilter('StringTrim'); $cellPhone->addFilter('StringTrim');
$this->addElement($cellPhone); $this->addElement($cellPhone);
$skype = new Zend_Form_Element_Text('skype'); $skype = new Zend_Form_Element_Text('skype');
$skype->setLabel('Skype:'); $skype->setLabel(_('Skype:'));
$skype->setAttrib('class', 'input_text'); $skype->setAttrib('class', 'input_text');
$skype->addFilter('StringTrim'); $skype->addFilter('StringTrim');
$this->addElement($skype); $this->addElement($skype);
$jabber = new Zend_Form_Element_Text('jabber'); $jabber = new Zend_Form_Element_Text('jabber');
$jabber->setLabel('Jabber:'); $jabber->setLabel(_('Jabber:'));
$jabber->setAttrib('class', 'input_text'); $jabber->setAttrib('class', 'input_text');
$jabber->addFilter('StringTrim'); $jabber->addFilter('StringTrim');
$jabber->addValidator('EmailAddress'); $jabber->addValidator('EmailAddress');
$this->addElement($jabber); $this->addElement($jabber);
$select = new Zend_Form_Element_Select('type'); $select = new Zend_Form_Element_Select('type');
$select->setLabel('User Type:'); $select->setLabel(_('User Type:'));
$select->setAttrib('class', 'input_select'); $select->setAttrib('class', 'input_select');
$select->setAttrib('style', 'width: 40%'); $select->setAttrib('style', 'width: 40%');
$select->setMultiOptions(array( $select->setMultiOptions(array(
"G" => "Guest", "G" => _("Guest"),
"H" => "DJ", "H" => _("DJ"),
"P" => "Program Manager", "P" => _("Program Manager"),
"A" => "Admin" "A" => _("Admin")
)); ));
$select->setRequired(true); $select->setRequired(true);
$this->addElement($select); $this->addElement($select);
@ -90,7 +90,7 @@ class Application_Form_AddUser extends Zend_Form
$saveBtn = new Zend_Form_Element_Button('save_user'); $saveBtn = new Zend_Form_Element_Button('save_user');
$saveBtn->setAttrib('class', 'btn btn-small right-floated'); $saveBtn->setAttrib('class', 'btn btn-small right-floated');
$saveBtn->setIgnore(true); $saveBtn->setIgnore(true);
$saveBtn->setLabel('Save'); $saveBtn->setLabel(_('Save'));
$this->addElement($saveBtn); $this->addElement($saveBtn);
} }
@ -100,7 +100,7 @@ class Application_Form_AddUser extends Zend_Form
$count = CcSubjsQuery::create()->filterByDbLogin($data['login'])->count(); $count = CcSubjsQuery::create()->filterByDbLogin($data['login'])->count();
if ($count != 0) { if ($count != 0) {
$this->getElement('login')->setErrors(array("Login name is not unique.")); $this->getElement('login')->setErrors(array(_("Login name is not unique.")));
return false; return false;
} }

View File

@ -13,7 +13,7 @@ class Application_Form_DateRange extends Zend_Form_SubForm
$startDate = new Zend_Form_Element_Text('his_date_start'); $startDate = new Zend_Form_Element_Text('his_date_start');
$startDate->class = 'input_text'; $startDate->class = 'input_text';
$startDate->setRequired(true) $startDate->setRequired(true)
->setLabel('Date Start:') ->setLabel(_('Date Start:'))
->setValue(date("Y-m-d")) ->setValue(date("Y-m-d"))
->setFilters(array('StringTrim')) ->setFilters(array('StringTrim'))
->setValidators(array( ->setValidators(array(
@ -32,7 +32,7 @@ class Application_Form_DateRange extends Zend_Form_SubForm
->setValidators(array( ->setValidators(array(
'NotEmpty', 'NotEmpty',
array('date', false, array('HH:mm')), array('date', false, array('HH:mm')),
array('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => 'Invalid character entered')))) array('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => _('Invalid character entered')))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$startTime->setAttrib('alt', 'time'); $startTime->setAttrib('alt', 'time');
$this->addElement($startTime); $this->addElement($startTime);
@ -41,7 +41,7 @@ class Application_Form_DateRange extends Zend_Form_SubForm
$endDate = new Zend_Form_Element_Text('his_date_end'); $endDate = new Zend_Form_Element_Text('his_date_end');
$endDate->class = 'input_text'; $endDate->class = 'input_text';
$endDate->setRequired(true) $endDate->setRequired(true)
->setLabel('Date End:') ->setLabel(_('Date End:'))
->setValue(date("Y-m-d")) ->setValue(date("Y-m-d"))
->setFilters(array('StringTrim')) ->setFilters(array('StringTrim'))
->setValidators(array( ->setValidators(array(
@ -60,7 +60,7 @@ class Application_Form_DateRange extends Zend_Form_SubForm
->setValidators(array( ->setValidators(array(
'NotEmpty', 'NotEmpty',
array('date', false, array('HH:mm')), array('date', false, array('HH:mm')),
array('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => 'Invalid character entered')))) array('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => _('Invalid character entered')))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$endTime->setAttrib('alt', 'time'); $endTime->setAttrib('alt', 'time');
$this->addElement($endTime); $this->addElement($endTime);

View File

@ -10,42 +10,42 @@ class Application_Form_EditAudioMD extends Zend_Form
// Add title field // Add title field
$this->addElement('text', 'track_title', array( $this->addElement('text', 'track_title', array(
'label' => 'Title:', 'label' => _('Title:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
)); ));
// Add artist field // Add artist field
$this->addElement('text', 'artist_name', array( $this->addElement('text', 'artist_name', array(
'label' => 'Creator:', 'label' => _('Creator:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
)); ));
// Add album field // Add album field
$this->addElement('text', 'album_title', array( $this->addElement('text', 'album_title', array(
'label' => 'Album:', 'label' => _('Album:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add track number field // Add track number field
$this->addElement('text', 'track_number', array( $this->addElement('text', 'track_number', array(
'label' => 'Track:', 'label' => _('Track:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add genre field // Add genre field
$this->addElement('text', 'genre', array( $this->addElement('text', 'genre', array(
'label' => 'Genre:', 'label' => _('Genre:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add year field // Add year field
$this->addElement('text', 'year', array( $this->addElement('text', 'year', array(
'label' => 'Year:', 'label' => _('Year:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array( 'validators' => array(
@ -57,28 +57,28 @@ class Application_Form_EditAudioMD extends Zend_Form
// Add label field // Add label field
$this->addElement('text', 'label', array( $this->addElement('text', 'label', array(
'label' => 'Label:', 'label' => _('Label:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add composer field // Add composer field
$this->addElement('text', 'composer', array( $this->addElement('text', 'composer', array(
'label' => 'Composer:', 'label' => _('Composer:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add conductor field // Add conductor field
$this->addElement('text', 'conductor', array( $this->addElement('text', 'conductor', array(
'label' => 'Conductor:', 'label' => _('Conductor:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add mood field // Add mood field
$this->addElement('text', 'mood', array( $this->addElement('text', 'mood', array(
'label' => 'Mood:', 'label' => _('Mood:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
@ -86,7 +86,7 @@ class Application_Form_EditAudioMD extends Zend_Form
// Add bmp field // Add bmp field
$bpm = new Zend_Form_Element_Text('bpm'); $bpm = new Zend_Form_Element_Text('bpm');
$bpm->class = 'input_text'; $bpm->class = 'input_text';
$bpm->setLabel('BPM:') $bpm->setLabel(_('BPM:'))
->setFilters(array('StringTrim')) ->setFilters(array('StringTrim'))
->setValidators(array( ->setValidators(array(
new Zend_Validate_StringLength(array('min'=>0,'max' => 8)), new Zend_Validate_StringLength(array('min'=>0,'max' => 8)),
@ -95,28 +95,28 @@ class Application_Form_EditAudioMD extends Zend_Form
// Add copyright field // Add copyright field
$this->addElement('text', 'copyright', array( $this->addElement('text', 'copyright', array(
'label' => 'Copyright:', 'label' => _('Copyright:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add isrc number field // Add isrc number field
$this->addElement('text', 'isrc_number', array( $this->addElement('text', 'isrc_number', array(
'label' => 'ISRC Number:', 'label' => _('ISRC Number:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add website field // Add website field
$this->addElement('text', 'info_url', array( $this->addElement('text', 'info_url', array(
'label' => 'Website:', 'label' => _('Website:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add language field // Add language field
$this->addElement('text', 'language', array( $this->addElement('text', 'language', array(
'label' => 'Language:', 'label' => _('Language:'),
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
@ -125,7 +125,7 @@ class Application_Form_EditAudioMD extends Zend_Form
$this->addElement('submit', 'submit', array( $this->addElement('submit', 'submit', array(
'ignore' => true, 'ignore' => true,
'class' => 'btn', 'class' => 'btn',
'label' => 'Save', 'label' => _('Save'),
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
@ -135,7 +135,7 @@ class Application_Form_EditAudioMD extends Zend_Form
$this->addElement('button', 'cancel', array( $this->addElement('button', 'cancel', array(
'ignore' => true, 'ignore' => true,
'class' => 'btn md-cancel', 'class' => 'btn md-cancel',
'label' => 'Cancel', 'label' => _('Cancel'),
'onclick' => 'javascript:document.location.href="'.$baseUrl.'/Library"', 'onclick' => 'javascript:document.location.href="'.$baseUrl.'/Library"',
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'

View File

@ -14,7 +14,7 @@ class Application_Form_EmailServerPreferences extends Zend_Form_SubForm
// Enable system emails // Enable system emails
$this->addElement('checkbox', 'enableSystemEmail', array( $this->addElement('checkbox', 'enableSystemEmail', array(
'label' => 'Enable System Emails (Password Reset)', 'label' => _('Enable System Emails (Password Reset)'),
'required' => false, 'required' => false,
'value' => Application_Model_Preference::GetEnableSystemEmail(), 'value' => Application_Model_Preference::GetEnableSystemEmail(),
'decorators' => array( 'decorators' => array(
@ -24,14 +24,14 @@ class Application_Form_EmailServerPreferences extends Zend_Form_SubForm
$this->addElement('text', 'systemEmail', array( $this->addElement('text', 'systemEmail', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Reset Password \'From\' Email', 'label' => _("Reset Password 'From' Email"),
'value' => Application_Model_Preference::GetSystemEmail(), 'value' => Application_Model_Preference::GetSystemEmail(),
'readonly' => true, 'readonly' => true,
'decorators' => array('viewHelper') 'decorators' => array('viewHelper')
)); ));
$this->addElement('checkbox', 'configureMailServer', array( $this->addElement('checkbox', 'configureMailServer', array(
'label' => 'Configure Mail Server', 'label' => _('Configure Mail Server'),
'required' => false, 'required' => false,
'value' => Application_Model_Preference::GetMailServerConfigured(), 'value' => Application_Model_Preference::GetMailServerConfigured(),
'decorators' => array ( 'decorators' => array (
@ -40,7 +40,7 @@ class Application_Form_EmailServerPreferences extends Zend_Form_SubForm
)); ));
$this->addElement('checkbox', 'msRequiresAuth', array( $this->addElement('checkbox', 'msRequiresAuth', array(
'label' => 'Requires Authentication', 'label' => _('Requires Authentication'),
'required' => false, 'required' => false,
'value' => Application_Model_Preference::GetMailServerRequiresAuth(), 'value' => Application_Model_Preference::GetMailServerRequiresAuth(),
'decorators' => array( 'decorators' => array(
@ -50,7 +50,7 @@ class Application_Form_EmailServerPreferences extends Zend_Form_SubForm
$this->addElement('text', 'mailServer', array( $this->addElement('text', 'mailServer', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Mail Server', 'label' => _('Mail Server'),
'value' => Application_Model_Preference::GetMailServer(), 'value' => Application_Model_Preference::GetMailServer(),
'readonly' => true, 'readonly' => true,
'decorators' => array('viewHelper'), 'decorators' => array('viewHelper'),
@ -64,7 +64,7 @@ class Application_Form_EmailServerPreferences extends Zend_Form_SubForm
$this->addElement('text', 'email', array( $this->addElement('text', 'email', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Email Address', 'label' => _('Email Address'),
'value' => Application_Model_Preference::GetMailServerEmailAddress(), 'value' => Application_Model_Preference::GetMailServerEmailAddress(),
'readonly' => true, 'readonly' => true,
'decorators' => array('viewHelper'), 'decorators' => array('viewHelper'),
@ -79,7 +79,7 @@ class Application_Form_EmailServerPreferences extends Zend_Form_SubForm
$this->addElement('password', 'ms_password', array( $this->addElement('password', 'ms_password', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Password', 'label' => _('Password'),
'value' => Application_Model_Preference::GetMailServerPassword(), 'value' => Application_Model_Preference::GetMailServerPassword(),
'readonly' => true, 'readonly' => true,
'decorators' => array('viewHelper'), 'decorators' => array('viewHelper'),
@ -97,7 +97,7 @@ class Application_Form_EmailServerPreferences extends Zend_Form_SubForm
$port->class = 'input_text'; $port->class = 'input_text';
$port->setRequired(false) $port->setRequired(false)
->setValue(Application_Model_Preference::GetMailServerPort()) ->setValue(Application_Model_Preference::GetMailServerPort())
->setLabel('Port') ->setLabel(_('Port'))
->setAttrib('readonly', true) ->setAttrib('readonly', true)
->setDecorators(array('viewHelper')); ->setDecorators(array('viewHelper'));

View File

@ -18,7 +18,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
//Station name //Station name
$this->addElement('text', 'stationName', array( $this->addElement('text', 'stationName', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Station Name', 'label' => _('Station Name'),
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'value' => Application_Model_Preference::GetStationName(), 'value' => Application_Model_Preference::GetStationName(),
@ -30,12 +30,12 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
//Default station fade //Default station fade
$this->addElement('text', 'stationDefaultFade', array( $this->addElement('text', 'stationDefaultFade', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Default Fade (s):', 'label' => _('Default Fade (s):'),
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array(array('regex', false, 'validators' => array(array('regex', false,
array('/^[0-9]{1,2}(\.\d{1})?$/', array('/^[0-9]{1,2}(\.\d{1})?$/',
'messages' => 'enter a time in seconds 0{.0}'))), 'messages' => _('enter a time in seconds 0{.0}')))),
'value' => $defaultFade, 'value' => $defaultFade,
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
@ -43,7 +43,8 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
)); ));
$third_party_api = new Zend_Form_Element_Radio('thirdPartyApi'); $third_party_api = new Zend_Form_Element_Radio('thirdPartyApi');
$third_party_api->setLabel('Allow Remote Websites To Access "Schedule" Info?<br> (Enable this to make front-end widgets work.)'); $third_party_api->setLabel(
sprintf(_('Allow Remote Websites To Access "Schedule" Info?%s (Enable this to make front-end widgets work.'), '<br>'));
$third_party_api->setMultiOptions(array("Disabled", $third_party_api->setMultiOptions(array("Disabled",
"Enabled")); "Enabled"));
$third_party_api->setValue(Application_Model_Preference::GetAllow3rdPartyApi()); $third_party_api->setValue(Application_Model_Preference::GetAllow3rdPartyApi());
@ -52,7 +53,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
/* Form Element for setting the Timezone */ /* Form Element for setting the Timezone */
$timezone = new Zend_Form_Element_Select("timezone"); $timezone = new Zend_Form_Element_Select("timezone");
$timezone->setLabel("Timezone"); $timezone->setLabel(_("Timezone"));
$timezone->setMultiOptions($this->getTimezones()); $timezone->setMultiOptions($this->getTimezones());
$timezone->setValue(Application_Model_Preference::GetTimezone()); $timezone->setValue(Application_Model_Preference::GetTimezone());
$timezone->setDecorators(array('ViewHelper')); $timezone->setDecorators(array('ViewHelper'));
@ -60,7 +61,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
/* Form Element for setting which day is the start of the week */ /* Form Element for setting which day is the start of the week */
$week_start_day = new Zend_Form_Element_Select("weekStartDay"); $week_start_day = new Zend_Form_Element_Select("weekStartDay");
$week_start_day->setLabel("Week Starts On"); $week_start_day->setLabel(_("Week Starts On"));
$week_start_day->setMultiOptions($this->getWeekStartDays()); $week_start_day->setMultiOptions($this->getWeekStartDays());
$week_start_day->setValue(Application_Model_Preference::GetWeekStartDay()); $week_start_day->setValue(Application_Model_Preference::GetWeekStartDay());
$week_start_day->setDecorators(array('ViewHelper')); $week_start_day->setDecorators(array('ViewHelper'));

View File

@ -16,24 +16,24 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
// automatic trasition on source disconnection // automatic trasition on source disconnection
$auto_transition = new Zend_Form_Element_Checkbox("auto_transition"); $auto_transition = new Zend_Form_Element_Checkbox("auto_transition");
$auto_transition->setLabel("Auto Switch Off") $auto_transition->setLabel(_("Auto Switch Off"))
->setValue(Application_Model_Preference::GetAutoTransition()) ->setValue(Application_Model_Preference::GetAutoTransition())
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($auto_transition); $this->addElement($auto_transition);
// automatic switch on upon source connection // automatic switch on upon source connection
$auto_switch = new Zend_Form_Element_Checkbox("auto_switch"); $auto_switch = new Zend_Form_Element_Checkbox("auto_switch");
$auto_switch->setLabel("Auto Switch On") $auto_switch->setLabel(_("Auto Switch On"))
->setValue(Application_Model_Preference::GetAutoSwitch()) ->setValue(Application_Model_Preference::GetAutoSwitch())
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($auto_switch); $this->addElement($auto_switch);
// Default transition fade // Default transition fade
$transition_fade = new Zend_Form_Element_Text("transition_fade"); $transition_fade = new Zend_Form_Element_Text("transition_fade");
$transition_fade->setLabel("Switch Transition Fade (s)") $transition_fade->setLabel(_("Switch Transition Fade (s)"))
->setFilters(array('StringTrim')) ->setFilters(array('StringTrim'))
->addValidator('regex', false, array('/^[0-9]{1,2}(\.\d{1,6})?$/', ->addValidator('regex', false, array('/^[0-9]{1,2}(\.\d{1,6})?$/',
'messages' => 'enter a time in seconds 00{.000000}')) 'messages' => _('enter a time in seconds 00{.000000}')))
->setValue($defaultFade) ->setValue($defaultFade)
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($transition_fade); $this->addElement($transition_fade);
@ -42,7 +42,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
$master_username = new Zend_Form_Element_Text('master_username'); $master_username = new Zend_Form_Element_Text('master_username');
$master_username->setAttrib('autocomplete', 'off') $master_username->setAttrib('autocomplete', 'off')
->setAllowEmpty(true) ->setAllowEmpty(true)
->setLabel('Master Username') ->setLabel(_('Master Username'))
->setFilters(array('StringTrim')) ->setFilters(array('StringTrim'))
->setValue(Application_Model_Preference::GetLiveStreamMasterUsername()) ->setValue(Application_Model_Preference::GetLiveStreamMasterUsername())
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
@ -59,7 +59,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
->setAttrib('renderPassword','true') ->setAttrib('renderPassword','true')
->setAllowEmpty(true) ->setAllowEmpty(true)
->setValue(Application_Model_Preference::GetLiveStreamMasterPassword()) ->setValue(Application_Model_Preference::GetLiveStreamMasterPassword())
->setLabel('Master Password') ->setLabel(_('Master Password'))
->setFilters(array('StringTrim')) ->setFilters(array('StringTrim'))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($master_password); $this->addElement($master_password);
@ -67,7 +67,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
//Master source connection url //Master source connection url
$master_dj_connection_url = new Zend_Form_Element_Text('master_dj_connection_url'); $master_dj_connection_url = new Zend_Form_Element_Text('master_dj_connection_url');
$master_dj_connection_url->setAttrib('readonly', true) $master_dj_connection_url->setAttrib('readonly', true)
->setLabel('Master Source Connection URL') ->setLabel(_('Master Source Connection URL'))
->setValue(Application_Model_Preference::GetMasterDJSourceConnectionURL()) ->setValue(Application_Model_Preference::GetMasterDJSourceConnectionURL())
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($master_dj_connection_url); $this->addElement($master_dj_connection_url);
@ -75,7 +75,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
//Show source connection url //Show source connection url
$live_dj_connection_url = new Zend_Form_Element_Text('live_dj_connection_url'); $live_dj_connection_url = new Zend_Form_Element_Text('live_dj_connection_url');
$live_dj_connection_url->setAttrib('readonly', true) $live_dj_connection_url->setAttrib('readonly', true)
->setLabel('Show Source Connection URL') ->setLabel(_('Show Source Connection URL'))
->setValue(Application_Model_Preference::GetLiveDJSourceConnectionURL()) ->setValue(Application_Model_Preference::GetLiveDJSourceConnectionURL())
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($live_dj_connection_url); $this->addElement($live_dj_connection_url);
@ -83,38 +83,38 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
//liquidsoap harbor.input port //liquidsoap harbor.input port
$m_port = Application_Model_StreamSetting::getMasterLiveStreamPort(); $m_port = Application_Model_StreamSetting::getMasterLiveStreamPort();
$master_dj_port = new Zend_Form_Element_Text('master_harbor_input_port'); $master_dj_port = new Zend_Form_Element_Text('master_harbor_input_port');
$master_dj_port->setLabel("Master Source Port") $master_dj_port->setLabel(_("Master Source Port"))
->setValue($m_port) ->setValue($m_port)
->setValidators(array(new Zend_Validate_Between(array('min'=>1024, 'max'=>49151)))) ->setValidators(array(new Zend_Validate_Between(array('min'=>1024, 'max'=>49151))))
->addValidator('regex', false, array('pattern'=>'/^[0-9]+$/', 'messages'=>array('regexNotMatch'=>'Only numbers are allowed.'))) ->addValidator('regex', false, array('pattern'=>'/^[0-9]+$/', 'messages'=>array('regexNotMatch'=>_('Only numbers are allowed.'))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($master_dj_port); $this->addElement($master_dj_port);
$m_mount = Application_Model_StreamSetting::getMasterLiveStreamMountPoint(); $m_mount = Application_Model_StreamSetting::getMasterLiveStreamMountPoint();
$master_dj_mount = new Zend_Form_Element_Text('master_harbor_input_mount_point'); $master_dj_mount = new Zend_Form_Element_Text('master_harbor_input_mount_point');
$master_dj_mount->setLabel("Master Source Mount Point") $master_dj_mount->setLabel(_("Master Source Mount Point"))
->setValue($m_mount) ->setValue($m_mount)
->setValidators(array( ->setValidators(array(
array('regex', false, array('/^[^ &<>]+$/', 'messages' => 'Invalid character entered')))) array('regex', false, array('/^[^ &<>]+$/', 'messages' => _('Invalid character entered')))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($master_dj_mount); $this->addElement($master_dj_mount);
//liquidsoap harbor.input port //liquidsoap harbor.input port
$l_port = Application_Model_StreamSetting::getDjLiveStreamPort(); $l_port = Application_Model_StreamSetting::getDjLiveStreamPort();
$live_dj_port = new Zend_Form_Element_Text('dj_harbor_input_port'); $live_dj_port = new Zend_Form_Element_Text('dj_harbor_input_port');
$live_dj_port->setLabel("Show Source Port") $live_dj_port->setLabel(_("Show Source Port"))
->setValue($l_port) ->setValue($l_port)
->setValidators(array(new Zend_Validate_Between(array('min'=>1024, 'max'=>49151)))) ->setValidators(array(new Zend_Validate_Between(array('min'=>1024, 'max'=>49151))))
->addValidator('regex', false, array('pattern'=>'/^[0-9]+$/', 'messages'=>array('regexNotMatch'=>'Only numbers are allowed.'))) ->addValidator('regex', false, array('pattern'=>'/^[0-9]+$/', 'messages'=>array('regexNotMatch'=>_('Only numbers are allowed.'))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($live_dj_port); $this->addElement($live_dj_port);
$l_mount = Application_Model_StreamSetting::getDjLiveStreamMountPoint(); $l_mount = Application_Model_StreamSetting::getDjLiveStreamMountPoint();
$live_dj_mount = new Zend_Form_Element_Text('dj_harbor_input_mount_point'); $live_dj_mount = new Zend_Form_Element_Text('dj_harbor_input_mount_point');
$live_dj_mount->setLabel("Show Source Mount Point") $live_dj_mount->setLabel(_("Show Source Mount Point"))
->setValue($l_mount) ->setValue($l_mount)
->setValidators(array( ->setValidators(array(
array('regex', false, array('/^[^ &<>]+$/', 'messages' => 'Invalid character entered')))) array('regex', false, array('/^[^ &<>]+$/', 'messages' => _('Invalid character entered')))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($live_dj_mount); $this->addElement($live_dj_mount);
// demo only code // demo only code
@ -149,7 +149,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
if ($master_harbor_input_port == $dj_harbor_input_port && $master_harbor_input_port != "") { if ($master_harbor_input_port == $dj_harbor_input_port && $master_harbor_input_port != "") {
$element = $this->getElement("dj_harbor_input_port"); $element = $this->getElement("dj_harbor_input_port");
$element->addError("You cannot use same port as Master DJ port."); $element->addError(_("You cannot use same port as Master DJ port."));
$isValid = false; $isValid = false;
} }
if ($master_harbor_input_port != "") { if ($master_harbor_input_port != "") {
@ -160,7 +160,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
socket_bind($sock, 0, $master_harbor_input_port); socket_bind($sock, 0, $master_harbor_input_port);
} catch (Exception $e) { } catch (Exception $e) {
$element = $this->getElement("master_harbor_input_port"); $element = $this->getElement("master_harbor_input_port");
$element->addError("Port '$master_harbor_input_port' is not available."); $element->addError(sprintf(_("Port %s is not available"), $master_harbor_input_port));
$isValid = false; $isValid = false;
} }
@ -178,7 +178,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
socket_bind($sock, 0, $dj_harbor_input_port); socket_bind($sock, 0, $dj_harbor_input_port);
} catch (Exception $e) { } catch (Exception $e) {
$element = $this->getElement("dj_harbor_input_port"); $element = $this->getElement("dj_harbor_input_port");
$element->addError("Port '$dj_harbor_input_port' is not available."); $element->addError(sprintf(_("Port %s is not available"). $dj_harbor_input_port));
$isValid = false; $isValid = false;
} }
socket_close($sock); socket_close($sock);

View File

@ -16,7 +16,7 @@ class Application_Form_Login extends Zend_Form
// Add username element // Add username element
$this->addElement('text', 'username', array( $this->addElement('text', 'username', array(
'label' => 'Username:', 'label' => _('Username:'),
'class' => 'input_text', 'class' => 'input_text',
'required' => true, 'required' => true,
'value' => (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'', 'value' => (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'',
@ -31,7 +31,7 @@ class Application_Form_Login extends Zend_Form
// Add password element // Add password element
$this->addElement('password', 'password', array( $this->addElement('password', 'password', array(
'label' => 'Password:', 'label' => _('Password:'),
'class' => 'input_text', 'class' => 'input_text',
'required' => true, 'required' => true,
'value' => (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'', 'value' => (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'',
@ -56,7 +56,7 @@ class Application_Form_Login extends Zend_Form
// Add the submit button // Add the submit button
$this->addElement('submit', 'submit', array( $this->addElement('submit', 'submit', array(
'ignore' => true, 'ignore' => true,
'label' => 'Login', 'label' => _('Login'),
'class' => 'ui-button ui-widget ui-state-default ui-button-text-only center', 'class' => 'ui-button ui-widget ui-state-default ui-button-text-only center',
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
@ -74,7 +74,7 @@ class Application_Form_Login extends Zend_Form
$captcha = new Zend_Form_Element_Captcha('captcha', $captcha = new Zend_Form_Element_Captcha('captcha',
array( array(
'label' => 'Type the characters you see in the picture below.', 'label' => _('Type the characters you see in the picture below.'),
'captcha' => 'ReCaptcha', 'captcha' => 'ReCaptcha',
'captchaOptions' => array( 'captchaOptions' => array(
'captcha' => 'ReCaptcha', 'captcha' => 'ReCaptcha',

View File

@ -11,7 +11,7 @@ class Application_Form_PasswordChange extends Zend_Form
)); ));
$this->addElement('password', 'password', array( $this->addElement('password', 'password', array(
'label' => 'Password', 'label' => _('Password'),
'required' => true, 'required' => true,
'filters' => array('stringTrim'), 'filters' => array('stringTrim'),
'validators' => array( 'validators' => array(
@ -23,7 +23,7 @@ class Application_Form_PasswordChange extends Zend_Form
)); ));
$this->addElement('password', 'password_confirm', array( $this->addElement('password', 'password_confirm', array(
'label' => 'Confirm new password', 'label' => _('Confirm new password'),
'required' => true, 'required' => true,
'filters' => array('stringTrim'), 'filters' => array('stringTrim'),
'validators' => array( 'validators' => array(
@ -38,7 +38,7 @@ class Application_Form_PasswordChange extends Zend_Form
)); ));
$this->addElement('submit', 'submit', array( $this->addElement('submit', 'submit', array(
'label' => 'Get new password', 'label' => _('Get new password'),
'ignore' => true, 'ignore' => true,
'class' => 'ui-button ui-widget ui-state-default ui-button-text-only center', 'class' => 'ui-button ui-widget ui-state-default ui-button-text-only center',
'decorators' => array( 'decorators' => array(

View File

@ -11,7 +11,7 @@ class Application_Form_PasswordRestore extends Zend_Form
)); ));
$this->addElement('text', 'email', array( $this->addElement('text', 'email', array(
'label' => 'E-mail', 'label' => _('E-mail'),
'required' => true, 'required' => true,
'filters' => array( 'filters' => array(
'stringTrim', 'stringTrim',
@ -22,7 +22,7 @@ class Application_Form_PasswordRestore extends Zend_Form
)); ));
$this->addElement('text', 'username', array( $this->addElement('text', 'username', array(
'label' => 'Username', 'label' => _('Username'),
'required' => false, 'required' => false,
'filters' => array( 'filters' => array(
'stringTrim', 'stringTrim',
@ -33,7 +33,7 @@ class Application_Form_PasswordRestore extends Zend_Form
)); ));
$this->addElement('submit', 'submit', array( $this->addElement('submit', 'submit', array(
'label' => 'Restore password', 'label' => _('Restore password'),
'ignore' => true, 'ignore' => true,
'class' => 'ui-button ui-widget ui-state-default ui-button-text-only center', 'class' => 'ui-button ui-widget ui-state-default ui-button-text-only center',
'decorators' => array( 'decorators' => array(
@ -43,7 +43,7 @@ class Application_Form_PasswordRestore extends Zend_Form
$cancel = new Zend_Form_Element_Button("cancel"); $cancel = new Zend_Form_Element_Button("cancel");
$cancel->class = 'ui-button ui-widget ui-state-default ui-button-text-only center'; $cancel->class = 'ui-button ui-widget ui-state-default ui-button-text-only center';
$cancel->setLabel("Cancel") $cancel->setLabel(_("Cancel"))
->setIgnore(True) ->setIgnore(True)
->setAttrib('onclick', 'redirectToLogin();') ->setAttrib('onclick', 'redirectToLogin();')
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));

View File

@ -27,7 +27,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
// Station Name // Station Name
$stnName = new Zend_Form_Element_Text("stnName"); $stnName = new Zend_Form_Element_Text("stnName");
$stnName->setLabel("Station Name") $stnName->setLabel(_("Station Name"))
->setRequired(true) ->setRequired(true)
->setValue(Application_Model_Preference::GetStationName()) ->setValue(Application_Model_Preference::GetStationName())
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
@ -36,7 +36,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
// Phone number // Phone number
$this->addElement('text', 'Phone', array( $this->addElement('text', 'Phone', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Phone:', 'label' => _('Phone:'),
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'value' => Application_Model_Preference::GetPhone(), 'value' => Application_Model_Preference::GetPhone(),
@ -48,7 +48,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
//Email //Email
$this->addElement('text', 'Email', array( $this->addElement('text', 'Email', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Email:', 'label' => _('Email:'),
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'value' => Application_Model_Preference::GetEmail(), 'value' => Application_Model_Preference::GetEmail(),
@ -59,7 +59,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
// Station Web Site // Station Web Site
$this->addElement('text', 'StationWebSite', array( $this->addElement('text', 'StationWebSite', array(
'label' => 'Station Web Site:', 'label' => _('Station Web Site:'),
'required' => false, 'required' => false,
'class' => 'input_text', 'class' => 'input_text',
'value' => Application_Model_Preference::GetStationWebSite(), 'value' => Application_Model_Preference::GetStationWebSite(),
@ -70,7 +70,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
// county list dropdown // county list dropdown
$this->addElement('select', 'Country', array( $this->addElement('select', 'Country', array(
'label' => 'Country:', 'label' => _('Country:'),
'required' => false, 'required' => false,
'value' => Application_Model_Preference::GetStationCountry(), 'value' => Application_Model_Preference::GetStationCountry(),
'multiOptions' => $country_list, 'multiOptions' => $country_list,
@ -81,7 +81,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
// Station city // Station city
$this->addElement('text', 'City', array( $this->addElement('text', 'City', array(
'label' => 'City:', 'label' => _('City:'),
'required' => false, 'required' => false,
'class' => 'input_text', 'class' => 'input_text',
'value' => Application_Model_Preference::GetStationCity(), 'value' => Application_Model_Preference::GetStationCity(),
@ -93,7 +93,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
// Station Description // Station Description
$description = new Zend_Form_Element_Textarea('Description'); $description = new Zend_Form_Element_Textarea('Description');
$description->class = 'input_text_area'; $description->class = 'input_text_area';
$description->setLabel('Station Description:') $description->setLabel(_('Station Description:'))
->setRequired(false) ->setRequired(false)
->setValue(Application_Model_Preference::GetStationDescription()) ->setValue(Application_Model_Preference::GetStationDescription())
->setDecorators(array('ViewHelper')) ->setDecorators(array('ViewHelper'))
@ -103,7 +103,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
// Station Logo // Station Logo
$upload = new Zend_Form_Element_File('Logo'); $upload = new Zend_Form_Element_File('Logo');
$upload->setLabel('Station Logo:') $upload->setLabel(_('Station Logo:'))
->setRequired(false) ->setRequired(false)
->setDecorators(array('File')) ->setDecorators(array('File'))
->addValidator('Count', false, 1) ->addValidator('Count', false, 1)
@ -113,7 +113,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
//enable support feedback //enable support feedback
$this->addElement('checkbox', 'SupportFeedback', array( $this->addElement('checkbox', 'SupportFeedback', array(
'label' => 'Send support feedback', 'label' => _('Send support feedback'),
'required' => false, 'required' => false,
'value' => 1, 'value' => 1,
'decorators' => array( 'decorators' => array(
@ -123,7 +123,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
// checkbox for publicise // checkbox for publicise
$checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise"); $checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise");
$checkboxPublicise->setLabel('Promote my station on Sourcefabric.org') $checkboxPublicise->setLabel(_('Promote my station on Sourcefabric.org'))
->setRequired(false) ->setRequired(false)
->setDecorators(array('ViewHelper')) ->setDecorators(array('ViewHelper'))
->setValue(Application_Model_Preference::GetPublicise()); ->setValue(Application_Model_Preference::GetPublicise());
@ -145,7 +145,10 @@ class Application_Form_RegisterAirtime extends Zend_Form
// checkbox for privacy policy // checkbox for privacy policy
$checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy"); $checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy");
$checkboxPrivacy->setLabel("By checking this box, I agree to Sourcefabric's <a id=\"link_to_privacy\" href=\"http://www.sourcefabric.org/en/about/policy/\" onclick=\"window.open(this.href); return false;\">privacy policy</a>.") $checkboxPrivacy->setLabel(
sprintf(_("By checking this box, I agree to Sourcefabric's %sprivacy policy%s."),
"<a id='link_to_privacy' href='http://www.sourcefabric.org/en/about/policy/' onclick='window.open(this.href); return false;'>",
"</a>"))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($checkboxPrivacy); $this->addElement($checkboxPrivacy);
} }
@ -160,7 +163,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
if (isset($data["Privacy"])) { if (isset($data["Privacy"])) {
$checkPrivacy = $this->getElement('Privacy'); $checkPrivacy = $this->getElement('Privacy');
if ($data["SupportFeedback"] == "1" && $data["Privacy"] != "1") { if ($data["SupportFeedback"] == "1" && $data["Privacy"] != "1") {
$checkPrivacy->addError("You have to agree to privacy policy."); $checkPrivacy->addError(_("You have to agree to privacy policy."));
$isValid = false; $isValid = false;
} }
} }

View File

@ -15,7 +15,7 @@ class Application_Form_ShowBuilder extends Zend_Form_SubForm
$startDate = new Zend_Form_Element_Text('sb_date_start'); $startDate = new Zend_Form_Element_Text('sb_date_start');
$startDate->class = 'input_text'; $startDate->class = 'input_text';
$startDate->setRequired(true) $startDate->setRequired(true)
->setLabel('Date Start:') ->setLabel(_('Date Start:'))
->setValue(date("Y-m-d")) ->setValue(date("Y-m-d"))
->setFilters(array('StringTrim')) ->setFilters(array('StringTrim'))
->setValidators(array( ->setValidators(array(
@ -34,7 +34,7 @@ class Application_Form_ShowBuilder extends Zend_Form_SubForm
->setValidators(array( ->setValidators(array(
'NotEmpty', 'NotEmpty',
array('date', false, array('HH:mm')), array('date', false, array('HH:mm')),
array('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => 'Invalid character entered')))) array('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => _('Invalid character entered')))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$startTime->setAttrib('alt', 'time'); $startTime->setAttrib('alt', 'time');
$this->addElement($startTime); $this->addElement($startTime);
@ -43,7 +43,7 @@ class Application_Form_ShowBuilder extends Zend_Form_SubForm
$endDate = new Zend_Form_Element_Text('sb_date_end'); $endDate = new Zend_Form_Element_Text('sb_date_end');
$endDate->class = 'input_text'; $endDate->class = 'input_text';
$endDate->setRequired(true) $endDate->setRequired(true)
->setLabel('Date End:') ->setLabel(_('Date End:'))
->setValue(date("Y-m-d")) ->setValue(date("Y-m-d"))
->setFilters(array('StringTrim')) ->setFilters(array('StringTrim'))
->setValidators(array( ->setValidators(array(
@ -62,14 +62,14 @@ class Application_Form_ShowBuilder extends Zend_Form_SubForm
->setValidators(array( ->setValidators(array(
'NotEmpty', 'NotEmpty',
array('date', false, array('HH:mm')), array('date', false, array('HH:mm')),
array('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => 'Invalid character entered')))) array('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => _('Invalid character entered')))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$endTime->setAttrib('alt', 'time'); $endTime->setAttrib('alt', 'time');
$this->addElement($endTime); $this->addElement($endTime);
// add a select to choose a show. // add a select to choose a show.
$showSelect = new Zend_Form_Element_Select("sb_show_filter"); $showSelect = new Zend_Form_Element_Select("sb_show_filter");
$showSelect->setLabel("Show:"); $showSelect->setLabel(_("Show:"));
$showSelect->setMultiOptions($this->getShowNames()); $showSelect->setMultiOptions($this->getShowNames());
$showSelect->setValue(null); $showSelect->setValue(null);
$showSelect->setDecorators(array('ViewHelper')); $showSelect->setDecorators(array('ViewHelper'));
@ -77,7 +77,7 @@ class Application_Form_ShowBuilder extends Zend_Form_SubForm
if ($user->getType() === 'H') { if ($user->getType() === 'H') {
$myShows = new Zend_Form_Element_Checkbox('sb_my_shows'); $myShows = new Zend_Form_Element_Checkbox('sb_my_shows');
$myShows->setLabel('All My Shows:') $myShows->setLabel(_('All My Shows:'))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($myShows); $this->addElement($myShows);
} }

View File

@ -1,88 +1,119 @@
<?php <?php
class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
{ {
private $criteriaOptions = array( private $criteriaOptions;
0 => "Select criteria", private $stringCriteriaOptions;
"album_title" => "Album", private $numericCriteriaOptions;
"bit_rate" => "Bit Rate (Kbps)", private $limitOptions;
"bpm" => "BPM",
"composer" => "Composer",
"conductor" => "Conductor",
"copyright" => "Copyright",
"artist_name" => "Creator",
"encoded_by" => "Encoded By",
"genre" => "Genre",
"isrc_number" => "ISRC",
"label" => "Label",
"language" => "Language",
"mtime" => "Last Modified",
"lptime" => "Last Played",
"length" => "Length",
"mime" => "Mime",
"mood" => "Mood",
"owner_id" => "Owner",
"replay_gain" => "Replay Gain",
"sample_rate" => "Sample Rate (kHz)",
"track_title" => "Title",
"track_number" => "Track Number",
"utime" => "Uploaded",
"info_url" => "Website",
"year" => "Year"
);
private $criteriaTypes = array( private $criteriaTypes = array(
0 => "", 0 => "",
"album_title" => "s", "album_title" => "s",
"bit_rate" => "n", "bit_rate" => "n",
"bpm" => "n", "bpm" => "n",
"composer" => "s", "composer" => "s",
"conductor" => "s", "conductor" => "s",
"copyright" => "s", "copyright" => "s",
"artist_name" => "s", "artist_name" => "s",
"encoded_by" => "s", "encoded_by" => "s",
"utime" => "n", "utime" => "n",
"mtime" => "n", "mtime" => "n",
"lptime" => "n", "lptime" => "n",
"genre" => "s", "genre" => "s",
"isrc_number" => "s", "isrc_number" => "s",
"label" => "s", "label" => "s",
"language" => "s", "language" => "s",
"length" => "n", "length" => "n",
"mime" => "s", "mime" => "s",
"mood" => "s", "mood" => "s",
"owner_id" => "s", "owner_id" => "s",
"replay_gain" => "n", "replay_gain" => "n",
"sample_rate" => "n", "sample_rate" => "n",
"track_title" => "s", "track_title" => "s",
"track_number" => "n", "track_number" => "n",
"info_url" => "s", "info_url" => "s",
"year" => "n" "year" => "n"
); );
private function getCriteriaOptions($option = null)
{
if (!isset($this->criteriaOptions)) {
$this->criteriaOptions = array(
0 => _("Select criteria"),
"album_title" => _("Album"),
"bit_rate" => _("Bit Rate (Kbps)"),
"bpm" => _("BPM"),
"composer" => _("Composer"),
"conductor" => _("Conductor"),
"copyright" => _("Copyright"),
"artist_name" => _("Creator"),
"encoded_by" => _("Encoded By"),
"genre" => _("Genre"),
"isrc_number" => _("ISRC"),
"label" => _("Label"),
"language" => _("Language"),
"mtime" => _("Last Modified"),
"lptime" => _("Last Played"),
"length" => _("Length"),
"mime" => _("Mime"),
"mood" => _("Mood"),
"owner_id" => _("Owner"),
"replay_gain" => _("Replay Gain"),
"sample_rate" => _("Sample Rate (kHz)"),
"track_title" => _("Title"),
"track_number" => _("Track Number"),
"utime" => _("Uploaded"),
"info_url" => _("Website"),
"year" => _("Year")
);
}
if (is_null($option)) return $this->criteriaOptions;
else return $this->criteriaOptions[$option];
}
private $stringCriteriaOptions = array( private function getStringCriteriaOptions()
"0" => "Select modifier", {
"contains" => "contains", if (!isset($this->stringCriteriaOptions)) {
"does not contain" => "does not contain", $this->stringCriteriaOptions = array(
"is" => "is", "0" => _("Select modifier"),
"is not" => "is not", "contains" => _("contains"),
"starts with" => "starts with", "does not contain" => _("does not contain"),
"ends with" => "ends with" "is" => _("is"),
); "is not" => _("is not"),
"starts with" => _("starts with"),
"ends with" => _("ends with")
);
}
return $this->stringCriteriaOptions;
}
private $numericCriteriaOptions = array( private function getNumericCriteriaOptions()
"0" => "Select modifier", {
"is" => "is", if (!isset($this->numericCriteriaOptions)) {
"is not" => "is not", $this->numericCriteriaOptions = array(
"is greater than" => "is greater than", "0" => _("Select modifier"),
"is less than" => "is less than", "is" => _("is"),
"is in the range" => "is in the range" "is not" => _("is not"),
); "is greater than" => _("is greater than"),
"is less than" => _("is less than"),
"is in the range" => _("is in the range")
);
}
return $this->numericCriteriaOptions;
}
private $limitOptions = array( private function getLimitOptions()
"hours" => "hours", {
"minutes" => "minutes", if (!isset($this->limitOptions)) {
"items" => "items" $this->limitOptions = array(
); "hours" => _("hours"),
"minutes" => _("minutes"),
"items" => _("items")
);
}
return $this->limitOptions;
}
public function init() public function init()
{ {
@ -99,11 +130,11 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
} }
$spType = new Zend_Form_Element_Radio('sp_type'); $spType = new Zend_Form_Element_Radio('sp_type');
$spType->setLabel('Set smart block type:') $spType->setLabel(_('Set smart block type:'))
->setDecorators(array('viewHelper')) ->setDecorators(array('viewHelper'))
->setMultiOptions(array( ->setMultiOptions(array(
'static' => 'Static', 'static' => _('Static'),
'dynamic' => 'Dynamic' 'dynamic' => _('Dynamic')
)) ))
->setValue($blockType); ->setValue($blockType);
$this->addElement($spType); $this->addElement($spType);
@ -126,7 +157,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
if (isset($storedCrit["crit"])) { if (isset($storedCrit["crit"])) {
$criteriaKeys = array_keys($storedCrit["crit"]); $criteriaKeys = array_keys($storedCrit["crit"]);
} }
$numElements = count($this->criteriaOptions); $numElements = count($this->getCriteriaOptions());
for ($i = 0; $i < $numElements; $i++) { for ($i = 0; $i < $numElements; $i++) {
$criteriaType = ""; $criteriaType = "";
@ -153,7 +184,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$criteria->setAttrib('class', 'input_select sp_input_select'.$invisible) $criteria->setAttrib('class', 'input_select sp_input_select'.$invisible)
->setValue('Select criteria') ->setValue('Select criteria')
->setDecorators(array('viewHelper')) ->setDecorators(array('viewHelper'))
->setMultiOptions($this->criteriaOptions); ->setMultiOptions($this->getCriteriaOptions());
if ($i != 0 && !isset($criteriaKeys[$i])) { if ($i != 0 && !isset($criteriaKeys[$i])) {
$criteria->setAttrib('disabled', 'disabled'); $criteria->setAttrib('disabled', 'disabled');
} }
@ -174,13 +205,13 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
} }
if (isset($criteriaKeys[$i])) { if (isset($criteriaKeys[$i])) {
if ($criteriaType == "s") { if ($criteriaType == "s") {
$criteriaModifers->setMultiOptions($this->stringCriteriaOptions); $criteriaModifers->setMultiOptions($this->getStringCriteriaOptions());
} else { } else {
$criteriaModifers->setMultiOptions($this->numericCriteriaOptions); $criteriaModifers->setMultiOptions($this->getNumericCriteriaOptions());
} }
$criteriaModifers->setValue($storedCrit["crit"][$criteriaKeys[$i]][$j]["modifier"]); $criteriaModifers->setValue($storedCrit["crit"][$criteriaKeys[$i]][$j]["modifier"]);
} else { } else {
$criteriaModifers->setMultiOptions(array('0' => 'Select modifier')); $criteriaModifers->setMultiOptions(array('0' => _('Select modifier')));
} }
$this->addElement($criteriaModifers); $this->addElement($criteriaModifers);
@ -214,7 +245,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$repeatTracks = new Zend_Form_Element_Checkbox('sp_repeat_tracks'); $repeatTracks = new Zend_Form_Element_Checkbox('sp_repeat_tracks');
$repeatTracks->setDecorators(array('viewHelper')) $repeatTracks->setDecorators(array('viewHelper'))
->setLabel('Allow Repeat Tracks:'); ->setLabel(_('Allow Repeat Tracks:'));
if (isset($storedCrit["repeat_tracks"])) { if (isset($storedCrit["repeat_tracks"])) {
$repeatTracks->setChecked($storedCrit["repeat_tracks"]["value"] == 1?true:false); $repeatTracks->setChecked($storedCrit["repeat_tracks"]["value"] == 1?true:false);
} }
@ -223,7 +254,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$limit = new Zend_Form_Element_Select('sp_limit_options'); $limit = new Zend_Form_Element_Select('sp_limit_options');
$limit->setAttrib('class', 'sp_input_select') $limit->setAttrib('class', 'sp_input_select')
->setDecorators(array('viewHelper')) ->setDecorators(array('viewHelper'))
->setMultiOptions($this->limitOptions); ->setMultiOptions($this->getLimitOptions());
if (isset($storedCrit["limit"])) { if (isset($storedCrit["limit"])) {
$limit->setValue($storedCrit["limit"]["modifier"]); $limit->setValue($storedCrit["limit"]["modifier"]);
} }
@ -231,7 +262,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$limitValue = new Zend_Form_Element_Text('sp_limit_value'); $limitValue = new Zend_Form_Element_Text('sp_limit_value');
$limitValue->setAttrib('class', 'sp_input_text_limit') $limitValue->setAttrib('class', 'sp_input_text_limit')
->setLabel('Limit to') ->setLabel(_('Limit to'))
->setDecorators(array('viewHelper')); ->setDecorators(array('viewHelper'));
$this->addElement($limitValue); $this->addElement($limitValue);
if (isset($storedCrit["limit"])) { if (isset($storedCrit["limit"])) {
@ -253,23 +284,23 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$generate = new Zend_Form_Element_Button('generate_button'); $generate = new Zend_Form_Element_Button('generate_button');
$generate->setAttrib('class', 'btn btn-small'); $generate->setAttrib('class', 'btn btn-small');
$generate->setAttrib('title', 'Generate playlist content and save criteria'); $generate->setAttrib('title', _('Generate playlist content and save criteria'));
$generate->setIgnore(true); $generate->setIgnore(true);
$generate->setLabel('Generate'); $generate->setLabel(_('Generate'));
$generate->setDecorators(array('viewHelper')); $generate->setDecorators(array('viewHelper'));
$this->addElement($generate); $this->addElement($generate);
$shuffle = new Zend_Form_Element_Button('shuffle_button'); $shuffle = new Zend_Form_Element_Button('shuffle_button');
$shuffle->setAttrib('class', 'btn btn-small'); $shuffle->setAttrib('class', 'btn btn-small');
$shuffle->setAttrib('title', 'Shuffle playlist content'); $shuffle->setAttrib('title', _('Shuffle playlist content'));
$shuffle->setIgnore(true); $shuffle->setIgnore(true);
$shuffle->setLabel('Shuffle'); $shuffle->setLabel(_('Shuffle'));
$shuffle->setDecorators(array('viewHelper')); $shuffle->setDecorators(array('viewHelper'));
$this->addElement($shuffle); $this->addElement($shuffle);
$this->setDecorators(array( $this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/smart-block-criteria.phtml', "openOption"=> $openSmartBlockOption, array('ViewScript', array('viewScript' => 'form/smart-block-criteria.phtml', "openOption"=> $openSmartBlockOption,
'criteriasLength' => count($this->criteriaOptions), 'poolCount' => $files['count'], 'modRowMap' => $modRowMap, 'criteriasLength' => count($this->getCriteriaOptions()), 'poolCount' => $files['count'], 'modRowMap' => $modRowMap,
'showPoolCount' => $showPoolCount)) 'showPoolCount' => $showPoolCount))
)); ));
} }
@ -285,17 +316,17 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
foreach ($d as $modKey=>$modInfo) { foreach ($d as $modKey=>$modInfo) {
if ($modKey == 0) { if ($modKey == 0) {
$eleCrit = $this->getElement("sp_criteria_field_".$critKey."_".$modKey); $eleCrit = $this->getElement("sp_criteria_field_".$critKey."_".$modKey);
$eleCrit->setValue($this->criteriaOptions[$modInfo['sp_criteria_field']]); $eleCrit->setValue($this->getCriteriaOptions($modInfo['sp_criteria_field']));
$eleCrit->setAttrib("disabled", null); $eleCrit->setAttrib("disabled", null);
$eleMod = $this->getElement("sp_criteria_modifier_".$critKey."_".$modKey); $eleMod = $this->getElement("sp_criteria_modifier_".$critKey."_".$modKey);
$criteriaType = $this->criteriaTypes[$modInfo['sp_criteria_field']]; $criteriaType = $this->criteriaTypes[$modInfo['sp_criteria_field']];
if ($criteriaType == "s") { if ($criteriaType == "s") {
$eleMod->setMultiOptions($this->stringCriteriaOptions); $eleMod->setMultiOptions($this->getStringCriteriaOptions());
} elseif ($criteriaType == "n") { } elseif ($criteriaType == "n") {
$eleMod->setMultiOptions($this->numericCriteriaOptions); $eleMod->setMultiOptions($this->getNumericCriteriaOptions());
} else { } else {
$eleMod->setMultiOptions(array('0' => 'Select modifier')); $eleMod->setMultiOptions(array('0' => _('Select modifier')));
} }
$eleMod->setValue($modInfo['sp_criteria_modifier']); $eleMod->setValue($modInfo['sp_criteria_modifier']);
$eleMod->setAttrib("disabled", null); $eleMod->setAttrib("disabled", null);
@ -316,10 +347,10 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$criteria->setAttrib('class', 'input_select sp_input_select sp-invisible') $criteria->setAttrib('class', 'input_select sp_input_select sp-invisible')
->setValue('Select criteria') ->setValue('Select criteria')
->setDecorators(array('viewHelper')) ->setDecorators(array('viewHelper'))
->setMultiOptions($this->criteriaOptions); ->setMultiOptions($this->getCriteriaOptions());
$criteriaType = $this->criteriaTypes[$modInfo['sp_criteria_field']]; $criteriaType = $this->criteriaTypes[$modInfo['sp_criteria_field']];
$criteria->setValue($this->criteriaOptions[$modInfo['sp_criteria_field']]); $criteria->setValue($this->getCriteriaOptions($modInfo['sp_criteria_field']));
$this->addElement($criteria); $this->addElement($criteria);
/****************** MODIFIER ***********/ /****************** MODIFIER ***********/
@ -329,11 +360,11 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
->setDecorators(array('viewHelper')); ->setDecorators(array('viewHelper'));
if ($criteriaType == "s") { if ($criteriaType == "s") {
$criteriaModifers->setMultiOptions($this->stringCriteriaOptions); $criteriaModifers->setMultiOptions($this->getStringCriteriaOptions());
} elseif ($criteriaType == "n") { } elseif ($criteriaType == "n") {
$criteriaModifers->setMultiOptions($this->numericCriteriaOptions); $criteriaModifers->setMultiOptions($this->getNumericCriteriaOptions());
} else { } else {
$criteriaModifers->setMultiOptions(array('0' => 'Select modifier')); $criteriaModifers->setMultiOptions(array('0' => _('Select modifier')));
} }
$criteriaModifers->setValue($modInfo['sp_criteria_modifier']); $criteriaModifers->setValue($modInfo['sp_criteria_modifier']);
$this->addElement($criteriaModifers); $this->addElement($criteriaModifers);
@ -427,25 +458,25 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
if ($data['etc']['sp_limit_options'] == 'hours' || $data['etc']['sp_limit_options'] == 'mins') { if ($data['etc']['sp_limit_options'] == 'hours' || $data['etc']['sp_limit_options'] == 'mins') {
$element = $this->getElement("sp_limit_value"); $element = $this->getElement("sp_limit_value");
if ($data['etc']['sp_limit_value'] == "" || floatval($data['etc']['sp_limit_value']) <= 0) { if ($data['etc']['sp_limit_value'] == "" || floatval($data['etc']['sp_limit_value']) <= 0) {
$element->addError("Limit cannot be empty or smaller than 0"); $element->addError(_("Limit cannot be empty or smaller than 0"));
$isValid = false; $isValid = false;
} else { } else {
$mins = floatval($data['etc']['sp_limit_value']) * $multiplier; $mins = floatval($data['etc']['sp_limit_value']) * $multiplier;
if ($mins > 1440) { if ($mins > 1440) {
$element->addError("Limit cannot be more than 24 hrs"); $element->addError(_("Limit cannot be more than 24 hrs"));
$isValid = false; $isValid = false;
} }
} }
} else { } else {
$element = $this->getElement("sp_limit_value"); $element = $this->getElement("sp_limit_value");
if ($data['etc']['sp_limit_value'] == "" || floatval($data['etc']['sp_limit_value']) <= 0) { if ($data['etc']['sp_limit_value'] == "" || floatval($data['etc']['sp_limit_value']) <= 0) {
$element->addError("Limit cannot be empty or smaller than 0"); $element->addError(_("Limit cannot be empty or smaller than 0"));
$isValid = false; $isValid = false;
} elseif (!ctype_digit($data['etc']['sp_limit_value'])) { } elseif (!ctype_digit($data['etc']['sp_limit_value'])) {
$element->addError("The value should be an integer"); $element->addError(_("The value should be an integer"));
$isValid = false; $isValid = false;
} elseif (intval($data['etc']['sp_limit_value']) > 500) { } elseif (intval($data['etc']['sp_limit_value']) > 500) {
$element->addError("500 is the max item limit value you can set"); $element->addError(_("500 is the max item limit value you can set"));
$isValid = false; $isValid = false;
} }
} }
@ -456,19 +487,19 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$element = $this->getElement("sp_criteria_field_".$rowKey."_".$key); $element = $this->getElement("sp_criteria_field_".$rowKey."_".$key);
// check for not selected select box // check for not selected select box
if ($d['sp_criteria_field'] == "0" || $d['sp_criteria_modifier'] == "0") { if ($d['sp_criteria_field'] == "0" || $d['sp_criteria_modifier'] == "0") {
$element->addError("You must select Criteria and Modifier"); $element->addError(_("You must select Criteria and Modifier"));
$isValid = false; $isValid = false;
} else { } else {
$column = CcFilesPeer::getTableMap()->getColumnByPhpName($criteria2PeerMap[$d['sp_criteria_field']]); $column = CcFilesPeer::getTableMap()->getColumnByPhpName($criteria2PeerMap[$d['sp_criteria_field']]);
// validation on type of column // validation on type of column
if ($d['sp_criteria_field'] == 'length') { if ($d['sp_criteria_field'] == 'length') {
if (!preg_match("/^(\d{2}):(\d{2}):(\d{2})/", $d['sp_criteria_value'])) { if (!preg_match("/^(\d{2}):(\d{2}):(\d{2})/", $d['sp_criteria_value'])) {
$element->addError("'Length' should be in '00:00:00' format"); $element->addError(_("'Length' should be in '00:00:00' format"));
$isValid = false; $isValid = false;
} }
} elseif ($column->getType() == PropelColumnTypes::TIMESTAMP) { } elseif ($column->getType() == PropelColumnTypes::TIMESTAMP) {
if (!preg_match("/(\d{4})-(\d{2})-(\d{2})/", $d['sp_criteria_value'])) { if (!preg_match("/(\d{4})-(\d{2})-(\d{2})/", $d['sp_criteria_value'])) {
$element->addError("The value should be in timestamp format(eg. 0000-00-00 or 00-00-00 00:00:00"); $element->addError(_("The value should be in timestamp format(eg. 0000-00-00 or 00-00-00 00:00:00)"));
$isValid = false; $isValid = false;
} else { } else {
$result = Application_Common_DateHelper::checkDateTimeRangeForSQL($d['sp_criteria_value']); $result = Application_Common_DateHelper::checkDateTimeRangeForSQL($d['sp_criteria_value']);
@ -481,7 +512,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
if (isset($d['sp_criteria_extra'])) { if (isset($d['sp_criteria_extra'])) {
if (!preg_match("/(\d{4})-(\d{2})-(\d{2})/", $d['sp_criteria_extra'])) { if (!preg_match("/(\d{4})-(\d{2})-(\d{2})/", $d['sp_criteria_extra'])) {
$element->addError("The value should be in timestamp format(eg. 0000-00-00 or 00-00-00 00:00:00"); $element->addError(_("The value should be in timestamp format(eg. 0000-00-00 or 00-00-00 00:00:00)"));
$isValid = false; $isValid = false;
} else { } else {
$result = Application_Common_DateHelper::checkDateTimeRangeForSQL($d['sp_criteria_extra']); $result = Application_Common_DateHelper::checkDateTimeRangeForSQL($d['sp_criteria_extra']);
@ -495,24 +526,24 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
} elseif ($column->getType() == PropelColumnTypes::INTEGER && } elseif ($column->getType() == PropelColumnTypes::INTEGER &&
$d['sp_criteria_field'] != 'owner_id') { $d['sp_criteria_field'] != 'owner_id') {
if (!is_numeric($d['sp_criteria_value'])) { if (!is_numeric($d['sp_criteria_value'])) {
$element->addError("The value has to be numeric"); $element->addError(_("The value has to be numeric"));
$isValid = false; $isValid = false;
} }
// length check // length check
if (intval($d['sp_criteria_value']) >= pow(2,31)) { if (intval($d['sp_criteria_value']) >= pow(2,31)) {
$element->addError("The value should be less then 2147483648"); $element->addError(_("The value should be less then 2147483648"));
$isValid = false; $isValid = false;
} }
} elseif ($column->getType() == PropelColumnTypes::VARCHAR) { } elseif ($column->getType() == PropelColumnTypes::VARCHAR) {
if (strlen($d['sp_criteria_value']) > $column->getSize()) { if (strlen($d['sp_criteria_value']) > $column->getSize()) {
$element->addError("The value should be less ".$column->getSize()." characters"); $element->addError(sprintf(_("The value should be less than %s characters"), $column->getSize()));
$isValid = false; $isValid = false;
} }
} }
} }
if ($d['sp_criteria_value'] == "") { if ($d['sp_criteria_value'] == "") {
$element->addError("Value cannot be empty"); $element->addError(_("Value cannot be empty"));
$isValid = false; $isValid = false;
} }
}//end foreach }//end foreach

View File

@ -13,7 +13,7 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
//enable soundcloud uploads //enable soundcloud uploads
$this->addElement('checkbox', 'UseSoundCloud', array( $this->addElement('checkbox', 'UseSoundCloud', array(
'label' => 'Automatically Upload Recorded Shows', 'label' => _('Automatically Upload Recorded Shows'),
'required' => false, 'required' => false,
'value' => Application_Model_Preference::GetAutoUploadRecordedShowToSoundcloud(), 'value' => Application_Model_Preference::GetAutoUploadRecordedShowToSoundcloud(),
'decorators' => array( 'decorators' => array(
@ -23,7 +23,7 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
//enable soundcloud uploads option //enable soundcloud uploads option
$this->addElement('checkbox', 'UploadToSoundcloudOption', array( $this->addElement('checkbox', 'UploadToSoundcloudOption', array(
'label' => 'Enable SoundCloud Upload', 'label' => _('Enable SoundCloud Upload'),
'required' => false, 'required' => false,
'value' => Application_Model_Preference::GetUploadToSoundcloudOption(), 'value' => Application_Model_Preference::GetUploadToSoundcloudOption(),
'decorators' => array( 'decorators' => array(
@ -33,7 +33,7 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
//enable downloadable for soundcloud //enable downloadable for soundcloud
$this->addElement('checkbox', 'SoundCloudDownloadbleOption', array( $this->addElement('checkbox', 'SoundCloudDownloadbleOption', array(
'label' => 'Automatically Mark Files "Downloadable" on SoundCloud', 'label' => _('Automatically Mark Files "Downloadable" on SoundCloud'),
'required' => false, 'required' => false,
'value' => Application_Model_Preference::GetSoundCloudDownloadbleOption(), 'value' => Application_Model_Preference::GetSoundCloudDownloadbleOption(),
'decorators' => array( 'decorators' => array(
@ -44,7 +44,7 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
//SoundCloud Username //SoundCloud Username
$this->addElement('text', 'SoundCloudUser', array( $this->addElement('text', 'SoundCloudUser', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'SoundCloud Email', 'label' => _('SoundCloud Email'),
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'autocomplete' => 'off', 'autocomplete' => 'off',
'value' => Application_Model_Preference::GetSoundCloudUser(), 'value' => Application_Model_Preference::GetSoundCloudUser(),
@ -64,7 +64,7 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
//SoundCloud Password //SoundCloud Password
$this->addElement('password', 'SoundCloudPassword', array( $this->addElement('password', 'SoundCloudPassword', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'SoundCloud Password', 'label' => _('SoundCloud Password'),
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'autocomplete' => 'off', 'autocomplete' => 'off',
'value' => Application_Model_Preference::GetSoundCloudPassword(), 'value' => Application_Model_Preference::GetSoundCloudPassword(),
@ -84,7 +84,7 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
// Add the description element // Add the description element
$this->addElement('textarea', 'SoundCloudTags', array( $this->addElement('textarea', 'SoundCloudTags', array(
'label' => 'SoundCloud Tags: (separate tags with spaces)', 'label' => _('SoundCloud Tags: (separate tags with spaces)'),
'required' => false, 'required' => false,
'class' => 'input_text_area', 'class' => 'input_text_area',
'value' => Application_Model_Preference::GetSoundCloudTags(), 'value' => Application_Model_Preference::GetSoundCloudTags(),
@ -96,7 +96,7 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
//SoundCloud default genre //SoundCloud default genre
$this->addElement('text', 'SoundCloudGenre', array( $this->addElement('text', 'SoundCloudGenre', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Default Genre:', 'label' => _('Default Genre:'),
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'value' => Application_Model_Preference::GetSoundCloudGenre(), 'value' => Application_Model_Preference::GetSoundCloudGenre(),
@ -106,7 +106,7 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
)); ));
$select = new Zend_Form_Element_Select('SoundCloudTrackType'); $select = new Zend_Form_Element_Select('SoundCloudTrackType');
$select->setLabel('Default Track Type:'); $select->setLabel(_('Default Track Type:'));
$select->setAttrib('class', 'input_select'); $select->setAttrib('class', 'input_select');
$select->setMultiOptions(array( $select->setMultiOptions(array(
"" => "", "" => "",
@ -130,7 +130,7 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
$this->addElement($select); $this->addElement($select);
$select = new Zend_Form_Element_Select('SoundCloudLicense'); $select = new Zend_Form_Element_Select('SoundCloudLicense');
$select->setLabel('Default License:'); $select->setLabel(_('Default License:'));
$select->setAttrib('class', 'input_select'); $select->setAttrib('class', 'input_select');
$select->setMultiOptions(array( $select->setMultiOptions(array(
"" => "", "" => "",

View File

@ -19,7 +19,7 @@ class Application_Form_StreamSetting extends Zend_Form
$setting = $this->setting; $setting = $this->setting;
if (Application_Model_Preference::GetPlanLevel() == 'disabled') { if (Application_Model_Preference::GetPlanLevel() == 'disabled') {
$output_sound_device = new Zend_Form_Element_Checkbox('output_sound_device'); $output_sound_device = new Zend_Form_Element_Checkbox('output_sound_device');
$output_sound_device->setLabel('Hardware Audio Output') $output_sound_device->setLabel(_('Hardware Audio Output'))
->setRequired(false) ->setRequired(false)
->setValue(($setting['output_sound_device'] == "true")?1:0) ->setValue(($setting['output_sound_device'] == "true")?1:0)
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
@ -30,7 +30,7 @@ class Application_Form_StreamSetting extends Zend_Form
$output_types = array("ALSA"=>"ALSA", "AO"=>"AO", "OSS"=>"OSS", "Portaudio"=>"Portaudio", "Pulseaudio"=>"Pulseaudio"); $output_types = array("ALSA"=>"ALSA", "AO"=>"AO", "OSS"=>"OSS", "Portaudio"=>"Portaudio", "Pulseaudio"=>"Pulseaudio");
$output_type = new Zend_Form_Element_Select('output_sound_device_type'); $output_type = new Zend_Form_Element_Select('output_sound_device_type');
$output_type->setLabel("Output Type") $output_type->setLabel(_("Output Type"))
->setMultiOptions($output_types) ->setMultiOptions($output_types)
->setValue($setting['output_sound_device_type']) ->setValue($setting['output_sound_device_type'])
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
@ -41,7 +41,7 @@ class Application_Form_StreamSetting extends Zend_Form
} }
$icecast_vorbis_metadata = new Zend_Form_Element_Checkbox('icecast_vorbis_metadata'); $icecast_vorbis_metadata = new Zend_Form_Element_Checkbox('icecast_vorbis_metadata');
$icecast_vorbis_metadata->setLabel('Icecast Vorbis Metadata') $icecast_vorbis_metadata->setLabel(_('Icecast Vorbis Metadata'))
->setRequired(false) ->setRequired(false)
->setValue(($setting['icecast_vorbis_metadata'] == "true")?1:0) ->setValue(($setting['icecast_vorbis_metadata'] == "true")?1:0)
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
@ -51,10 +51,10 @@ class Application_Form_StreamSetting extends Zend_Form
$this->addElement($icecast_vorbis_metadata); $this->addElement($icecast_vorbis_metadata);
$stream_format = new Zend_Form_Element_Radio('streamFormat'); $stream_format = new Zend_Form_Element_Radio('streamFormat');
$stream_format->setLabel('Stream Label:'); $stream_format->setLabel(_('Stream Label:'));
$stream_format->setMultiOptions(array("Artist - Title", $stream_format->setMultiOptions(array(_("Artist - Title"),
"Show - Artist - Title", _("Show - Artist - Title"),
"Station name - Show name")); _("Station name - Show name")));
$stream_format->setValue(Application_Model_Preference::GetStreamLabelFormat()); $stream_format->setValue(Application_Model_Preference::GetStreamLabelFormat());
$stream_format->setDecorators(array('ViewHelper')); $stream_format->setDecorators(array('ViewHelper'));
$this->addElement($stream_format); $this->addElement($stream_format);

View File

@ -45,7 +45,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$disable_all = Application_Model_Preference::GetEnableStreamConf() == "false"; $disable_all = Application_Model_Preference::GetEnableStreamConf() == "false";
$enable = new Zend_Form_Element_Checkbox('enable'); $enable = new Zend_Form_Element_Checkbox('enable');
$enable->setLabel('Enabled:') $enable->setLabel(_('Enabled:'))
->setValue($setting[$prefix.'_enable'] == 'true' ? 1 : 0) ->setValue($setting[$prefix.'_enable'] == 'true' ? 1 : 0)
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
if ($disable_all) { if ($disable_all) {
@ -54,7 +54,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($enable); $this->addElement($enable);
$type = new Zend_Form_Element_Select('type'); $type = new Zend_Form_Element_Select('type');
$type->setLabel("Stream Type:") $type->setLabel(_("Stream Type:"))
->setMultiOptions($stream_types) ->setMultiOptions($stream_types)
->setValue(isset($setting[$prefix.'_type'])?$setting[$prefix.'_type']:0) ->setValue(isset($setting[$prefix.'_type'])?$setting[$prefix.'_type']:0)
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
@ -64,7 +64,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($type); $this->addElement($type);
$bitrate = new Zend_Form_Element_Select('bitrate'); $bitrate = new Zend_Form_Element_Select('bitrate');
$bitrate->setLabel("Bit Rate:") $bitrate->setLabel(_("Bit Rate:"))
->setMultiOptions($stream_bitrates) ->setMultiOptions($stream_bitrates)
->setValue(isset($setting[$prefix.'_bitrate'])?$setting[$prefix.'_bitrate']:0) ->setValue(isset($setting[$prefix.'_bitrate'])?$setting[$prefix.'_bitrate']:0)
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
@ -74,7 +74,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($bitrate); $this->addElement($bitrate);
$output = new Zend_Form_Element_Select('output'); $output = new Zend_Form_Element_Select('output');
$output->setLabel("Service Type:") $output->setLabel(_("Service Type:"))
->setMultiOptions(array("icecast"=>"Icecast", "shoutcast"=>"SHOUTcast")) ->setMultiOptions(array("icecast"=>"Icecast", "shoutcast"=>"SHOUTcast"))
->setValue(isset($setting[$prefix.'_output'])?$setting[$prefix.'_output']:"icecast") ->setValue(isset($setting[$prefix.'_output'])?$setting[$prefix.'_output']:"icecast")
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
@ -84,8 +84,8 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($output); $this->addElement($output);
$channels = new Zend_Form_Element_Select('channels'); $channels = new Zend_Form_Element_Select('channels');
$channels->setLabel("Channels:") $channels->setLabel(_("Channels:"))
->setMultiOptions(array("mono"=>"1 - Mono", "stereo"=>"2 - Stereo")) ->setMultiOptions(array("mono"=>_("1 - Mono"), "stereo"=>_("2 - Stereo")))
->setValue(isset($setting[$prefix.'_channels']) ? $setting[$prefix.'_channels'] : "stereo") ->setValue(isset($setting[$prefix.'_channels']) ? $setting[$prefix.'_channels'] : "stereo")
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
if ($disable_all) { if ($disable_all) {
@ -94,10 +94,10 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($channels); $this->addElement($channels);
$host = new Zend_Form_Element_Text('host'); $host = new Zend_Form_Element_Text('host');
$host->setLabel("Server") $host->setLabel(_("Server"))
->setValue(isset($setting[$prefix.'_host'])?$setting[$prefix.'_host']:"") ->setValue(isset($setting[$prefix.'_host'])?$setting[$prefix.'_host']:"")
->setValidators(array( ->setValidators(array(
array('regex', false, array('/^[0-9a-zA-Z-_.]+$/', 'messages' => 'Invalid character entered')))) array('regex', false, array('/^[0-9a-zA-Z-_.]+$/', 'messages' => _('Invalid character entered')))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
if ($disable_all) { if ($disable_all) {
$host->setAttrib("disabled", "disabled"); $host->setAttrib("disabled", "disabled");
@ -106,10 +106,10 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($host); $this->addElement($host);
$port = new Zend_Form_Element_Text('port'); $port = new Zend_Form_Element_Text('port');
$port->setLabel("Port") $port->setLabel(_("Port"))
->setValue(isset($setting[$prefix.'_port'])?$setting[$prefix.'_port']:"") ->setValue(isset($setting[$prefix.'_port'])?$setting[$prefix.'_port']:"")
->setValidators(array(new Zend_Validate_Between(array('min'=>0, 'max'=>99999)))) ->setValidators(array(new Zend_Validate_Between(array('min'=>0, 'max'=>99999))))
->addValidator('regex', false, array('pattern'=>'/^[0-9]+$/', 'messages'=>array('regexNotMatch'=>'Only numbers are allowed.'))) ->addValidator('regex', false, array('pattern'=>'/^[0-9]+$/', 'messages'=>array('regexNotMatch'=>_('Only numbers are allowed.'))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
if ($disable_all) { if ($disable_all) {
$port->setAttrib("disabled", "disabled"); $port->setAttrib("disabled", "disabled");
@ -117,10 +117,10 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($port); $this->addElement($port);
$pass = new Zend_Form_Element_Text('pass'); $pass = new Zend_Form_Element_Text('pass');
$pass->setLabel("Password") $pass->setLabel(_("Password"))
->setValue(isset($setting[$prefix.'_pass'])?$setting[$prefix.'_pass']:"") ->setValue(isset($setting[$prefix.'_pass'])?$setting[$prefix.'_pass']:"")
->setValidators(array( ->setValidators(array(
array('regex', false, array('/^[^ &<>]+$/', 'messages' => 'Invalid character entered')))) array('regex', false, array('/^[^ &<>]+$/', 'messages' => _('Invalid character entered')))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
if ($disable_all) { if ($disable_all) {
$pass->setAttrib("disabled", "disabled"); $pass->setAttrib("disabled", "disabled");
@ -129,7 +129,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($pass); $this->addElement($pass);
$genre = new Zend_Form_Element_Text('genre'); $genre = new Zend_Form_Element_Text('genre');
$genre->setLabel("Genre") $genre->setLabel(_("Genre"))
->setValue(isset($setting[$prefix.'_genre'])?$setting[$prefix.'_genre']:"") ->setValue(isset($setting[$prefix.'_genre'])?$setting[$prefix.'_genre']:"")
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
if ($disable_all) { if ($disable_all) {
@ -138,10 +138,10 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($genre); $this->addElement($genre);
$url = new Zend_Form_Element_Text('url'); $url = new Zend_Form_Element_Text('url');
$url->setLabel("URL") $url->setLabel(_("URL"))
->setValue(isset($setting[$prefix.'_url'])?$setting[$prefix.'_url']:"") ->setValue(isset($setting[$prefix.'_url'])?$setting[$prefix.'_url']:"")
->setValidators(array( ->setValidators(array(
array('regex', false, array('/^[0-9a-zA-Z\-_.:\/]+$/', 'messages' => 'Invalid character entered')))) array('regex', false, array('/^[0-9a-zA-Z\-_.:\/]+$/', 'messages' => _('Invalid character entered')))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
if ($disable_all) { if ($disable_all) {
$url->setAttrib("disabled", "disabled"); $url->setAttrib("disabled", "disabled");
@ -150,7 +150,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($url); $this->addElement($url);
$name = new Zend_Form_Element_Text('name'); $name = new Zend_Form_Element_Text('name');
$name->setLabel("Name") $name->setLabel(_("Name"))
->setValue(isset($setting[$prefix.'_name'])?$setting[$prefix.'_name']:"") ->setValue(isset($setting[$prefix.'_name'])?$setting[$prefix.'_name']:"")
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
if ($disable_all) { if ($disable_all) {
@ -159,7 +159,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($name); $this->addElement($name);
$description = new Zend_Form_Element_Text('description'); $description = new Zend_Form_Element_Text('description');
$description->setLabel("Description") $description->setLabel(_("Description"))
->setValue(isset($setting[$prefix.'_description'])?$setting[$prefix.'_description']:"") ->setValue(isset($setting[$prefix.'_description'])?$setting[$prefix.'_description']:"")
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
if ($disable_all) { if ($disable_all) {
@ -168,10 +168,10 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($description); $this->addElement($description);
$mount = new Zend_Form_Element_Text('mount'); $mount = new Zend_Form_Element_Text('mount');
$mount->setLabel("Mount Point") $mount->setLabel(_("Mount Point"))
->setValue(isset($setting[$prefix.'_mount'])?$setting[$prefix.'_mount']:"") ->setValue(isset($setting[$prefix.'_mount'])?$setting[$prefix.'_mount']:"")
->setValidators(array( ->setValidators(array(
array('regex', false, array('/^[^ &<>]+$/', 'messages' => 'Invalid character entered')))) array('regex', false, array('/^[^ &<>]+$/', 'messages' => _('Invalid character entered')))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
if ($disable_all) { if ($disable_all) {
$mount->setAttrib("disabled", "disabled"); $mount->setAttrib("disabled", "disabled");
@ -180,10 +180,10 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
$this->addElement($mount); $this->addElement($mount);
$user = new Zend_Form_Element_Text('user'); $user = new Zend_Form_Element_Text('user');
$user->setLabel("Username") $user->setLabel(_("Username"))
->setValue(isset($setting[$prefix.'_user'])?$setting[$prefix.'_user']:"") ->setValue(isset($setting[$prefix.'_user'])?$setting[$prefix.'_user']:"")
->setValidators(array( ->setValidators(array(
array('regex', false, array('/^[^ &<>]+$/', 'messages' => 'Invalid character entered')))) array('regex', false, array('/^[^ &<>]+$/', 'messages' => _('Invalid character entered')))))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
if ($disable_all) { if ($disable_all) {
$user->setAttrib("disabled", "disabled"); $user->setAttrib("disabled", "disabled");
@ -205,18 +205,18 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
if ($f_data['enable'] == 1) { if ($f_data['enable'] == 1) {
if ($f_data['host'] == '') { if ($f_data['host'] == '') {
$element = $this->getElement("host"); $element = $this->getElement("host");
$element->addError("Server cannot be empty."); $element->addError(_("Server cannot be empty."));
$isValid = false; $isValid = false;
} }
if ($f_data['port'] == '') { if ($f_data['port'] == '') {
$element = $this->getElement("port"); $element = $this->getElement("port");
$element->addError("Port cannot be empty."); $element->addError(_("Port cannot be empty."));
$isValid = false; $isValid = false;
} }
if ($f_data['output'] == 'icecast') { if ($f_data['output'] == 'icecast') {
if ($f_data['mount'] == '') { if ($f_data['mount'] == '') {
$element = $this->getElement("mount"); $element = $this->getElement("mount");
$element->addError("Mount cannot be empty with Icecast server."); $element->addError(_("Mount cannot be empty with Icecast server."));
$isValid = false; $isValid = false;
} }
} }

View File

@ -17,7 +17,7 @@ class Application_Form_SupportSettings extends Zend_Form
//Station name //Station name
$this->addElement('text', 'stationName', array( $this->addElement('text', 'stationName', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Station Name', 'label' => _('Station Name'),
'required' => true, 'required' => true,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validator' => array('NotEmpty'), 'validator' => array('NotEmpty'),
@ -30,7 +30,7 @@ class Application_Form_SupportSettings extends Zend_Form
// Phone number // Phone number
$this->addElement('text', 'Phone', array( $this->addElement('text', 'Phone', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Phone:', 'label' => _('Phone:'),
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'value' => Application_Model_Preference::GetPhone(), 'value' => Application_Model_Preference::GetPhone(),
@ -42,7 +42,7 @@ class Application_Form_SupportSettings extends Zend_Form
//Email //Email
$this->addElement('text', 'Email', array( $this->addElement('text', 'Email', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Email:', 'label' => _('Email:'),
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'value' => Application_Model_Preference::GetEmail(), 'value' => Application_Model_Preference::GetEmail(),
@ -53,7 +53,7 @@ class Application_Form_SupportSettings extends Zend_Form
// Station Web Site // Station Web Site
$this->addElement('text', 'StationWebSite', array( $this->addElement('text', 'StationWebSite', array(
'label' => 'Station Web Site:', 'label' => _('Station Web Site:'),
'required' => false, 'required' => false,
'class' => 'input_text', 'class' => 'input_text',
'value' => Application_Model_Preference::GetStationWebSite(), 'value' => Application_Model_Preference::GetStationWebSite(),
@ -64,7 +64,7 @@ class Application_Form_SupportSettings extends Zend_Form
// county list dropdown // county list dropdown
$this->addElement('select', 'Country', array( $this->addElement('select', 'Country', array(
'label' => 'Country:', 'label' => _('Country:'),
'required' => false, 'required' => false,
'value' => Application_Model_Preference::GetStationCountry(), 'value' => Application_Model_Preference::GetStationCountry(),
'multiOptions' => $country_list, 'multiOptions' => $country_list,
@ -75,7 +75,7 @@ class Application_Form_SupportSettings extends Zend_Form
// Station city // Station city
$this->addElement('text', 'City', array( $this->addElement('text', 'City', array(
'label' => 'City:', 'label' => _('City:'),
'required' => false, 'required' => false,
'class' => 'input_text', 'class' => 'input_text',
'value' => Application_Model_Preference::GetStationCity(), 'value' => Application_Model_Preference::GetStationCity(),
@ -87,7 +87,7 @@ class Application_Form_SupportSettings extends Zend_Form
// Station Description // Station Description
$description = new Zend_Form_Element_Textarea('Description'); $description = new Zend_Form_Element_Textarea('Description');
$description->class = 'input_text_area'; $description->class = 'input_text_area';
$description->setLabel('Station Description:') $description->setLabel(_('Station Description:'))
->setRequired(false) ->setRequired(false)
->setValue(Application_Model_Preference::GetStationDescription()) ->setValue(Application_Model_Preference::GetStationDescription())
->setDecorators(array('ViewHelper')) ->setDecorators(array('ViewHelper'))
@ -97,7 +97,7 @@ class Application_Form_SupportSettings extends Zend_Form
// Station Logo // Station Logo
$upload = new Zend_Form_Element_File('Logo'); $upload = new Zend_Form_Element_File('Logo');
$upload->setLabel('Station Logo:') $upload->setLabel(_('Station Logo:'))
->setRequired(false) ->setRequired(false)
->setDecorators(array('File')) ->setDecorators(array('File'))
->addValidator('Count', false, 1) ->addValidator('Count', false, 1)
@ -108,7 +108,7 @@ class Application_Form_SupportSettings extends Zend_Form
//enable support feedback //enable support feedback
$this->addElement('checkbox', 'SupportFeedback', array( $this->addElement('checkbox', 'SupportFeedback', array(
'label' => 'Send support feedback', 'label' => _('Send support feedback'),
'required' => false, 'required' => false,
'value' => Application_Model_Preference::GetSupportFeedback(), 'value' => Application_Model_Preference::GetSupportFeedback(),
'decorators' => array( 'decorators' => array(
@ -118,7 +118,7 @@ class Application_Form_SupportSettings extends Zend_Form
// checkbox for publicise // checkbox for publicise
$checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise"); $checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise");
$checkboxPublicise->setLabel('Promote my station on Sourcefabric.org') $checkboxPublicise->setLabel(_('Promote my station on Sourcefabric.org'))
->setRequired(false) ->setRequired(false)
->setDecorators(array('ViewHelper')) ->setDecorators(array('ViewHelper'))
->setValue(Application_Model_Preference::GetPublicise()); ->setValue(Application_Model_Preference::GetPublicise());
@ -143,7 +143,10 @@ class Application_Form_SupportSettings extends Zend_Form
// checkbox for privacy policy // checkbox for privacy policy
$checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy"); $checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy");
$checkboxPrivacy->setLabel("By checking this box, I agree to Sourcefabric's <a id=\"link_to_privacy\" href=\"http://www.sourcefabric.org/en/about/policy/\" onclick=\"window.open(this.href); return false;\">privacy policy</a>.") $checkboxPrivacy->setLabel(
sprintf(_("By checking this box, I agree to Sourcefabric's %sprivacy policy%s."),
"<a id='link_to_privacy' href='http://www.sourcefabric.org/en/about/policy/' onclick='window.open(this.href); return false;'>",
"</a>"))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($checkboxPrivacy); $this->addElement($checkboxPrivacy);
@ -151,7 +154,7 @@ class Application_Form_SupportSettings extends Zend_Form
$submit = new Zend_Form_Element_Submit("submit"); $submit = new Zend_Form_Element_Submit("submit");
$submit->class = 'ui-button ui-state-default right-floated'; $submit->class = 'ui-button ui-state-default right-floated';
$submit->setIgnore(true) $submit->setIgnore(true)
->setLabel("Save") ->setLabel(_("Save"))
->setDecorators(array('ViewHelper')); ->setDecorators(array('ViewHelper'));
$this->addElement($submit); $this->addElement($submit);
} }
@ -166,7 +169,7 @@ class Application_Form_SupportSettings extends Zend_Form
if (isset($data["Privacy"])) { if (isset($data["Privacy"])) {
$checkPrivacy = $this->getElement('Privacy'); $checkPrivacy = $this->getElement('Privacy');
if ($data["SupportFeedback"] == "1" && $data["Privacy"] != "1") { if ($data["SupportFeedback"] == "1" && $data["Privacy"] != "1") {
$checkPrivacy->addError("You have to agree to privacy policy."); $checkPrivacy->addError(_("You have to agree to privacy policy."));
$isValid = false; $isValid = false;
} }
} }

View File

@ -11,7 +11,7 @@ class Application_Form_WatchedDirPreferences extends Zend_Form_SubForm
$this->addElement('text', 'storageFolder', array( $this->addElement('text', 'storageFolder', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Import Folder:', 'label' => _('Import Folder:'),
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'value' => '', 'value' => '',
@ -22,7 +22,7 @@ class Application_Form_WatchedDirPreferences extends Zend_Form_SubForm
$this->addElement('text', 'watchedFolder', array( $this->addElement('text', 'watchedFolder', array(
'class' => 'input_text', 'class' => 'input_text',
'label' => 'Watched Folders:', 'label' => _('Watched Folders:'),
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'value' => '', 'value' => '',
@ -37,7 +37,7 @@ class Application_Form_WatchedDirPreferences extends Zend_Form_SubForm
$element = $this->getElement($p_form_element_id); $element = $this->getElement($p_form_element_id);
if (!is_dir($element->getValue())) { if (!is_dir($element->getValue())) {
$element->setErrors(array('Not a valid Directory')); $element->setErrors(array(_('Not a valid Directory')));
return false; return false;
} else { } else {

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("AirtimeRecorder") ?></b><? echo _(" and script/action name "); ?><b><? echo _("index"); ?></b></center>

View File

@ -42,7 +42,7 @@
</div> </div>
<div class="jp-time-holder"> <div class="jp-time-holder">
<div class="jp-current-time"></div> <div class="jp-current-time"></div>
<?php if ($this->type == "audioclip"): ?><div class="jp-duration"></div><? echo _(" "); ?><?php endif;?> <?php if ($this->type == "audioclip"): ?><div class="jp-duration"></div><?php endif;?>
</div> </div>
</div> </div>
<div class="jp-volume-block"> <div class="jp-volume-block">
@ -67,7 +67,9 @@
</div> </div>
<div class="jp-no-solution"> <div class="jp-no-solution">
<span><? echo _("Update Required") ?></span> <span><? echo _("Update Required") ?></span>
To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank"><? echo _("Flash plugin") ?></a>. <? sprintf(_("To play the media you will need to either update your browser to a recent version or update your %sFlash plugin%s."),
"<a href='http://get.adobe.com/flashplayer/' target='_blank'>",
"</a>") ?>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,8 +1,21 @@
<div class="text-content"> <div class="text-content">
<h2><? echo _("About") ?></h2> <h2><? echo _("About") ?></h2>
<p> <p>
<a href="http://airtime.sourcefabric.org" target="_blank"><? echo _("Airtime") ?></a><? echo _(" "); ?><?php echo $this->airtime_version ?><? echo _(", the open radio software for scheduling and remote station management."); ?><br> <?php
© 2012 <a href="http://www.sourcefabric.org" target="_blank"><? echo _("Sourcefabric") ?></a><? echo _(" o.p.s. Airtime is distributed under the "); ?><a href="http://www.gnu.org/licenses/gpl-3.0-standalone.html" target="_blank">GNU GPL v.3</a> echo sprintf(_("%sAirtime%s %s, , the open radio software for scheduling and remote station management. %s"),
"<a href='http://airtime.sourcefabric.org' target='_blank'>",
"</a>",
$this->airtime_version,
"<br />")
?>
<br>© 2012
<?php
echo sprintf(_("%sSourcefabric%s o.p.s. Airtime is distributed under the %sGNU GPL v.3%s"),
"<a href='http://www.sourcefabric.org' target='_blank'>",
"</a>",
"<a href='http://www.gnu.org/licenses/gpl-3.0-standalone.html' target='_blank'>",
"</a>")
?>
</p> </p>
</div> </div>
<br> <br>

View File

@ -1,15 +1,17 @@
<div class="gray-logo"></div> <div class="gray-logo"></div>
<div class="text-content"> <div class="text-content">
<h2>Welcome to Airtime!</h2> <h2><?php echo _("Welcome to Airtime!") ?></h2>
<p>Here's how you can get started using Airtime to automate your broadcasts: </p> <p><?php echo _("Here's how you can get started using Airtime to automate your broadcasts: ")?></p>
<ol> <ol>
<li>Begin by adding your files to the library using the "Add Media" menu button. You can drag and drop your files to this window too.</li> <li><?php echo _("Begin by adding your files to the library using the 'Add Media' menu button. You can drag and drop your files to this window too.")?></li>
<li>Create a show by going to "Calendar" in the menu bar, and then clicking the "+ Show" icon. This can be either a one-time or repeating show. Only admins and program managers can add shows.</li> <li><?php echo _("Create a show by going to 'Calendar' in the menu bar, and then clicking the '+ Show' icon. This can be either a one-time or repeating show. Only admins and program managers can add shows.")?></li>
<li>Add media to the show by going to your show in the Schedule calendar, left-clicking on it and selecting "Add / Remove Content".</li> <li><?php echo _("Add media to the show by going to your show in the Schedule calendar, left-clicking on it and selecting 'Add / Remove Content'")?>.</li>
<li><? echo _("Select your media from the left pane and drag them to your show in the right pane."); ?></li> <li><?php echo _("Select your media from the left pane and drag them to your show in the right pane."); ?></li>
</ol> </ol>
<p><strong>Then you're good to go!</strong><br /> <p><strong><?php echo _("Then you're good to go!")?></strong><br />
For more detailed help, read the <a href="http://www.sourcefabric.org/en/airtime/manuals/" target="_blank"><? echo _("user manual") ?></a><? echo _("."); ?></p> <?php echo sprintf(_("For more detailed help, read the %suser manual%s."),
"<a href='http://www.sourcefabric.org/en/airtime/manuals/' target='_blank'>",
"</a>") ?></p>
</div> </div>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Dashboard") ?></b><? echo _(" and script/action name "); ?><b><? echo _("index"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Error") ?></b><? echo _(" and script/action name "); ?><b><? echo _("denied"); ?></b></center>

View File

@ -7,8 +7,8 @@
</head> </head>
<body> <body>
<div class="error-content"> <div class="error-content">
<h2>Page not found!</h2> <h2><?php echo _("Page not found!")?></h2>
<p>Looks like the page you were looking for doesn't exist!</p> <p><?php echo _("Looks like the page you were looking for doesn't exist!")?></p>
<div class="button-bar"> <div class="button-bar">
<a class="toggle-button" href="<?php echo $this->baseUrl('dashboard/help'); ?>"><? echo _("Help") ?></a> <a class="toggle-button" href="<?php echo $this->baseUrl('dashboard/help'); ?>"><? echo _("Help") ?></a>
</div> </div>

View File

@ -3,7 +3,7 @@
<?php echo $this->element->getElement('his_time_start') ?> <?php echo $this->element->getElement('his_time_start') ?>
<?php echo $this->element->getElement('his_date_end') ?> <?php echo $this->element->getElement('his_date_end') ?>
<?php echo $this->element->getElement('his_time_end') ?> <?php echo $this->element->getElement('his_time_end') ?>
<div id="his_submit" class="ui-button ui-state-default" title="Filter History"> <div id="his_submit" class="ui-button ui-state-default" title="<?php echo _("Filter History")?>">
<span class="ui-icon ui-icon-search"></span> <span class="ui-icon ui-icon-search"></span>
</div> </div>
</div> </div>

View File

@ -105,7 +105,8 @@
<?php endif; ?> <?php endif; ?>
</dd> </dd>
<dt id="master_dj_connection_url-label"> <dt id="master_dj_connection_url-label">
<label class="optional" for="master_dj_connection_url" style="white-space: nowrap">Master Source Connection URL: <label class="optional" for="master_dj_connection_url" style="white-space: nowrap">
<?php echo _("Master Source Connection URL:")?>
</label> </label>
</dt> </dt>
<dd id="master_dj_connection_url-element"> <dd id="master_dj_connection_url-element">
@ -148,7 +149,8 @@
<?php endif; ?> <?php endif; ?>
</dd> </dd>
<dt id="live_dj_connection_url-label"> <dt id="live_dj_connection_url-label">
<label class="optional" for="live_dj_connection_url" style="white-space: nowrap">Show Source Connection URL: <label class="optional" for="live_dj_connection_url" style="white-space: nowrap">
<?php echo _("Show Source Connection URL:")?>
</label> </label>
</dt> </dt>
<dd id="live_dj_connection_url-element"> <dd id="live_dj_connection_url-element">

View File

@ -41,7 +41,7 @@
</dd> </dd>
<dt id="SoundCloudUser-label" class="block-display"> <dt id="SoundCloudUser-label" class="block-display">
<label class="optional" for="SoundCloudUser"><?php echo $this->element->getElement('SoundCloudUser')->getLabel() ?> <label class="optional" for="SoundCloudUser"><?php echo $this->element->getElement('SoundCloudUser')->getLabel() ?>
<span class="info-text-small">(Required)</span> : <span class="info-text-small"><?php echo _("(Required)")?></span> :
</label> </label>
</dt> </dt>
<dd id="SoundCloudUser-element" class="block-display"> <dd id="SoundCloudUser-element" class="block-display">
@ -56,7 +56,7 @@
</dd> </dd>
<dt id="SoundCloudPassword-label" class="block-display"> <dt id="SoundCloudPassword-label" class="block-display">
<label class="optional" for="SoundCloudPassword"><?php echo $this->element->getElement('SoundCloudPassword')->getLabel() ?> <label class="optional" for="SoundCloudPassword"><?php echo $this->element->getElement('SoundCloudPassword')->getLabel() ?>
<span class="info-text-small">(Required)</span> : <span class="info-text-small"><?php echo _("(Required)")?></span> :
</label> </label>
</dt> </dt>
<dd id="SoundCloudPassword-element" class="block-display"> <dd id="SoundCloudPassword-element" class="block-display">

View File

@ -40,8 +40,8 @@
<?php foreach($watched_dirs as $watched_dir): ?> <?php foreach($watched_dirs as $watched_dir): ?>
<dd class="block-display selected-item"> <dd class="block-display selected-item">
<?php echo ($watched_dir->getExistsFlag())?"":"<span class='ui-icon-alert'><img src='/css/images/warning-icon.png'></span>"?><span id="folderPath" style="display:block; width:350px"><?php echo $watched_dir->getDirectory();?></span></span> <?php echo ($watched_dir->getExistsFlag())?"":"<span class='ui-icon-alert'><img src='/css/images/warning-icon.png'></span>"?><span id="folderPath" style="display:block; width:350px"><?php echo $watched_dir->getDirectory();?></span></span>
<span title="Rescan watched directory (This is useful if it is network mount and may be out of sync with Airtime)" class="ui-icon ui-icon-refresh"></span> <span title="<?php echo _("Rescan watched directory (This is useful if it is network mount and may be out of sync with Airtime)")?> class="ui-icon ui-icon-refresh"></span>
<span title="Remove watched directory" class="ui-icon ui-icon-close"></span> <span title="<?php echo _("Remove watched directory")?>" class="ui-icon ui-icon-close"></span>
</dd> </dd>
<?php endforeach; ?> <?php endforeach; ?>

View File

@ -3,11 +3,10 @@
<fieldset> <fieldset>
<dl class="zend_form"> <dl class="zend_form">
<dt class="block-display info-text"> <dt class="block-display info-text">
Help Airtime improve by letting us know how you are using it. This info <?php echo sprintf(_("Help Airtime improve by letting us know how you are using it. This info "
will be collected regularly in order to enhance your user experience. ."will be collected regularly in order to enhance your user experience.%s"
<br /><br /> ."Click 'Yes, help Airtime' and we'll make sure the features you use are"
Click "Yes, help Airtime" and we'll make sure the features you use are ."constantly improving."), "<br /><br />") ?>
constantly improving.
</dt> </dt>
<dd id="SupportFeedback-element" class="block-display"> <dd id="SupportFeedback-element" class="block-display">
<label class="optional" for="SupportFeedback"> <label class="optional" for="SupportFeedback">
@ -23,9 +22,10 @@
<?php endif; ?> <?php endif; ?>
</dd> </dd>
<dt class="block-display info-text"> <dt class="block-display info-text">
Click the box below to advertise your station on <?php echo sprintf(_("Click the box below to advertise your station on %sSourcefabric.org%s."
<a id="link_to_whos_using" href="http://sourcefabric.org/en/airtime/whosusing" onclick="window.open(this.href); return false"><? echo _("Sourcefabric.org"); ?></a>. ." In order to promote your station, 'Send support feedback' must be enabled. This data will be collected in addition to the support feedback."),
In order to promote your station, "Send support feedback" must be enabled. This data will be collected in addition to the support feedback. "<a id='link_to_whos_using' href='http://sourcefabric.org/en/airtime/whosusing' onclick='window.open(this.href); return false'>",
"</a>")?>
</dt> </dt>
<dd id="publicize-element" class="block-display"> <dd id="publicize-element" class="block-display">
<label class="optional" for="Publicise"> <label class="optional" for="Publicise">
@ -44,7 +44,7 @@
<dl id="public-info" style="display:none;"> <dl id="public-info" style="display:none;">
<dt id="stnName-label"> <dt id="stnName-label">
<label class="optional" for="stnName"><?php echo $this->element->getElement('stnName')->getLabel() ?> <label class="optional" for="stnName"><?php echo $this->element->getElement('stnName')->getLabel() ?>
<span class="info-text-small">(Required)</span> : <span class="info-text-small"><?php echo _("(Required)")?></span> :
</label> </label>
</dt> </dt>
<dd id="stnName-element"> <dd id="stnName-element">
@ -62,7 +62,7 @@
</dt> </dt>
<dd id="Phone-element"> <dd id="Phone-element">
<?php echo $this->element->getElement('Phone') ?> <?php echo $this->element->getElement('Phone') ?>
<span class="info-text-small">(for verification purposes only, will not be published)</span> <span class="info-text-small"><?php echo _("(for verification purposes only, will not be published)")?></span>
<?php if($this->element->getElement('Phone')->hasErrors()) : ?> <?php if($this->element->getElement('Phone')->hasErrors()) : ?>
<ul class='errors'> <ul class='errors'>
<?php foreach($this->element->getElement('Phone')->getMessages() as $error): ?> <?php foreach($this->element->getElement('Phone')->getMessages() as $error): ?>
@ -76,7 +76,7 @@
</dt> </dt>
<dd id="Email-element"> <dd id="Email-element">
<?php echo $this->element->getElement('Email') ?> <?php echo $this->element->getElement('Email') ?>
<span class="info-text-small">(for verification purposes only, will not be published)</span> <span class="info-text-small"><?php echo _("(for verification purposes only, will not be published)")?></span>
<?php if($this->element->getElement('Email')->hasErrors()) : ?> <?php if($this->element->getElement('Email')->hasErrors()) : ?>
<ul class='errors'> <ul class='errors'>
<?php foreach($this->element->getElement('Email')->getMessages() as $error): ?> <?php foreach($this->element->getElement('Email')->getMessages() as $error): ?>
@ -147,7 +147,7 @@
<?php }?> <?php }?>
<?php echo $this->element->getElement('Logo') ?> <?php echo $this->element->getElement('Logo') ?>
<p class="info-text">Note: Anything larger than 600x600 will be resized.</p> <p class="info-text"><?php echo _("Note: Anything larger than 600x600 will be resized.")?></p>
<?php if($this->element->getElement('Logo')->hasErrors()) : ?> <?php if($this->element->getElement('Logo')->hasErrors()) : ?>
<ul class='errors'> <ul class='errors'>
<?php foreach($this->element->getElement('Logo')->getMessages() as $error): ?> <?php foreach($this->element->getElement('Logo')->getMessages() as $error): ?>

View File

@ -9,7 +9,7 @@
<fieldset class="padded display_field push-down-8 closed"> <fieldset class="padded display_field push-down-8 closed">
<legend style="cursor: pointer;"> <legend style="cursor: pointer;">
<span class="ui-icon ui-icon-triangle-2-n-s"></span> <span class="ui-icon ui-icon-triangle-2-n-s"></span>
Filter By Show: <?php echo _("Filter By Show:")?>"
</legend> </legend>
<div class="sb-options-form"> <div class="sb-options-form">

View File

@ -117,20 +117,20 @@
if ($this->poolCount > 1) { if ($this->poolCount > 1) {
echo $this->poolCount; echo $this->poolCount;
?> ?>
files meet the criteria <?php echo _("files meet the criteria")?>
</span> </span>
<span class='checked-icon sp-checked-icon' id='sp_pool_count_icon'></span> <span class='checked-icon sp-checked-icon' id='sp_pool_count_icon'></span>
<?php <?php
} else if ($this->poolCount == 1) { } else if ($this->poolCount == 1) {
echo $this->poolCount; echo $this->poolCount;
?> ?>
file meets the criteria <?php echo _("file meet the criteria")?>
</span> </span>
<span class='checked-icon sp-checked-icon' id='sp_pool_count_icon'></span> <span class='checked-icon sp-checked-icon' id='sp_pool_count_icon'></span>
<?php <?php
} else { } else {
?> ?>
0 files meet the criteria 0 <?php echo _(" files meet the criteria")?>
</span> </span>
<span class='sp-warning-icon' id='sp_pool_count_icon'></span> <span class='sp-warning-icon' id='sp_pool_count_icon'></span>
<?php <?php

View File

@ -29,7 +29,8 @@
<?php echo $this->element->getElement('bitrate')?> <?php echo $this->element->getElement('bitrate')?>
</dd> </dd>
<dt id="outputServer-label"> <dt id="outputServer-label">
<label for="outputServer"><?php echo $this->element->getElement('host')->getLabel()?><span class="info-text-small">(Required)</span> :</label> <label for="outputServer"><?php echo $this->element->getElement('host')->getLabel()?><span class="info-text-small">
<?php echo _("(Required)")?></span> :</label>
</dt> </dt>
<dd id="outputServer-element"> <dd id="outputServer-element">
<?php echo $this->element->getElement('host')?> <?php echo $this->element->getElement('host')?>
@ -42,7 +43,8 @@
<?php endif; ?> <?php endif; ?>
</dd> </dd>
<dt id="outputPort-label"> <dt id="outputPort-label">
<label for="outputPort"><?php echo $this->element->getElement('port')->getLabel()?><span class="info-text-small">(Required)</span> :</label> <label for="outputPort"><?php echo $this->element->getElement('port')->getLabel()?><span class="info-text-small">
<?php echo _("(Required)")?></span> :</label>
</dt> </dt>
<dd id="outputPort-element"> <dd id="outputPort-element">
<?php echo $this->element->getElement('port')?> <?php echo $this->element->getElement('port')?>
@ -71,7 +73,7 @@
<fieldset class="padded top-margin display_field toggle closed" id="output_setting"> <fieldset class="padded top-margin display_field toggle closed" id="output_setting">
<legend style="cursor: pointer;"> <legend style="cursor: pointer;">
<span class="ui-icon ui-icon-triangle-2-n-s"></span> <span class="ui-icon ui-icon-triangle-2-n-s"></span>
Additional Options <?php echo _("Additional Options")?>
</legend> </legend>
<dl class="zend_form"> <dl class="zend_form">
<dt id="outputUser-label"> <dt id="outputUser-label">
@ -103,7 +105,7 @@
<?php endif; ?> <?php endif; ?>
</dd> </dd>
<dt class="block-display info-block"> <dt class="block-display info-block">
The following info will be displayed to listeners in their media player: <?php echo _("The following info will be displayed to listeners in their media player:")?>
</dt> </dt>
<dt id="stationName-label"> <dt id="stationName-label">
<label for="stationName"><?php echo $this->element->getElement('name')->getLabel()?> :</label> <label for="stationName"><?php echo $this->element->getElement('name')->getLabel()?> :</label>

View File

@ -2,10 +2,9 @@
<dl class="zend_form"> <dl class="zend_form">
<dd id="SupportFeedback-element" style="width:90%;"> <dd id="SupportFeedback-element" style="width:90%;">
<div class="info-text"> <div class="info-text">
Help Airtime improve by letting Sourcefabric know how you are using it. This information <?php echo sprintf(_("Help Airtime improve by letting Sourcefabric know how you are using it. This information"
will be collected regularly in order to enhance your user experience.<br /> ." will be collected regularly in order to enhance your user experience.%s"
Click the "Send support feedback" box and we'll make sure the features you use are ."Click the 'Send support feedback' box and we'll make sure the features you use are constantly improving."), "<br />")?>
constantly improving.
</div> </div>
<label class="optional" for="SupportFeedback"> <label class="optional" for="SupportFeedback">
<?php echo $this->element->getElement('SupportFeedback') ?> <?php echo $this->element->getElement('SupportFeedback') ?>
@ -20,8 +19,10 @@
<?php endif; ?> <?php endif; ?>
</dd> </dd>
<dd id="publicize-element" style="width:90%;"> <dd id="publicize-element" style="width:90%;">
<div class="info-text">Click the box below to promote your station on <div class="info-text">
<a id="link_to_whos_using" href="http://www.sourcefabric.org/en/airtime/whosusing/" onclick="window.open(this.href); return false"><? echo _("Sourcefabric.org"); ?></a>. <?php echo sprintf(_("Click the box below to promote your station on %sSourcefabric.org%s."),
"<a id='link_to_whos_using' href='http://www.sourcefabric.org/en/airtime/whosusing/' onclick='window.open(this.href); return false'>",
"</a>")?>
</div> </div>
<label class="optional" for="Publicise"> <label class="optional" for="Publicise">
<?php echo $this->element->getElement('Publicise') ?> <?php echo $this->element->getElement('Publicise') ?>
@ -36,7 +37,9 @@
<?php endif; ?> <?php endif; ?>
</dd> </dd>
</dl> </dl>
<div class="info-text" style="clear: both;padding: 4px 0 4px 15px;">(In order to promote your station, "Send support feedback" must be enabled).<br /><br /></div> <div class="info-text" style="clear: both;padding: 4px 0 4px 15px;">
<?php echo _("(In order to promote your station, 'Send support feedback' must be enabled).")?><br /><br />
</div>
<dl id="public-info" style="display:<?php echo "none"?>;"> <dl id="public-info" style="display:<?php echo "none"?>;">
<dt id="stationName-label" class="block-display"> <dt id="stationName-label" class="block-display">
<label class="required" for="stationName"><?php echo $this->element->getElement('stationName')->getLabel() ?> <label class="required" for="stationName"><?php echo $this->element->getElement('stationName')->getLabel() ?>
@ -69,7 +72,9 @@
</dd> </dd>
<dt id="Email-label" class="block-display"> <dt id="Email-label" class="block-display">
<label class="optional" for="Email"><?php echo $this->element->getElement('Email')->getLabel() ?></label> <label class="optional" for="Email"><?php echo $this->element->getElement('Email')->getLabel() ?></label>
<span class="info-text-small">(for verification purposes only, will not be published)</span> <span class="info-text-small">
<?php echo _("(for verification purposes only, will not be published)")?>
</span>
</dt> </dt>
<dd id="Email-element" class="block-display"> <dd id="Email-element" class="block-display">
<?php echo $this->element->getElement('Email') ?> <?php echo $this->element->getElement('Email') ?>
@ -142,7 +147,9 @@
<?php }?> <?php }?>
<?php echo $this->element->getElement('Logo') ?> <?php echo $this->element->getElement('Logo') ?>
<div class="info-text"><p>Note: Anything larger than 600x600 will be resized.</p></div> <div class="info-text">
<p><?php echo ("Note: Anything larger than 600x600 will be resized.")?></p>
</div>
<?php if($this->element->getElement('Logo')->hasErrors()) : ?> <?php if($this->element->getElement('Logo')->hasErrors()) : ?>
<ul class='errors'> <ul class='errors'>
<?php foreach($this->element->getElement('Logo')->getMessages() as $error): ?> <?php foreach($this->element->getElement('Logo')->getMessages() as $error): ?>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Index") ?></b><? echo _(" and script/action name "); ?><b><? echo _("display"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Index") ?></b><? echo _(" and script/action name "); ?><b><? echo _("main"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Index") ?></b><? echo _(" and script/action name "); ?><b><? echo _("newfield"); ?></b></center>

View File

@ -18,7 +18,7 @@
<tr><td><? echo _("Isrc Number:"); ?></td><td><?php echo ($this->md["MDATA_KEY_ISRC"]);?></td></tr> <tr><td><? echo _("Isrc Number:"); ?></td><td><?php echo ($this->md["MDATA_KEY_ISRC"]);?></td></tr>
<tr><td><? echo _("Website:"); ?></td><td><?php echo ($this->md["MDATA_KEY_URL"]);?></td></tr> <tr><td><? echo _("Website:"); ?></td><td><?php echo ($this->md["MDATA_KEY_URL"]);?></td></tr>
<tr><td><? echo _("Language:"); ?></td><td><?php echo ($this->md["MDATA_KEY_LANGUAGE"]);?></td></tr> <tr><td><? echo _("Language:"); ?></td><td><?php echo ($this->md["MDATA_KEY_LANGUAGE"]);?></td></tr>
<tr><td>File&nbsp;Path:</td><td><?php echo ($this->md["MDATA_KEY_FILEPATH"]);?></td></tr> <tr><td><? echo _("File"); ?>&nbsp;<? echo _("Path:"); ?></td><td><?php echo ($this->md["MDATA_KEY_FILEPATH"]);?></td></tr>
</table> </table>
<?php endif; ?> <?php endif; ?>
@ -36,10 +36,10 @@
<?php if ($this->type == "playlist") { ?> <?php if ($this->type == "playlist") { ?>
<div class='file-md-qtip-legend'> <div class='file-md-qtip-legend'>
<span class='webstream'><? echo _("o") ?></span><? echo _(" "); ?><span><? echo _("Web Stream"); ?></span><br /> <span class='webstream'>o</span> <span><? echo _("Web Stream"); ?></span><br />
<span class='dynamic'><? echo _("o") ?></span><? echo _(" "); ?><span><? echo _("Dynamic Smart Block"); ?></span><br /> <span class='dynamic'>o</span> <span><? echo _("Dynamic Smart Block"); ?></span><br />
<span class='static'><? echo _("o") ?></span><? echo _(" "); ?><span><? echo _("Static Smart Block"); ?></span><br /> <span class='static'>o</span> <span><? echo _("Static Smart Block"); ?></span><br />
<span><? echo _("o") ?></span><? echo _(" "); ?><span><? echo _("Audio Track"); ?></span> <span>o</span> <span><? echo _("Audio Track"); ?></span>
</div> </div>
<?php } ?> <?php } ?>
@ -116,7 +116,7 @@
<?php endforeach; ?> <?php endforeach; ?>
<tr> <tr>
<td><? echo _("Limit to ") ?></td> <td><? echo _("Limit to ") ?></td>
<td><?php echo $this->contents["limit"]["value"] ?><? echo _(" "); ?><?php echo $this->contents["limit"]["modifier"] ?></td> <td><?php echo $this->contents["limit"]["value"] ?> <?php echo $this->contents["limit"]["modifier"] ?></td>
</tr> </tr>
</table> </table>
<?php } ?> <?php } ?>

View File

@ -1,5 +1,5 @@
<div id="listenerstat_content" class="ui-widget ui-widget-content block-shadow alpha-block padded"> <div id="listenerstat_content" class="ui-widget ui-widget-content block-shadow alpha-block padded">
Listener Count Over Time<br> <?php echo _("Listener Count Over Time")?><br>
<div id="flot_placeholder" style="width:600px;height:300px;margin:0px 50px 0px 50px"></div> <div id="flot_placeholder" style="width:600px;height:300px;margin:0px 50px 0px 50px"></div>
<div id="legend" style="width:600px;height:70px;margin:0px 50px 0px 50px"></div> <div id="legend" style="width:600px;height:70px;margin:0px 50px 0px 50px"></div>
<?php echo $this->date_form; ?> <?php echo $this->date_form; ?>

View File

@ -3,7 +3,9 @@
<h2><? echo _("Login") ?></h2> <h2><? echo _("Login") ?></h2>
<div id="login" class="login-content clearfix"> <div id="login" class="login-content clearfix">
<?php if(isset($this->demo) && $this->demo == 1){?> <?php if(isset($this->demo) && $this->demo == 1){?>
<p style="font-weight:bold">Welcome to the online Airtime demo! You can log in using the username 'admin' and the password 'admin'.</p> <p style="font-weight:bold">
<?php echo _("Welcome to the online Airtime demo! You can log in using the username 'admin' and the password 'admin'.")?>
</p>
<?php }?> <?php }?>
<p class="light" style='<?php echo $this->error?"color:#902d2d;font-size:11px;padding:2px 4px;background:#c6b4b4;margin-bottom:2px;border:1px solid #c83f3f;":""?>'><?php echo $this->message; ?></p> <p class="light" style='<?php echo $this->error?"color:#902d2d;font-size:11px;padding:2px 4px;background:#c6b4b4;margin-bottom:2px;border:1px solid #c83f3f;":""?>'><?php echo $this->message; ?></p>
<?php echo $this->form; ?> <?php echo $this->form; ?>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Login") ?></b><? echo _(" and script/action name "); ?><b><? echo _("logout"); ?></b></center>

View File

@ -3,7 +3,9 @@
<h2><? echo _("Reset password") ?></h2> <h2><? echo _("Reset password") ?></h2>
<div id="login" class="login-content clearfix"> <div id="login" class="login-content clearfix">
<p class="light">Please enter your account e-mail address. You will receive a link to create a new password via e-mail.</p> <p class="light">
<?php echo _("Please enter your account e-mail address. You will receive a link to create a new password via e-mail.")?>
</p>
<?php echo $this->form; ?> <?php echo $this->form; ?>
</div> </div>
</div> </div>

View File

@ -1,13 +1,13 @@
<div id="master-panel"> <div id="master-panel">
<div class="now-playing-block"> <div class="now-playing-block">
<div class="text-row"><strong><? echo _("Previous:"); ?></strong><? echo _(" "); ?><span id='previous'></span><? echo _(" "); ?><span id='prev-length'></span></div> <div class="text-row"><strong><? echo _("Previous:"); ?></strong> <span id='previous'></span> <span id='prev-length'></span></div>
<div class="now-playing-info song"> <div class="now-playing-info song">
<div class="time-flow"><span class="time-elapsed" id="time-elapsed"></span><span class="time-remaining" id="time-remaining"></span></div> <div class="time-flow"><span class="time-elapsed" id="time-elapsed"></span><span class="time-remaining" id="time-remaining"></span></div>
<span id='current'></span><? echo _(" "); ?><span class="length" id="song-length"></span><? echo _(" ") ?></div> <span id='current'></span><? echo _(" "); ?><span class="length" id="song-length"></span><? echo _(" ") ?></div>
<div class="progressbar"> <div class="progressbar">
<div class="progress-song" id="progress-bar" style="width:0%;"></div> <div class="progress-song" id="progress-bar" style="width:0%;"></div>
</div> </div>
<div class="text-row next-song"><strong><? echo _("Next:"); ?></strong><? echo _(" "); ?><span id='next'></span><? echo _(" "); ?><span id='next-length'></span></div> <div class="text-row next-song"><strong><? echo _("Next:"); ?></strong> <span id='next'></span> <span id='next-length'></span></div>
</div> </div>
<div class="show-block"> <div class="show-block">
<div class="text-row">&nbsp;</div> <div class="text-row">&nbsp;</div>
@ -26,7 +26,7 @@
<li> <li>
<div id="master_dj_div" class="source-label"> <div id="master_dj_div" class="source-label">
<a id="master_dj" class="source-kick-button" onclick="kickSource(this)"></a> <a id="master_dj" class="source-kick-button" onclick="kickSource(this)"></a>
Master Source <? echo _("Master Source") ?>
</div> </div>
<div class="line-to-switch"></div> <div class="line-to-switch"></div>
<a href="#" id="master_dj" class="source-switch-button" onclick="setSwitchListener(this);"><span><?php echo $this->master_dj_switch?></span></a> <a href="#" id="master_dj" class="source-switch-button" onclick="setSwitchListener(this);"><span><?php echo $this->master_dj_switch?></span></a>
@ -35,7 +35,7 @@
<li> <li>
<div id="live_dj_div" class="source-label"> <div id="live_dj_div" class="source-label">
<a id="live_dj" class="source-kick-button" onclick="kickSource(this)"></a> <a id="live_dj" class="source-kick-button" onclick="kickSource(this)"></a>
Show Source <? echo _("Show Source")?>
</div> </div>
<div class="line-to-switch"></div> <div class="line-to-switch"></div>
<a href="#" id="live_dj" class="source-switch-button" onclick="setSwitchListener(this);"><span><?php echo $this->live_dj_switch?></span></a> <a href="#" id="live_dj" class="source-switch-button" onclick="setSwitchListener(this);"><span><?php echo $this->live_dj_switch?></span></a>

View File

@ -6,7 +6,7 @@
<div class="trial-box-calendar-gray"><? echo _("days") ?></div> <div class="trial-box-calendar-gray"><? echo _("days") ?></div>
</div> </div>
<div class="trial-box-button"> <div class="trial-box-button">
<a title="Purchase your copy of Airtime" href="https://account.sourcefabric.com/clientarea.php" target="_blank"><? echo _("My Account") ?></a> <a title="<?php echo _("Purchase your copy of Airtime")?> href="https://account.sourcefabric.com/clientarea.php" target="_blank"><? echo _("My Account") ?></a>
</div> </div>
</div> </div>
<?php }?> <?php }?>

View File

@ -7,7 +7,7 @@ if (isset($this->obj)) {
<div class="btn-toolbar spl-no-top-margin clearfix"> <div class="btn-toolbar spl-no-top-margin clearfix">
<div class="btn-group pull-left"> <div class="btn-group pull-left">
<button id="spl_new" class="btn dropdown-toggle" data-toggle="dropdown" aria-disabled="false"> <button id="spl_new" class="btn dropdown-toggle" data-toggle="dropdown" aria-disabled="false">
New <span class="caret"></span> <? echo _("New")?> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li id='lib-new-pl'><a href="#"><? echo _("New Playlist") ?></a></li> <li id='lib-new-pl'><a href="#"><? echo _("New Playlist") ?></a></li>

View File

@ -1,10 +1,10 @@
<dl id="spl_cue_editor" class="inline-list"> <dl id="spl_cue_editor" class="inline-list">
<dt><? echo _("Cue In: "); ?><span class='spl_cue_hint'>(hh:mm:ss.t)</span></dt> <dt><? echo _("Cue In: "); ?><span class='spl_cue_hint'><? echo _("(hh:mm:ss.t)")?></span></dt>
<dd id="spl_cue_in_<?php echo $this->id; ?>" class="spl_cue_in"> <dd id="spl_cue_in_<?php echo $this->id; ?>" class="spl_cue_in">
<span contenteditable="true" class="spl_text_input"><?php echo $this->cueIn; ?></span> <span contenteditable="true" class="spl_text_input"><?php echo $this->cueIn; ?></span>
</dd> </dd>
<dd class="edit-error"></dd> <dd class="edit-error"></dd>
<dt><? echo _("Cue Out: "); ?><span class='spl_cue_hint'>(hh:mm:ss.t)</span></dt> <dt><? echo _("Cue Out: "); ?><span class='spl_cue_hint'><? echo _("(hh:mm:ss.t)")?></span></dt>
<dd id="spl_cue_out_<?php echo $this->id; ?>" class="spl_cue_out"> <dd id="spl_cue_out_<?php echo $this->id; ?>" class="spl_cue_out">
<span contenteditable="true" class="spl_text_input"><?php echo $this->cueOut; ?></span> <span contenteditable="true" class="spl_text_input"><?php echo $this->cueOut; ?></span>
</dd> </dd>

View File

@ -1,13 +1,13 @@
<dl id="spl_editor" class="inline-list"> <dl id="spl_editor" class="inline-list">
<?php if ($this->item1Type == 0) {?> <?php if ($this->item1Type == 0) {?>
<dt><? echo _("Fade out: "); ?><span class='spl_cue_hint'>(ss.t)</span></dt> <dt><? echo _("Fade out: "); ?><span class='spl_cue_hint'><? echo _("(ss.t)")?></span></dt>
<dd id="spl_fade_out_<?php echo $this->item1; ?>" class="spl_fade_out"> <dd id="spl_fade_out_<?php echo $this->item1; ?>" class="spl_fade_out">
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeOut; ?></span> <span contenteditable="true" class="spl_text_input"><?php echo $this->fadeOut; ?></span>
</dd> </dd>
<dd class="edit-error"></dd> <dd class="edit-error"></dd>
<?php } <?php }
if ($this->item2Type == 0) {?> if ($this->item2Type == 0) {?>
<dt><? echo _("Fade in: "); ?><span class='spl_cue_hint'>(ss.t)</span></dt> <dt><? echo _("Fade in: "); ?><span class='spl_cue_hint'><? echo _("(ss.t)")?></span></dt>
<dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in"> <dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in">
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeIn; ?></span> <span contenteditable="true" class="spl_text_input"><?php echo $this->fadeIn; ?></span>
</dd> </dd>

View File

@ -7,7 +7,7 @@ if (isset($this->obj)) {
<div class="btn-toolbar spl-no-top-margin clearfix"> <div class="btn-toolbar spl-no-top-margin clearfix">
<div class="btn-group pull-left"> <div class="btn-group pull-left">
<button id="spl_new" class="btn dropdown-toggle" data-toggle='dropdown' aria-disabled="false"> <button id="spl_new" class="btn dropdown-toggle" data-toggle='dropdown' aria-disabled="false">
New <span class="caret"></span> <? echo _("New")?> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li id='lib-new-pl'><a href="#"><? echo _("New Playlist") ?></a></li> <li id='lib-new-pl'><a href="#"><? echo _("New Playlist") ?></a></li>
@ -65,10 +65,10 @@ if (isset($this->obj)) {
<div id="crossfade_main" class="crossfade-main clearfix" style="display:none;"> <div id="crossfade_main" class="crossfade-main clearfix" style="display:none;">
<span class="ui-icon ui-icon-closethick"></span> <span class="ui-icon ui-icon-closethick"></span>
<dl id="spl_editor-main" class="inline-list"> <dl id="spl_editor-main" class="inline-list">
<dt><? echo _("Fade in: "); ?><span class='spl_cue_hint'>(ss.t)</span></dt> <dt><? echo _("Fade in: "); ?><span class='spl_cue_hint'><? echo _("(ss.t)")?></span></dt>
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd> <dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
<dd class="edit-error"></dd> <dd class="edit-error"></dd>
<dt><? echo _("Fade out: "); ?><span class='spl_cue_hint'>(ss.t)</span></dt> <dt><? echo _("Fade out: "); ?><span class='spl_cue_hint'><? echo _("(ss.t)")?></span></dt>
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</span></dd> <dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</span></dd>
<dd class="edit-error"></dd> <dd class="edit-error"></dd>
</dl> </dl>

View File

@ -37,12 +37,12 @@ if ($item['type'] == 2) {
if ($staticBlock) {?> if ($staticBlock) {?>
<span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>"> <span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">
<span class="ui-icon ui-icon-triangle-2-n-s"></span> <span class="ui-icon ui-icon-triangle-2-n-s"></span>
Expand Static Block <?php echo _("Expand Static Block")?>
</span> </span>
<?php } else { ?> <?php } else { ?>
<span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>"> <span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">
<span class="ui-icon ui-icon-triangle-2-n-s"></span> <span class="ui-icon ui-icon-triangle-2-n-s"></span>
Expand Dynamic Block <?php echo _("Expand Dynamic Block")?>
</span> </span>
<?php } <?php }
} ?> } ?>
@ -95,9 +95,9 @@ if ($item['type'] == 2) {
<li class="spl_empty"> <li class="spl_empty">
<?php <?php
if ($this->obj instanceof Application_Model_Block) { if ($this->obj instanceof Application_Model_Block) {
echo 'Empty smart block'; echo _("Empty smart block");
} else { } else {
echo 'Empty playlist'; echo _("Empty playlist");
} }
?> ?>
</li> </li>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Library") ?></b><? echo _(" and script/action name "); ?><b><? echo _("upload"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Recorder") ?></b><? echo _(" and script/action name "); ?><b><? echo _("getShowSchedule"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Recorder") ?></b><? echo _(" and script/action name "); ?><b><? echo _("index"); ?></b></center>

View File

@ -3,7 +3,7 @@
<a href="#" id="add-show-close" class="icon-link"><span class="ui-icon ui-icon-circle-close"></span><? echo _("Close") ?></a> <a href="#" id="add-show-close" class="icon-link"><span class="ui-icon ui-icon-circle-close"></span><? echo _("Close") ?></a>
<button data-action="<?php echo isset($this->action) ? $this->action : "add-show" ?>" aria-disabled="false" role="button" class="add-show-submit right-floated ui-button ui-widget ui-state-default ui-button-text-icon-primary"> <button data-action="<?php echo isset($this->action) ? $this->action : "add-show" ?>" aria-disabled="false" role="button" class="add-show-submit right-floated ui-button ui-widget ui-state-default ui-button-text-icon-primary">
<span class="ui-icon ui-icon-plusthick"></span> <span class="ui-icon ui-icon-plusthick"></span>
<span class="ui-button-text"><?php echo ($this->addNewShow ? "Add this show" : "Update show"); ?></span> <span class="ui-button-text"><?php echo ($this->addNewShow ? _("Add this show") : _("Update show")); ?></span>
</button> </button>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
@ -20,7 +20,7 @@
<div id="live-stream-override" class="collapsible-content"> <div id="live-stream-override" class="collapsible-content">
<?php echo $this->live; ?> <?php echo $this->live; ?>
</div> </div>
<h3 class="collapsible-header"><span class="arrow-icon"></span>Record & Rebroadcast</h3> <h3 class="collapsible-header"><span class="arrow-icon"></span><? echo _("Record & Rebroadcast")?></h3>
<div id="schedule-record-rebroadcast" class="collapsible-content"> <div id="schedule-record-rebroadcast" class="collapsible-content">
<?php echo $this->rr; ?> <?php echo $this->rr; ?>
<?php echo $this->absoluteRebroadcast; ?> <?php echo $this->absoluteRebroadcast; ?>
@ -37,7 +37,7 @@
<div class="button-bar bottom"> <div class="button-bar bottom">
<button data-action="<?php echo isset($this->action) ? $this->action : "add-show" ?>" aria-disabled="false" role="button" class="add-show-submit right-floated ui-button ui-widget ui-state-default ui-button-text-icon-primary"> <button data-action="<?php echo isset($this->action) ? $this->action : "add-show" ?>" aria-disabled="false" role="button" class="add-show-submit right-floated ui-button ui-widget ui-state-default ui-button-text-icon-primary">
<span class="ui-icon ui-icon-plusthick"></span> <span class="ui-icon ui-icon-plusthick"></span>
<span class="ui-button-text"><?php echo ($this->addNewShow ? "Add this show" : "Update show"); ?></span> <span class="ui-button-text"><?php echo ($this->addNewShow ? _("Add this show") : _("Update show")); ?></span>
</button> </button>
</div> </div>
</div> </div>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Schedule") ?></b><? echo _(" and script/action name "); ?><b><? echo _("addShow"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Schedule") ?></b><? echo _(" and script/action name "); ?><b><? echo _("cancelCurrentShow"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Schedule") ?></b><? echo _(" and script/action name "); ?><b><? echo _("cancelShow"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Schedule") ?></b><? echo _(" and script/action name "); ?><b><? echo _("clearShow"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Schedule") ?></b><? echo _(" and script/action name "); ?><b><? echo _("deleteShow"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Schedule") ?></b><? echo _(" and script/action name "); ?><b><? echo _("eventFeed"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Schedule") ?></b><? echo _(" and script/action name "); ?><b><? echo _("makeContextMenu"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Schedule") ?></b><? echo _(" and script/action name "); ?><b><? echo _("moveShow"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Schedule") ?></b><? echo _(" and script/action name "); ?><b><? echo _("removeGroup"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("Schedule") ?></b><? echo _(" and script/action name "); ?><b><? echo _("resizeShow"); ?></b></center>

View File

@ -12,7 +12,7 @@
<div class="sb-timerange"> <div class="sb-timerange">
<?php if(!$this->disableLib && !$this->showLib):?> <?php if(!$this->disableLib && !$this->showLib):?>
<a id="sb_edit" class="btn btn-small" href="#" title="Open library to add or remove content"> <a id="sb_edit" class="btn btn-small" href="#" title="Open library to add or remove content">
Add / Remove Content <?php echo _("Add / Remove Content")?>
</a> </a>
<?php endif; ?> <?php endif; ?>
<?php echo $this->sb_form; ?> <?php echo $this->sb_form; ?>

View File

@ -7,7 +7,7 @@
<div class="button-holder"> <div class="button-holder">
<button type="button" id="add_user_button" name="search_add_group" class="ui-button ui-widget ui-state-default ui-button-text-icon-primary"> <button type="button" id="add_user_button" name="search_add_group" class="ui-button ui-widget ui-state-default ui-button-text-icon-primary">
<span class="ui-icon ui-icon-plusthick"></span> <span class="ui-icon ui-icon-plusthick"></span>
<span class="ui-button-text">New&nbsp;User</span> <span class="ui-button-text"><? echo _("New")?>&nbsp;<? echo _("User")?></span>
</button> </button>
</div> </div>
@ -16,9 +16,9 @@
<tr> <tr>
<th><? echo _("id") ?></th> <th><? echo _("id") ?></th>
<th><? echo _("Username") ?></th> <th><? echo _("Username") ?></th>
<th>First&nbsp;Name</th> <th><? echo _("First")?>&nbsp;<? echo _("Name")?></th>
<th>Last&nbsp;Name</th> <th><? echo _("Last")?>&nbsp;<? echo _("Name")?></th>
<th>User&nbsp;Type</th> <th><? echo _("User")?>&nbsp;<? echo _("Type")?></th>
<th>&nbsp;</th> <th>&nbsp;</th>
</tr> </tr>
</thead> </thead>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("User") ?></b><? echo _(" and script/action name "); ?><b><? echo _("getHosts"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("User") ?></b><? echo _(" and script/action name "); ?><b><? echo _("getUserDataTableInfo"); ?></b></center>

View File

@ -1 +0,0 @@
<br /><br /><center><? echo _("View script for controller "); ?><b><? echo _("User") ?></b><? echo _(" and script/action name "); ?><b><? echo _("index"); ?></b></center>

View File

@ -1,7 +1,7 @@
<div class="btn-toolbar spl-no-top-margin clearfix"> <div class="btn-toolbar spl-no-top-margin clearfix">
<div class="btn-group pull-left"> <div class="btn-group pull-left">
<button id="ws_new" class="btn dropdown-toggle" data-toggle="dropdown" aria-disabled="false"> <button id="ws_new" class="btn dropdown-toggle" data-toggle="dropdown" aria-disabled="false">
New <span class="caret"></span> <? echo _("New")?> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li id='lib-new-pl'><a href="#"><? echo _("New Playlist") ?></a></li> <li id='lib-new-pl'><a href="#"><? echo _("New Playlist") ?></a></li>