From 8c49540d3d776f87833092324988269e1cd6e1e9 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 20 Nov 2012 11:16:10 -0500 Subject: [PATCH] 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 --- airtime_mvc/application/Bootstrap.php | 3 + airtime_mvc/application/configs/ACL.php | 4 +- .../controllers/LocaleController.php | 262 ++++++++++++++++++ .../public/js/airtime/common/common.js | 2 +- .../public/js/airtime/dashboard/dashboard.js | 14 +- .../js/airtime/dashboard/versiontooltip.js | 8 +- .../library/events/library_playlistbuilder.js | 14 +- .../library/events/library_showbuilder.js | 4 +- .../public/js/airtime/library/library.js | 99 +++---- .../public/js/airtime/library/plupload.js | 4 +- airtime_mvc/public/js/airtime/library/spl.js | 24 +- .../js/airtime/listenerstat/listenerstat.js | 4 +- .../public/js/airtime/nowplaying/register.js | 8 +- .../js/airtime/playlist/smart_blockbuilder.js | 43 ++- .../js/airtime/playouthistory/historytable.js | 12 +- .../js/airtime/preferences/musicdirs.js | 14 +- .../js/airtime/preferences/streamsetting.js | 28 +- .../js/airtime/preferences/support-setting.js | 2 +- .../public/js/airtime/schedule/add-show.js | 10 +- .../schedule/full-calendar-functions.js | 36 +-- .../public/js/airtime/schedule/schedule.js | 16 +- .../public/js/airtime/showbuilder/builder.js | 56 ++-- .../js/airtime/showbuilder/main_builder.js | 2 +- .../public/js/airtime/status/status.js | 4 +- airtime_mvc/public/js/airtime/user/user.js | 8 +- 25 files changed, 472 insertions(+), 209 deletions(-) create mode 100644 airtime_mvc/application/controllers/LocaleController.php diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php index f670353fa..06226cb8f 100644 --- a/airtime_mvc/application/Bootstrap.php +++ b/airtime_mvc/application/Bootstrap.php @@ -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 diff --git a/airtime_mvc/application/configs/ACL.php b/airtime_mvc/application/configs/ACL.php index 6687011a4..46ec0c6a3 100644 --- a/airtime_mvc/application/configs/ACL.php +++ b/airtime_mvc/application/configs/ACL.php @@ -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') diff --git a/airtime_mvc/application/controllers/LocaleController.php b/airtime_mvc/application/controllers/LocaleController.php new file mode 100644 index 000000000..7f5ecc805 --- /dev/null +++ b/airtime_mvc/application/controllers/LocaleController.php @@ -0,0 +1,262 @@ +_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); + + } +} \ No newline at end of file diff --git a/airtime_mvc/public/js/airtime/common/common.js b/airtime_mvc/public/js/airtime/common/common.js index 984b9419e..a990f82a5 100644 --- a/airtime_mvc/public/js/airtime/common/common.js +++ b/airtime_mvc/public/js/airtime/common/common.js @@ -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; } diff --git a/airtime_mvc/public/js/airtime/dashboard/dashboard.js b/airtime_mvc/public/js/airtime/dashboard/dashboard.js index df107ef15..1f72a76b2 100644 --- a/airtime_mvc/public/js/airtime/dashboard/dashboard.js +++ b/airtime_mvc/public/js/airtime/dashboard/dashboard.js @@ -143,24 +143,24 @@ function updatePlaybar(){ } if (currentSong !== null && !master_dj_on_air && !live_dj_on_air){ if (currentSong.record == "1") - $('#current').html("Recording: "+currentSong.name+","); + $('#current').html(""+$.i18n._("Recording:")+""+currentSong.name+","); else $('#current').text(currentSong.name+","); }else{ if (master_dj_on_air) { if (showName) { - $('#current').html("Current: "+showName+" - Master Stream"); + $('#current').html("Current: "+showName+" - "+$.i18n._("Master Stream")+""); } else { - $('#current').html("Current: Master Stream"); + $('#current').html("Current: "+$.i18n._("Master Stream")+""); } } else if (live_dj_on_air) { if (showName) { - $('#current').html("Current: "+showName+" - Live Stream"); + $('#current').html("Current: "+showName+" - "+$.i18n._("Live Stream")+""); } else { - $('#current').html("Current: Live Stream"); + $('#current').html("Current: "+$.i18n._("Live Stream")+""); } } else { - $('#current').html("Current: Nothing Scheduled"); + $('#current').html("Current: "+$.i18n._("Nothing Scheduled")+""); } } @@ -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); diff --git a/airtime_mvc/public/js/airtime/dashboard/versiontooltip.js b/airtime_mvc/public/js/airtime/dashboard/versiontooltip.js index 10afb2864..4b6675591 100644 --- a/airtime_mvc/public/js/airtime/dashboard/versiontooltip.js +++ b/airtime_mvc/public/js/airtime/dashboard/versiontooltip.js @@ -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.
Please upgrade to " + link; + msg = $.i18n._("This version will soon be obsolete.")+"
"+$.i18n._("Please upgrade to ") + link; } else { - msg = "This version is no longer supported.
Please upgrade to " + link; + msg = $.i18n._("This version is no longer supported.")+"
"+$.i18n._("Please upgrade to ") + link; } return msg; diff --git a/airtime_mvc/public/js/airtime/library/events/library_playlistbuilder.js b/airtime_mvc/public/js/airtime/library/events/library_playlistbuilder.js index 457b219b7..ced6d852e 100644 --- a/airtime_mvc/public/js/airtime/library/events/library_playlistbuilder.js +++ b/airtime_mvc/public/js/airtime/library/events/library_playlistbuilder.js @@ -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 = $('
').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.')); } } }); diff --git a/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js b/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js index ba03586d0..a0d5b4598 100644 --- a/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js +++ b/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js @@ -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 = $('
').attr('id', diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index 3b7c956be..72980ab15 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -109,12 +109,12 @@ var AIRTIME = (function(AIRTIME) { $menu .append("
" + "" + "" + "
") .append("
" + @@ -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('') - .append('') - .append('') - .append('') - .append('') - .append('') - .append('') + .append('') + .append('') + .append('') + .append('') + .append('') + .append('') .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(''); + .before(''); } 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(''); + .after(''); } 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.
"+"Error code: "+json.error_code+ - "
"+"Error msg: "+json.error_msg+"
"); + this.set('content.text', $.i18n.("There was error while uploading to soundcloud.")+"
"+$.i18n._("Error code: ")+json.error_code+ + "
"+$.i18n._("Error msg: ")+json.error_msg+"
"); } } }, @@ -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(); } diff --git a/airtime_mvc/public/js/airtime/schedule/schedule.js b/airtime_mvc/public/js/airtime/schedule/schedule.js index e91f65c34..8c92c528f 100644 --- a/airtime_mvc/public/js/airtime/schedule/schedule.js +++ b/airtime_mvc/public/js/airtime/schedule/schedule.js @@ -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); }); diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index 7fd4fa5b4..e410ba739 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -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 = 'Show Empty'; + sSeparatorHTML = ''+$.i18n._("Show Empty")+''; cl = cl + " sb-empty odd"; fnPrepareSeparatorRow(sSeparatorHTML, cl, 1); @@ -539,7 +539,7 @@ var AIRTIME = (function(AIRTIME){ $node = $(nRow.children[0]); $node.html(''); - sSeparatorHTML = 'Recording From Line In'; + sSeparatorHTML = ''+$.i18n._("Recording From Line In")+''; cl = cl + " sb-record odd"; fnPrepareSeparatorRow(sSeparatorHTML, cl, 1); @@ -554,7 +554,7 @@ var AIRTIME = (function(AIRTIME){ if (!isAudioSupported(aData.mime)) { $image.html(''); } else { - $image.html('') + $image.html('') .click(function() { open_show_preview(aData.instance, aData.pos); return false; @@ -565,7 +565,7 @@ var AIRTIME = (function(AIRTIME){ $image.html(''); $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 = $('') @@ -983,28 +983,28 @@ var AIRTIME = (function(AIRTIME){ $menu = $("
"); $menu.append("
" + "" + "" + "
") .append("
" + - "
") .append("
" + - "
"); //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("
" + - "
") .append("
" + - "
"); } @@ -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)) { diff --git a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js index 74358a99d..70be61183 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js @@ -15,7 +15,7 @@ AIRTIME = (function(AIRTIME) { timeStartId = "#sb_time_start", dateEndId = "#sb_date_end", timeEndId = "#sb_time_end", - $toggleLib = $("Add / Remove Content"), + $toggleLib = $(""+$.i18n._("Add / Remove Content")+""), $libClose = $('', { "class": "close-round", "href": "#", diff --git a/airtime_mvc/public/js/airtime/status/status.js b/airtime_mvc/public/js/airtime/status/status.js index 9223b247a..cd0699e3a 100644 --- a/airtime_mvc/public/js/airtime/status/status.js +++ b/airtime_mvc/public/js/airtime/status/status.js @@ -2,7 +2,7 @@ function generatePartitions(partitions){ var rowTemplate = ''+ - 'Disk #%s'+ + ''+$.i18n._("Disk")+' #%s'+ '
    '+ '
'+ ''+ @@ -12,7 +12,7 @@ function generatePartitions(partitions){ '
'+ '
'+ '
'+ - '
%s%% in use
'+ + '
%s%% '+$.i18n._("in use")+'
'+ ''+ ''; diff --git a/airtime_mvc/public/js/airtime/user/user.js b/airtime_mvc/public/js/airtime/user/user.js index 637666719..18d1d7d7a 100644 --- a/airtime_mvc/public/js/airtime/user/user.js +++ b/airtime_mvc/public/js/airtime/user/user.js @@ -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;