Make radio page translatable
This makes the radio page use the station default language if one is set. Previously the pages where not really getting translated.
This commit is contained in:
parent
3196603dde
commit
c2deb94c16
|
@ -2,11 +2,13 @@
|
||||||
|
|
||||||
class EmbedController extends Zend_Controller_Action
|
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.
|
* 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
|
* It passes all the js and css files to the view, as well as all the
|
||||||
|
|
|
@ -34,6 +34,12 @@ class IndexController extends Zend_Controller_Action
|
||||||
|
|
||||||
$this->_helper->layout->setLayout('radio-page');
|
$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();
|
$this->view->stationLogo = Application_Model_Preference::GetStationLogo();
|
||||||
|
|
||||||
$stationName = Application_Model_Preference::GetStationName();
|
$stationName = Application_Model_Preference::GetStationName();
|
||||||
|
|
|
@ -395,7 +395,7 @@
|
||||||
<li></li>
|
<li></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
|
|
||||||
<div class="schedule_content">
|
<div class="schedule_content">
|
||||||
<div ng-repeat="x in weekDays track by $index" ng-attr-id="{{'day-' + x.dayOfMonth}}" class="schedule_item">
|
<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 ng-repeat="show in x.shows" class="row">
|
||||||
<div class="time_grid">{{show.show_start_hour}} - {{show.show_end_hour}}</div>
|
<div class="time_grid">{{show.show_start_hour}} - {{show.show_end_hour}}</div>
|
||||||
<div class="name_grid">{{show.name}}</div>
|
<div class="name_grid">{{show.name}}</div>
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="weekly-schedule-widget-footer" <?php if ($this->widgetStyle == "premium") echo "style='display:none'"; ?>>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -24,14 +24,14 @@
|
||||||
echo "<a href='#' class='logo'><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
|
echo "<a href='#' class='logo'><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<?php if ($this->displayLoginButton) {
|
<?php if ($this->displayLoginButton): ?>
|
||||||
echo "<div class='login-btn'>
|
<div class='login-btn'>
|
||||||
<a href='/login' target='_parent'>
|
<a href='/login' target='_parent'>
|
||||||
<span>Login</span>
|
<span><?php echo _('Login'); ?></span>
|
||||||
<span class='login-img'></span>
|
<span class='login-img'></span>
|
||||||
</a>
|
</a>
|
||||||
</div>";
|
</div>
|
||||||
}?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div id="tab-1" class="schedule tab_content current">
|
<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>
|
<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>
|
||||||
|
|
Loading…
Reference in New Issue