diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php
index 646dc2282..715c90a2c 100644
--- a/airtime_mvc/application/Bootstrap.php
+++ b/airtime_mvc/application/Bootstrap.php
@@ -54,8 +54,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$view = $this->getResource('view');
$baseUrl = Application_Common_OsPath::getBaseDir();
- $view->headScript()->appendScript("var baseUrl = '$baseUrl'");
-
+ $view->headScript()->appendScript("var baseUrl = '$baseUrl';");
+ $this->_initTranslationGlobals($view);
+
$user = Application_Model_User::GetCurrentUser();
if (!is_null($user)){
$userType = $user->getType();
@@ -63,7 +64,17 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$userType = "";
}
$view->headScript()->appendScript("var userType = '$userType';");
-
+ }
+
+ /**
+ * Ideally, globals should be written to a single js file once
+ * from a php init function. This will save us from having to
+ * reinitialize them every request
+ */
+ private function _initTranslationGlobals($view) {
+ $view->headScript()->appendScript("var PRODUCT_NAME = '" . PRODUCT_NAME . "';");
+ $view->headScript()->appendScript("var USER_MANUAL_URL = '" . USER_MANUAL_URL . "';");
+ $view->headScript()->appendScript("var COMPANY_NAME = '" . COMPANY_NAME . "';");
}
protected function _initHeadLink()
diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php
index 69ce78d19..81b9040b7 100644
--- a/airtime_mvc/application/configs/constants.php
+++ b/airtime_mvc/application/configs/constants.php
@@ -1,5 +1,21 @@
id)) {
$obj = new $objInfo['className']($obj_sess->id);
@@ -422,29 +422,29 @@ class PlaylistController extends Zend_Controller_Action
public function setCrossfadeAction()
{
- $id1 = $this->_getParam('id1', null);
- $id2 = $this->_getParam('id2', null);
- $type = $this->_getParam('type');
- $fadeIn = $this->_getParam('fadeIn', 0);
- $fadeOut = $this->_getParam('fadeOut', 0);
- $offset = $this->_getParam('offset', 0);
+ $id1 = $this->_getParam('id1', null);
+ $id2 = $this->_getParam('id2', null);
+ $type = $this->_getParam('type');
+ $fadeIn = $this->_getParam('fadeIn', 0);
+ $fadeOut = $this->_getParam('fadeOut', 0);
+ $offset = $this->_getParam('offset', 0);
- try {
- $obj = $this->getPlaylist($type);
- $response = $obj->createCrossfade($id1, $fadeOut, $id2, $fadeIn, $offset);
+ try {
+ $obj = $this->getPlaylist($type);
+ $response = $obj->createCrossfade($id1, $fadeOut, $id2, $fadeIn, $offset);
- if (!isset($response["error"])) {
- $this->createUpdateResponse($obj);
- } else {
- $this->view->error = $response["error"];
- }
- } catch (PlaylistOutDatedException $e) {
- $this->playlistOutdated($e);
- } catch (PlaylistNotFoundException $e) {
- $this->playlistNotFound($type);
- } catch (Exception $e) {
- $this->playlistUnknownError($e);
- }
+ if (!isset($response["error"])) {
+ $this->createUpdateResponse($obj);
+ } else {
+ $this->view->error = $response["error"];
+ }
+ } catch (PlaylistOutDatedException $e) {
+ $this->playlistOutdated($e);
+ } catch (PlaylistNotFoundException $e) {
+ $this->playlistNotFound($type);
+ } catch (Exception $e) {
+ $this->playlistUnknownError($e);
+ }
}
public function getPlaylistFadesAction()
diff --git a/airtime_mvc/application/forms/AddShowLiveStream.php b/airtime_mvc/application/forms/AddShowLiveStream.php
index 65e2a19d3..923c6993d 100644
--- a/airtime_mvc/application/forms/AddShowLiveStream.php
+++ b/airtime_mvc/application/forms/AddShowLiveStream.php
@@ -7,7 +7,7 @@ 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(sprintf(_("Use %s Authentication:"), PRODUCT_NAME))
->setRequired(false)
->setDecorators(array('ViewHelper'));
$this->addElement($cb_airtime_auth);
diff --git a/airtime_mvc/application/forms/RegisterAirtime.php b/airtime_mvc/application/forms/RegisterAirtime.php
index 2da7083c8..1fcafc840 100644
--- a/airtime_mvc/application/forms/RegisterAirtime.php
+++ b/airtime_mvc/application/forms/RegisterAirtime.php
@@ -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(sprintf(_('Promote my station on %s'), COMPANY_SITE))
->setRequired(false)
->setDecorators(array('ViewHelper'))
->setValue(Application_Model_Preference::GetPublicise());
@@ -143,11 +143,14 @@ class Application_Form_RegisterAirtime extends Zend_Form
)
));
+ $privacyPolicyAnchorOpen = "";
// checkbox for privacy policy
$checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy");
$checkboxPrivacy->setLabel(
- sprintf(_("By checking this box, I agree to Sourcefabric's %sprivacy policy%s."),
- "",
+ sprintf(_('By checking this box, I agree to %s\'s %sprivacy policy%s.'),
+ COMPANY_NAME,
+ $privacyPolicyAnchorOpen,
""))
->setDecorators(array('ViewHelper'));
$this->addElement($checkboxPrivacy);
diff --git a/airtime_mvc/application/forms/SupportSettings.php b/airtime_mvc/application/forms/SupportSettings.php
index 660c7e6be..468345a1f 100644
--- a/airtime_mvc/application/forms/SupportSettings.php
+++ b/airtime_mvc/application/forms/SupportSettings.php
@@ -118,7 +118,7 @@ class Application_Form_SupportSettings extends Zend_Form
// checkbox for publicise
$checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise");
- $checkboxPublicise->setLabel(_('Promote my station on Sourcefabric.org'))
+ $checkboxPublicise->setLabel(sprintf(_('Promote my station on %s'), COMPANY_SITE))
->setRequired(false)
->setDecorators(array('ViewHelper'))
->setValue(Application_Model_Preference::GetPublicise());
@@ -130,8 +130,9 @@ class Application_Form_SupportSettings extends Zend_Form
// checkbox for privacy policy
$checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy");
$checkboxPrivacy->setLabel(
- sprintf(_("By checking this box, I agree to Sourcefabric's %sprivacy policy%s."),
- "",
+ sprintf(_('By checking this box, I agree to %s\'s %sprivacy policy%s.'),
+ COMPANY_NAME,
+ $privacyPolicyAnchorOpen,
""))
->setDecorators(array('ViewHelper'));
$this->addElement($checkboxPrivacy);
diff --git a/airtime_mvc/application/layouts/scripts/login.phtml b/airtime_mvc/application/layouts/scripts/login.phtml
index aa4030390..6a9879673 100644
--- a/airtime_mvc/application/layouts/scripts/login.phtml
+++ b/airtime_mvc/application/layouts/scripts/login.phtml
@@ -1,11 +1,11 @@
doctype() ?>
-
- headTitle() ?>
- headLink() ?>
- headScript() ?>
- google_analytics)?$this->google_analytics:"" ?>
+
+ headTitle() ?>
+ headLink() ?>
+ headScript() ?>
+ google_analytics)?$this->google_analytics:"" ?>
@@ -13,9 +13,20 @@
layout()->content ?>
diff --git a/airtime_mvc/application/models/Auth.php b/airtime_mvc/application/models/Auth.php
index 52dda5154..e09d38692 100644
--- a/airtime_mvc/application/models/Auth.php
+++ b/airtime_mvc/application/models/Auth.php
@@ -33,7 +33,8 @@ class Application_Model_Auth
$message = sprintf(_("Hi %s, \n\nClick this link to reset your password: "), $user->getDbLogin());
$message .= "{$e_link_protocol}://{$e_link_base}:{$e_link_port}{$e_link_path}";
- $success = Application_Model_Email::send(_('Airtime Password Reset'), $message, $user->getDbEmail());
+ $str = sprintf(_('%s Password Reset'), PRODUCT_NAME);
+ $success = Application_Model_Email::send($str, $message, $user->getDbEmail());
return $success;
}
diff --git a/airtime_mvc/application/views/scripts/dashboard/about.phtml b/airtime_mvc/application/views/scripts/dashboard/about.phtml
index f2ccfa02d..98e93e724 100644
--- a/airtime_mvc/application/views/scripts/dashboard/about.phtml
+++ b/airtime_mvc/application/views/scripts/dashboard/about.phtml
@@ -2,19 +2,25 @@
",
- "",
- $this->airtime_version,
- "
")
+
+$productSiteAnchor = ""
+ . PRODUCT_NAME
+ . "";
+echo sprintf(_('%1$s %2$s, the open radio software for scheduling and remote station management.'),
+ $productSiteAnchor,
+ $this->airtime_version)
?>
-
© 2013
+
+
© 2013
",
- "",
- "",
- "")
+$companySiteAnchor = ""
+ . COMPANY_NAME . " " . COMPANY_SUFFIX
+ . "";
+$licenseAnchor = ""
+ . LICENSE_VERSION
+ . "";
+echo sprintf(_('%1$s %2$s is distributed under the %3$s'),
+ $companySiteAnchor, PRODUCT_NAME, $licenseAnchor)
?>
diff --git a/airtime_mvc/application/views/scripts/dashboard/help.phtml b/airtime_mvc/application/views/scripts/dashboard/help.phtml
index 66857c7cd..7b4b9f5c8 100644
--- a/airtime_mvc/application/views/scripts/dashboard/help.phtml
+++ b/airtime_mvc/application/views/scripts/dashboard/help.phtml
@@ -1,7 +1,7 @@
-
-
+
+
@@ -10,8 +10,12 @@
-",
- "") ?>
+";
+echo sprintf(_("For more detailed help, read the %suser manual%s."),
+ $userManualAnchorOpen, "")
+
+?>
+
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 c44dcae4c..37dba574d 100644
--- a/airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml
+++ b/airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml
@@ -40,9 +40,8 @@
getExistsFlag())?"":"
"?>getDirectory());?>
- " class="ui-icon ui-icon-refresh">
+ " class="ui-icon ui-icon-refresh">
" class="ui-icon ui-icon-close">
-
diff --git a/airtime_mvc/application/views/scripts/form/register-dialog.phtml b/airtime_mvc/application/views/scripts/form/register-dialog.phtml
index 6f00586e6..999eb045d 100644
--- a/airtime_mvc/application/views/scripts/form/register-dialog.phtml
+++ b/airtime_mvc/application/views/scripts/form/register-dialog.phtml
@@ -3,10 +3,10 @@