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

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