Skip to content

Commit 6c16180

Browse files
author
Rens Sikma
committed
Merge branch 'add-tranlations' into 'master'
add tranlations See merge request cloud-cursusinfra/guacamole-trigger!2
2 parents 70ee054 + 93fa916 commit 6c16180

5 files changed

Lines changed: 15 additions & 7 deletions

File tree

src/main/resources/controllers/idleController.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ angular.module('guacTrigger').controller('idleController', ['$scope', '$injector
66
var idleConfigREST = $injector.get('idleConfigREST');
77

88
// TODO add countdown or mention time when disconect
9-
// TODO translate
10-
$scope.messages = "host will disconnect if idle";
11-
$scope.idle = false;
129

10+
$scope.idle = false;
1311

1412
function setTimers(config){
15-
// TODO what to do if there is connection message
13+
// TODO do we still set a timer if there is a notification (connection error)
1614

1715
if (config.idleTime !== 0 && config.disconnectTime !== 0){
1816
idleServices.idleCallback(config.idleTime * 1000,

src/main/resources/guac-manifest.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
"html" : [
2828
"templates/notificationWrapper.html",
2929
"templates/idleWarning.html"
30-
]
30+
],
31+
"translations" : [
32+
"translations/en.json"
33+
]
3134

3235
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<meta name="replace" content="#connection-warning">
22
<div ng-controller="idleController" id="idle-warning" ng-show="idle">
3-
{{ messages }}
3+
{{ 'GUACAMOLE_TRIGGER.IDLE_WARNING' |translate }}
44
<div>

src/main/resources/templates/notificationWrapper.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<div class="notification" ng-if="showBootNotification" style="width:100%;">
4949

5050
<div ng-show="notification.title" class="title-bar" style="margin:0px">
51-
<div class="title">"{{host.hostname}} is booting up"</div>
51+
<div class="title">{{host.hostname}} {{ 'GUACAMOLE_TRIGGER.IS_BOOTING' |translate }}</div>
5252
</div>
5353
<console output=host.console></console>
5454

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"GUACAMOLE_TRIGGER" : {
3+
"IDLE_WARNING" : "Host will disconnect if idle",
4+
"IS_BOOTING" : "is booting up"
5+
}
6+
7+
}

0 commit comments

Comments
 (0)