Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Commit

Permalink
GUAC-1172: Work around angular-translate/angular-translate#788 by usi…
Browse files Browse the repository at this point in the history
…ng the translate directive (no filter). Current scope is not available to filters as of AngularJS 1.3.
  • Loading branch information
mike-jumper committed Jul 2, 2015
1 parent 076a549 commit 04a3031
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
<div class="filename">{{transfer.filename}}</div>

<!-- Progress/status text -->
<div class="text">{{'CLIENT.TEXT_FILE_TRANSFER_PROGRESS' | translate:'{PROGRESS: getProgressValue(), UNIT: getProgressUnit()}'}}</div>
<div class="text"
translate="CLIENT.TEXT_FILE_TRANSFER_PROGRESS"
translate-values="{PROGRESS: getProgressValue(), UNIT: getProgressUnit()}"></div>

<!-- Progress bar -->
<div class="progress"><div ng-style="{'width': getPercentDone() + '%'}" class="bar"></div></div>
Expand Down
6 changes: 3 additions & 3 deletions guacamole/src/main/webapp/app/home/templates/connection.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
<span class="name">{{item.name}}</span>

<!-- Active user count -->
<span class="activeUserCount" ng-show="item.getActiveConnections()">
{{'HOME.INFO_ACTIVE_USER_COUNT' | translate:'{USERS: item.getActiveConnections()}'}}
</span>
<span class="activeUserCount" ng-show="item.getActiveConnections()"
translate="HOME.INFO_ACTIVE_USER_COUNT"
translate-values="{USERS: item.getActiveConnections()}"></span>

</div>
</a>
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ <h2 class="header">{{'MANAGE_CONNECTION.SECTION_HEADER_HISTORY' | translate}}</h
<tr ng-repeat="wrapper in wrapperPage">
<td class="username">{{wrapper.entry.username}}</td>
<td class="start">{{wrapper.entry.startDate | date:historyDateFormat}}</td>
<td class="duration">{{wrapper.durationText | translate:"{VALUE: wrapper.duration.value, UNIT: wrapper.duration.unit}"}}</td>
<td class="duration"
translate="{{wrapper.durationText}}"
translate-values="{VALUE: wrapper.duration.value, UNIT: wrapper.duration.unit}"></td>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@
<p ng-show="notification.text" class="text">{{notification.text | translate}}</p>

<!-- Current progress -->
<div ng-show="notification.progress" class="progress"><div ng-show="progressPercent" ng-style="{'width': progressPercent + '%'}" class="bar"></div><div ng-show="notification.progress.text" class="text">{{notification.progress.text | translate:"{ PROGRESS: notification.progress.value, UNIT: notification.progress.unit}"}}</div></div>
<div class="progress" ng-show="notification.progress"><div class="bar" ng-show="progressPercent" ng-style="{'width': progressPercent + '%'}"></div><div
ng-show="notification.progress.text"
translate="{{notification.progress.text}}"
translate-values="{PROGRESS: notification.progress.value, UNIT: notification.progress.unit}"></div></div>

<!-- Default action countdown text -->
<p ng-show="notification.countdown.text" class="countdown-text">{{notification.countdown.text | translate:"{ REMAINING: timeRemaining}"}}</p>
<p class="countdown-text"
ng-show="notification.countdown.text"
translate="{{notification.countdown.text}}"
translate-values="{REMAINING: timeRemaining}"></p>

</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
<span class="name">{{item.name}}</span>

<!-- Active user count -->
<span class="activeUserCount" ng-show="item.getActiveConnections()">
{{'SETTINGS_CONNECTIONS.INFO_ACTIVE_USER_COUNT' | translate:'{USERS: item.getActiveConnections()}'}}
</span>
<span class="activeUserCount" ng-show="item.getActiveConnections()"
translate="SETTINGS_CONNECTIONS.INFO_ACTIVE_USER_COUNT"
translate-values="{USERS: item.getActiveConnections()}"></span>

</div>
</a>

0 comments on commit 04a3031

Please sign in to comment.