From e4ff3f434e16bbc730b21c72da9283d9c34a7cc7 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 17 Nov 2020 12:21:24 -0500 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20move=20translations?= =?UTF-8?q?=20files=20into=20addon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/intl | 1 + ui/desktop/app/templates/scopes.hbs | 2 +- ui/desktop/app/templates/scopes/index.hbs | 4 +-- .../templates/scopes/scope/-header-nav.hbs | 2 +- .../app/templates/scopes/scope/targets.hbs | 2 +- .../templates/scopes/scope/targets/index.hbs | 12 +++---- ui/desktop/package.json | 1 + ui/desktop/translations/form/en-us.yaml | 16 --------- ui/desktop/translations/resources/en-us.yaml | 13 -------- yarn.lock | 33 ++++++++++++++----- 10 files changed, 38 insertions(+), 48 deletions(-) create mode 160000 addons/intl delete mode 100644 ui/desktop/translations/form/en-us.yaml delete mode 100644 ui/desktop/translations/resources/en-us.yaml diff --git a/addons/intl b/addons/intl new file mode 160000 index 000000000..aa8d852b0 --- /dev/null +++ b/addons/intl @@ -0,0 +1 @@ +Subproject commit aa8d852b03b1a7777cb7f26d5a01fc4dada29dc5 diff --git a/ui/desktop/app/templates/scopes.hbs b/ui/desktop/app/templates/scopes.hbs index 53d1e87e5..2cca02c50 100644 --- a/ui/desktop/app/templates/scopes.hbs +++ b/ui/desktop/app/templates/scopes.hbs @@ -1,4 +1,4 @@ -{{page-title (t 'scope.title_plural')}} +{{page-title (t 'resources.scope.title_plural')}} diff --git a/ui/desktop/app/templates/scopes/index.hbs b/ui/desktop/app/templates/scopes/index.hbs index cfb863937..c9da99ae5 100644 --- a/ui/desktop/app/templates/scopes/index.hbs +++ b/ui/desktop/app/templates/scopes/index.hbs @@ -2,7 +2,7 @@

- {{t "scope.title_plural"}} + {{t "resources.scope.title_plural"}}

