diff --git a/awx/ui/client/src/users/tokens.strings.js b/awx/ui/client/src/users/tokens.strings.js index 2780661e79..0dc2fa61b5 100644 --- a/awx/ui/client/src/users/tokens.strings.js +++ b/awx/ui/client/src/users/tokens.strings.js @@ -15,11 +15,21 @@ function TokensStrings (BaseString) { }; ns.add = { - PANEL_TITLE: t.s('CREATE TOKEN') + PANEL_TITLE: t.s('CREATE TOKEN'), + APP_PLACEHOLDER: t.s('SELECT AN APPLICATION'), + SCOPE_HELP_TEXT: t.s('Specify a scope for the token\'s access'), + TOKEN_MODAL_HEADER: t.s('TOKEN INFORMATION'), + TOKEN_LABEL: t.s('TOKEN'), + REFRESH_TOKEN_LABEL: t.s('REFRESH TOKEN'), + TOKEN_EXPIRES_LABEL: t.s('EXPIRES'), + ERROR_HEADER: t.s('COULD NOT CREATE TOKEN'), + ERROR_BODY_LABEL: t.s('Returned status:'), + LAST_USED_LABEL: t.s('by'), + DELETE_ACTION_LABEL: t.s('DELETE') }; ns.list = { - ROW_ITEM_LABEL_EXPIRED: t.s('DESCRIPTION'), + ROW_ITEM_LABEL_DESCRIPTION: t.s('DESCRIPTION'), ROW_ITEM_LABEL_EXPIRED: t.s('EXPIRATION'), ROW_ITEM_LABEL_USED: t.s('LAST USED') }; diff --git a/awx/ui/client/src/users/users-tokens-add.controller.js b/awx/ui/client/src/users/users-tokens-add.controller.js index 7b63a8ce61..6e5d4c4d26 100644 --- a/awx/ui/client/src/users/users-tokens-add.controller.js +++ b/awx/ui/client/src/users/users-tokens-add.controller.js @@ -22,14 +22,14 @@ function AddTokensController (models, $state, strings, Rest, Alert, Wait, GetBas vm.form.application._resource = 'application'; vm.form.application._route = 'users.edit.tokens.add.application'; vm.form.application._model = application; - vm.form.application._placeholder = strings.get('SELECT AN APPLICATION'); + vm.form.application._placeholder = strings.get('add.APP_PLACEHOLDER'); vm.form.application.required = true; vm.form.description.required = false; vm.form.scope = { choices: ['', 'read', 'write'], - help_text: 'Specify a scope for the token\'s access', + help_text: strings.get('add.SCOPE_HELP_TEXT'), id: 'scope', label: 'Scope', required: true, @@ -43,10 +43,10 @@ function AddTokensController (models, $state, strings, Rest, Alert, Wait, GetBas Rest.setUrl(GetBasePath('users') + $state.params.user_id + '/authorized_tokens'); return Rest.post(data) .then(({data}) => { - Alert('TOKEN INFORMATION', ` + Alert(strings.get('add.TOKEN_MODAL_HEADER'), `