Skip to content

Commit

Permalink
Merge branch 'add-tranlations' into 'master'
Browse files Browse the repository at this point in the history
add tranlations

See merge request cloud-cursusinfra/guacamole-trigger!2
  • Loading branch information
Rens Sikma committed Nov 17, 2020
2 parents 70ee054 + 93fa916 commit 6c16180
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/main/resources/controllers/idleController.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ angular.module('guacTrigger').controller('idleController', ['$scope', '$injector
var idleConfigREST = $injector.get('idleConfigREST');

// TODO add countdown or mention time when disconect
// TODO translate
$scope.messages = "host will disconnect if idle";
$scope.idle = false;

$scope.idle = false;

function setTimers(config){
// TODO what to do if there is connection message
// TODO do we still set a timer if there is a notification (connection error)

if (config.idleTime !== 0 && config.disconnectTime !== 0){
idleServices.idleCallback(config.idleTime * 1000,
Expand Down
5 changes: 4 additions & 1 deletion src/main/resources/guac-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"html" : [
"templates/notificationWrapper.html",
"templates/idleWarning.html"
]
],
"translations" : [
"translations/en.json"
]

}
2 changes: 1 addition & 1 deletion src/main/resources/templates/idleWarning.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<meta name="replace" content="#connection-warning">
<div ng-controller="idleController" id="idle-warning" ng-show="idle">
{{ messages }}
{{ 'GUACAMOLE_TRIGGER.IDLE_WARNING' |translate }}
<div>
2 changes: 1 addition & 1 deletion src/main/resources/templates/notificationWrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<div class="notification" ng-if="showBootNotification" style="width:100%;">

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

Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/translations/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"GUACAMOLE_TRIGGER" : {
"IDLE_WARNING" : "Host will disconnect if idle",
"IS_BOOTING" : "is booting up"
}

}

0 comments on commit 6c16180

Please sign in to comment.