CC-1960: Internationalize Airtime / Support translations
-added gettext wrapper functions for all strings in view/scripts, and forms
This commit is contained in:
parent
a69ff167d4
commit
e5f67c8b05
78 changed files with 481 additions and 423 deletions
|
@ -27,7 +27,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
|
||||
// Station Name
|
||||
$stnName = new Zend_Form_Element_Text("stnName");
|
||||
$stnName->setLabel("Station Name")
|
||||
$stnName->setLabel(_("Station Name"))
|
||||
->setRequired(true)
|
||||
->setValue(Application_Model_Preference::GetStationName())
|
||||
->setDecorators(array('ViewHelper'));
|
||||
|
@ -36,7 +36,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
// Phone number
|
||||
$this->addElement('text', 'Phone', array(
|
||||
'class' => 'input_text',
|
||||
'label' => 'Phone:',
|
||||
'label' => _('Phone:'),
|
||||
'required' => false,
|
||||
'filters' => array('StringTrim'),
|
||||
'value' => Application_Model_Preference::GetPhone(),
|
||||
|
@ -48,7 +48,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
//Email
|
||||
$this->addElement('text', 'Email', array(
|
||||
'class' => 'input_text',
|
||||
'label' => 'Email:',
|
||||
'label' => _('Email:'),
|
||||
'required' => false,
|
||||
'filters' => array('StringTrim'),
|
||||
'value' => Application_Model_Preference::GetEmail(),
|
||||
|
@ -59,7 +59,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
|
||||
// Station Web Site
|
||||
$this->addElement('text', 'StationWebSite', array(
|
||||
'label' => 'Station Web Site:',
|
||||
'label' => _('Station Web Site:'),
|
||||
'required' => false,
|
||||
'class' => 'input_text',
|
||||
'value' => Application_Model_Preference::GetStationWebSite(),
|
||||
|
@ -70,7 +70,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
|
||||
// county list dropdown
|
||||
$this->addElement('select', 'Country', array(
|
||||
'label' => 'Country:',
|
||||
'label' => _('Country:'),
|
||||
'required' => false,
|
||||
'value' => Application_Model_Preference::GetStationCountry(),
|
||||
'multiOptions' => $country_list,
|
||||
|
@ -81,7 +81,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
|
||||
// Station city
|
||||
$this->addElement('text', 'City', array(
|
||||
'label' => 'City:',
|
||||
'label' => _('City:'),
|
||||
'required' => false,
|
||||
'class' => 'input_text',
|
||||
'value' => Application_Model_Preference::GetStationCity(),
|
||||
|
@ -93,7 +93,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
// Station Description
|
||||
$description = new Zend_Form_Element_Textarea('Description');
|
||||
$description->class = 'input_text_area';
|
||||
$description->setLabel('Station Description:')
|
||||
$description->setLabel(_('Station Description:'))
|
||||
->setRequired(false)
|
||||
->setValue(Application_Model_Preference::GetStationDescription())
|
||||
->setDecorators(array('ViewHelper'))
|
||||
|
@ -103,7 +103,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
|
||||
// Station Logo
|
||||
$upload = new Zend_Form_Element_File('Logo');
|
||||
$upload->setLabel('Station Logo:')
|
||||
$upload->setLabel(_('Station Logo:'))
|
||||
->setRequired(false)
|
||||
->setDecorators(array('File'))
|
||||
->addValidator('Count', false, 1)
|
||||
|
@ -113,7 +113,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
|
||||
//enable support feedback
|
||||
$this->addElement('checkbox', 'SupportFeedback', array(
|
||||
'label' => 'Send support feedback',
|
||||
'label' => _('Send support feedback'),
|
||||
'required' => false,
|
||||
'value' => 1,
|
||||
'decorators' => array(
|
||||
|
@ -123,7 +123,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
|
||||
// checkbox for 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)
|
||||
->setDecorators(array('ViewHelper'))
|
||||
->setValue(Application_Model_Preference::GetPublicise());
|
||||
|
@ -145,7 +145,10 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
|
||||
// checkbox for privacy policy
|
||||
$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'));
|
||||
$this->addElement($checkboxPrivacy);
|
||||
}
|
||||
|
@ -160,7 +163,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
if (isset($data["Privacy"])) {
|
||||
$checkPrivacy = $this->getElement('Privacy');
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue