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

@ -23,7 +23,7 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
$text->setAttrib('class', 'input_text');
$text->addFilter('StringTrim');
$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->setDecorators(array('ViewHelper'));
$this->addElement($text);
@ -55,12 +55,12 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
}
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;
}
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;
}
@ -83,7 +83,7 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
$rebroad_start = new DateTime($rebroad_start);
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;
$noError = false;
}