GUACAMOLE-36: Migrate guacLogin and guacNotification to TranslatableMessage.

This commit is contained in:
Michael Jumper
2016-08-16 21:47:26 -07:00
parent 0671f18d40
commit 986ea4b206
13 changed files with 70 additions and 35 deletions

View File

@@ -60,7 +60,9 @@ angular.module('notification').factory('guacNotification', ['$injector',
* // To show a status message with actions
* guacNotification.showStatus({
* 'title' : 'Disconnected',
* 'text' : 'You have been disconnected!',
* 'text' : {
* 'key' : 'NAMESPACE.SOME_TRANSLATION_KEY'
* },
* 'actions' : {
* 'name' : 'reconnect',
* 'callback' : function () {

View File

@@ -8,7 +8,9 @@
<div class="body">
<!-- Notification text -->
<p ng-show="notification.text" class="text">{{notification.text | translate}}</p>
<p ng-show="notification.text" class="text"
translate="{{notification.text.key}}"
translate-values="{{notification.text.variables}}"></p>
<!-- Current progress -->
<div class="progress" ng-show="notification.progress"><div class="bar" ng-show="progressPercent" ng-style="{'width': progressPercent + '%'}"></div><div

View File

@@ -53,7 +53,7 @@ angular.module('notification').factory('Notification', [function defineNotificat
/**
* The body text of the notification.
*
* @type String
* @type TranslatableMessage
*/
this.text = template.text;