From ff9636addd3997925398e8d8d159131eb38bdd04 Mon Sep 17 00:00:00 2001 From: pliablepixels Date: Thu, 26 May 2016 09:01:10 -0400 Subject: #261 more translations Former-commit-id: aede6d512f022f0d32a6aa13bc199836995b66dd --- www/js/TimelineModalCtrl.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'www/js/TimelineModalCtrl.js') diff --git a/www/js/TimelineModalCtrl.js b/www/js/TimelineModalCtrl.js index 623deef3..35d93ea9 100644 --- a/www/js/TimelineModalCtrl.js +++ b/www/js/TimelineModalCtrl.js @@ -6,7 +6,7 @@ -angular.module('zmApp.controllers').controller('TimelineModalCtrl', ['$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('TimelineModalCtrl', ['$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) { @@ -80,10 +80,10 @@ angular.module('zmApp.controllers').controller('TimelineModalCtrl', ['$scope', ' $scope.switchType = function() { - if ($scope.graphType == "all") + if ($scope.graphType == $translate.instant('kGraphAll')) { current_data = onlyalarm_data; - $scope.graphType = "alarmed"; + $scope.graphType = $translate.instant('kGraphAlarmed'); ZMDataModel.zmDebug ("Alarm array has " + onlyalarm_data.labels.length+ " frames"); btype='bar'; //console.log (JSON.stringify(onlyalarm_data)); @@ -93,7 +93,7 @@ angular.module('zmApp.controllers').controller('TimelineModalCtrl', ['$scope', ' { current_data = data; // tcGraph.data = - $scope.graphType = "all"; + $scope.graphType = $translate.instant('kGraphAll'); btype='line'; } @@ -175,7 +175,7 @@ angular.module('zmApp.controllers').controller('TimelineModalCtrl', ['$scope', ' ZMDataModel.zmLog("Image padding digits reported as " + eventImageDigits); }); - $scope.eventdetails = "loading..."; + $scope.eventdetails = $translate.instant('kLoading')+"..."; processEvent(); //$scope.eventdetails = JSON.stringify($scope.event); }); @@ -200,7 +200,7 @@ angular.module('zmApp.controllers').controller('TimelineModalCtrl', ['$scope', ' }, function (error) { - $scope.errorDetails = "there was an error rendering the graph. Please see logs"; + $scope.errorDetails = $translate.instant('kGraphError'); ZMDataModel.zmLog ("Error in timeline frames " + JSON.stringify(error)); }); } @@ -371,7 +371,7 @@ angular.module('zmApp.controllers').controller('TimelineModalCtrl', ['$scope', ' cv = document.getElementById("tcchart"); ctx = cv.getContext("2d"); - if (ZMDataModel.getLogin().timelineModalGraphType == 'all') + if (ZMDataModel.getLogin().timelineModalGraphType == $translate.instant('kGraphAll')) { btype = 'line'; current_data = data; -- cgit v1.2.3