Made several reoccurring strings into application constants and altered any static strings containing them to use these constants in string format calls.
This commit is contained in:
parent
62a915f109
commit
795e239ff3
14 changed files with 101 additions and 67 deletions
|
@ -768,7 +768,7 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
//File is not in database anymore.
|
||||
if (is_null($file)) {
|
||||
$return_hash['error'] = _("File does not exist in Airtime.");
|
||||
$return_hash['error'] = sprintf(_("File does not exist in %s"), PRODUCT_NAME);
|
||||
}
|
||||
//Updating a metadata change.
|
||||
else {
|
||||
|
@ -788,7 +788,7 @@ class ApiController extends Zend_Controller_Action
|
|||
$md['MDATA_KEY_ORIGINAL_PATH'], $con);
|
||||
|
||||
if (is_null($file)) {
|
||||
$return_hash['error'] = _('File does not exist in Airtime');
|
||||
$return_hash['error'] = sprintf(_('File does not exist in %s'), PRODUCT_NAME);
|
||||
} else {
|
||||
$filepath = $md['MDATA_KEY_FILEPATH'];
|
||||
//$filepath = str_replace("\\", "", $filepath);
|
||||
|
@ -800,7 +800,7 @@ class ApiController extends Zend_Controller_Action
|
|||
$file = Application_Model_StoredFile::RecallByFilepath($filepath, $con);
|
||||
|
||||
if (is_null($file)) {
|
||||
$return_hash['error'] = _("File doesn't exist in Airtime.");
|
||||
$return_hash['error'] = sprintf(_('File does not exist in %s'), PRODUCT_NAME);
|
||||
Logging::warn("Attempt to delete file that doesn't exist.
|
||||
Path: '$filepath'");
|
||||
} else {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 = "<a id='link_to_privacy' href='" . PRIVACY_POLICY_URL
|
||||
. "' onclick='window.open(this.href); return false;'>";
|
||||
// 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."),
|
||||
"<a id='link_to_privacy' href='http://www.sourcefabric.org/en/about/policy/' onclick='window.open(this.href); return false;'>",
|
||||
sprintf(_('By checking this box, I agree to %s\'s %sprivacy policy%s.'),
|
||||
COMPANY_NAME,
|
||||
$privacyPolicyAnchorOpen,
|
||||
"</a>"))
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($checkboxPrivacy);
|
||||
|
|
|
@ -119,7 +119,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());
|
||||
|
@ -142,11 +142,14 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
)
|
||||
));
|
||||
|
||||
$privacyPolicyAnchorOpen = "<a id='link_to_privacy' href='" . PRIVACY_POLICY_URL
|
||||
. "' onclick='window.open(this.href); return false;'>";
|
||||
// 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."),
|
||||
"<a id='link_to_privacy' href='http://www.sourcefabric.org/en/about/policy/' onclick='window.open(this.href); return false;'>",
|
||||
sprintf(_('By checking this box, I agree to %s\'s %sprivacy policy%s.'),
|
||||
COMPANY_NAME,
|
||||
$privacyPolicyAnchorOpen,
|
||||
"</a>"))
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($checkboxPrivacy);
|
||||
|
|
|
@ -13,9 +13,20 @@
|
|||
<?php echo $this->layout()->content ?>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<?php echo sprintf(_("Airtime copyright © Sourcefabric z.ú. All rights reserved.%s"
|
||||
."Maintained and distributed under the GNU GPL v.3 by %sSourcefabric z.ú.%s"),
|
||||
"<br>", "<a href='http://www.sourcefabric.org'>" ,"</a>");?>
|
||||
<?php
|
||||
$company = COMPANY_NAME . " " . COMPANY_SUFFIX;
|
||||
$licenseSiteAnchor = "<a href='" . LICENSE_URL . "'>"
|
||||
. LICENSE_VERSION
|
||||
. "</a>";
|
||||
$companySiteAnchor = "<a href='" . COMPANY_SITE_URL . "'>"
|
||||
. $company
|
||||
. "</a>";
|
||||
echo sprintf(_('%1$s copyright © %2$s All rights reserved.%3$s'
|
||||
. 'Maintained and distributed under the %4$s by %5$s'),
|
||||
PRODUCT_NAME, $company, "<br>",
|
||||
$licenseSiteAnchor,
|
||||
$companySiteAnchor);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -2,19 +2,25 @@
|
|||
<h2><?php echo _("About") ?></h2>
|
||||
<p>
|
||||
<?php
|
||||
echo sprintf(_("%sAirtime%s %s, the open radio software for scheduling and remote station management. %s"),
|
||||
"<a href='http://airtime.sourcefabric.org' target='_blank'>",
|
||||
"</a>",
|
||||
$this->airtime_version,
|
||||
"<br />")
|
||||
|
||||
$productSiteAnchor = "<a href='" . PRODUCT_SITE_URL . "' target='_blank'>"
|
||||
. PRODUCT_NAME
|
||||
. "</a>";
|
||||
echo sprintf(_('%1$s %2$s, the open radio software for scheduling and remote station management.'),
|
||||
$productSiteAnchor,
|
||||
$this->airtime_version)
|
||||
?>
|
||||
<br>© 2013
|
||||
<br />
|
||||
<br />© 2013
|
||||
<?php
|
||||
echo sprintf(_("%sSourcefabric%s z.ú Airtime is distributed under the %sGNU GPL v.3%s"),
|
||||
"<a href='http://www.sourcefabric.org' target='_blank'>",
|
||||
"</a>",
|
||||
"<a href='http://www.gnu.org/licenses/gpl-3.0-standalone.html' target='_blank'>",
|
||||
"</a>")
|
||||
$companySiteAnchor = "<a href='" . COMPANY_SITE_URL . "' target='_blank'>"
|
||||
. COMPANY_NAME . " " . COMPANY_SUFFIX
|
||||
. "</a>";
|
||||
$licenseAnchor = "<a href='" . LICENSE_URL . "' target='_blank'>"
|
||||
. LICENSE_VERSION
|
||||
. "</a>";
|
||||
echo sprintf(_('%1$s %2$s is distributed under the %3$s'),
|
||||
$companySiteAnchor, PRODUCT_NAME, $licenseAnchor)
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="gray-logo"></div>
|
||||
<div class="text-content">
|
||||
<h2><?php echo _("Welcome to Airtime!") ?></h2>
|
||||
<p><?php echo _("Here's how you can get started using Airtime to automate your broadcasts: ")?></p>
|
||||
<h2><?php echo sprintf(_("Welcome to %s!"), PRODUCT_NAME) ?></h2>
|
||||
<p><?php echo sprintf(_("Here's how you can get started using %s to automate your broadcasts: "), PRODUCT_NAME)?></p>
|
||||
|
||||
<ol>
|
||||
<li><?php echo _("Begin by adding your files to the library using the 'Add Media' menu button. You can drag and drop your files to this window too.")?></li>
|
||||
|
@ -10,8 +10,12 @@
|
|||
<li><?php echo _("Select your media from the left pane and drag them to your show in the right pane."); ?></li>
|
||||
</ol>
|
||||
<p><strong><?php echo _("Then you're good to go!")?></strong><br />
|
||||
<?php echo sprintf(_("For more detailed help, read the %suser manual%s."),
|
||||
"<a href='http://www.sourcefabric.org/en/airtime/manuals/' target='_blank'>",
|
||||
"</a>") ?></p>
|
||||
<?php
|
||||
$userManualAnchorOpen = "<a href='" . USER_MANUAL_URL . "' target='_blank'>";
|
||||
echo sprintf(_("For more detailed help, read the %suser manual%s."),
|
||||
$userManualAnchorOpen, "</a>")
|
||||
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -40,9 +40,8 @@
|
|||
<?php foreach($watched_dirs as $watched_dir): ?>
|
||||
<dd class="block-display selected-item">
|
||||
<?php echo ($watched_dir->getExistsFlag())?"":"<span class='ui-icon-alert'><img src='/css/images/warning-icon.png'></span>"?><span id="folderPath" style="display:block; width:350px"><?php echo htmlspecialchars($watched_dir->getDirectory());?></span></span>
|
||||
<span title="<?php echo _("Rescan watched directory (This is useful if it is network mount and may be out of sync with Airtime)")?>" class="ui-icon ui-icon-refresh"></span>
|
||||
<span title="<?php echo sprintf(_("Rescan watched directory (This is useful if it is network mount and may be out of sync with %s)"), PRODUCT_NAME)?>" class="ui-icon ui-icon-refresh"></span>
|
||||
<span title="<?php echo _("Remove watched directory")?>" class="ui-icon ui-icon-close"></span>
|
||||
|
||||
</dd>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<fieldset>
|
||||
<dl class="zend_form">
|
||||
<dt class="block-display info-text">
|
||||
<?php echo sprintf(_("Help Airtime improve by letting us know how you are using it. This info "
|
||||
."will be collected regularly in order to enhance your user experience.%s"
|
||||
."Click 'Yes, help Airtime' and we'll make sure the features you use are "
|
||||
."constantly improving."), "<br /><br />") ?>
|
||||
<?php echo sprintf(_('Help %1$s improve by letting us know how you are using it. This info '
|
||||
.'will be collected regularly in order to enhance your user experience.%2$s'
|
||||
.'Click \'Yes, help %1$s\' and we\'ll make sure the features you use are '
|
||||
.'constantly improving.'), PRODUCT_NAME, "<br /><br />") ?>
|
||||
</dt>
|
||||
<dd id="SupportFeedback-element" class="block-display">
|
||||
<label class="optional" for="SupportFeedback">
|
||||
|
@ -22,10 +22,12 @@
|
|||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt class="block-display info-text">
|
||||
<?php echo sprintf(_("Click the box below to advertise your station on %sSourcefabric.org%s."
|
||||
." In order to promote your station, 'Send support feedback' must be enabled. This data will be collected in addition to the support feedback."),
|
||||
"<a id='link_to_whos_using' href='http://sourcefabric.org/en/airtime/whosusing' onclick='window.open(this.href); return false'>",
|
||||
"</a>")?>
|
||||
<?php
|
||||
$whosUsingAnchor = "<a id='link_to_whos_using' href='" . WHOS_USING_URL . "' onclick='window.open(this.href); return false'>"
|
||||
. COMPANY_SITE
|
||||
. "</a>";
|
||||
echo sprintf(_("Click the box below to promote your station on %s."), $whosUsingAnchor)
|
||||
?>
|
||||
</dt>
|
||||
<dd id="publicize-element" class="block-display">
|
||||
<label class="optional" for="Publicise">
|
||||
|
@ -175,7 +177,7 @@
|
|||
<?php echo $this->element->getElement('Privacy')->getLabel() ?>
|
||||
</label>
|
||||
<?php }else{?>
|
||||
<a id="link_to_terms_and_condition" href="http://www.sourcefabric.org/en/about/policy/" onclick="window.open(this.href); return false;"><?php echo _("Terms and Conditions") ?></a>
|
||||
<a id="link_to_terms_and_condition" href="<?php echo TERMS_AND_CONDITIONS_URL ?>" onclick="window.open(this.href); return false;"><?php echo _("Terms and Conditions") ?></a>
|
||||
<?php }?>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
<dl class="zend_form">
|
||||
<dd id="SupportFeedback-element" style="width:90%;">
|
||||
<div class="info-text">
|
||||
<?php echo sprintf(_("Help Airtime improve by letting Sourcefabric know how you are using it. This information"
|
||||
<?php echo sprintf(_("Help %s improve by letting %s know how you are using it. This information"
|
||||
." will be collected regularly in order to enhance your user experience.%s"
|
||||
."Click the 'Send support feedback' box and we'll make sure the features you use are constantly improving."), "<br />")?>
|
||||
."Click the 'Send support feedback' box and we'll make sure the features you use are constantly improving."),
|
||||
PRODUCT_NAME, COMPANY_NAME, "<br />")?>
|
||||
</div>
|
||||
<label class="optional" for="SupportFeedback">
|
||||
<?php echo $this->element->getElement('SupportFeedback') ?>
|
||||
|
@ -20,9 +21,13 @@
|
|||
</dd>
|
||||
<dd id="publicize-element" style="width:90%;">
|
||||
<div class="info-text">
|
||||
<?php echo sprintf(_("Click the box below to promote your station on %sSourcefabric.org%s."),
|
||||
"<a id='link_to_whos_using' href='http://www.sourcefabric.org/en/airtime/whosusing/' onclick='window.open(this.href); return false'>",
|
||||
"</a>")?>
|
||||
<?php
|
||||
|
||||
$whosUsingAnchor = "<a id='link_to_whos_using' href='" . WHOS_USING_URL . "' onclick='window.open(this.href); return false'>"
|
||||
. COMPANY_SITE
|
||||
. "</a>";
|
||||
echo sprintf(_("Click the box below to promote your station on %s."), $whosUsingAnchor)
|
||||
?>
|
||||
</div>
|
||||
<label class="optional" for="Publicise">
|
||||
<?php echo $this->element->getElement('Publicise') ?>
|
||||
|
@ -183,7 +188,7 @@
|
|||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php }else{?>
|
||||
<a id="link_to_terms_and_condition" href="http://www.sourcefabric.org/en/about/policy/" onclick="window.open(this.href); return false;"><?php echo _("Sourcefabric Privacy Policy") ?></a>
|
||||
<a id="link_to_terms_and_condition" href="<?php echo PRIVACY_POLICY_URL ?>" onclick="window.open(this.href); return false;"><?php echo _("Sourcefabric Privacy Policy") ?></a>
|
||||
<?php }?>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div id="login" class="login-content clearfix">
|
||||
<?php if(isset($this->demo) && $this->demo == 1){?>
|
||||
<p style="font-weight:bold">
|
||||
<?php echo _("Welcome to the Airtime demo! You can log in using the username 'admin' and the password 'admin'.")?>
|
||||
<?php echo sprintf(_("Welcome to the %s demo! You can log in using the username 'admin' and the password 'admin'."), PRODUCT_NAME)?>
|
||||
</p>
|
||||
<?php }?>
|
||||
<p class="light" style='<?php echo $this->error?"color:#902d2d;font-size:11px;padding:2px 4px;background:#c6b4b4;margin-bottom:2px;border:1px solid #c83f3f;":""?>'><?php echo $this->message; ?></p>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="trial-box-calendar-gray"><?php echo _("days") ?></div>
|
||||
</div>
|
||||
<div class="trial-box-button">
|
||||
<a title="<?php echo _("Purchase your copy of Airtime")?> href="https://account.sourcefabric.com/clientarea.php" target="_blank"><?php echo _("My Account") ?></a>
|
||||
<a title="<?php echo sprintf(_("Purchase your copy of %s"), PRODUCT_NAME)?> href="https://account.sourcefabric.com/clientarea.php" target="_blank"><?php echo _("My Account") ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<tbody>
|
||||
<!--
|
||||
<tr class="odd">
|
||||
<td><?php echo _("Airtime Version") ?></td>
|
||||
<td><?php echo sprintf(_("%s Version"), PRODUCT_NAME) ?></td>
|
||||
<td>1.9.3</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue