From 59bfe98d911728cfefd2321bf4ac86d62f4c64f8 Mon Sep 17 00:00:00 2001 From: pliablepixels Date: Thu, 26 May 2016 08:10:14 -0400 Subject: more translations, dummy italian language (all caps) to check if things are working Former-commit-id: e02d1017b1e818a4b90faa18b0f0e221d867e543 --- www/js/DataModel.js | 6 +++--- www/js/DevOptionsCtrl.js | 10 +--------- www/js/EventCtrl.js | 6 +++--- www/js/EventModalCtrl.js | 28 ++++++++++++++-------------- www/js/EventServer.js | 8 ++++---- www/js/LogCtrl.js | 4 ++-- www/js/LoginCtrl.js | 2 +- www/js/MontageCtrl.js | 12 ++++++------ www/js/MontageHistoryCtrl.js | 10 +++++----- www/js/StateCtrl.js | 10 +++++----- www/js/TimelineCtrl.js | 6 +++--- www/js/WizardCtrl.js | 32 ++++++++++++++++---------------- www/js/app.js | 8 ++++---- 13 files changed, 67 insertions(+), 75 deletions(-) (limited to 'www/js') diff --git a/www/js/DataModel.js b/www/js/DataModel.js index c3c5be36..e45829af 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -337,7 +337,7 @@ angular.module('zmApp.controllers') { if (urls.length > 0 && $rootScope.userCancelledAuth != true) { - $ionicLoading.show({template: 'trying ' + urls[0].server}); + $ionicLoading.show({template: $translate.instant('kTrying') + urls[0].server}); zmLog ("Reachability test.." + urls[0].url); return $http.get(urls[0].url).then(function () { zmLog ("Success: reachability on "+ urls[0].url); @@ -1043,7 +1043,7 @@ angular.module('zmApp.controllers') $ionicLoading.show({ - template: 'loading monitors...', + template: $translate.instant('kLoadingMonitors'), animation: 'fade-in', showBackdrop: true, duration: zm.loadingTimeout, @@ -1248,7 +1248,7 @@ angular.module('zmApp.controllers') //console.log (">>>>>Constructed URL " + myurl); $ionicLoading.show({ - template: 'calculating events list size...', + template: $translate.instant('kCalcEventSize')+'...', animation: 'fade-in', showBackdrop: true, duration: zm.loadingTimeout, diff --git a/www/js/DevOptionsCtrl.js b/www/js/DevOptionsCtrl.js index d114f4de..580e1214 100644 --- a/www/js/DevOptionsCtrl.js +++ b/www/js/DevOptionsCtrl.js @@ -58,15 +58,7 @@ angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope' { ZMDataModel.zmDebug("SaveDevOptions: called"); - /*if (parseInt($scope.loginData.maxMontage) > zm.safeMontageLimit) { - $rootScope.zmPopup= SecuredPopups.show('alert',{ - title: 'Note', - template: 'You have selected to view more than 10 monitors in the Montage screen. Note that this is very resource intensive and may load the server or cause issues in the application. If you are not sure, please consider limiting this value to 10' - }); - ZMDataModel.zmDebug("SaveDevOptions: " + $scope.loginData.maxMontage + - " monitors for montage"); - }*/ - + if ((parseInt($scope.loginData.maxFPS) < 0) || (parseInt($scope.loginData.maxFPS) > zm.maxFPS)) { $scope.loginData.maxFPS = zm.defaultFPS.toString(); diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index b972b33e..e0064b3b 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -997,7 +997,7 @@ angular.module('zmApp.controllers') //$state.go($state.current, {}, {reload: true}); $rootScope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; $ionicLoading.show({ - template: "refreshed view", + template: $translate.instant('kRefreshedView'), noBackdrop: true, duration: 3000 }); @@ -1238,7 +1238,7 @@ angular.module('zmApp.controllers') $scope.modal = modal; $ionicLoading.show({ - template: "please wait...", + template: $translate.instant('kPleaseWait')+"...", noBackdrop: true, duration: 10000 }); @@ -1295,7 +1295,7 @@ angular.module('zmApp.controllers') enableLoadMore = false; //console.log("**** CANCELLED ****"); $ionicLoading.show({ - template: 'Search Cancelled', + template: $translate.instant('kSearchCancelled'), animation: 'fade-in', showBackdrop: true, duration: 2000, diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 3783ff72..0df9dd4a 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -6,7 +6,7 @@ -angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$rootScope', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$q', '$sce', 'carouselUtils', '$ionicPopup', function ($scope, $rootScope, zm, ZMDataModel, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $q, $sce, carouselUtils, $ionicPopup) { +angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$rootScope', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$q', '$sce', 'carouselUtils', '$ionicPopup', '$translate', function ($scope, $rootScope, zm, ZMDataModel, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $q, $sce, carouselUtils, $ionicPopup, $translate) { // from parent scope @@ -65,7 +65,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $rootScope.authSession = "undefined"; $ionicLoading.show({ - template: 'negotiating stream authentication...', + template: $translate.instant('kNegotiatingStreamAuth'), animation: 'fade-in', showBackdrop: true, duration: zm.loadingTimeout, @@ -378,7 +378,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro function SaveSuccess() { $ionicLoading.show({ - template: "done!", + template: $translate.instant('kDone'), noBackdrop: true, duration: 1000 }); @@ -387,7 +387,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro function SaveError(e) { $ionicLoading.show({ - template: "error - could not save", + template: $translate.instant('kErrorSave'), noBackdrop: true, duration: 2000 }); @@ -428,7 +428,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $scope.isPaused = true; $ionicLoading.show({ - template: "please wait...", + template: $translate.instant('kPleaseWait'), noBackdrop: true, duration: zm.httpTimeout }); @@ -501,7 +501,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro ZMDataModel.zmLog("snapshot API Error: Could not get frames " + JSON.stringify(err)); $ionicLoading.show({ - template: "error retrieving frames", + template: $translate.instant('kErrorRetrievingFrames'), noBackdrop: true, duration: 4000 }); @@ -544,7 +544,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $rootScope.zmPopup = $ionicPopup.show({ - template: '
Frame: {{slideIndex+1}} of {{slideLastIndex+1}}

', + template: '
Frame: {{slideIndex+1}} / {{slideLastIndex+1}}

', title: 'Select ' + (onlyAlarms ? 'Alarmed ' : '') + 'frame to save', subTitle: 'use left and right arrows to change', scope: $scope, @@ -621,7 +621,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro function saveNow() { $ionicLoading.show({ - template: "saving snapshot...", + template: $translate.instant('kSavingSnapshot')+"...", noBackdrop: true, duration: zm.httpTimeout }); @@ -841,7 +841,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro if ($scope.defaultVideo !== undefined && $scope.defaultVideo != '') { $ionicLoading.show({ - template: "Please use video player controls for H264 events. ZoneMinder doesn't yet support zms controls", + template: $translate.instant('kUseVideoControls'), noBackdrop: true, duration: 3000 }); @@ -873,7 +873,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro } $ionicLoading.show({ - template: "please wait...", + template: $translate.instant('kPleaseWait')+"...", noBackdrop: true, duration: zm.httpTimeout }); @@ -922,7 +922,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro ZMDataModel.zmDebug("Set playback speed to " + $scope.eventSpeed); $ionicLoading.show({ - template: 'playback interval: ' + $scope.eventSpeed.toFixed(3) + "ms", + template: $translate.instant('kPlaybackInterval')+': ' + $scope.eventSpeed.toFixed(3) + "ms", animation: 'fade-in', showBackdrop: false, duration: 1500, @@ -1059,7 +1059,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro ZMDataModel.zmLog("Event jump called with:" + eid); if (eid == "") { $ionicLoading.show({ - template: "no more events", + template: $translate.instant('kNoMoreEvents'), noBackdrop: true, duration: 2000 }); @@ -1112,7 +1112,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro if ($scope.defaultVideo !== undefined && $scope.defaultVideo != '') { $ionicLoading.show({ - template: "Event navigation is not available with video feeds. ZoneMinder doesn't yet support them", + template: $translate.instant('kEventNavVidFeeds', noBackdrop: true, duration: 3000 }); @@ -1124,7 +1124,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro ZMDataModel.zmDebug("Sending " + cmd + " to " + connkey); $ionicLoading.show({ - template: "switching events..", + template: $translate.instant('kSwitchingEvents')+"...", noBackdrop: true, duration: zm.httpTimeout }); diff --git a/www/js/EventServer.js b/www/js/EventServer.js index 08e2249d..9b0103cf 100644 --- a/www/js/EventServer.js +++ b/www/js/EventServer.js @@ -11,8 +11,8 @@ angular.module('zmApp.controllers') -.factory('EventServer', ['ZMDataModel', '$rootScope', '$websocket', '$ionicPopup', '$timeout', '$q', 'zm', '$ionicPlatform', '$cordovaMedia', function - (ZMDataModel, $rootScope, $websocket, $ionicPopup, $timeout, $q, zm, $ionicPlatform, $cordovaMedia) { +.factory('EventServer', ['ZMDataModel', '$rootScope', '$websocket', '$ionicPopup', '$timeout', '$q', 'zm', '$ionicPlatform', '$cordovaMedia', '$translate', function + (ZMDataModel, $rootScope, $websocket, $ionicPopup, $timeout, $q, zm, $ionicPlatform, $cordovaMedia, $translate) { var ws; @@ -129,8 +129,8 @@ angular.module('zmApp.controllers') str.version = "0.1"; if (ZMDataModel.versionCompare(str.version, zm.minEventServerVersion) == -1) { $rootScope.zmPopup= $ionicPopup.alert({ - title: 'Event Server version not supported', - template: 'You are running version ' + str.version + ". Please upgrade to " + + title: $translate.instant('kEventServerVersionTitle'), + template: $translate.instant('kEventServerVersionBody1') + " " + str.version + ". "+ $translate.instant('kEventServerVersionBody2') + zm.minEventServerVersion }); } diff --git a/www/js/LogCtrl.js b/www/js/LogCtrl.js index 83857d75..6a366902 100644 --- a/www/js/LogCtrl.js +++ b/www/js/LogCtrl.js @@ -39,8 +39,8 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo $scope.deleteLogs = function () { $rootScope.zmPopup = $ionicPopup.confirm({ - title: 'Please Confirm', - template: 'Are you sure you want to delete logs?', + title: $translate.instant('kPleaseConfirm'), + template: $translate.instant('kDeleteLogsConfirm'), }); $rootScope.zmPopup.then(function (res) { diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js index f973bf5c..3347bdb9 100644 --- a/www/js/LoginCtrl.js +++ b/www/js/LoginCtrl.js @@ -582,7 +582,7 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r if (showalert) { $rootScope.zmPopup = SecuredPopups.show('alert',{ - title: 'Login validated', + title: $translate.instant('kLoginValidatedTitle'), template: loginStatus }).then(function (res) { diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index e4ccabc8..e58af3c5 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -4,7 +4,7 @@ /* global cordova,StatusBar,angular,console,ionic,Packery, Draggabilly, imagesLoaded */ -angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '$rootScope', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$ionicPopup', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', 'zm', '$ionicPopover', '$controller', 'imageLoadingDataShare', '$window', '$localstorage', function ($scope, $rootScope, ZMDataModel, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $ionicPopup, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, zm, $ionicPopover, $controller, imageLoadingDataShare, $window, $localstorage) { +angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '$rootScope', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$ionicPopup', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', 'zm', '$ionicPopover', '$controller', 'imageLoadingDataShare', '$window', '$localstorage', '$translate', function ($scope, $rootScope, ZMDataModel, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $ionicPopup, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, zm, $ionicPopover, $controller, imageLoadingDataShare, $window, $localstorage, $translate) { //--------------------------------------------------------------------- // Controller main @@ -77,7 +77,7 @@ function initPackery() $ionicLoading.show({ - template: "arranging images...", + template: $translate.instant('kArrangingImages'), noBackdrop: true, duration: zm.loadingTimeout }); @@ -684,7 +684,7 @@ function initPackery() $scope.modal = modal; $ionicLoading.show({ - template: "please wait...", + template: $translate.instant('kPleaseWait'), noBackdrop: true, duration: zm.loadingTimeout }); @@ -858,8 +858,8 @@ $scope.$on('$ionicView.afterEnter', function () { if ($scope.MontageMonitors.length == 0) { $rootScope.zmPopup = $ionicPopup.alert({ - title: "No Monitors found", - template: "Please check your credentials" + title: $translate.instant('kNoMonitors'), + template: $translate.instant('kCheckCredentials') }); $ionicHistory.nextViewOptions({ disableBack: true @@ -874,7 +874,7 @@ $scope.$on('$ionicView.afterEnter', function () { $rootScope.authSession = "undefined"; $ionicLoading.show({ - template: 'negotiating stream authentication...', + template: $translate.instant('kNegotiatingStreamAuth'), animation: 'fade-in', showBackdrop: true, duration: zm.loadingTimeout, diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js index 2a5cc31f..ad5d6af1 100644 --- a/www/js/MontageHistoryCtrl.js +++ b/www/js/MontageHistoryCtrl.js @@ -6,7 +6,7 @@ // FIXME: This is a copy of montageCtrl - needs a lot of code cleanup -angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$scope', '$rootScope', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$ionicPopup', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', 'zm', '$ionicPopover', '$controller', 'imageLoadingDataShare', '$window', function ($scope, $rootScope, ZMDataModel, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $ionicPopup, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, zm, $ionicPopover, $controller, imageLoadingDataShare, $window) { +angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$scope', '$rootScope', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$ionicPopup', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', 'zm', '$ionicPopover', '$controller', 'imageLoadingDataShare', '$window', '$translate', function ($scope, $rootScope, ZMDataModel, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $ionicPopup, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, zm, $ionicPopover, $controller, imageLoadingDataShare, $window, $translate) { //-------------------------------------- @@ -353,7 +353,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc if (disp) { $ionicLoading.hide(); $ionicLoading.show({ - template: "please wait...", + template: $translate.instant('kPleaseWait')+"...", noBackdrop: true, duration: zm.loadingTimeout, }); @@ -600,8 +600,8 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc if (tempMonitors.length == 0) { $rootScope.zmPopup= $ionicPopup.alert({ - title: "No Monitors found", - template: "Please check your credentials" + title: $translate.instant('kNoMonitors'), + template:$translate.instant('kPleaseCheckCredentials') }); $ionicHistory.nextViewOptions({ disableBack: true @@ -740,7 +740,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc $rootScope.authSession = "undefined"; $ionicLoading.show({ - template: 'negotiating stream authentication...', + template: $translate.instant('kNegotiatingStreamAuth'), animation: 'fade-in', showBackdrop: true, duration: zm.loadingTimeout, diff --git a/www/js/StateCtrl.js b/www/js/StateCtrl.js index 97fd234a..25e88247 100644 --- a/www/js/StateCtrl.js +++ b/www/js/StateCtrl.js @@ -4,8 +4,8 @@ // controller for State View -angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup', '$scope', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$ionicLoading', '$ionicModal', '$state', '$http', '$rootScope', '$timeout', '$ionicHistory', function ( - $ionicPopup, $scope, zm, ZMDataModel, $ionicSideMenuDelegate, $ionicLoading, $ionicModal, $state, $http, $rootScope, $timeout,$ionicHistory) { +angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup', '$scope', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$ionicLoading', '$ionicModal', '$state', '$http', '$rootScope', '$timeout', '$ionicHistory', '$translate', function ( + $ionicPopup, $scope, zm, ZMDataModel, $ionicSideMenuDelegate, $ionicLoading, $ionicModal, $state, $http, $rootScope, $timeout,$ionicHistory, $translate) { //---------------------------------------------------------------------- // Controller main @@ -306,15 +306,15 @@ angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup' if (inProgress) { ZMDataModel.zmDebug("StateCtrl/controlZM: operation in progress"); $ionicPopup.alert({ - title: "Operation in Progress", - template: "The previous operation is still in progress. Please wait..." + title: $translate.instant('kOperationInProgressTitle'), + template: $translate.instant('kOperationInProgressBody') }); return; } var statesearch = "startstoprestart"; - var promptstring = 'Are you sure you want to ' + str + ' Zoneminder?'; + var promptstring = $translate.instant('kStateAreYouSure') + str + ' Zoneminder?'; if (statesearch.indexOf(str) == -1) { promptstring = "Are you sure you want to change state to " + str; } diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js index 337b611b..9261130d 100644 --- a/www/js/TimelineCtrl.js +++ b/www/js/TimelineCtrl.js @@ -13,7 +13,7 @@ // FIXME: too much redundant code between EventCtrl and Timeline // Move to ModalCtrl and see if it works -angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPlatform', '$scope', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$rootScope', '$http', '$q', 'message', '$state', '$ionicLoading', '$ionicPopover', '$ionicScrollDelegate', '$ionicModal', '$timeout', '$ionicContentBanner', '$ionicHistory', '$sce', '$stateParams', function ($ionicPlatform, $scope, zm, ZMDataModel, $ionicSideMenuDelegate, $rootScope, $http, $q, message, $state, $ionicLoading, $ionicPopover, $ionicScrollDelegate, $ionicModal, $timeout, $ionicContentBanner, $ionicHistory, $sce, $stateParams) { +angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPlatform', '$scope', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$rootScope', '$http', '$q', 'message', '$state', '$ionicLoading', '$ionicPopover', '$ionicScrollDelegate', '$ionicModal', '$timeout', '$ionicContentBanner', '$ionicHistory', '$sce', '$stateParams', '$translate', function ($ionicPlatform, $scope, zm, ZMDataModel, $ionicSideMenuDelegate, $rootScope, $http, $q, message, $state, $ionicLoading, $ionicPopover, $ionicScrollDelegate, $ionicModal, $timeout, $ionicContentBanner, $ionicHistory, $sce, $stateParams, $translate) { //console.log("Inside Timeline controller"); $scope.openMenu = function () { @@ -194,7 +194,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla $scope.modal = modal; $ionicLoading.show({ - template: "please wait...", + template: $translate.instant('kPleaseWait')+"...", noBackdrop: true, duration: 10000, @@ -505,7 +505,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla curCount = count; $ionicLoading.show({ - template: "Loading graph...", + template: $translate.instant('kLoadingGraph')+"...", animation: 'fade-in', showBackdrop: true, maxWidth: 200, diff --git a/www/js/WizardCtrl.js b/www/js/WizardCtrl.js index 2e8ae18d..b241304d 100644 --- a/www/js/WizardCtrl.js +++ b/www/js/WizardCtrl.js @@ -2,7 +2,7 @@ /* jslint browser: true*/ /* global cordova,StatusBar,angular,console, Masonry, URI */ -angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$rootScope', '$ionicModal', 'ZMDataModel', '$ionicSideMenuDelegate', '$ionicHistory', '$state', '$ionicPopup', 'SecuredPopups', '$http', '$q', 'zm','$ionicLoading', 'WizardHandler', function ($scope, $rootScope, $ionicModal, ZMDataModel, $ionicSideMenuDelegate, $ionicHistory, $state, $ionicPopup, SecuredPopups, $http, $q, zm, $ionicLoading, WizardHandler) { +angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$rootScope', '$ionicModal', 'ZMDataModel', '$ionicSideMenuDelegate', '$ionicHistory', '$state', '$ionicPopup', 'SecuredPopups', '$http', '$q', 'zm','$ionicLoading', 'WizardHandler','$translate', function ($scope, $rootScope, $ionicModal, ZMDataModel, $ionicSideMenuDelegate, $ionicHistory, $state, $ionicPopup, SecuredPopups, $http, $q, zm, $ionicLoading, WizardHandler, $translate) { $scope.openMenu = function () { $ionicSideMenuDelegate.toggleLeft(); }; @@ -208,7 +208,7 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ function continueCgi (urls) { $ionicLoading.show({ - template: "discovering...", + template: $translate.instant('kDiscovering')+"...", noBackdrop: true, duration: zm.httpTimeout }); @@ -225,7 +225,7 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ $ionicLoading.show({ - template: "discovering...", + template: $translate.instant('kDiscovering')+"...", noBackdrop: true, duration: zm.httpTimeout }); @@ -421,7 +421,7 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ // use it even after logging in ZMDataModel.zmLog("zmWizard: logging out"); $ionicLoading.show({ - template: "cleaning up...", + template: $translate.instant('kCleaningUp')+"...", noBackdrop: true, duration: zm.httpTimeout }); @@ -434,7 +434,7 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ // The logic will be: // Login then do an api detect and cgi-detect together $ionicLoading.show({ - template: "discovering portal...", + template: $translate.instant('kDiscoveringPortal')+"...", noBackdrop: true, duration: zm.httpTimeout }); @@ -445,7 +445,7 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ // API Detection $ionicLoading.show({ - template: "discovering api...", + template: $translate.instant('kDiscoveringAPI')+"...", noBackdrop: true, duration: zm.httpTimeout }); @@ -455,7 +455,7 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ ZMDataModel.zmLog ("zmWizard: API succeeded"); $ionicLoading.show({ - template: "discovering cgi-bin...", + template: $translate.instant('kDiscoveringCGI')+"...", noBackdrop: true, duration: zm.httpTimeout }); @@ -521,10 +521,10 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ if ($scope.wizard.useauth) { if (!$scope.wizard.usezmauth && !$scope.wizard.usebasicauth) { $rootScope.zmPopup = SecuredPopups.show('show', { - title: 'Whoops!', - template: 'You need to enable at least one authentication mechanism', + title: $translate.instant('kError'), + template: $translate.instant('kOneAuth'), buttons: [{ - text: 'Ok' + text: $translate.instant('kButtonOk') }] }); @@ -533,10 +533,10 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ if ($scope.wizard.usezmauth) { if ((!$scope.wizard.zmuser) || (!$scope.wizard.zmpassword)) { $rootScope.zmPopup = SecuredPopups.show('show', { - title: 'Whoops!', - template: 'Please enter a valid username and password for ZM auth', + title: $translate.instant('kError'), + template: $translate.instant('kValidNameZMAuth'), buttons: [{ - text: 'Ok' + text: $translate.instant('kButtonOk') }] }); @@ -547,10 +547,10 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ if ($scope.wizard.usebasicauth) { if ((!$scope.wizard.basicuser) || (!$scope.wizard.basicpassword)) { $rootScope.zmPopup = SecuredPopups.show('show', { - title: 'Whoops!', - template: 'Please enter a valid username and password for basic auth', + title: $translate.instant('kError'), + template: $translate.instant('kValidNameBasicAuth'), buttons: [{ - text: 'Ok' + text: $translate.instant('kButtonOk') }] }); diff --git a/www/js/app.js b/www/js/app.js index 71015c7d..f0f99be9 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -715,7 +715,7 @@ angular.module('zmApp', [ // This service automatically logs into ZM at periodic intervals //------------------------------------------------------------------ -.factory('zmAutoLogin', function ($interval, ZMDataModel, $http, zm, $browser, $timeout, $q, $rootScope, $ionicLoading, $ionicPopup, $state, $ionicContentBanner, EventServer, $ionicHistory) { +.factory('zmAutoLogin', function ($interval, ZMDataModel, $http, zm, $browser, $timeout, $q, $rootScope, $ionicLoading, $ionicPopup, $state, $ionicContentBanner, EventServer, $ionicHistory, $translate) { var zmAutoLoginHandle; //------------------------------------------------------------------ @@ -864,7 +864,7 @@ angular.module('zmApp', [ ], "", 8000); var alertPopup = $ionicPopup.alert({ title: 'reCaptcha enabled', - template: 'Looks like you have enabled reCaptcha. It needs to be turned off for '+$rootScope.appName+' to work' + template: $translate.instant('kRecaptcha') }); @@ -1163,8 +1163,8 @@ angular.module('zmApp', [ if (requireLogin) { $ionicPopup.alert({ - title: "Credentials Required", - template: "Please provide your ZoneMinder credentials" + title: $translate.instant('kCredentialsTitle'), + template: $translate.instant('kCredentialsBody') }); // for whatever reason, .go was resulting in digest loops. // if you don't prevent, states will stack -- cgit v1.2.3