From b677130a3fcbcbf1f5ee71b62ab271e10f9075dd Mon Sep 17 00:00:00 2001 From: denise Date: Fri, 23 Nov 2012 16:39:41 -0500 Subject: [PATCH] CC-1960Internationalize Airtime / Support translations -added gettext wrapper to strings missing it -timepicker close button was not getting translated -fixed --- .../forms/SoundcloudPreferences.php | 42 +++++++++---------- .../application/models/ShowBuilder.php | 2 +- .../form/preferences_email_server.phtml | 6 +-- .../scripts/form/preferences_general.phtml | 2 +- .../form/preferences_watched_dirs.phtml | 8 ++-- .../js/airtime/listenerstat/listenerstat.js | 2 +- .../js/airtime/playouthistory/historytable.js | 2 +- .../public/js/airtime/schedule/add-show.js | 9 +++- .../js/airtime/showbuilder/main_builder.js | 2 +- 9 files changed, 40 insertions(+), 35 deletions(-) diff --git a/airtime_mvc/application/forms/SoundcloudPreferences.php b/airtime_mvc/application/forms/SoundcloudPreferences.php index 02ba2b3b3..30e1702c9 100644 --- a/airtime_mvc/application/forms/SoundcloudPreferences.php +++ b/airtime_mvc/application/forms/SoundcloudPreferences.php @@ -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()); diff --git a/airtime_mvc/application/models/ShowBuilder.php b/airtime_mvc/application/models/ShowBuilder.php index 789d5990a..c9bd495ef 100644 --- a/airtime_mvc/application/models/ShowBuilder.php +++ b/airtime_mvc/application/models/ShowBuilder.php @@ -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; diff --git a/airtime_mvc/application/views/scripts/form/preferences_email_server.phtml b/airtime_mvc/application/views/scripts/form/preferences_email_server.phtml index c47b926af..f898873f7 100644 --- a/airtime_mvc/application/views/scripts/form/preferences_email_server.phtml +++ b/airtime_mvc/application/views/scripts/form/preferences_email_server.phtml @@ -41,7 +41,7 @@
@@ -87,7 +87,7 @@
diff --git a/airtime_mvc/application/views/scripts/form/preferences_general.phtml b/airtime_mvc/application/views/scripts/form/preferences_general.phtml index 15caeb13b..cc280b851 100644 --- a/airtime_mvc/application/views/scripts/form/preferences_general.phtml +++ b/airtime_mvc/application/views/scripts/form/preferences_general.phtml @@ -68,7 +68,7 @@
diff --git a/airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml b/airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml index d9ece6f37..f0fb29cf0 100644 --- a/airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml +++ b/airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml @@ -6,8 +6,8 @@
element->getElement('storageFolder') ?> - - + "> + "> element->getElement('storageFolder')->hasErrors()) : ?>