From 956596227bc335c95b478e38a98b1d2a23470581 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Thu, 10 May 2018 12:38:56 -0400 Subject: [PATCH] use translated string for scope in tokens list --- .../features/users/tokens/users-tokens-list.controller.js | 8 ++++++++ .../features/users/tokens/users-tokens-list.partial.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/features/users/tokens/users-tokens-list.controller.js b/awx/ui/client/features/users/tokens/users-tokens-list.controller.js index c2fe647928..ecd3d68c39 100644 --- a/awx/ui/client/features/users/tokens/users-tokens-list.controller.js +++ b/awx/ui/client/features/users/tokens/users-tokens-list.controller.js @@ -37,6 +37,14 @@ function ListTokensController ( $scope[name] = dataset.results; vm.tokensCount = dataset.count; }); + + vm.getScopeString = str => { + if (str === 'Read') { + return vm.strings.get('add.SCOPE_READ_LABEL'); + } else if (str === 'Write') { + return vm.strings.get('add.SCOPE_WRITE_LABEL'); + } + } vm.getLastUsed = token => { const lastUsed = _.get(token, 'last_used'); diff --git a/awx/ui/client/features/users/tokens/users-tokens-list.partial.html b/awx/ui/client/features/users/tokens/users-tokens-list.partial.html index 9a25c09c23..b92d24811a 100644 --- a/awx/ui/client/features/users/tokens/users-tokens-list.partial.html +++ b/awx/ui/client/features/users/tokens/users-tokens-list.partial.html @@ -33,7 +33,7 @@ + value="{{ vm.getScopeString(token.scope) }}">