CC-1960Internationalize Airtime / Support translations

-added gettext wrapper to strings missing it
-timepicker close button was not getting translated -fixed
This commit is contained in:
denise 2012-11-23 16:39:41 -05:00
parent c6a5db4a78
commit b677130a3f
9 changed files with 40 additions and 35 deletions

View File

@ -110,19 +110,19 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
$select->setAttrib('class', 'input_select');
$select->setMultiOptions(array(
"" => "",
"original" => "Original",
"remix" => "Remix",
"live" => "Live",
"recording" => "Recording",
"spoken" => "Spoken",
"podcast" => "Podcast",
"demo" => "Demo",
"in progress" => "Work in progress",
"stem" => "Stem",
"loop" => "Loop",
"sound effect" => "Sound Effect",
"sample" => "One Shot Sample",
"other" => "Other"
"original" => _("Original"),
"remix" => _("Remix"),
"live" => _("Live"),
"recording" => _("Recording"),
"spoken" => _("Spoken"),
"podcast" => _("Podcast"),
"demo" => _("Demo"),
"in progress" => _("Work in progress"),
"stem" => _("Stem"),
"loop" => _("Loop"),
"sound effect" => _("Sound Effect"),
"sample" => _("One Shot Sample"),
"other" => _("Other")
));
$select->setRequired(false);
$select->setValue(Application_Model_Preference::GetSoundCloudTrackType());
@ -134,14 +134,14 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
$select->setAttrib('class', 'input_select');
$select->setMultiOptions(array(
"" => "",
"no-rights-reserved" => "The work is in the public domain",
"all-rights-reserved" => "All rights are reserved",
"cc-by" => "Creative Commons Attribution",
"cc-by-nc" => "Creative Commons Attribution Noncommercial",
"cc-by-nd" => "Creative Commons Attribution No Derivative Works",
"cc-by-sa" => "Creative Commons Attribution Share Alike",
"cc-by-nc-nd" => "Creative Commons Attribution Noncommercial Non Derivate Works",
"cc-by-nc-sa" => "Creative Commons Attribution Noncommercial Share Alike"
"no-rights-reserved" => _("The work is in the public domain"),
"all-rights-reserved" => _("All rights are reserved"),
"cc-by" => _("Creative Commons Attribution"),
"cc-by-nc" => _("Creative Commons Attribution Noncommercial"),
"cc-by-nd" => _("Creative Commons Attribution No Derivative Works"),
"cc-by-sa" => _("Creative Commons Attribution Share Alike"),
"cc-by-nc-nd" => _("Creative Commons Attribution Noncommercial Non Derivate Works"),
"cc-by-nc-sa" => _("Creative Commons Attribution Noncommercial Share Alike")
));
$select->setRequired(false);
$select->setValue(Application_Model_Preference::GetSoundCloudLicense());

View File

