Merge pull request #123 from radiorabe/feature/translatable-radio-page

Translatable radio page
This commit is contained in:
Robb 2017-03-26 00:02:36 -04:00 committed by GitHub
commit d6b7a86048
39 changed files with 14112 additions and 13671 deletions

View file

@ -2,11 +2,13 @@
class EmbedController extends Zend_Controller_Action
{
public function init()
{
public function init() {
// translate widgets to station default language
$locale = Application_Model_Preference::GetDefaultLocale();
if ($locale) {
Application_Model_Locale::configureLocalization($locale);
}
}
/**
* This is the action that is called to insert the player onto a web page.
* It passes all the js and css files to the view, as well as all the

View file

@ -34,6 +34,12 @@ class IndexController extends Zend_Controller_Action
$this->_helper->layout->setLayout('radio-page');
// translate page to station default language
$locale = Application_Model_Preference::GetDefaultLocale();
if ($locale) {
Application_Model_Locale::configureLocalization($locale);
}
$this->view->stationLogo = Application_Model_Preference::GetStationLogo();
$stationName = Application_Model_Preference::GetStationName();

View file

@ -395,7 +395,7 @@
<li></li>
</ul>
</div>
<a class="airtime_pro" target="_blank" href="<?php echo PRODUCT_SITE_URL; ?>">Powered by <?php echo PRODUCT_NAME; ?></a>
<a class="airtime_pro" target="_blank" href="<?php echo PRODUCT_SITE_URL; ?>"><?php printf(_('Powered by %s'), PRODUCT_NAME); ?></a>
</div>
</div>

View file

@ -84,7 +84,7 @@
<div class="schedule_content">
<div ng-repeat="x in weekDays track by $index" ng-attr-id="{{'day-' + x.dayOfMonth}}" class="schedule_item">
<div ng-if="isEmpty(x.shows)" class="row empty-schedule">Looks like there are no shows scheduled on this day.</div>
<div ng-if="isEmpty(x.shows)" class="row empty-schedule"><?php echo _('Looks like there are no shows scheduled on this day.') ?></div>
<div ng-repeat="show in x.shows" class="row">
<div class="time_grid">{{show.show_start_hour}} - {{show.show_end_hour}}</div>
<div class="name_grid">{{show.name}}</div>
@ -93,7 +93,7 @@
</div>
<div class="weekly-schedule-widget-footer" <?php if ($this->widgetStyle == "premium") echo "style='display:none'"; ?>>
<a href="<?php echo PRODUCT_SITE_URL; ?>" target="_blank">Powered by <?php echo PRODUCT_NAME; ?></a>
<a href="<?php echo PRODUCT_SITE_URL; ?>" target="_blank"><?php printf(_('Powered by %s'), PRODUCT_NAME); ?></a>
</div>
</div>

View file

@ -24,14 +24,14 @@
echo "<a href='#' class='logo'><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
} ?>
<?php if ($this->displayLoginButton) {
echo "<div class='login-btn'>
<a href='/login' target='_parent'>
<span>Login</span>
<span class='login-img'></span>
</a>
</div>";
}?>
<?php if ($this->displayLoginButton): ?>
<div class='login-btn'>
<a href='/login' target='_parent'>
<span><?php echo _('Login'); ?></span>
<span class='login-img'></span>
</a>
</div>
<?php endif; ?>
<div id="tab-1" class="schedule tab_content current">
<iframe onLoad="autoResize('schedule_iframe');" id="schedule_iframe" height="300px" scrolling="yes" frameborder="0" src=<?php echo $this->stationUrl."embed/weekly-program?style=premium"?>></iframe>