diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php
index 06226cb8f..c6bc3bd31 100644
--- a/airtime_mvc/application/Bootstrap.php
+++ b/airtime_mvc/application/Bootstrap.php
@@ -103,8 +103,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$view->headScript()->appendFile($baseUrl.'/js/sprintf/sprintf-0.7-beta1.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$view->headScript()->appendFile($baseUrl.'/js/bootstrap/bootstrap.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$view->headScript()->appendFile($baseUrl.'/js/i18n/jquery.i18n.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
- $view->headScript()->appendFile($baseUrl.'/locale/translation-table?'.$CC_CONFIG['airtime_version'].rand(5, 10),'text/javascript');
- $view->headScript()->appendScript("$.i18n.setDictionary(lang_dict)");
+ $view->headScript()->appendFile($baseUrl.'/locale/general-translation-table?'.$CC_CONFIG['airtime_version'],'text/javascript');
+ $view->headScript()->appendFile($baseUrl.'/locale/datatables-translation-table?'.$CC_CONFIG['airtime_version'],'text/javascript');
+ $view->headScript()->appendScript("$.i18n.setDictionary(general_dict)");
$view->headScript()->appendScript("var baseUrl='$baseUrl'");
//scripts for now playing bar
diff --git a/airtime_mvc/application/controllers/LocaleController.php b/airtime_mvc/application/controllers/LocaleController.php
index 7f5ecc805..4fa34b8d4 100644
--- a/airtime_mvc/application/controllers/LocaleController.php
+++ b/airtime_mvc/application/controllers/LocaleController.php
@@ -5,11 +5,23 @@ class LocaleController extends Zend_Controller_Action
public function init()
{
$ajaxContext = $this->_helper->getHelper('AjaxContext');
- $ajaxContext->addActionContext('language-table', 'json')
+ $ajaxContext->addActionContext('general-translation-table', 'json')
+ ->addActionContext('datatables-translation-table', 'json')
->initContext();
}
- public function translationTableAction()
+ public function datatablesTranslationTableAction()
+ {
+ $this->view->layout()->disableLayout();
+ $this->_helper->viewRenderer->setNoRender(true);
+ header("Content-type: text/javascript");
+
+ $baseUrl = Application_Common_OsPath::getBaseDir();
+ echo "var datatables_dict =" .
+ file_get_contents($_SERVER['DOCUMENT_ROOT'].$baseUrl.'/js/datatables/i18n/de_DE.txt');
+ }
+
+ public function generalTranslationTableAction()
{
$translations = array (
//common/common.js
@@ -196,6 +208,48 @@ class LocaleController extends Zend_Controller_Action
//already in schedule/add-show.js
//"The show instance doesn't exist anymore!" => _("The show instance doesn't exist anymore!"),
//schedule/schedule.js
+ "January" => _("January"),
+ "February" => _("February"),
+ "March" => _("March"),
+ "April" => _("April"),
+ "May" => _("May"),
+ "June" => _("June"),
+ "July" => _("July"),
+ "August" => _("August"),
+ "September" => _("September"),
+ "October" => _("October"),
+ "November" => _("November"),
+ "December" => _("December"),
+ "Jan" => _("Jan"),
+ "Feb" => _("Feb"),
+ "Mar" => _("Mar"),
+ "Apr" => _("Apr"),
+ "May" => _("May"),
+ "Jun" => _("Jun"),
+ "Jul" => _("Jul"),
+ "Aug" => _("Aug"),
+ "Sep" => _("Sep"),
+ "Oct" => _("Oct"),
+ "Nov" => _("Nov"),
+ "Dec" => _("Dec"),
+ "today" => _("today"),
+ "day" => _("day"),
+ "week" => _("week"),
+ "month" => _("month"),
+ "Sunday" => _("Sunday"),
+ "Monday" => _("Monday"),
+ "Tuesday" => _("Tuesday"),
+ "Wednesday" => _("Wednesday"),
+ "Thursday" => _("Thursday"),
+ "Friday" => _("Friday"),
+ "Saturday" => _("Saturday"),
+ "Sun" => _("Sun"),
+ "Mon" => _("Mon"),
+ "Tue" => _("Tue"),
+ "Wed" => _("Wed"),
+ "Thu" => _("Thu"),
+ "Fri" => _("Fri"),
+ "Sat" => _("Sat"),
"Shows longer than their scheduled time will be cut off by a following show." => _("Shows longer than their scheduled time will be cut off by a following show."),
"Cancel Current Show?" => _("Cancel Current Show?"),
"Stop recording current show?" => _("Stop recording current show?"),
@@ -221,7 +275,7 @@ class LocaleController extends Zend_Controller_Action
"Show Empty" => _("Show Empty"),
"Recording From Line In" => _("Recording From Line In"),
"Track preview" => _("Track preview"),
- //already in library/spl/js
+ //already in library/spl.js
//"Airtime is unsure about the status of this file. This can happen when the file is on a remote drive that is unaccessible or the file is in a directory that isn't 'watched' anymore."
//=> _("Airtime is unsure about the status of this file. This can happen when the file is on a remote drive that is unaccessible or the file is in a directory that isn't 'watched' anymore."),
"Cannot schedule outside a show." => _("Cannot schedule outside a show."),
@@ -230,7 +284,7 @@ class LocaleController extends Zend_Controller_Action
" Item." => _(" Item."),
" Items." => _(" Items."),
//already in library/library.js
- "Select" => _("Select"),
+ //"Select" => _("Select"),
"Select all" => _("Select all"),
"Select none" => _("Select none"),
"Remove overbooked tracks" => _("Remove overbooked tracks"),
@@ -251,12 +305,15 @@ class LocaleController extends Zend_Controller_Action
"DJ" => _("DJ"),
"Program Manager" => _("Program Manager"),
"Guest" => _("Guest"),
-
+ //dataTables/ColVis.js
+ "Show / hide columns" => _("Show / hide columns"),
+ //datatables.columnFilter.js
+ "From {from} to {to}" => _("From {from} to {to}")
);
$this->view->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
header("Content-type: text/javascript");
- echo "var lang_dict=".json_encode($translations);
+ echo "var general_dict=".json_encode($translations);
}
}
\ No newline at end of file
diff --git a/airtime_mvc/application/views/scripts/playlist/playlist.phtml b/airtime_mvc/application/views/scripts/playlist/playlist.phtml
index 216cb5ac4..f8496d926 100644
--- a/airtime_mvc/application/views/scripts/playlist/playlist.phtml
+++ b/airtime_mvc/application/views/scripts/playlist/playlist.phtml
@@ -17,10 +17,10 @@ if (isset($this->obj)) {
obj)) : ?>
-
+
-
+
diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js
index 72980ab15..e9ece9a37 100644
--- a/airtime_mvc/public/js/airtime/library/library.js
+++ b/airtime_mvc/public/js/airtime/library/library.js
@@ -465,6 +465,7 @@ var AIRTIME = (function(AIRTIME) {
/* Website */ { "sTitle" : $.i18n._("Website") , "mDataProp" : "info_url" , "bVisible" : false , "sClass" : "library_url" , "sWidth" : "150px" },
/* Year */ { "sTitle" : $.i18n._("Year") , "mDataProp" : "year" , "bVisible" : false , "sClass" : "library_year" , "sWidth" : "60px" }
],
+
"bProcessing": true,
"bServerSide": true,
@@ -664,10 +665,7 @@ var AIRTIME = (function(AIRTIME) {
"sPaginationType": "full_numbers",
"bJQueryUI": true,
"bAutoWidth": false,
- "oLanguage": {
- "sSearch": "",
- "sLengthMenu": "Show _MENU_"
- },
+ "oLanguage": datatables_dict,
// R = ColReorder, C = ColVis
"sDom": 'Rl<"#library_display_type">f<"dt-process-rel"r><"H"<"library_toolbar"C>><"dataTables_scrolling"t><"F"ip>',
diff --git a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js
index 4bfaabf56..e045248e9 100644
--- a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js
+++ b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js
@@ -154,12 +154,12 @@ function viewDisplay( view ) {
var calendarEl = this;
var select = $('')
- .append('')
- .append('')
- .append('')
- .append('')
- .append('')
- .append('')
+ .append('')
+ .append('')
+ .append('')
+ .append('')
+ .append('')
+ .append('')
.change(function(){
var slotMin = $(this).val();
var opt = view.calendar.options;
@@ -424,7 +424,7 @@ function addQtipToSCIcons(ele){
if($(ele).hasClass("progress")){
$(ele).qtip({
content: {
- text: $.i18n.("Uploading in progress...")
+ text: $.i18n._("Uploading in progress...")
},
position:{
adjust: {
@@ -442,13 +442,13 @@ function addQtipToSCIcons(ele){
}else if($(ele).hasClass("soundcloud")){
$(ele).qtip({
content: {
- text: $.i18n.("Retreiving data from the server..."),
+ text: $.i18n._("Retreiving data from the server..."),
ajax: {
url: baseUrl+"/Library/get-upload-to-soundcloud-status",
type: "post",
data: ({format: "json", id : id, type: "file"}),
success: function(json, status){
- this.set('content.text', $.i18n.("The soundcloud id for this file is: ")+json.sc_id);
+ this.set('content.text', $.i18n._("The soundcloud id for this file is: ")+json.sc_id);
}
}
},
@@ -468,13 +468,13 @@ function addQtipToSCIcons(ele){
}else if($(ele).hasClass("sc-error")){
$(ele).qtip({
content: {
- text: $.i18n.("Retreiving data from the server..."),
+ text: $.i18n._("Retreiving data from the server..."),
ajax: {
url: baseUrl+"/Library/get-upload-to-soundcloud-status",
type: "post",
data: ({format: "json", id : id, type: "show"}),
success: function(json, status){
- this.set('content.text', $.i18n.("There was error while uploading to soundcloud.")+"
"+$.i18n._("Error code: ")+json.error_code+
+ this.set('content.text', $.i18n._("There was error while uploading to soundcloud.")+"
"+$.i18n._("Error code: ")+json.error_code+
"
"+$.i18n._("Error msg: ")+json.error_msg+"
");
}
}
@@ -548,7 +548,7 @@ function checkEmptyShowStatus(e) {
//Alert the error and reload the page
//this function is used to resolve concurrency issue
function alertShowErrorAndReload(){
- alert($.i18n.("The show instance doesn't exist anymore!"));
+ alert($.i18n._("The show instance doesn't exist anymore!"));
window.location.reload();
}
diff --git a/airtime_mvc/public/js/airtime/schedule/schedule.js b/airtime_mvc/public/js/airtime/schedule/schedule.js
index 8c92c528f..475c17001 100644
--- a/airtime_mvc/public/js/airtime/schedule/schedule.js
+++ b/airtime_mvc/public/js/airtime/schedule/schedule.js
@@ -262,6 +262,58 @@ function createFullCalendar(data){
agenda: 'H:mm{ - H:mm}',
month: 'H:mm{ - H:mm}'
},
+ monthNames: [
+ $.i18n._('January'),
+ $.i18n._('February'),
+ $.i18n._('March'),
+ $.i18n._('April'),
+ $.i18n._('May'),
+ $.i18n._('June'),
+ $.i18n._('July'),
+ $.i18n._('August'),
+ $.i18n._('September'),
+ $.i18n._('October'),
+ $.i18n._('November'),
+ $.i18n._('December')
+ ],
+ monthNamesShort: [
+ $.i18n._('Jan'),
+ $.i18n._('Feb'),
+ $.i18n._('Mar'),
+ $.i18n._('Apr'),
+ $.i18n._('May'),
+ $.i18n._('Jun'),
+ $.i18n._('Jul'),
+ $.i18n._('Aug'),
+ $.i18n._('Sep'),
+ $.i18n._('Oct'),
+ $.i18n._('Nov'),
+ $.i18n._('Dec')
+ ],
+ buttonText: {
+ today: $.i18n._('today'),
+ month: $.i18n._('month'),
+ week: $.i18n._('week'),
+ day: $.i18n._('day')
+ },
+ dayNames: [
+ $.i18n._('Sunday'),
+ $.i18n._('Monday'),
+ $.i18n._('Tuesday'),
+ $.i18n._('Wednesday'),
+ $.i18n._('Thursday'),
+ $.i18n._('Friday'),
+ $.i18n._('Saturday')
+ ],
+ dayNamesShort: [
+ $.i18n._('Sun'),
+ $.i18n._('Mon'),
+ $.i18n._('Tue'),
+ $.i18n._('Wed'),
+ $.i18n._('Thu'),
+ $.i18n._('Fri'),
+ $.i18n._('Sat')
+ ],
contentHeight: mainHeight,
theme: true,
lazyFetching: false,
diff --git a/airtime_mvc/public/js/airtime/user/user.js b/airtime_mvc/public/js/airtime/user/user.js
index 18d1d7d7a..35d4e16dd 100644
--- a/airtime_mvc/public/js/airtime/user/user.js
+++ b/airtime_mvc/public/js/airtime/user/user.js
@@ -86,9 +86,7 @@ function populateUserTable() {
"bJQueryUI": true,
"bAutoWidth": false,
"bLengthChange": false,
- "oLanguage": {
- "sSearch": ""
- },
+ "oLanguage": datatables_dict,
"sDom": '<"H"lf<"dt-process-rel"r>>t<"F"ip>',
});
diff --git a/airtime_mvc/public/js/datatables/plugin/AIRTIME_DEV_README_COL_VIS b/airtime_mvc/public/js/datatables/plugin/AIRTIME_DEV_README_COL_VIS
index c332d036e..2a04f4f0d 100644
--- a/airtime_mvc/public/js/datatables/plugin/AIRTIME_DEV_README_COL_VIS
+++ b/airtime_mvc/public/js/datatables/plugin/AIRTIME_DEV_README_COL_VIS
@@ -30,4 +30,8 @@ The new _fnDomBaseButton looks like this:
return nButton;
},
-
\ No newline at end of file
+
+--------------------------------------------------------------------------------
+* Line 96 has changed
+- "buttonText": "Show / hide columns",
++ "buttonText": $.i18n._("Show / hide columns"),
\ No newline at end of file
diff --git a/airtime_mvc/public/js/datatables/plugin/dataTables.ColVis.js b/airtime_mvc/public/js/datatables/plugin/dataTables.ColVis.js
index 2f1c8ed02..4c5c3bfaf 100644
--- a/airtime_mvc/public/js/datatables/plugin/dataTables.ColVis.js
+++ b/airtime_mvc/public/js/datatables/plugin/dataTables.ColVis.js
@@ -95,7 +95,7 @@ ColVis = function( oDTSettings, oInit )
* @type String
* @default Show / hide columns
*/
- "buttonText": "Show / hide columns",
+ "buttonText": $.i18n._("Show / hide columns"),
/**
* Flag to say if the collection is hidden
diff --git a/airtime_mvc/public/js/datatables/plugin/dataTables.columnFilter.js b/airtime_mvc/public/js/datatables/plugin/dataTables.columnFilter.js
index 80cb011cf..7e64409fd 100644
--- a/airtime_mvc/public/js/datatables/plugin/dataTables.columnFilter.js
+++ b/airtime_mvc/public/js/datatables/plugin/dataTables.columnFilter.js
@@ -585,7 +585,7 @@
sRangeSeparator: "~",
iFilteringDelay: 500,
aoColumns: null,
- sRangeFormat: "From {from} to {to}"
+ sRangeFormat: $.i18n._("From {from} to {to}")
};
properties = $.extend(defaults, options);