@ -195,7 +195,7 @@ class Application_Model_ShowBuilder
$dt->setTimezone(new DateTimeZone($this->timezone));
$time = $dt->format("Y-m-d H:i");
$row["rebroadcast_title"] = "Rebroadcast of {$name} from {$time}";
$row["rebroadcast_title"] = sprintf(_("Rebroadcast of %s from %s"), $name, $time);
} elseif (intval($p_item["si_record"]) === 1) {
$row["record"] = true;

View File

@ -41,7 +41,7 @@
<dt id="mailServer-label" class="block-display">
<label class="required" for="mailServer"><?php echo $this->element->getElement('mailServer')->getLabel() ?>
<span class="info-text-small">(Required)</span>:
<span class="info-text-small"><?php _("(Required)") ?></span>:
</label>
<label class="required" for="msRequiresAuth">
@ -71,7 +71,7 @@
<dt id="email-label" class="block-display">
<label class="required" for="email"><?php echo $this->element->getElement('email')->getLabel() ?>
<span class="info-text-small">(Required)</span>:
<span class="info-text-small"><?php _("(Required)") ?></span>:
</label>
</dt>
<dd id="email-element" class="block-display">
@ -87,7 +87,7 @@
<dt id="password-label" class="block-display">
<label class="required" for="password"><?php echo $this->element->getElement('ms_password')->getLabel() ?>
<span class="info-text-small">(Required)</span>:
<span class="info-text-small"><?php _("(Required)") ?></span>:
</label>
</dt>
<dd id="password-element" class="block-display">

View File

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

View File

@ -6,8 +6,8 @@
</dt>
<dd id="storageFolder-element" class="block-display">
<?php echo $this->element->getElement('storageFolder') ?>
<input id="storageFolder-selection" type="button" value="Choose folder"></input>
<input id="storageFolder-ok" type="button" value="Set"></input>
<input id="storageFolder-selection" type="button" value="<?php _("Choose folder")?>"></input>
<input id="storageFolder-ok" type="button" value="<?php _("Set")?>"></input>
<?php if($this->element->getElement('storageFolder')->hasErrors()) : ?>
<ul class='errors'>
<?php foreach($this->element->getElement('storageFolder')->getMessages() as $error): ?>
@ -24,8 +24,8 @@
</dt>
<dd id="watchedFolder-element" class="block-display">
<?php echo $this->element->getElement('watchedFolder') ?>
<input id="watchedFolder-selection" type="button" value="Choose folder"></input>
<input id="watchedFolder-ok" type="button" value="Add"></input>
<input id="watchedFolder-selection" type="button" value="<?php _("Choose folder")?>"></input>
<input id="watchedFolder-ok" type="button" value="<?php _("Add")?>"></input>
<?php if($this->element->getElement('watchedFolder')->hasErrors()) : ?>
<ul class='errors'>
<?php foreach($this->element->getElement('watchedFolder')->getMessages() as $error): ?>

View File

@ -167,7 +167,7 @@ function plot(datasets){
oBaseTimePickerSettings = {
showPeriodLabels: false,
showCloseButton: true,
showButtonText: $.i18n._("Done"),
closeButtonText: $.i18n._("Done"),
showLeadingZero: false,
defaultTime: '0:00',
hourText: $.i18n._("Hour"),

View File

@ -161,7 +161,7 @@ $(document).ready(function(){
oBaseTimePickerSettings = {
showPeriodLabels: false,
showCloseButton: true,
showButtonText: $.i18n._("Done"),
closeButtonText: $.i18n._("Done"),
showLeadingZero: false,
defaultTime: '0:00',
hourText: $.i18n._("Hour"),

View File

@ -305,11 +305,15 @@ function setAddShowEvents() {
$("#add_show_start_time").timepicker({
amPmText: ['', ''],
defaultTime: '00:00',
onSelect: onStartTimeSelect
onSelect: onStartTimeSelect,
hourText: $.i18n._("Hour"),
minuteText: $.i18n._("Minute")
});
$("#add_show_end_time").timepicker({
amPmText: ['', ''],
onSelect: onEndTimeSelect
onSelect: onEndTimeSelect,
hourText: $.i18n._("Hour"),
minuteText: $.i18n._("Minute")
});
form.find('input[name^="add_show_rebroadcast_date_absolute"]').datepicker({
@ -322,6 +326,7 @@ function setAddShowEvents() {
form.find('input[name^="add_show_rebroadcast_time"]').timepicker({
amPmText: ['', ''],
defaultTime: '',
closeButtonText: $.i18n._("Done"),
hourText: $.i18n._("Hour"),
minuteText: $.i18n._("Minute")
});

View File

@ -41,7 +41,7 @@ AIRTIME = (function(AIRTIME) {
oBaseTimePickerSettings = {
showPeriodLabels: false,
showCloseButton: true,
showButtonText: $.i18n._("Done"),
closeButtonText: $.i18n._("Done"),
showLeadingZero: false,
defaultTime: '0:00',
hourText: $.i18n._("Hour"),