CC-1960: Internationalize Airtime / Support translations
-added i18n jquery library -created a Locale controller that returns a js dictionary of translations needed in js -added jquery i18n wrapper function to all strings in js
This commit is contained in:
parent
b801235c99
commit
57fdab0ddf
|
@ -102,6 +102,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
$view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$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()->appendScript("var baseUrl='$baseUrl'");
|
||||
|
||||
//scripts for now playing bar
|
||||
|
|
|
@ -26,7 +26,8 @@ $ccAcl->add(new Zend_Acl_Resource('library'))
|
|||
->add(new Zend_Acl_Resource('listenerstat'))
|
||||
->add(new Zend_Acl_Resource('usersettings'))
|
||||
->add(new Zend_Acl_Resource('audiopreview'))
|
||||
->add(new Zend_Acl_Resource('webstream'));
|
||||
->add(new Zend_Acl_Resource('webstream'))
|
||||
->add(new Zend_Acl_Resource('locale'));
|
||||
|
||||
/** Creating permissions */
|
||||
$ccAcl->allow('G', 'index')
|
||||
|
@ -38,6 +39,7 @@ $ccAcl->allow('G', 'index')
|
|||
->allow('G', 'dashboard')
|
||||
->allow('G', 'audiopreview')
|
||||
->allow('G', 'webstream')
|
||||
->allow('G', 'locale')
|
||||
->allow('H', 'preference', 'is-import-in-progress')
|
||||
->allow('H', 'usersettings')
|
||||
->allow('H', 'plupload')
|
||||
|
|
|
@ -0,0 +1,262 @@
|
|||
<?php
|
||||
|
||||
class LocaleController extends Zend_Controller_Action
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext->addActionContext('language-table', 'json')
|
||||
->initContext();
|
||||
}
|
||||
|
||||
public function translationTableAction()
|
||||
{
|
||||
$translations = array (
|
||||
//common/common.js
|
||||
"Audio Player" => _("Audio Player"),
|
||||
//dashboard/dashboard.js
|
||||
"Recording:" => _("Recording:"),
|
||||
"Master Stream" => _("Master Stream"),
|
||||
"Live Stream" => _("Live Stream"),
|
||||
"Nothing Scheduled" => _("Nothing Scheduled"),
|
||||
"Current Show:" => _("Current Show:"),
|
||||
//dashboard/versiontooltip.js
|
||||
"You are running the latest version" => _("You are running the latest version"),
|
||||
"New version available: " => _("New version available: "),
|
||||
"This version will soon be obsolete." => _("This version will soon be obsolete."),
|
||||
"This version is no longer supported." => _("This version is no longer supported."),
|
||||
"Please upgrade to " => _("Please upgrade to "),
|
||||
//library/events/library_playlistbuilder.js
|
||||
" Add to current playlist" => _(" Add to current playlist"),
|
||||
" Add to current smart block" => _(" Add to current smart block"),
|
||||
"Adding 1 Item." => _("Adding 1 Item."),
|
||||
/*****embedded variable*****/
|
||||
"Adding " => _("Adding "),
|
||||
" Items." => _(" Items."),
|
||||
"You can only add tracks to smart blocks." => _("You can only add tracks to smart blocks."),
|
||||
"You can only add tracks, smart blocks, and webstreams to playlists." => _("You can only add tracks, smart blocks, and webstreams to playlists."),
|
||||
//library/events/library_showbuilder.js
|
||||
"Adding 1 Item." => _("Adding 1 Item."),
|
||||
/****string with variable*****/
|
||||
"Adding " => _("Adding "),
|
||||
" Items." => _(" Items."),
|
||||
//library/library.js
|
||||
"Select" => _("Select"),
|
||||
"Select this page" => _("Select this page"),
|
||||
"Deselect this page" => _("Deselect this page"),
|
||||
"Deselect all" => _("Deselect all"),
|
||||
"Are you sure you want to delete the selected item(s)?" => _("Are you sure you want to delete the selected item(s)?"),
|
||||
"Title" => _("Title"),
|
||||
"Creator" => _("Creator"),
|
||||
"Album" => _("Album"),
|
||||
"Bit Rate" => _("Bit Rate"),
|
||||
"BPM" => _("BPM"),
|
||||
"Composer" => _("Composer"),
|
||||
"Conductor" => _("Conductor"),
|
||||
"Copyright" => _("Copyright"),
|
||||
"Encoded By" => _("Encoded By"),
|
||||
"Genre" => _("Genre"),
|
||||
"ISRC" => _("ISRC"),
|
||||
"Label" => _("Label"),
|
||||
"Language" => _("Language"),
|
||||
"Last Modified" => _("Last Modified"),
|
||||
"Last Played" => _("Last Played"),
|
||||
"Length" => _("Length"),
|
||||
"Mime" => _("Mime"),
|
||||
"Mood" => _("Mood"),
|
||||
"Owner" => _("Owner"),
|
||||
"Replay Gain" => _("Replay Gain"),
|
||||
"Sample Rate" => _("Sample Rate"),
|
||||
"Track Number" => _("Track Number"),
|
||||
"Uploaded" => _("Uploaded"),
|
||||
"Website" => _("Webiste"),
|
||||
"Year" => _("Year"),
|
||||
"Loading..." => _("Loading..."),
|
||||
"All" => _("All"),
|
||||
"Files" => _("Files"),
|
||||
"Playlists" => _("Playlists"),
|
||||
"Smart Blocks" => _("Smart Blocks"),
|
||||
"Web Streams" => _("Web Streams"),
|
||||
"Unknown type: " => _("Unknown type: "),
|
||||
"Are you sure you want to delete the selected item?" => _("Are you sure you want to delete the selected item?"),
|
||||
"Uploading in progress..." => _("Uploading in progress..."),
|
||||
"Retrieving data from the server..." => _("Retrieving data from the server..."),
|
||||
"The soundcloud id for this file is: " => _("The soundcloud id for this file is: "),
|
||||
"There was an error while uploading to soundcloud." => _("There was an error while uploading to soundcloud."),
|
||||
"Error code: " => _("Error code: "),
|
||||
"Error msg: " => _("Error msg: "),
|
||||
"Input must be a positive number" => _("Input must be a positive number"),
|
||||
"Input must be a number" => _("Input must be a number"),
|
||||
"Input must be in the format: yyyy-mm-dd" => _("Input must be in the format: yyyy-mm-dd"),
|
||||
"Input must be in the format: hh:mm:ss.t" => _("Input must be in the format: hh:mm:ss.t"),
|
||||
//library/plupload.js
|
||||
"You are currently uploading files." => _("You are currently uploading files."),
|
||||
"Going to another screen will cancel the upload process." => _("Going to another screen will cancel the upload process."),
|
||||
"Are you sure you want to leave the page?" => _("Are you sure you want to leave the page?"),
|
||||
//library/spl.js
|
||||
"please put in a time '00:00:00 (.0)'" => _("please put in a time '00:00:00 (.0)'"),
|
||||
"please put in a time in seconds '00 (.0)'" => _("please put in a time in seconds '00 (.0)'"),
|
||||
"Your browser does not support playing this file type: " => _("Your browser does not support playing this file type: "),
|
||||
"Dynamic block is not previewable" => _("Dynamic block is not previewable"),
|
||||
"Limit to: " => _("Limit to: "),
|
||||
"-error" => _("-error"),
|
||||
"Playlist saved" => _("Playlist saved"),
|
||||
"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."),
|
||||
//listenerstat/listenerstat.js
|
||||
"Listener Count on" => _("Listener Count on"),
|
||||
"You clicked point " => _("You clicked point "),
|
||||
"in" => _("in"),
|
||||
//nowplaying/register.js
|
||||
"Remind me in 1 week" => _("Remind me in 1 week"),
|
||||
"Remind me never" => _("Remind me never"),
|
||||
"Yes, help Airtime" => _("Yes, help Airtime"),
|
||||
"Image must be one of jpg, jpeg, png, or gif" => _("Image must be one of jpg, jpeg, png, or gif"),
|
||||
//playlist/smart_blockbuilder.js
|
||||
"A static smart block will save the criteria and generate the block content immediately. This allows you to edit and view it in the Library before adding it to a show."
|
||||
=> _("A static smart block will save the criteria and generate the block content immediately. This allows you to edit and view it in the Library before adding it to a show."),
|
||||
"A dynamic smart block will only save the criteria. The block content will get generated upon adding it to a show. You will not be able to view and edit the content in the Library."
|
||||
=> _("A dynamic smart block will only save the criteria. The block content will get generated upon adding it to a show. You will not be able to view and edit the content in the Library."),
|
||||
"If your criteria is too strict, Airtime may not be able to fill up the desired smart block length. Hence, if you check this option, tracks will be used more than once."
|
||||
=> _("If your criteria is too strict, Airtime may not be able to fill up the desired smart block length. Hence, if you check this option, tracks will be used more than once."),
|
||||
"Smart block shuffled" => _("Smart block shuffled"),
|
||||
"Smart block generated and criteria saved" => _("Smart block generated and criteria saved"),
|
||||
"Smart block saved" => _("Smart block saved"),
|
||||
"Processing..." => _("Processing..."),
|
||||
"Select modifier" => _("Select modifier"),
|
||||
"contains" => _("contains"),
|
||||
"does not contain" => _("does not contain"),
|
||||
"is" => _("is"),
|
||||
"is not" => _("is not"),
|
||||
"starts with" => _("starts with"),
|
||||
"ends with" => _("ends with"),
|
||||
"is greater than" => _("is greater than"),
|
||||
"is less than" => _("is less than"),
|
||||
"is in the range" => _("is in the range"),
|
||||
//playouthistory/historytable.js
|
||||
"Title" => _("Title"),
|
||||
"Creator" => _("Creator"),
|
||||
"Played" => _("Played"),
|
||||
"Length" => _("Length"),
|
||||
"Composer" => _("Composer"),
|
||||
"Copyright" => _("Copyright"),
|
||||
//preferences/musicdirs.js
|
||||
"Choose Storage Folder" => _("Choose Storage Folder"),
|
||||
"Choose Folder to Watch" => _("Choose Folder to Watch"),
|
||||
"Are you sure you want to change the storage folder?\nThis will remove the files from your Airtime library!"
|
||||
=> _("Are you sure you want to change the storage folder?\nThis will remove the files from your Airtime library!"),
|
||||
"Manage Media Folders" => _("Manage Media Folders"),
|
||||
"Are you sure you want to remove the watched folder?" => _("Are you sure you want to remove the watched folder?"),
|
||||
"This path is currently not accessible." => _("This path is currently not accessible."),
|
||||
//preferences/streamsetting.js
|
||||
"Connected to the streaming server" => _("Connected to the streaming server"),
|
||||
"The stream is disabled" => _("The stream is disabled"),
|
||||
"Getting information from the server..." => _("Getting information from the server..."),
|
||||
"Can not connect to the streaming server" => _("Can not connect to the streaming server"),
|
||||
"If Airtime is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. The allowed range is between 1024 and 49151."
|
||||
=> _("If Airtime is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. The allowed range is between 1024 and 49151."),
|
||||
/*****embedded variable*****/
|
||||
"For more details, please read the " => _("For more details, please read the "),
|
||||
"Airtime manual" => _("Airtime manual"),
|
||||
"Check this option to enable metadata for OGG streams (stream metadata is the track title, artist, and show name that is displayed in an audio player). VLC and mplayer have a serious bug when playing an OGG/VORBIS stream that has metadata information enabled: they will disconnect from the stream after every song. If you are using an OGG stream and your listeners do not require support for these audio players, then feel free to enable this option."
|
||||
=> _("Check this option to enable metadata for OGG streams (stream metadata is the track title, artist, and show name that is displayed in an audio player). VLC and mplayer have a serious bug when playing an OGG/VORBIS stream that has metadata information enabled: they will disconnect from the stream after every song. If you are using an OGG stream and your listeners do not require support for these audio players, then feel free to enable this option."),
|
||||
"Check this box to automatically switch off Master/Show source upon source disconnection." => _("Check this box to automatically switch off Master/Show source upon source disconnection."),
|
||||
"Check this box to automatically switch on Master/Show source upon source connection." => _("Check this box to automatically switch on Master/Show source upon source connection."),
|
||||
"If your Icecast server expects a username of 'source', this field can be left blank." => _("If your Icecast server expects a username of 'source', this field can be left blank."),
|
||||
"If your live streaming client does not ask for a username, this field should be 'source'." => _("If your live streaming client does not ask for a username, this field should be 'source'."),
|
||||
"If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If Airtime is recording, and if the change causes a playout engine restart, the recording will be interrupted."
|
||||
=> _("If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If Airtime is recording, and if the change causes a playout engine restart, the recording will be interrupted."),
|
||||
//preferences/support-setting.js
|
||||
"Image must be one of jpg, jpeg, png, or gif" => _("Image must be one of jpg, jpeg, png, or gif"),
|
||||
//schedule/add-show.js
|
||||
"No result found" => _("No result found"),
|
||||
"This follows the same security pattern for the shows: only users assigned to the show can connect." => _("This follows the same security pattern for the shows: only users assigned to the show can connect."),
|
||||
"Specify custom authentication which will work only for this show." => _("Specify custom authentication which will work only for this show."),
|
||||
"If your live streaming client does not ask for a username, this field should be 'source'." => _("If your live streaming client does not ask for a username, this field should be 'source'."),
|
||||
"The show instance doesn't exist anymore!" => _("The show instance doesn't exist anymore!"),
|
||||
//schedule/full-calendar-functions
|
||||
//already in schedule/add-show.js
|
||||
//"The show instance doesn't exist anymore!" => _("The show instance doesn't exist anymore!"),
|
||||
"Show" => _("Show"),
|
||||
"Show is empty" => _("Show is empty"),
|
||||
"1m" => _("1m"),
|
||||
"5m" => _("5m"),
|
||||
"10m" => _("10m"),
|
||||
"15m" => _("15m"),
|
||||
"30m" => _("30m"),
|
||||
"60m" => _("60m"),
|
||||
"Uploading in progress..." => _("Uploading in progress..."),
|
||||
"Retreiving data from the server..." => _("Retreiving data from the server..."),
|
||||
//already in library/library.js
|
||||
//"The soundcloud id for this file is: " => _("The soundcloud id for this file is: "),
|
||||
//"There was error while uploading to soundcloud." => _("There was error while uploading to soundcloud."),
|
||||
//"Error code: " => _("Error code: "),
|
||||
//"Error msg: " => _("Error msg: "),
|
||||
"This show has no scheduled content." => _("This show has no scheduled content."),
|
||||
//already in schedule/add-show.js
|
||||
//"The show instance doesn't exist anymore!" => _("The show instance doesn't exist anymore!"),
|
||||
//schedule/schedule.js
|
||||
"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?"),
|
||||
"Ok" => _("Ok"),
|
||||
"Contents of Show" => _("Contents of Show"),
|
||||
//already in schedule/add-show.js
|
||||
//"The show instance doesn't exist anymore!" => _("The show instance doesn't exist anymore!"),
|
||||
"Remove all content?" => _("Remove all content?"),
|
||||
//showbuilder/builder.js
|
||||
"Delete selected item(s)?" => _("Delete selected item(s)?"),
|
||||
"Start" => _("Start"),
|
||||
"End" => _("End"),
|
||||
"Duration" => _("Duration"),
|
||||
//already in library/library.js
|
||||
//"Title" => _("Title"),
|
||||
//"Creator" => _("Creator"),
|
||||
//"Album" => _("Album"),
|
||||
//"Mime" => _("Mime"),
|
||||
"Cue In" => _("Cue In"),
|
||||
"Cue Out" => _("Cue Out"),
|
||||
"Fade In" => _("Fade In"),
|
||||
"Fade Out" => _("Fade Out"),
|
||||
"Show Empty" => _("Show Empty"),
|
||||
"Recording From Line In" => _("Recording From Line In"),
|
||||
"Track preview" => _("Track preview"),
|
||||
//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."),
|
||||
/*****embedded variable*****/
|
||||
"Moving " => _("Moving "),
|
||||
" Item." => _(" Item."),
|
||||
" Items." => _(" Items."),
|
||||
//already in library/library.js
|
||||
"Select" => _("Select"),
|
||||
"Select all" => _("Select all"),
|
||||
"Select none" => _("Select none"),
|
||||
"Remove overbooked tracks" => _("Remove overbooked tracks"),
|
||||
"Remove selected scheduled items" => _("Remove selected scheduled items"),
|
||||
"Jump to the current playing track" => _("Jump to the current playing track"),
|
||||
"Cancel current show" => _("Cancel current show"),
|
||||
//already in schedule/schedule.js
|
||||
//"Cancel Current Show?" => _("Cancel Current Show?"),
|
||||
"Stop recording current show?" => _("Stop recording current show?"),
|
||||
//showbuilder/main_builder.js
|
||||
"Open library to add or remove content" => _("Open library to add or remove content"),
|
||||
"Add / Remove Content" => _("Add / Remove Content"),
|
||||
//status/status.js
|
||||
"in use" => _("in use"),
|
||||
"Disk" => _("Disk"),
|
||||
//user/user.js
|
||||
"Admin" => _("Admin"),
|
||||
"DJ" => _("DJ"),
|
||||
"Program Manager" => _("Program Manager"),
|
||||
"Guest" => _("Guest"),
|
||||
|
||||
);
|
||||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
header("Content-type: text/javascript");
|
||||
echo "var lang_dict=".json_encode($translations);
|
||||
|
||||
}
|
||||
}
|
|
@ -104,7 +104,7 @@ function open_show_preview(p_showID, p_showIndex) {
|
|||
}
|
||||
|
||||
function openPreviewWindow(url) {
|
||||
_preview_window = window.open(url, 'Audio Player', 'width=450,height=100,scrollbars=yes');
|
||||
_preview_window = window.open(url, $.i18n._('Audio Player'), 'width=450,height=100,scrollbars=yes');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -143,24 +143,24 @@ function updatePlaybar(){
|
|||
}
|
||||
if (currentSong !== null && !master_dj_on_air && !live_dj_on_air){
|
||||
if (currentSong.record == "1")
|
||||
$('#current').html("<span style='color:red; font-weight:bold'>Recording: </span>"+currentSong.name+",");
|
||||
$('#current').html("<span style='color:red; font-weight:bold'>"+$.i18n._("Recording:")+"</span>"+currentSong.name+",");
|
||||
else
|
||||
$('#current').text(currentSong.name+",");
|
||||
}else{
|
||||
if (master_dj_on_air) {
|
||||
if (showName) {
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>"+showName+" - Master Stream</span>");
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>"+showName+" - "+$.i18n._("Master Stream")+"</span>");
|
||||
} else {
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>Master Stream</span>");
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>"+$.i18n._("Master Stream")+"</span>");
|
||||
}
|
||||
} else if (live_dj_on_air) {
|
||||
if (showName) {
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>"+showName+" - Live Stream</span>");
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>"+showName+" - "+$.i18n._("Live Stream")+"</span>");
|
||||
} else {
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>Live Stream</span>");
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>"+$.i18n._("Live Stream")+"</span>");
|
||||
}
|
||||
} else {
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>Nothing Scheduled</span>");
|
||||
$('#current').html("Current: <span style='color:red; font-weight:bold'>"+$.i18n._("Nothing Scheduled")+"</span>");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ function updatePlaybar(){
|
|||
$('#song-length').text(convertToHHMMSSmm(currentSong.songLengthMs));
|
||||
}
|
||||
/* Column 1 update */
|
||||
$('#playlist').text("Current Show:");
|
||||
$('#playlist').text($.i18n._("Current Show:"));
|
||||
var recElem = $('.recording-show');
|
||||
if (currentShow.length > 0){
|
||||
$('#playlist').text(currentShow[0].name);
|
||||
|
|
|
@ -8,13 +8,13 @@ function getContent() {
|
|||
var msg = "";
|
||||
// See file airtime_mvc/application/views/helpers/VersionNotify.php for more info
|
||||
if(isUpToDate()) {
|
||||
msg = "You are running the latest version";
|
||||
msg = $.i18n._("You are running the latest version");
|
||||
} else if (diff < 20) {
|
||||
msg = "New version available: " + link;
|
||||
msg = $.i18n._("New version available: ") + link;
|
||||
} else if (diff < 30) {
|
||||
msg = "This version will soon be obsolete.<br/>Please upgrade to " + link;
|
||||
msg = $.i18n._("This version will soon be obsolete.")+"<br/>"+$.i18n._("Please upgrade to ") + link;
|
||||
} else {
|
||||
msg = "This version is no longer supported.<br/>Please upgrade to " + link;
|
||||
msg = $.i18n._("This version is no longer supported.")+"<br/>"+$.i18n._("Please upgrade to ") + link;
|
||||
}
|
||||
|
||||
return msg;
|
||||
|
|
|
@ -30,11 +30,11 @@ var AIRTIME = (function(AIRTIME) {
|
|||
var objType = $('#obj_type').val(),
|
||||
btnText;
|
||||
if (objType === 'playlist') {
|
||||
btnText = ' Add to current playlist';
|
||||
btnText = $.i18n._(' Add to current playlist');
|
||||
} else if (objType === 'block') {
|
||||
btnText = ' Add to current smart block';
|
||||
btnText = $.i18n._(' Add to current smart block');
|
||||
} else {
|
||||
btnText = ' Add to current playlist';
|
||||
btnText = $.i18n._(' Add to current playlist');
|
||||
}
|
||||
AIRTIME.library.changeAddButtonText($('.btn-group #library-plus #lib-plus-text'), btnText);
|
||||
};
|
||||
|
@ -86,9 +86,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
|
||||
if (selected === 1) {
|
||||
message = "Adding 1 Item.";
|
||||
message = $.i18n._("Adding 1 Item.");
|
||||
} else {
|
||||
message = "Adding " + selected + " Items.";
|
||||
message = $.i18n._("Adding ") + selected + $.i18n._(" Items.");
|
||||
}
|
||||
|
||||
container = $('<div class="helper"/>').append(
|
||||
|
@ -158,9 +158,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
undefined, 'after');
|
||||
} else {
|
||||
if ($('#obj_type').val() == 'block') {
|
||||
alert('You can only add tracks to smart blocks.');
|
||||
alert($.i18n._('You can only add tracks to smart blocks.'));
|
||||
} else if ($('#obj_type').val() == 'playlist') {
|
||||
alert('You can only add tracks, smart blocks, and webstreams to playlists.');
|
||||
alert($.i18n._('You can only add tracks, smart blocks, and webstreams to playlists.'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -66,9 +66,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
|
||||
if (selected === 1) {
|
||||
message = "Adding 1 Item.";
|
||||
message = $.i18n._("Adding 1 Item.");
|
||||
} else {
|
||||
message = "Adding " + selected + " Items.";
|
||||
message = $.i18n._("Adding ") + selected + $.i18n._(" Items.");
|
||||
}
|
||||
|
||||
container = $('<div/>').attr('id',
|
||||
|
|
|
@ -109,12 +109,12 @@ var AIRTIME = (function(AIRTIME) {
|
|||
$menu
|
||||
.append("<div class='btn-group'>" +
|
||||
"<button class='btn btn-small dropdown-toggle' data-toggle='dropdown'>" +
|
||||
"Select <span class='caret'></span>" +
|
||||
$.i18n._("Select")+" <span class='caret'></span>" +
|
||||
"</button>" +
|
||||
"<ul class='dropdown-menu'>" +
|
||||
"<li id='sb-select-page'><a href='#'>Select this page</a></li>" +
|
||||
"<li id='sb-dselect-page'><a href='#'>Deselect this page</a></li>" +
|
||||
"<li id='sb-dselect-all'><a href='#'>Deselect all</a></li>" +
|
||||
"<li id='sb-select-page'><a href='#'>"+$.i18n._("Select this page")+"</a></li>" +
|
||||
"<li id='sb-dselect-page'><a href='#'>"+$.i18n._("Deselect this page")+"</a></li>" +
|
||||
"<li id='sb-dselect-all'><a href='#'>"+$.i18n._("Deselect all")+"</a></li>" +
|
||||
"</ul>" +
|
||||
"</div>")
|
||||
.append("<div class='btn-group'>" +
|
||||
|
@ -322,7 +322,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
};
|
||||
|
||||
mod.fnDeleteSelectedItems = function() {
|
||||
if (confirm('Are you sure you want to delete the selected item(s)?')) {
|
||||
if (confirm($.i18n._('Are you sure you want to delete the selected item(s)?'))) {
|
||||
var aData = AIRTIME.library.getSelectedData(),
|
||||
item,
|
||||
temp,
|
||||
|
@ -439,31 +439,31 @@ var AIRTIME = (function(AIRTIME) {
|
|||
/* ftype */ { "sTitle" : "" , "mDataProp" : "ftype" , "bSearchable" : false , "bVisible" : false } ,
|
||||
/* Checkbox */ { "sTitle" : "" , "mDataProp" : "checkbox" , "bSortable" : false , "bSearchable" : false , "sWidth" : "25px" , "sClass" : "library_checkbox" } ,
|
||||
/* Type */ { "sTitle" : "" , "mDataProp" : "image" , "bSearchable" : false , "sWidth" : "25px" , "sClass" : "library_type" , "iDataSort" : 0 } ,
|
||||
/* Title */ { "sTitle" : "Title" , "mDataProp" : "track_title" , "sClass" : "library_title" , "sWidth" : "170px" } ,
|
||||
/* Creator */ { "sTitle" : "Creator" , "mDataProp" : "artist_name" , "sClass" : "library_creator" , "sWidth" : "160px" } ,
|
||||
/* Album */ { "sTitle" : "Album" , "mDataProp" : "album_title" , "sClass" : "library_album" , "sWidth" : "150px" } ,
|
||||
/* Bit Rate */ { "sTitle" : "Bit Rate" , "mDataProp" : "bit_rate" , "bVisible" : false , "sClass" : "library_bitrate" , "sWidth" : "80px" },
|
||||
/* BPM */ { "sTitle" : "BPM" , "mDataProp" : "bpm" , "bVisible" : false , "sClass" : "library_bpm" , "sWidth" : "50px" },
|
||||
/* Composer */ { "sTitle" : "Composer" , "mDataProp" : "composer" , "bVisible" : false , "sClass" : "library_composer" , "sWidth" : "150px" },
|
||||
/* Conductor */ { "sTitle" : "Conductor" , "mDataProp" : "conductor" , "bVisible" : false , "sClass" : "library_conductor" , "sWidth" : "125px" },
|
||||
/* Copyright */ { "sTitle" : "Copyright" , "mDataProp" : "copyright" , "bVisible" : false , "sClass" : "library_copyright" , "sWidth" : "125px" },
|
||||
/* Encoded */ { "sTitle" : "Encoded By" , "mDataProp" : "encoded_by" , "bVisible" : false , "sClass" : "library_encoded" , "sWidth" : "150px" },
|
||||
/* Genre */ { "sTitle" : "Genre" , "mDataProp" : "genre" , "bVisible" : false , "sClass" : "library_genre" , "sWidth" : "100px" },
|
||||
/* ISRC Number */ { "sTitle" : "ISRC" , "mDataProp" : "isrc_number" , "bVisible" : false , "sClass" : "library_isrc" , "sWidth" : "150px" },
|
||||
/* Label */ { "sTitle" : "Label" , "mDataProp" : "label" , "bVisible" : false , "sClass" : "library_label" , "sWidth" : "125px" },
|
||||
/* Language */ { "sTitle" : "Language" , "mDataProp" : "language" , "bVisible" : false , "sClass" : "library_language" , "sWidth" : "125px" },
|
||||
/* Last Modified */ { "sTitle" : "Last Modified" , "mDataProp" : "mtime" , "bVisible" : false , "sClass" : "library_modified_time" , "sWidth" : "125px" },
|
||||
/* Last Played */ { "sTitle" : "Last Played " , "mDataProp" : "lptime" , "bVisible" : false , "sClass" : "library_modified_time" , "sWidth" : "125px" },
|
||||
/* Length */ { "sTitle" : "Length" , "mDataProp" : "length" , "sClass" : "library_length" , "sWidth" : "80px" } ,
|
||||
/* Mime */ { "sTitle" : "Mime" , "mDataProp" : "mime" , "bVisible" : false , "sClass" : "library_mime" , "sWidth" : "80px" },
|
||||
/* Mood */ { "sTitle" : "Mood" , "mDataProp" : "mood" , "bVisible" : false , "sClass" : "library_mood" , "sWidth" : "70px" },
|
||||
/* Owner */ { "sTitle" : "Owner" , "mDataProp" : "owner_id" , "bVisible" : false , "sClass" : "library_language" , "sWidth" : "125px" },
|
||||
/* Replay Gain */ { "sTitle" : "Replay Gain" , "mDataProp" : "replay_gain" , "bVisible" : false , "sClass" : "library_replay_gain" , "sWidth" : "80px" },
|
||||
/* Sample Rate */ { "sTitle" : "Sample Rate" , "mDataProp" : "sample_rate" , "bVisible" : false , "sClass" : "library_sr" , "sWidth" : "80px" },
|
||||
/* Track Number */ { "sTitle" : "Track Number" , "mDataProp" : "track_number" , "bVisible" : false , "sClass" : "library_track" , "sWidth" : "65px" },
|
||||
/* Upload Time */ { "sTitle" : "Uploaded" , "mDataProp" : "utime" , "sClass" : "library_upload_time" , "sWidth" : "125px" } ,
|
||||
/* Website */ { "sTitle" : "Website" , "mDataProp" : "info_url" , "bVisible" : false , "sClass" : "library_url" , "sWidth" : "150px" },
|
||||
/* Year */ { "sTitle" : "Year" , "mDataProp" : "year" , "bVisible" : false , "sClass" : "library_year" , "sWidth" : "60px" }
|
||||
/* Title */ { "sTitle" : $.i18n._("Title") , "mDataProp" : "track_title" , "sClass" : "library_title" , "sWidth" : "170px" } ,
|
||||
/* Creator */ { "sTitle" : $.i18n._("Creator") , "mDataProp" : "artist_name" , "sClass" : "library_creator" , "sWidth" : "160px" } ,
|
||||
/* Album */ { "sTitle" : $.i18n._("Album") , "mDataProp" : "album_title" , "sClass" : "library_album" , "sWidth" : "150px" } ,
|
||||
/* Bit Rate */ { "sTitle" : $.i18n._("Bit Rate") , "mDataProp" : "bit_rate" , "bVisible" : false , "sClass" : "library_bitrate" , "sWidth" : "80px" },
|
||||
/* BPM */ { "sTitle" : $.i18n._("BPM") , "mDataProp" : "bpm" , "bVisible" : false , "sClass" : "library_bpm" , "sWidth" : "50px" },
|
||||
/* Composer */ { "sTitle" : $.i18n._("Composer") , "mDataProp" : "composer" , "bVisible" : false , "sClass" : "library_composer" , "sWidth" : "150px" },
|
||||
/* Conductor */ { "sTitle" : $.i18n._("Conductor") , "mDataProp" : "conductor" , "bVisible" : false , "sClass" : "library_conductor" , "sWidth" : "125px" },
|
||||
/* Copyright */ { "sTitle" : $.i18n._("Copyright") , "mDataProp" : "copyright" , "bVisible" : false , "sClass" : "library_copyright" , "sWidth" : "125px" },
|
||||
/* Encoded */ { "sTitle" : $.i18n._("Encoded By") , "mDataProp" : "encoded_by" , "bVisible" : false , "sClass" : "library_encoded" , "sWidth" : "150px" },
|
||||
/* Genre */ { "sTitle" : $.i18n._("Genre") , "mDataProp" : "genre" , "bVisible" : false , "sClass" : "library_genre" , "sWidth" : "100px" },
|
||||
/* ISRC Number */ { "sTitle" : $.i18n._("ISRC") , "mDataProp" : "isrc_number" , "bVisible" : false , "sClass" : "library_isrc" , "sWidth" : "150px" },
|
||||
/* Label */ { "sTitle" : $.i18n._("Label") , "mDataProp" : "label" , "bVisible" : false , "sClass" : "library_label" , "sWidth" : "125px" },
|
||||
/* Language */ { "sTitle" : $.i18n._("Language") , "mDataProp" : "language" , "bVisible" : false , "sClass" : "library_language" , "sWidth" : "125px" },
|
||||
/* Last Modified */ { "sTitle" : $.i18n._("Last Modified") , "mDataProp" : "mtime" , "bVisible" : false , "sClass" : "library_modified_time" , "sWidth" : "125px" },
|
||||
/* Last Played */ { "sTitle" : $.i18n._("Last Played") , "mDataProp" : "lptime" , "bVisible" : false , "sClass" : "library_modified_time" , "sWidth" : "125px" },
|
||||
/* Length */ { "sTitle" : $.i18n._("Length") , "mDataProp" : "length" , "sClass" : "library_length" , "sWidth" : "80px" } ,
|
||||
/* Mime */ { "sTitle" : $.i18n._("Mime") , "mDataProp" : "mime" , "bVisible" : false , "sClass" : "library_mime" , "sWidth" : "80px" },
|
||||
/* Mood */ { "sTitle" : $.i18n._("Mood") , "mDataProp" : "mood" , "bVisible" : false , "sClass" : "library_mood" , "sWidth" : "70px" },
|
||||
/* Owner */ { "sTitle" : $.i18n._("Owner") , "mDataProp" : "owner_id" , "bVisible" : false , "sClass" : "library_language" , "sWidth" : "125px" },
|
||||
/* Replay Gain */ { "sTitle" : $.i18n._("Replay Gain") , "mDataProp" : "replay_gain" , "bVisible" : false , "sClass" : "library_replay_gain" , "sWidth" : "80px" },
|
||||
/* Sample Rate */ { "sTitle" : $.i18n._("Sample Rate") , "mDataProp" : "sample_rate" , "bVisible" : false , "sClass" : "library_sr" , "sWidth" : "80px" },
|
||||
/* Track Number */ { "sTitle" : $.i18n._("Track Number") , "mDataProp" : "track_number" , "bVisible" : false , "sClass" : "library_track" , "sWidth" : "65px" },
|
||||
/* Upload Time */ { "sTitle" : $.i18n._("Uploaded") , "mDataProp" : "utime" , "sClass" : "library_upload_time" , "sWidth" : "125px" } ,
|
||||
/* 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,
|
||||
|
@ -611,7 +611,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
// icon.
|
||||
$(nRow).find("td:not(.library_checkbox, .library_type)").qtip({
|
||||
content: {
|
||||
text: "Loading...",
|
||||
text: $.i18n._("Loading..."),
|
||||
title: {
|
||||
text: aData.track_title
|
||||
},
|
||||
|
@ -725,11 +725,11 @@ var AIRTIME = (function(AIRTIME) {
|
|||
.addClass("dataTables_type")
|
||||
.append('<select name="library_display_type" />')
|
||||
.find("select")
|
||||
.append('<option value="0">All</option>')
|
||||
.append('<option value="1">Files</option>')
|
||||
.append('<option value="2">Playlists</option>')
|
||||
.append('<option value="3">Smart Blocks</option>')
|
||||
.append('<option value="4">Web Streams</option>')
|
||||
.append('<option value="0">'+$.i18n._("All")+'</option>')
|
||||
.append('<option value="1">'+$.i18n._("Files")+'</option>')
|
||||
.append('<option value="2">'+$.i18n._("Playlists")+'</option>')
|
||||
.append('<option value="3">'+$.i18n._("Smart Blocks")+'</option>')
|
||||
.append('<option value="4">'+$.i18n._("Web Streams")+'</option>')
|
||||
.end()
|
||||
.change(function(ev){
|
||||
oTable.fnDraw();
|
||||
|
@ -812,7 +812,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
AIRTIME.playlist.fnEdit(data.id, data.ftype, url);
|
||||
}
|
||||
} else {
|
||||
throw new Exception("Unknown type: " + data.ftype);
|
||||
throw new Exception($.i18n._("Unknown type: ") + data.ftype);
|
||||
}
|
||||
oItems.edit.callback = callback;
|
||||
}
|
||||
|
@ -854,7 +854,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
callback = function() {
|
||||
aMedia = [];
|
||||
aMedia.push({"id": data.id, "type": data.ftype});
|
||||
if (confirm('Are you sure you want to delete the selected item?')) {
|
||||
if (confirm($.i18n._('Are you sure you want to delete the selected item?'))) {
|
||||
AIRTIME.library.fnDeleteItems(aMedia);
|
||||
}
|
||||
};
|
||||
|
@ -863,7 +863,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
callback = function() {
|
||||
var media = [];
|
||||
|
||||
if (confirm('Are you sure you want to delete the selected item?')) {
|
||||
if (confirm($.i18n._('Are you sure you want to delete the selected item?'))) {
|
||||
|
||||
media.push({"id": data.id, "type": data.ftype});
|
||||
$.post(oItems.del.url, {format: "json", media: media }, function(json){
|
||||
|
@ -1010,7 +1010,7 @@ function addQtipToSCIcons(){
|
|||
if ($(this).hasClass("progress")){
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: "Uploading in progress..."
|
||||
text: $.i18n._("Uploading in progress...")
|
||||
},
|
||||
position:{
|
||||
adjust: {
|
||||
|
@ -1030,13 +1030,13 @@ function addQtipToSCIcons(){
|
|||
else if($(this).hasClass("soundcloud")){
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: "Retrieving data from the server...",
|
||||
text: $.i18n._("Retrieving 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', "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);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1057,14 +1057,15 @@ function addQtipToSCIcons(){
|
|||
}else if($(this).hasClass("sc-error")){
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: "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', "There was error while uploading to soundcloud.<br>"+"Error code: "+json.error_code+
|
||||
"<br>"+"Error msg: "+json.error_msg+"<br>");
|
||||
this.set('content.text', $.i18n._("There was an error while uploading to soundcloud.")+"<br>"+
|
||||
$.i18n._("Error code: ")+json.error_code+
|
||||
"<br>"+$.i18n._("Error msg: ")+json.error_msg+"<br>");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1167,13 +1168,13 @@ function validateAdvancedSearch(divs) {
|
|||
function addRemoveValidationIcons(valid, field, searchTermType) {
|
||||
var title = '';
|
||||
if (searchTermType === 'i') {
|
||||
title = 'Input must be a positive number';
|
||||
title = $.i18n._('Input must be a positive number');
|
||||
} else if (searchTermType === 'n') {
|
||||
title = 'Input must be a number';
|
||||
title = $.i18n._('Input must be a number');
|
||||
} else if (searchTermType === 't') {
|
||||
title = 'Input must be in the format: yyyy-mm-dd';
|
||||
title = $.i18n._('Input must be in the format: yyyy-mm-dd');
|
||||
} else if (searchTermType === 'l') {
|
||||
title = 'Input must be in the format: hh:mm:ss.t';
|
||||
title = $.i18n._('Input must be in the format: hh:mm:ss.t');
|
||||
}
|
||||
|
||||
var validIndicator = " <span class='checked-icon sp-checked-icon'></span>",
|
||||
|
|
|
@ -56,7 +56,9 @@ $(document).ready(function() {
|
|||
|
||||
$(window).bind('beforeunload', function(){
|
||||
if(uploadProgress){
|
||||
return "You are currently uploading files.\nGoing to another screen will cancel the upload process.\nAre you sure you want to leave the page?";
|
||||
return $.i18n._("You are currently uploading files.")+"\n"+
|
||||
$.i18n._("Going to another screen will cancel the upload process.")+"\n"+
|
||||
$.i18n._("Are you sure you want to leave the page?");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
type = $('#obj_type').val();
|
||||
|
||||
if (!isTimeValid(cueIn)){
|
||||
showError(span, "please put in a time '00:00:00 (.0)'");
|
||||
showError(span, $.i18n("please put in a time '00:00:00 (.0)'"));
|
||||
return;
|
||||
}
|
||||
$.post(url,
|
||||
|
@ -111,7 +111,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
type = $('#obj_type').val();
|
||||
|
||||
if (!isTimeValid(cueOut)){
|
||||
showError(span, "please put in a time '00:00:00 (.0)'");
|
||||
showError(span, $.i18n("please put in a time '00:00:00 (.0)'"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
type = $('#obj_type').val();
|
||||
|
||||
if (!isFadeValid(fadeIn)){
|
||||
showError(span, "please put in a time in seconds '00 (.0)'");
|
||||
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
type = $('#obj_type').val();
|
||||
|
||||
if (!isFadeValid(fadeOut)){
|
||||
showError(span, "please put in a time in seconds '00 (.0)'");
|
||||
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -378,7 +378,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
} else {
|
||||
$(value).attr("class", "big_play_disabled dark_class");
|
||||
$(value).qtip({
|
||||
content: 'Your browser does not support playing this file type: "'+ mime +'"',
|
||||
content: $.i18n._("Your browser does not support playing this file type: ")+ mime,
|
||||
show: 'mouseover',
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -402,7 +402,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
if ($(value).attr('blocktype') === 'dynamic') {
|
||||
$(value).attr("class", "big_play_disabled dark_class");
|
||||
$(value).qtip({
|
||||
content: 'Dynamic block is not previewable',
|
||||
content: $.i18n._('Dynamic block is not previewable'),
|
||||
show: 'mouseover',
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -483,7 +483,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
"</li>";
|
||||
});
|
||||
}
|
||||
$html += "<li><br /><span class='block-item-title'>Limit to: "+data.limit.value+" "+data.limit.modifier+"</span></li>";
|
||||
$html += "<li><br /><span class='block-item-title'>"+$.i18n._("Limit to: ")+data.limit.value+" "+data.limit.modifier+"</span></li>";
|
||||
}
|
||||
$pl.find("#block_"+id+"_info").html($html).show();
|
||||
mod.enableUI();
|
||||
|
@ -575,7 +575,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
type = $('#obj_type').val();
|
||||
|
||||
if (!isFadeValid(fadeIn)){
|
||||
showError(span, "please put in a time in seconds '00 (.0)'");
|
||||
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -599,7 +599,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
type = $('#obj_type').val();
|
||||
|
||||
if (!isFadeValid(fadeOut)){
|
||||
showError(span, "please put in a time in seconds '00 (.0)'");
|
||||
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -682,7 +682,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
var field = json.analysis[s];
|
||||
|
||||
if (!field[0]) {
|
||||
var elemId = "#"+s+"-error";
|
||||
var elemId = "#"+s+$.i18n._("-error");
|
||||
var $div = $("#side_playlist " + elemId).text(field[1]).show();
|
||||
}
|
||||
}
|
||||
|
@ -738,7 +738,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
if (obj_type == "block") {
|
||||
callback(data, "save");
|
||||
} else {
|
||||
$('.success').text('Playlist saved');
|
||||
$('.success').text($.i18n._('Playlist saved'));
|
||||
$('.success').show();
|
||||
setTimeout(removeSuccessMsg, 5000);
|
||||
dt.fnStandingRedraw();
|
||||
|
@ -1075,7 +1075,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
$pl.find(".ui-icon-alert").qtip({
|
||||
content: {
|
||||
text: "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."
|
||||
text: $.i18n._("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.")
|
||||
},
|
||||
position:{
|
||||
adjust: {
|
||||
|
|
|
@ -134,7 +134,7 @@ function plot(datasets){
|
|||
var y = item.datapoint[1].toFixed(2);
|
||||
|
||||
showTooltip(item.pageX, item.pageY,
|
||||
"Listener Count on '"+item.series.label + "': " + Math.floor(y));
|
||||
$.i18n._("Listener Count on")+" '"+item.series.label + "': " + Math.floor(y));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -145,7 +145,7 @@ function plot(datasets){
|
|||
|
||||
$("#placeholder").bind("plotclick", function (event, pos, item) {
|
||||
if (item) {
|
||||
$("#clickdata").text("You clicked point " + item.dataIndex + " in " + item.series.label + ".");
|
||||
$("#clickdata").text($.i18n._("You clicked point ") + item.dataIndex + " "+$.i18n._("in")+" " + item.series.label + ".");
|
||||
plot.highlight(item.series, item.datapoint);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -16,7 +16,7 @@ $(document).ready(function(){
|
|||
buttons: [
|
||||
{
|
||||
id: "remind_me",
|
||||
text: "Remind me in 1 week",
|
||||
text: $.i18n._("Remind me in 1 week"),
|
||||
"class": "btn",
|
||||
click: function() {
|
||||
var url = baseUrl+'/Usersettings/remindme';
|
||||
|
@ -29,7 +29,7 @@ $(document).ready(function(){
|
|||
},
|
||||
{
|
||||
id: "remind_never",
|
||||
text: "Remind me never",
|
||||
text: $.i18n._("Remind me never"),
|
||||
"class": "btn",
|
||||
click: function() {
|
||||
var url =baseUrl+'/Usersettings/remindme-never';
|
||||
|
@ -42,7 +42,7 @@ $(document).ready(function(){
|
|||
},
|
||||
{
|
||||
id: "help_airtime",
|
||||
text: "Yes, help Airtime",
|
||||
text: $.i18n._("Yes, help Airtime"),
|
||||
"class": "btn",
|
||||
click: function() {
|
||||
$("#register-form").submit();
|
||||
|
@ -129,7 +129,7 @@ $(document).ready(function(){
|
|||
var ul, li;
|
||||
|
||||
ul = logoEl.find('.errors');
|
||||
li = $("<li/>").append("Image must be one of jpg, jpeg, png, or gif");
|
||||
li = $("<li/>").append($.i18n._("Image must be one of jpg, jpeg, png, or gif"));
|
||||
|
||||
//errors ul has already been created.
|
||||
if (ul.length > 0) {
|
||||
|
|
|
@ -378,10 +378,8 @@ function setupUI() {
|
|||
|
||||
$(".playlist_type_help_icon").qtip({
|
||||
content: {
|
||||
text: "A static smart block will save the criteria and generate the block content immediately. " +
|
||||
"This allows you to edit and view it in the Library before adding it to a show.<br /><br />" +
|
||||
"A dynamic smart block will only save the criteria. The block content will get generated upon " +
|
||||
"adding it to a show. You will not be able to view and edit the content in the Library."
|
||||
text: $.i18n._("A static smart block will save the criteria and generate the block content immediately. This allows you to edit and view it in the Library before adding it to a show.")+"<br /><br />" +
|
||||
$.i18n._("A dynamic smart block will only save the criteria. The block content will get generated upon adding it to a show. You will not be able to view and edit the content in the Library.")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -402,8 +400,7 @@ function setupUI() {
|
|||
|
||||
$(".repeat_tracks_help_icon").qtip({
|
||||
content: {
|
||||
text: "If your criteria is too strict, Airtime may not be able to fill up the desired smart block length." +
|
||||
" Hence, if you check this option, tracks will be used more than once."
|
||||
text: $.i18n._("If your criteria is too strict, Airtime may not be able to fill up the desired smart block length. Hence, if you check this option, tracks will be used more than once.")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -495,9 +492,9 @@ function callback(data, type) {
|
|||
var form = $('#smart-block-form');
|
||||
if (json.result == "0") {
|
||||
if (type == 'shuffle') {
|
||||
form.find('.success').text('Smart block shuffled');
|
||||
form.find('.success').text($.i18n._('Smart block shuffled'));
|
||||
} else if (type == 'generate') {
|
||||
form.find('.success').text('Smart block generated and criteria saved');
|
||||
form.find('.success').text($.i18n._('Smart block generated and criteria saved'));
|
||||
//redraw library table so the length gets updated
|
||||
dt.fnStandingRedraw();
|
||||
}
|
||||
|
@ -508,7 +505,7 @@ function callback(data, type) {
|
|||
AIRTIME.playlist.fnOpenPlaylist(json);
|
||||
var form = $('#smart-block-form');
|
||||
if (json.result == "0") {
|
||||
$('#sp-success-saved').text('Smart block saved');
|
||||
$('#sp-success-saved').text($.i18n._('Smart block saved'));
|
||||
$('#sp-success-saved').show();
|
||||
|
||||
//redraw library table so the length gets updated
|
||||
|
@ -553,7 +550,7 @@ function removeButtonCheck() {
|
|||
|
||||
function enableLoadingIcon() {
|
||||
$("#side_playlist").block({
|
||||
message: "Processing...",
|
||||
message: $.i18n._("Processing..."),
|
||||
theme: true,
|
||||
allowBodyStretch: true,
|
||||
applyPlatformOpacityRules: false
|
||||
|
@ -594,20 +591,20 @@ var criteriaTypes = {
|
|||
};
|
||||
|
||||
var stringCriteriaOptions = {
|
||||
"0" : "Select modifier",
|
||||
"contains" : "contains",
|
||||
"does not contain" : "does not contain",
|
||||
"is" : "is",
|
||||
"is not" : "is not",
|
||||
"starts with" : "starts with",
|
||||
"ends with" : "ends with"
|
||||
"0" : $.i18n._("Select modifier"),
|
||||
"contains" : $.i18n._("contains"),
|
||||
"does not contain" : $.i18n._("does not contain"),
|
||||
"is" : $.i18n._("is"),
|
||||
"is not" : $.i18n._("is not"),
|
||||
"starts with" : $.i18n._("starts with"),
|
||||
"ends with" : $.i18n._("ends with")
|
||||
};
|
||||
|
||||
var numericCriteriaOptions = {
|
||||
"0" : "Select modifier",
|
||||
"is" : "is",
|
||||
"is not" : "is not",
|
||||
"is greater than" : "is greater than",
|
||||
"is less than" : "is less than",
|
||||
"is in the range" : "is in the range"
|
||||
"0" : $.i18n._("Select modifier"),
|
||||
"is" : $.i18n._("is"),
|
||||
"is not" : $.i18n._("is not"),
|
||||
"is greater than" : $.i18n._("is greater than"),
|
||||
"is less than" : $.i18n._("is less than"),
|
||||
"is in the range" : $.i18n._("is in the range")
|
||||
};
|
||||
|
|
|
@ -65,12 +65,12 @@ var AIRTIME = (function(AIRTIME) {
|
|||
oTable = historyTableDiv.dataTable( {
|
||||
|
||||
"aoColumns": [
|
||||
{"sTitle": "Title", "mDataProp": "title", "sClass": "his_title"}, /* Title */
|
||||
{"sTitle": "Creator", "mDataProp": "artist", "sClass": "his_artist"}, /* Creator */
|
||||
{"sTitle": "Played", "mDataProp": "played", "sClass": "his_artist"}, /* times played */
|
||||
{"sTitle": "Length", "mDataProp": "length", "sClass": "his_length library_length"}, /* Length */
|
||||
{"sTitle": "Composer", "mDataProp": "composer", "sClass": "his_composer"}, /* Composer */
|
||||
{"sTitle": "Copyright", "mDataProp": "copyright", "sClass": "his_copyright"} /* Copyright */
|
||||
{"sTitle": $.i18n._("Title"), "mDataProp": "title", "sClass": "his_title"}, /* Title */
|
||||
{"sTitle": $.i18n._("Creator"), "mDataProp": "artist", "sClass": "his_artist"}, /* Creator */
|
||||
{"sTitle": $.i18n._("Played"), "mDataProp": "played", "sClass": "his_artist"}, /* times played */
|
||||
{"sTitle": $.i18n._("Length"), "mDataProp": "length", "sClass": "his_length library_length"}, /* Length */
|
||||
{"sTitle": $.i18n._("Composer"), "mDataProp": "composer", "sClass": "his_composer"}, /* Composer */
|
||||
{"sTitle": $.i18n._("Copyright"), "mDataProp": "copyright", "sClass": "his_copyright"} /* Copyright */
|
||||
],
|
||||
|
||||
"bProcessing": true,
|
||||
|
|
|
@ -15,7 +15,7 @@ function setWatchedDirEvents() {
|
|||
imageUrl: 'img/icons/',
|
||||
systemImageUrl: baseUrl+'/css/img/',
|
||||
handlerUrl: baseUrl+'/Preference/server-browse/format/json',
|
||||
title: 'Choose Storage Folder',
|
||||
title: $.i18n._('Choose Storage Folder'),
|
||||
basePath: '',
|
||||
requestMethod: 'POST',
|
||||
});
|
||||
|
@ -35,7 +35,7 @@ function setWatchedDirEvents() {
|
|||
imageUrl: 'img/icons/',
|
||||
systemImageUrl: baseUrl+'/css/img/',
|
||||
handlerUrl: baseUrl+'/Preference/server-browse/format/json',
|
||||
title: 'Choose Folder to Watch',
|
||||
title: $.i18n._('Choose Folder to Watch'),
|
||||
basePath: '',
|
||||
requestMethod: 'POST',
|
||||
});
|
||||
|
@ -43,7 +43,7 @@ function setWatchedDirEvents() {
|
|||
$('#storageFolder-ok').click(function(){
|
||||
var url, chosen;
|
||||
|
||||
if(confirm("Are you sure you want to change the storage folder?\nThis will remove the files from your Airtime library!")){
|
||||
if(confirm($.i18n._("Are you sure you want to change the storage folder?\nThis will remove the files from your Airtime library!"))){
|
||||
url = baseUrl+"/Preference/change-stor-directory";
|
||||
chosen = $('#storageFolder').val();
|
||||
|
||||
|
@ -72,7 +72,7 @@ function setWatchedDirEvents() {
|
|||
|
||||
function(json) {
|
||||
$("#watched-folder-section").empty();
|
||||
$("#watched-folder-section").append("<h2>Manage Media Folders</h2>");
|
||||
$("#watched-folder-section").append("<h2>"+$.i18n._("Manage Media Folders")+"</h2>");
|
||||
$("#watched-folder-section").append(json.subform);
|
||||
setWatchedDirEvents();
|
||||
});
|
||||
|
@ -84,7 +84,7 @@ function setWatchedDirEvents() {
|
|||
});
|
||||
|
||||
$('.selected-item').find('.ui-icon-close').click(function(){
|
||||
if(confirm("Are you sure you want to remove the watched folder?")){
|
||||
if(confirm($.i18n._("Are you sure you want to remove the watched folder?"))){
|
||||
var row = $(this).parent();
|
||||
var folder = row.find('#folderPath').text();
|
||||
|
||||
|
@ -95,7 +95,7 @@ function setWatchedDirEvents() {
|
|||
|
||||
function(json) {
|
||||
$("#watched-folder-section").empty();
|
||||
$("#watched-folder-section").append("<h2>Manage Media Folders</h2>");
|
||||
$("#watched-folder-section").append("<h2>"+$.i18n._("Manage Media Folders")+"</h2>");
|
||||
$("#watched-folder-section").append(json.subform);
|
||||
setWatchedDirEvents();
|
||||
});
|
||||
|
@ -108,7 +108,7 @@ $(document).ready(function() {
|
|||
setWatchedDirEvents();
|
||||
$(".ui-icon-alert").qtip({
|
||||
content: {
|
||||
text: "This path is currently not accessible."
|
||||
text: $.i18n._("This path is currently not accessible.")
|
||||
},
|
||||
position:{
|
||||
adjust: {
|
||||
|
|
|
@ -93,13 +93,13 @@ function checkLiquidsoapStatus(){
|
|||
}
|
||||
var html;
|
||||
if(status == "OK"){
|
||||
html = '<div class="stream-status status-good"><h3>Connected to the streaming server</h3></div>';
|
||||
html = '<div class="stream-status status-good"><h3>'+$.i18n._("Connected to the streaming server")+'</h3></div>';
|
||||
}else if(status == "N/A"){
|
||||
html = '<div class="stream-status status-disabled"><h3>The stream is disabled</h3></div>';
|
||||
html = '<div class="stream-status status-disabled"><h3>'+$.i18n._("The stream is disabled")+'</h3></div>';
|
||||
}else if(status == "waiting"){
|
||||
html = '<div class="stream-status status-info"><h3>Getting information from the server...</h3></div>';
|
||||
html = '<div class="stream-status status-info"><h3>'+$.i18n._("Getting information from the server...")+'</h3></div>';
|
||||
}else{
|
||||
html = '<div class="stream-status status-error"><h3>Can not connect to the streaming server</h3><p>'+status+'</p></div>';
|
||||
html = '<div class="stream-status status-error"><h3>'+$.i18n._("Can not connect to the streaming server")+'</h3><p>'+status+'</p></div>';
|
||||
}
|
||||
$("#s"+id+"Liquidsoap-error-msg-element").html(html);
|
||||
}
|
||||
|
@ -250,7 +250,8 @@ function setupEventListeners() {
|
|||
// qtip for help text
|
||||
$(".override_help_icon").qtip({
|
||||
content: {
|
||||
text: "If Airtime is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. The allowed range is between 1024 and 49151. For more detail, please read the <a target=\"_blank\" href=\"http://www.sourcefabric.org/en/airtime/manuals/\">Airtime manual</a>."
|
||||
text: $.i18n._("If Airtime is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. The allowed range is between 1024 and 49151.")+" "+
|
||||
$.i18n._("For more details, please read the ")+"<a target=\"_blank\" href=\"http://www.sourcefabric.org/en/airtime/manuals/\">"+$.i18n._("Airtime manual")+"</a>."
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -271,7 +272,7 @@ function setupEventListeners() {
|
|||
|
||||
$(".icecast_metadata_help_icon").qtip({
|
||||
content: {
|
||||
text: "Check this option to enable metadata for OGG streams (stream metadata is the track title, artist, and show name that is displayed in an audio player). VLC and mplayer have a serious bug when playing an OGG/VORBIS stream that has metadata information enabled: they will disconnect from the stream after every song. If you are using an OGG stream and your listeners do not require support for these audio players, then feel free to enable this option."
|
||||
text: $.i18n._("Check this option to enable metadata for OGG streams (stream metadata is the track title, artist, and show name that is displayed in an audio player). VLC and mplayer have a serious bug when playing an OGG/VORBIS stream that has metadata information enabled: they will disconnect from the stream after every song. If you are using an OGG stream and your listeners do not require support for these audio players, then feel free to enable this option.")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -292,7 +293,7 @@ function setupEventListeners() {
|
|||
|
||||
$("#auto_transition_help").qtip({
|
||||
content: {
|
||||
text: "Check this box to automatically switch off Master/Show source upon source disconnection."
|
||||
text: $.i18n._("Check this box to automatically switch off Master/Show source upon source disconnection.")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -313,7 +314,7 @@ function setupEventListeners() {
|
|||
|
||||
$("#auto_switch_help").qtip({
|
||||
content: {
|
||||
text: "Check this box to automatically switch on Master/Show source upon source connection."
|
||||
text: $.i18n._("Check this box to automatically switch on Master/Show source upon source connection.")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -334,7 +335,7 @@ function setupEventListeners() {
|
|||
|
||||
$(".stream_username_help_icon").qtip({
|
||||
content: {
|
||||
text: "If your Icecast server expects a username of 'source', this field can be left blank."
|
||||
text: $.i18n._("If your Icecast server expects a username of 'source', this field can be left blank.")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -355,7 +356,7 @@ function setupEventListeners() {
|
|||
|
||||
$(".master_username_help_icon").qtip({
|
||||
content: {
|
||||
text: "If your live streaming client does not ask for a username, this field should be 'source'."
|
||||
text: $.i18n._("If your live streaming client does not ask for a username, this field should be 'source'.")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -375,12 +376,7 @@ function setupEventListeners() {
|
|||
})
|
||||
|
||||
$('#stream_save').live('click', function(){
|
||||
var confirm_pypo_restart_text = "If you change the username or password values for an enabled stream the "
|
||||
+ "playout engine will be rebooted and your listeners will hear silence for"
|
||||
+ "5-10 seconds. Changing the following fields will NOT cause a reboot: "
|
||||
+ "Stream Label (Global Settings), and Switch Transition Fade(s), Master "
|
||||
+ "Username, and Master Password (Input Stream Settings). If Airtime is recording"
|
||||
+ ", and if the change causes a playout engine restart, the recording will be interrupted.";
|
||||
var confirm_pypo_restart_text = $.i18n._("If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If Airtime is recording, and if the change causes a playout engine restart, the recording will be interrupted.");
|
||||
if (confirm(confirm_pypo_restart_text)) {
|
||||
var data = $('#stream_form').serialize();
|
||||
var url = baseUrl+'/Preference/stream-setting';
|
||||
|
|
|
@ -61,7 +61,7 @@ $(document).ready(function() {
|
|||
var ul, li;
|
||||
|
||||
ul = logoEl.find('.errors');
|
||||
li = $("<li/>").append("Image must be one of jpg, jpeg, png, or gif");
|
||||
li = $("<li/>").append($.i18n._("Image must be one of jpg, jpeg, png, or gif"));
|
||||
|
||||
//errors ul has already been created.
|
||||
if (ul.length > 0) {
|
||||
|
|
|
@ -53,7 +53,7 @@ function findHosts(request, callback) {
|
|||
var noResult = new Array();
|
||||
noResult[0] = new Array();
|
||||
noResult[0]['value'] = $("#add_show_hosts_autocomplete").val();
|
||||
noResult[0]['label'] = "No result found";
|
||||
noResult[0]['label'] = $.i18n._("No result found");
|
||||
noResult[0]['index'] = null;
|
||||
|
||||
$.post(url,
|
||||
|
@ -226,7 +226,7 @@ function setAddShowEvents() {
|
|||
|
||||
form.find(".airtime_auth_help_icon").qtip({
|
||||
content: {
|
||||
text: "This follows the same security pattern for the shows: only users assigned to the show can connect."
|
||||
text: $.i18n._("This follows the same security pattern for the shows: only users assigned to the show can connect.")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -246,7 +246,7 @@ function setAddShowEvents() {
|
|||
});
|
||||
form.find(".custom_auth_help_icon").qtip({
|
||||
content: {
|
||||
text: "Specify custom authentication which will work only for this show."
|
||||
text: $.i18n._("Specify custom authentication which will work only for this show.")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -266,7 +266,7 @@ function setAddShowEvents() {
|
|||
});
|
||||
form.find(".stream_username_help_icon").qtip({
|
||||
content: {
|
||||
text: "If your live streaming client does not ask for a username, this field should be 'source'."
|
||||
text: $.i18n._("If your live streaming client does not ask for a username, this field should be 'source'.")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -628,7 +628,7 @@ $(document).ready(function() {
|
|||
//Alert the error and reload the page
|
||||
//this function is used to resolve concurrency issue
|
||||
function alertShowErrorAndReload(){
|
||||
alert("The show instance doesn't exist anymore!");
|
||||
alert($.i18n._("The show instance doesn't exist anymore!"));
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
function scheduleRefetchEvents(json) {
|
||||
if(json.show_error == true){
|
||||
alert("The show instance doesn't exist anymore!");
|
||||
alert($.i18n._("The show instance doesn't exist anymore!"));
|
||||
}
|
||||
if(json.show_id) {
|
||||
var dialog_id = parseInt($("#add_show_id").val(), 10);
|
||||
|
@ -41,7 +41,7 @@ function openAddShowForm() {
|
|||
function makeAddShowButton(){
|
||||
$('.fc-header-left')
|
||||
.append('<span class="fc-header-space"></span>')
|
||||
.append('<span class="fc-button"><a href="#" class="add-button"><span class="add-icon"></span>Show</a></span>')
|
||||
.append('<span class="fc-button"><a href="#" class="add-button"><span class="add-icon"></span>'+$.i18n._("Show")+'</a></span>')
|
||||
.find('span.fc-button:last > a')
|
||||
.click(function(){
|
||||
openAddShowForm();
|
||||
|
@ -154,12 +154,12 @@ function viewDisplay( view ) {
|
|||
var calendarEl = this;
|
||||
|
||||
var select = $('<select class="schedule_change_slots input_select"/>')
|
||||
.append('<option value="1">1m</option>')
|
||||
.append('<option value="5">5m</option>')
|
||||
.append('<option value="10">10m</option>')
|
||||
.append('<option value="15">15m</option>')
|
||||
.append('<option value="30">30m</option>')
|
||||
.append('<option value="60">60m</option>')
|
||||
.append('<option value="1">'+$.i18n._("1m").'</option>')
|
||||
.append('<option value="5">'+$.i18n._("5m").'</option>')
|
||||
.append('<option value="10">'+$.i18n._("10m").'</option>')
|
||||
.append('<option value="15">'+$.i18n._("15m").'</option>')
|
||||
.append('<option value="30">'+$.i18n._("30m").'</option>')
|
||||
.append('<option value="60">'+$.i18n._("60m").'</option>')
|
||||
.change(function(){
|
||||
var slotMin = $(this).val();
|
||||
var opt = view.calendar.options;
|
||||
|
@ -261,7 +261,7 @@ function eventRender(event, element, view) {
|
|||
if (event.soundcloud_id === -1) {
|
||||
$(element)
|
||||
.find(".fc-event-time")
|
||||
.before('<span id="'+event.id+'" title="Show is empty" class="small-icon show-empty"></span>');
|
||||
.before('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
|
||||
} else if (event.soundcloud_id > 0) {
|
||||
|
||||
} else if (event.soundcloud_id === -2) {
|
||||
|
@ -275,7 +275,7 @@ function eventRender(event, element, view) {
|
|||
if (event.soundcloud_id === -1) {
|
||||
$(element)
|
||||
.find(".fc-event-title")
|
||||
.after('<span id="'+event.id+'" title="Show is empty" class="small-icon show-empty"></span>');
|
||||
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
|
||||
} else if (event.soundcloud_id > 0) {
|
||||
|
||||
} else if (event.soundcloud_id === -2) {
|
||||
|
@ -424,7 +424,7 @@ function addQtipToSCIcons(ele){
|
|||
if($(ele).hasClass("progress")){
|
||||
$(ele).qtip({
|
||||
content: {
|
||||
text: "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: "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', "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,14 +468,14 @@ function addQtipToSCIcons(ele){
|
|||
}else if($(ele).hasClass("sc-error")){
|
||||
$(ele).qtip({
|
||||
content: {
|
||||
text: "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', "There was error while uploading to soundcloud.<br>"+"Error code: "+json.error_code+
|
||||
"<br>"+"Error msg: "+json.error_msg+"<br>");
|
||||
this.set('content.text', $.i18n.("There was error while uploading to soundcloud.")+"<br>"+$.i18n._("Error code: ")+json.error_code+
|
||||
"<br>"+$.i18n._("Error msg: ")+json.error_msg+"<br>");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -495,7 +495,7 @@ function addQtipToSCIcons(ele){
|
|||
}else if ($(ele).hasClass("show-empty")){
|
||||
$(ele).qtip({
|
||||
content: {
|
||||
text: "This show has no scheduled content."
|
||||
text: $.i18n._("This show has no scheduled content.")
|
||||
},
|
||||
position:{
|
||||
adjust: {
|
||||
|
@ -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("The show instance doesn't exist anymore!");
|
||||
alert($.i18n.("The show instance doesn't exist anymore!"));
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ function checkShowLength(json) {
|
|||
|
||||
if (percent > 100){
|
||||
$("#show_time_warning")
|
||||
.text("Shows longer than their scheduled time will be cut off by a following show.")
|
||||
.text($.i18n._("Shows longer than their scheduled time will be cut off by a following show."))
|
||||
.show();
|
||||
}
|
||||
else {
|
||||
|
@ -33,7 +33,7 @@ function checkShowLength(json) {
|
|||
}
|
||||
|
||||
function confirmCancelShow(show_instance_id){
|
||||
if (confirm('Cancel Current Show?')) {
|
||||
if (confirm($.i18n._('Cancel Current Show?'))) {
|
||||
var url = baseUrl+"/Schedule/cancel-current-show";
|
||||
$.ajax({
|
||||
url: url,
|
||||
|
@ -46,7 +46,7 @@ function confirmCancelShow(show_instance_id){
|
|||
}
|
||||
|
||||
function confirmCancelRecordedShow(show_instance_id){
|
||||
if (confirm('Stop recording current show?')) {
|
||||
if (confirm($.i18n._('Stop recording current show?'))) {
|
||||
var url = baseUrl+"/Schedule/cancel-current-show";
|
||||
$.ajax({
|
||||
url: url,
|
||||
|
@ -165,7 +165,7 @@ function buildScheduleDialog (json) {
|
|||
close: closeDialog,
|
||||
buttons: [
|
||||
{
|
||||
text: "Ok",
|
||||
text: $.i18n._("Ok"),
|
||||
"class": "btn",
|
||||
click: function() {
|
||||
$(this).dialog("close");
|
||||
|
@ -207,14 +207,14 @@ function buildContentDialog (json){
|
|||
|
||||
dialog.dialog({
|
||||
autoOpen: false,
|
||||
title: "Contents of Show \"" + json.showTitle + "\"",
|
||||
title: $.i18n._("Contents of Show") +" '" + json.showTitle + "'",
|
||||
width: width,
|
||||
height: height,
|
||||
modal: true,
|
||||
close: closeDialog,
|
||||
buttons: [
|
||||
{
|
||||
text: "Ok",
|
||||
text: $.i18n._("Ok"),
|
||||
"class": "btn",
|
||||
click: function() {
|
||||
dialog.remove();
|
||||
|
@ -283,7 +283,7 @@ function createFullCalendar(data){
|
|||
//Alert the error and reload the page
|
||||
//this function is used to resolve concurrency issue
|
||||
function alertShowErrorAndReload(){
|
||||
alert("The show instance doesn't exist anymore!");
|
||||
alert($.i18n._("The show instance doesn't exist anymore!"));
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ $(document).ready(function() {
|
|||
if (oItems.clear !== undefined) {
|
||||
|
||||
callback = function() {
|
||||
if (confirm("Remove all content?")) {
|
||||
if (confirm($.i18n._("Remove all content?"))) {
|
||||
$.post(oItems.clear.url, {format: "json", id: data.id}, function(json){
|
||||
scheduleRefetchEvents(json);
|
||||
});
|
||||
|
|
|
@ -283,7 +283,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
mod.fnRemove = function(aItems) {
|
||||
|
||||
mod.disableUI();
|
||||
if (confirm("Delete selected item(s)?")) {
|
||||
if (confirm($.i18n._("Delete selected item(s)?"))) {
|
||||
$.post( baseUrl+"/showbuilder/schedule-remove",
|
||||
{"items": aItems, "format": "json"},
|
||||
mod.fnItemCallback
|
||||
|
@ -360,17 +360,17 @@ var AIRTIME = (function(AIRTIME){
|
|||
"aoColumns": [
|
||||
/* checkbox */ {"mDataProp": "allowed", "sTitle": "", "sWidth": "15px", "sClass": "sb-checkbox"},
|
||||
/* Type */ {"mDataProp": "image", "sTitle": "", "sClass": "library_image sb-image", "sWidth": "16px"},
|
||||
/* starts */ {"mDataProp": "starts", "sTitle": "Start", "sClass": "sb-starts", "sWidth": "60px"},
|
||||
/* ends */ {"mDataProp": "ends", "sTitle": "End", "sClass": "sb-ends", "sWidth": "60px"},
|
||||
/* runtime */ {"mDataProp": "runtime", "sTitle": "Duration", "sClass": "library_length sb-length", "sWidth": "65px"},
|
||||
/* title */ {"mDataProp": "title", "sTitle": "Title", "sClass": "sb-title"},
|
||||
/* creator */ {"mDataProp": "creator", "sTitle": "Creator", "sClass": "sb-creator"},
|
||||
/* album */ {"mDataProp": "album", "sTitle": "Album", "sClass": "sb-album"},
|
||||
/* cue in */ {"mDataProp": "cuein", "sTitle": "Cue In", "bVisible": false, "sClass": "sb-cue-in"},
|
||||
/* cue out */ {"mDataProp": "cueout", "sTitle": "Cue Out", "bVisible": false, "sClass": "sb-cue-out"},
|
||||
/* fade in */ {"mDataProp": "fadein", "sTitle": "Fade In", "bVisible": false, "sClass": "sb-fade-in"},
|
||||
/* fade out */ {"mDataProp": "fadeout", "sTitle": "Fade Out", "bVisible": false, "sClass": "sb-fade-out"},
|
||||
/* Mime */ {"mDataProp" : "mime", "sTitle" : "Mime", "bVisible": false, "sClass": "sb-mime"}
|
||||
/* starts */ {"mDataProp": "starts", "sTitle": $.i18n._("Start"), "sClass": "sb-starts", "sWidth": "60px"},
|
||||
/* ends */ {"mDataProp": "ends", "sTitle": $.i18n._("End"), "sClass": "sb-ends", "sWidth": "60px"},
|
||||
/* runtime */ {"mDataProp": "runtime", "sTitle": $.i18n._("Duration"), "sClass": "library_length sb-length", "sWidth": "65px"},
|
||||
/* title */ {"mDataProp": "title", "sTitle": $.i18n._("Title"), "sClass": "sb-title"},
|
||||
/* creator */ {"mDataProp": "creator", "sTitle": $.i18n._("Creator"), "sClass": "sb-creator"},
|
||||
/* album */ {"mDataProp": "album", "sTitle": $.i18n._("Album"), "sClass": "sb-album"},
|
||||
/* cue in */ {"mDataProp": "cuein", "sTitle": $.i18n._("Cue In"), "bVisible": false, "sClass": "sb-cue-in"},
|
||||
/* cue out */ {"mDataProp": "cueout", "sTitle": $.i18n._("Cue Out"), "bVisible": false, "sClass": "sb-cue-out"},
|
||||
/* fade in */ {"mDataProp": "fadein", "sTitle": $.i18n._("Fade In"), "bVisible": false, "sClass": "sb-fade-in"},
|
||||
/* fade out */ {"mDataProp": "fadeout", "sTitle": $.i18n._("Fade Out"), "bVisible": false, "sClass": "sb-fade-out"},
|
||||
/* Mime */ {"mDataProp" : "mime", "sTitle" : $.i18n._("Mime"), "bVisible": false, "sClass": "sb-mime"}
|
||||
],
|
||||
|
||||
"bJQueryUI": true,
|
||||
|
@ -527,7 +527,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
$node = $(nRow.children[0]);
|
||||
$node.html('');
|
||||
|
||||
sSeparatorHTML = '<span>Show Empty</span>';
|
||||
sSeparatorHTML = '<span>'+$.i18n._("Show Empty")+'</span>';
|
||||
cl = cl + " sb-empty odd";
|
||||
|
||||
fnPrepareSeparatorRow(sSeparatorHTML, cl, 1);
|
||||
|
@ -539,7 +539,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
$node = $(nRow.children[0]);
|
||||
$node.html('');
|
||||
|
||||
sSeparatorHTML = '<span>Recording From Line In</span>';
|
||||
sSeparatorHTML = '<span>'+$.i18n._("Recording From Line In")+'</span>';
|
||||
cl = cl + " sb-record odd";
|
||||
|
||||
fnPrepareSeparatorRow(sSeparatorHTML, cl, 1);
|
||||
|
@ -554,7 +554,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
if (!isAudioSupported(aData.mime)) {
|
||||
$image.html('<span class="ui-icon ui-icon-locked"></span>');
|
||||
} else {
|
||||
$image.html('<img title="Track preview" src="'+baseUrl+'/css/images/icon_audioclip.png"></img>')
|
||||
$image.html('<img title="'+$.i18n._("Track preview")+'" src="'+baseUrl+'/css/images/icon_audioclip.png"></img>')
|
||||
.click(function() {
|
||||
open_show_preview(aData.instance, aData.pos);
|
||||
return false;
|
||||
|
@ -565,7 +565,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
$image.html('<span class="ui-icon ui-icon-alert"></span>');
|
||||
$image.find(".ui-icon-alert").qtip({
|
||||
content: {
|
||||
text: "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."
|
||||
text: $.i18n._("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.")
|
||||
},
|
||||
style: {
|
||||
classes: "ui-tooltip-dark"
|
||||
|
@ -877,7 +877,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
//can't add items outside of shows.
|
||||
if (prev.find("td:first").hasClass("dataTables_empty")
|
||||
|| prev.length === 0) {
|
||||
alert("Cannot schedule outside a show.");
|
||||
alert($.i18n._("Cannot schedule outside a show."));
|
||||
ui.item.remove();
|
||||
return;
|
||||
}
|
||||
|
@ -932,10 +932,10 @@ var AIRTIME = (function(AIRTIME){
|
|||
}
|
||||
|
||||
if (selected.length === 1) {
|
||||
message = "Moving "+selected.length+" Item.";
|
||||
message = $.i18n._("Moving ")+selected.length+$.i18n._(" Item.");
|
||||
}
|
||||
else {
|
||||
message = "Moving "+selected.length+" Items.";
|
||||
message = $.i18n._("Moving ")+selected.length+$.i18n._(" Items.");
|
||||
}
|
||||
|
||||
draggingContainer = $('<tr/>')
|
||||
|
@ -983,28 +983,28 @@ var AIRTIME = (function(AIRTIME){
|
|||
$menu = $("<div class='btn-toolbar'/>");
|
||||
$menu.append("<div class='btn-group'>" +
|
||||
"<button class='btn btn-small dropdown-toggle' id='timeline-select' data-toggle='dropdown'>" +
|
||||
"Select <span class='caret'></span>" +
|
||||
$.i18n._("Select")+" <span class='caret'></span>" +
|
||||
"</button>" +
|
||||
"<ul class='dropdown-menu'>" +
|
||||
"<li id='timeline-sa'><a href='#'>Select all</a></li>" +
|
||||
"<li id='timeline-sn'><a href='#'>Select none</a></li>" +
|
||||
"<li id='timeline-sa'><a href='#'>"+$.i18n._("Select all")+"</a></li>" +
|
||||
"<li id='timeline-sn'><a href='#'>"+$.i18n._("Select none")+"</a></li>" +
|
||||
"</ul>" +
|
||||
"</div>")
|
||||
.append("<div class='btn-group'>" +
|
||||
"<button title='Remove overbooked tracks' class='ui-state-disabled btn btn-small' disabled='disabled'>" +
|
||||
"<button title='"+$.i18n._("Remove overbooked tracks")+"' class='ui-state-disabled btn btn-small' disabled='disabled'>" +
|
||||
"<i class='icon-white icon-cut'></i></button></div>")
|
||||
.append("<div class='btn-group'>" +
|
||||
"<button title='Remove selected scheduled items' class='ui-state-disabled btn btn-small' disabled='disabled'>" +
|
||||
"<button title='"+$.i18n._("Remove selected scheduled items")+"' class='ui-state-disabled btn btn-small' disabled='disabled'>" +
|
||||
"<i class='icon-white icon-trash'></i></button></div>");
|
||||
|
||||
//if 'Add/Remove content' was chosen from the context menu
|
||||
//in the Calendar do not append these buttons
|
||||
if ($(".ui-dialog-content").length === 0) {
|
||||
$menu.append("<div class='btn-group'>" +
|
||||
"<button title='Jump to the current playing track' class='ui-state-disabled btn btn-small' disabled='disabled'>" +
|
||||
"<button title='"+$.i18n._("Jump to the current playing track")+"' class='ui-state-disabled btn btn-small' disabled='disabled'>" +
|
||||
"<i class='icon-white icon-step-forward'></i></button></div>")
|
||||
.append("<div class='btn-group'>" +
|
||||
"<button title='Cancel current show' class='ui-state-disabled btn btn-small btn-danger' disabled='disabled'>" +
|
||||
"<button title='"+$.i18n._("Cancel current show")+"' class='ui-state-disabled btn btn-small btn-danger' disabled='disabled'>" +
|
||||
"<i class='icon-white icon-ban-circle'></i></button></div>");
|
||||
}
|
||||
|
||||
|
@ -1019,7 +1019,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
.click(function() {
|
||||
var $tr,
|
||||
data,
|
||||
msg = 'Cancel Current Show?';
|
||||
msg = $.i18n._('Cancel Current Show?');
|
||||
|
||||
if (AIRTIME.button.isDisabled('icon-ban-circle', true) === true) {
|
||||
return;
|
||||
|
@ -1031,7 +1031,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
data = $tr.data("aData");
|
||||
|
||||
if (data.record === true) {
|
||||
msg = 'Stop recording current show?';
|
||||
msg = $.i18n._('Stop recording current show?');
|
||||
}
|
||||
|
||||
if (confirm(msg)) {
|
||||
|
|
|
@ -15,7 +15,7 @@ AIRTIME = (function(AIRTIME) {
|
|||
timeStartId = "#sb_time_start",
|
||||
dateEndId = "#sb_date_end",
|
||||
timeEndId = "#sb_time_end",
|
||||
$toggleLib = $("<a id='sb_edit' class='btn btn-small' href='#' title='Open library to add or remove content'>Add / Remove Content</a>"),
|
||||
$toggleLib = $("<a id='sb_edit' class='btn btn-small' href='#' title='"+$.i18n._("Open library to add or remove content")+"'>"+$.i18n._("Add / Remove Content")+"</a>"),
|
||||
$libClose = $('<a />', {
|
||||
"class": "close-round",
|
||||
"href": "#",
|
||||
|
|
|
@ -2,7 +2,7 @@ function generatePartitions(partitions){
|
|||
|
||||
var rowTemplate =
|
||||
'<tr class="partition-info">'+
|
||||
'<td><span class="strong">Disk #%s</span>'+
|
||||
'<td><span class="strong">'+$.i18n._("Disk")+' #%s</span>'+
|
||||
'<ul id="watched-dir-list-%s">'+
|
||||
'</ul>'+
|
||||
'</td>'+
|
||||
|
@ -12,7 +12,7 @@ function generatePartitions(partitions){
|
|||
'<div class="diskspace" style="width:%s%%;">'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div>%s%% in use</div>'+
|
||||
'<div>%s%% '+$.i18n._("in use")+'</div>'+
|
||||
'</td>'+
|
||||
'</tr>';
|
||||
|
||||
|
|
|
@ -45,16 +45,16 @@ function rowCallback( nRow, aData, iDisplayIndex ){
|
|||
|
||||
if ( aData['type'] == "A" )
|
||||
{
|
||||
$('td:eq(3)', nRow).html( 'Admin' );
|
||||
$('td:eq(3)', nRow).html( $.i18n._('Admin') );
|
||||
} else if ( aData['type'] == "H" )
|
||||
{
|
||||
$('td:eq(3)', nRow).html( 'DJ' );
|
||||
$('td:eq(3)', nRow).html( $.i18n._('DJ') );
|
||||
} else if ( aData['type'] == "G" )
|
||||
{
|
||||
$('td:eq(3)', nRow).html( 'Guest' );
|
||||
$('td:eq(3)', nRow).html( $.i18n._('Guest') );
|
||||
} else if ( aData['type'] == "P" )
|
||||
{
|
||||
$('td:eq(3)', nRow).html( 'Program Manager' );
|
||||
$('td:eq(3)', nRow).html( $.i18n._('Program Manager') );
|
||||
}
|
||||
|
||||
return nRow;
|
||||
|
|
Loading…
Reference in New Issue