@@ -10,7 +10,7 @@ - {{t 'scope.title'}} + {{t 'resources.scope.title'}} diff --git a/ui/desktop/app/templates/scopes/scope/-header-nav.hbs b/ui/desktop/app/templates/scopes/scope/-header-nav.hbs index eca77955c..4a383eb6d 100644 --- a/ui/desktop/app/templates/scopes/scope/-header-nav.hbs +++ b/ui/desktop/app/templates/scopes/scope/-header-nav.hbs @@ -4,7 +4,7 @@ > {{!-- {{#if this.session.data.authenticated.isGlobal}} --}} - {{t "scope.global.title"}} + {{t "titles.global"}} {{!-- {{/if}} --}} diff --git a/ui/desktop/app/templates/scopes/scope/targets.hbs b/ui/desktop/app/templates/scopes/scope/targets.hbs index 74c1be2af..f0feb5185 100644 --- a/ui/desktop/app/templates/scopes/scope/targets.hbs +++ b/ui/desktop/app/templates/scopes/scope/targets.hbs @@ -1,3 +1,3 @@ -{{page-title (t 'target.title_plural')}} +{{page-title (t 'resources.target.title_plural')}} {{outlet}} diff --git a/ui/desktop/app/templates/scopes/scope/targets/index.hbs b/ui/desktop/app/templates/scopes/scope/targets/index.hbs index b0779fa23..d76bbbe13 100644 --- a/ui/desktop/app/templates/scopes/scope/targets/index.hbs +++ b/ui/desktop/app/templates/scopes/scope/targets/index.hbs @@ -2,7 +2,7 @@

- {{t "target.title_plural"}} + {{t "resources.target.title_plural"}}

@@ -10,10 +10,10 @@ - {{t "name.label"}} - {{t "id.label"}} - {{t "type.label"}} - {{t "project.label"}} + {{t "form.name.label"}} + {{t "form.id.label"}} + {{t "form.type.label"}} + {{t "resources.project.title"}} @@ -37,7 +37,7 @@ - {{t "session.actions.connect"}} + {{t "resources.session.actions.connect"}} diff --git a/ui/desktop/package.json b/ui/desktop/package.json index 2e48399b2..69792b4fe 100644 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -34,6 +34,7 @@ "@glimmer/component": "^1.0.1", "@glimmer/tracking": "^1.0.0", "api": "*", + "intl": "*", "auth": "*", "babel-eslint": "^10.1.0", "babel-loader": "^8.1.0", diff --git a/ui/desktop/translations/form/en-us.yaml b/ui/desktop/translations/form/en-us.yaml deleted file mode 100644 index a4c393943..000000000 --- a/ui/desktop/translations/form/en-us.yaml +++ /dev/null @@ -1,16 +0,0 @@ -id: - label: ID -name: - label: Name - help: Name for identification purposes -description: - label: Description - help: Description for identification purposes -type: - label: Type - help: The type of the resource, to help differentiate schemas -project: - label: Project -origin: - label: Origin - description: The Boundary server origin (e.g. protocol://host) diff --git a/ui/desktop/translations/resources/en-us.yaml b/ui/desktop/translations/resources/en-us.yaml deleted file mode 100644 index 22e1826b1..000000000 --- a/ui/desktop/translations/resources/en-us.yaml +++ /dev/null @@ -1,13 +0,0 @@ -scope: - title: Scope - title_plural: Scopes - global: - title: Global -target: - title: Target - title_plural: Targets -session: - title: Session - title_plural: Sessions - actions: - connect: Connect diff --git a/yarn.lock b/yarn.lock index 8586a5453..396414a77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7508,7 +7508,7 @@ debug@~4.1.0: dependencies: ms "^2.1.1" -debuglog@^1.0.1: +debuglog@*, debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= @@ -12147,7 +12147,7 @@ import-lazy@^2.1.0: resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= -imurmurhash@^0.1.4: +imurmurhash@*, imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= @@ -13844,6 +13844,11 @@ lodash._baseflatten@^3.0.0: lodash.isarguments "^3.0.0" lodash.isarray "^3.0.0" +lodash._baseindexof@*: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" + integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw= + lodash._baseuniq@~4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" @@ -13852,11 +13857,16 @@ lodash._baseuniq@~4.6.0: lodash._createset "~4.0.0" lodash._root "~3.0.0" -lodash._bindcallback@^3.0.0: +lodash._bindcallback@*, lodash._bindcallback@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4= +lodash._cacheindexof@*: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" + integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI= + lodash._createassigner@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11" @@ -13866,12 +13876,19 @@ lodash._createassigner@^3.0.0: lodash._isiterateecall "^3.0.0" lodash.restparam "^3.0.0" +lodash._createcache@*: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" + integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM= + dependencies: + lodash._getnative "^3.0.0" + lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= -lodash._getnative@^3.0.0: +lodash._getnative@*, lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= @@ -14084,7 +14101,7 @@ lodash.pick@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= -lodash.restparam@^3.0.0: +lodash.restparam@*, lodash.restparam@^3.0.0: version "3.6.1" resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU= @@ -14499,9 +14516,9 @@ mdurl@^1.0.0, mdurl@^1.0.1, mdurl@~1.0.0: integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= meant@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/meant/-/meant-1.0.2.tgz#5d0c78310a3d8ae1408a16be0fe0bd42a969f560" - integrity sha512-KN+1uowN/NK+sT/Lzx7WSGIj2u+3xe5n2LbwObfjOhPZiA+cCfCm6idVl0RkEfjThkw5XJ96CyRcanq6GmKtUg== + version "1.0.3" + resolved "https://registry.yarnpkg.com/meant/-/meant-1.0.3.tgz#67769af9de1d158773e928ae82c456114903554c" + integrity sha512-88ZRGcNxAq4EH38cQ4D85PM57pikCwS8Z99EWHODxN7KBY+UuPiqzRTtZzS8KTXO/ywSWbdjjJST2Hly/EQxLw== media-typer@0.3.0: version "0.3.0"