GUAC-1172: Work around angular-translate/angular-translate#788 by using the translate directive (no filter). Current scope is not available to filters as of AngularJS 1.3.

This commit is contained in:
Michael Jumper
2015-07-02 16:12:17 -07:00
parent 076a549754
commit 04a303108d
5 changed files with 20 additions and 10 deletions

View File

@@ -25,7 +25,9 @@
<div class="filename">{{transfer.filename}}</div> <div class="filename">{{transfer.filename}}</div>
<!-- Progress/status text --> <!-- 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 --> <!-- Progress bar -->
<div class="progress"><div ng-style="{'width': getPercentDone() + '%'}" class="bar"></div></div> <div class="progress"><div ng-style="{'width': getPercentDone() + '%'}" class="bar"></div></div>

View File

@@ -32,9 +32,9 @@
<span class="name">{{item.name}}</span> <span class="name">{{item.name}}</span>
<!-- Active user count --> <!-- Active user count -->
<span class="activeUserCount" ng-show="item.getActiveConnections()"> <span class="activeUserCount" ng-show="item.getActiveConnections()"
{{'HOME.INFO_ACTIVE_USER_COUNT' | translate:'{USERS: item.getActiveConnections()}'}} translate="HOME.INFO_ACTIVE_USER_COUNT"
</span> translate-values="{USERS: item.getActiveConnections()}"></span>
</div> </div>
</a> </a>

View File

@@ -96,7 +96,9 @@ THE SOFTWARE.
<tr ng-repeat="wrapper in wrapperPage"> <tr ng-repeat="wrapper in wrapperPage">
<td class="username">{{wrapper.entry.username}}</td> <td class="username">{{wrapper.entry.username}}</td>
<td class="start">{{wrapper.entry.startDate | date:historyDateFormat}}</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> </tr>
</tbody> </tbody>
</table> </table>

View File

@@ -32,10 +32,16 @@
<p ng-show="notification.text" class="text">{{notification.text | translate}}</p> <p ng-show="notification.text" class="text">{{notification.text | translate}}</p>
<!-- Current progress --> <!-- 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 --> <!-- 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> </div>

View File

@@ -32,9 +32,9 @@
<span class="name">{{item.name}}</span> <span class="name">{{item.name}}</span>
<!-- Active user count --> <!-- Active user count -->
<span class="activeUserCount" ng-show="item.getActiveConnections()"> <span class="activeUserCount" ng-show="item.getActiveConnections()"
{{'SETTINGS_CONNECTIONS.INFO_ACTIVE_USER_COUNT' | translate:'{USERS: item.getActiveConnections()}'}} translate="SETTINGS_CONNECTIONS.INFO_ACTIVE_USER_COUNT"
</span> translate-values="{USERS: item.getActiveConnections()}"></span>
</div> </div>
</a> </a>