From e66b00eb6480f3e13bdc4d94d97253a54e4f5ac8 Mon Sep 17 00:00:00 2001 From: kialam Date: Thu, 31 May 2018 16:32:34 -0400 Subject: [PATCH] Translate `VIEW MORE` and `VIEW LESS` into component strings --- awx/ui/client/lib/components/components.strings.js | 5 +++++ awx/ui/client/lib/components/toggle/toggle-tag.directive.js | 5 +++-- awx/ui/client/lib/components/toggle/toggle-tag.partial.html | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/lib/components/components.strings.js b/awx/ui/client/lib/components/components.strings.js index 072e1e82ce..97d8049543 100644 --- a/awx/ui/client/lib/components/components.strings.js +++ b/awx/ui/client/lib/components/components.strings.js @@ -52,6 +52,11 @@ function ComponentsStrings (BaseString) { COPIED: t.s('Copied to clipboard.') }; + ns.toggle = { + VIEW_MORE: t.s('VIEW MORE'), + VIEW_LESS: t.s('VIEW LESS') + }; + ns.layout = { CURRENT_USER_LABEL: t.s('Logged in as'), VIEW_DOCS: t.s('View Documentation'), diff --git a/awx/ui/client/lib/components/toggle/toggle-tag.directive.js b/awx/ui/client/lib/components/toggle/toggle-tag.directive.js index 68a47df575..7cce99831e 100644 --- a/awx/ui/client/lib/components/toggle/toggle-tag.directive.js +++ b/awx/ui/client/lib/components/toggle/toggle-tag.directive.js @@ -2,11 +2,12 @@ import { TRUNCATED, TRUNCATE_LENGTH } from './constants'; const templateUrl = require('~components/toggle/toggle-tag.partial.html'); -function controller ($scope, TagService) { +function controller ($scope, TagService, strings) { const { tags } = $scope; const vm = this; vm.truncatedLength = TRUNCATE_LENGTH; vm.truncated = TRUNCATED; + vm.strings = strings; vm.toggle = () => { vm.truncated = !vm.truncated; @@ -19,7 +20,7 @@ function controller ($scope, TagService) { }); } -controller.$inject = ['$scope', 'TagService']; +controller.$inject = ['$scope', 'TagService', 'ComponentsStrings']; function atToggleTag () { return { diff --git a/awx/ui/client/lib/components/toggle/toggle-tag.partial.html b/awx/ui/client/lib/components/toggle/toggle-tag.partial.html index e83d303eda..d0070c0fbf 100644 --- a/awx/ui/client/lib/components/toggle/toggle-tag.partial.html +++ b/awx/ui/client/lib/components/toggle/toggle-tag.partial.html @@ -3,12 +3,12 @@
- +
- +