diff --git a/.github/run_browserstack_acceptance.sh b/.github/run_browserstack_acceptance.sh index 2459fc882..f82b0022e 100755 --- a/.github/run_browserstack_acceptance.sh +++ b/.github/run_browserstack_acceptance.sh @@ -6,4 +6,12 @@ export BROWSERSTACK_BUILD_ID="${GITHUB_BRANCH} - ${GITHUB_RUN_ID}" COMMIT_MSG_TITLE=$(git log -n 1 --pretty=format:%s) export BROWSERSTACK_TEST_RUN_NAME=$COMMIT_MSG_TITLE -npm run acceptance -- --browsers browserstack:ie@11.0 browserstack:safari browserstack:firefox +if [[ $GITHUB_BRANCH == release/* + || $GITHUB_BRANCH == hotfix/* + || $GITHUB_BRANCH == master + || $GITHUB_BRANCH == support/* ]] +then + npm run acceptance -- --browsers browserstack:ie@11.0 browserstack:safari browserstack:firefox +else + npm run acceptance -- --browsers browserstack:ie@11.0 --concurrency 2 +fi \ No newline at end of file diff --git a/.github/run_translation_verification.sh b/.github/run_translation_verification.sh new file mode 100755 index 000000000..c727e77bc --- /dev/null +++ b/.github/run_translation_verification.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -e + +# Verifiy that the messages.pot file in the repo is up to date +# If there is a git diff after translations are extracted, the checked-in file is out of date +npm run extract-translations +git diff --exit-code translations/messages.pot > /dev/null # send stdout to /dev/null to reduce clutter in the CI output +diff_exit_code=$? + +if test $diff_exit_code -eq 1 +then + echo "Extracted translations are out of date. Run 'npm run extract-translations' and commit the updated pot file." + exit 1 +else + echo "The messages.pot translation file is up to date." +fi + +# Verify that translations are present for all languages +cd translations +if [[ $GITHUB_BASE_REF == refs/heads/release/* + || $GITHUB_BASE_REF == refs/heads/hotfix/* + || $GITHUB_BASE_REF == refs/heads/master + || $GITHUB_BASE_REF == refs/heads/support/* ]] +then + for po_file in *.po + do msgcmp $po_file messages.pot + done +else + echo "Skipping the verification that all translations are present" +fi \ No newline at end of file diff --git a/.github/workflows/translation-test.yml b/.github/workflows/translation-test.yml new file mode 100644 index 000000000..d50232dec --- /dev/null +++ b/.github/workflows/translation-test.yml @@ -0,0 +1,22 @@ +name: Translation Test + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [15.x] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: sudo apt-get install -qq gettext + - name: 'translation verification' + run: ./.github/run_translation_verification.sh diff --git a/cards/document-standard/template.hbs b/cards/document-standard/template.hbs index 8be5d157f..a9f3b0402 100644 --- a/cards/document-standard/template.hbs +++ b/cards/document-standard/template.hbs @@ -76,10 +76,12 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }} +
{{/if}}
diff --git a/cards/event-standard/template.hbs b/cards/event-standard/template.hbs index cd3982a77..6fd9a597e 100644 --- a/cards/event-standard/template.hbs +++ b/cards/event-standard/template.hbs @@ -73,13 +73,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -95,10 +97,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/faq-accordion/template.hbs b/cards/faq-accordion/template.hbs index 944e712c0..fd73c014d 100644 --- a/cards/faq-accordion/template.hbs +++ b/cards/faq-accordion/template.hbs @@ -7,10 +7,8 @@

{{{card.title}}}

-
+
+ {{> icons/builtInIcon iconName='chevron' }}
{{card.showMoreDetails.showMoreText}} - + + {{> icons/builtInIcon iconName='chevron' classNames='Icon--sm Icon--collapseDown' }} + {{/if}}
@@ -83,10 +83,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/financial-professional-location/template.hbs b/cards/financial-professional-location/template.hbs index 27698dedc..76021ecac 100644 --- a/cards/financial-professional-location/template.hbs +++ b/cards/financial-professional-location/template.hbs @@ -102,13 +102,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -172,10 +174,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/job-standard/template.hbs b/cards/job-standard/template.hbs index b373d71c1..d1535314a 100644 --- a/cards/job-standard/template.hbs +++ b/cards/job-standard/template.hbs @@ -65,13 +65,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -96,10 +98,12 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }} +
{{/if}}
diff --git a/cards/link-standard/template.hbs b/cards/link-standard/template.hbs index 4419dc700..206a6d2f3 100644 --- a/cards/link-standard/template.hbs +++ b/cards/link-standard/template.hbs @@ -18,7 +18,7 @@ data-eventoptions='{{json card.titleEventOptions}}' target={{#if card.target}}"{{card.target}}"{{else}}"_top"{{/if}}> {{{card.title}}} - {{> chevron_icon }} + {{> icons/builtInIcon iconName='chevron'}} {{else}} {{{card.title}}} @@ -27,14 +27,6 @@ {{/if}} {{/inline}} -{{#*inline 'chevron_icon'}} - - - - - -{{/inline}} - {{#*inline 'subtitle'}} {{#if card.subtitle}}
@@ -62,13 +54,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
diff --git a/cards/location-standard/template.hbs b/cards/location-standard/template.hbs index d0d127c13..a12a0ded0 100644 --- a/cards/location-standard/template.hbs +++ b/cards/location-standard/template.hbs @@ -90,10 +90,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} @@ -185,13 +186,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
diff --git a/cards/menuitem-standard/template.hbs b/cards/menuitem-standard/template.hbs index 546ab9a83..9c9966794 100644 --- a/cards/menuitem-standard/template.hbs +++ b/cards/menuitem-standard/template.hbs @@ -92,13 +92,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -116,10 +118,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/multilang-event-standard/template.hbs b/cards/multilang-event-standard/template.hbs index cd3982a77..6fd9a597e 100644 --- a/cards/multilang-event-standard/template.hbs +++ b/cards/multilang-event-standard/template.hbs @@ -73,13 +73,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -95,10 +97,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/multilang-faq-accordion/template.hbs b/cards/multilang-faq-accordion/template.hbs index 944e712c0..fd73c014d 100644 --- a/cards/multilang-faq-accordion/template.hbs +++ b/cards/multilang-faq-accordion/template.hbs @@ -7,10 +7,8 @@

{{{card.title}}}

-
+
+ {{> icons/builtInIcon iconName='chevron' }}
{{card.showMoreDetails.showMoreText}} - + + {{> icons/builtInIcon iconName='chevron' classNames='Icon--sm Icon--collapseDown' }} + {{/if}}
@@ -83,10 +83,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/multilang-financial-professional-location/template.hbs b/cards/multilang-financial-professional-location/template.hbs index 6ed5d576b..a802076a3 100644 --- a/cards/multilang-financial-professional-location/template.hbs +++ b/cards/multilang-financial-professional-location/template.hbs @@ -102,13 +102,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -172,10 +174,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/multilang-job-standard/template.hbs b/cards/multilang-job-standard/template.hbs index b373d71c1..d1535314a 100644 --- a/cards/multilang-job-standard/template.hbs +++ b/cards/multilang-job-standard/template.hbs @@ -65,13 +65,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -96,10 +98,12 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }} +
{{/if}}
diff --git a/cards/multilang-link-standard/template.hbs b/cards/multilang-link-standard/template.hbs index 4419dc700..206a6d2f3 100644 --- a/cards/multilang-link-standard/template.hbs +++ b/cards/multilang-link-standard/template.hbs @@ -18,7 +18,7 @@ data-eventoptions='{{json card.titleEventOptions}}' target={{#if card.target}}"{{card.target}}"{{else}}"_top"{{/if}}> {{{card.title}}} - {{> chevron_icon }} + {{> icons/builtInIcon iconName='chevron'}} {{else}} {{{card.title}}} @@ -27,14 +27,6 @@ {{/if}} {{/inline}} -{{#*inline 'chevron_icon'}} - - - - - -{{/inline}} - {{#*inline 'subtitle'}} {{#if card.subtitle}}
@@ -62,13 +54,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
diff --git a/cards/multilang-location-standard/template.hbs b/cards/multilang-location-standard/template.hbs index a718100ac..afbc93210 100644 --- a/cards/multilang-location-standard/template.hbs +++ b/cards/multilang-location-standard/template.hbs @@ -90,10 +90,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} @@ -185,13 +186,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
diff --git a/cards/multilang-menuitem-standard/template.hbs b/cards/multilang-menuitem-standard/template.hbs index 546ab9a83..9c9966794 100644 --- a/cards/multilang-menuitem-standard/template.hbs +++ b/cards/multilang-menuitem-standard/template.hbs @@ -92,13 +92,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -116,10 +118,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/multilang-product-prominentimage/template.hbs b/cards/multilang-product-prominentimage/template.hbs index 52d39db04..9314c43f0 100644 --- a/cards/multilang-product-prominentimage/template.hbs +++ b/cards/multilang-product-prominentimage/template.hbs @@ -74,13 +74,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -107,9 +109,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/multilang-product-prominentvideo/template.hbs b/cards/multilang-product-prominentvideo/template.hbs index a25c5f932..d01f4a9d3 100644 --- a/cards/multilang-product-prominentvideo/template.hbs +++ b/cards/multilang-product-prominentvideo/template.hbs @@ -76,13 +76,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -109,9 +111,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/multilang-product-standard/template.hbs b/cards/multilang-product-standard/template.hbs index 7b6147899..a1a245d6d 100644 --- a/cards/multilang-product-standard/template.hbs +++ b/cards/multilang-product-standard/template.hbs @@ -70,13 +70,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -94,8 +96,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/multilang-professional-location/template.hbs b/cards/multilang-professional-location/template.hbs index 27bffed6d..a20c75bfd 100644 --- a/cards/multilang-professional-location/template.hbs +++ b/cards/multilang-professional-location/template.hbs @@ -99,13 +99,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -169,10 +171,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/multilang-professional-standard/template.hbs b/cards/multilang-professional-standard/template.hbs index 08d6234a1..4ea666620 100644 --- a/cards/multilang-professional-standard/template.hbs +++ b/cards/multilang-professional-standard/template.hbs @@ -65,13 +65,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -133,10 +135,12 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }} +
{{/if}}
diff --git a/cards/multilang-standard/template.hbs b/cards/multilang-standard/template.hbs index bc52487d3..9c37fe70d 100644 --- a/cards/multilang-standard/template.hbs +++ b/cards/multilang-standard/template.hbs @@ -65,13 +65,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -98,10 +100,12 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }} +
{{/if}}
diff --git a/cards/product-prominentimage/template.hbs b/cards/product-prominentimage/template.hbs index 170c96471..677aeb8e0 100644 --- a/cards/product-prominentimage/template.hbs +++ b/cards/product-prominentimage/template.hbs @@ -74,13 +74,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -107,9 +109,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/product-prominentvideo/template.hbs b/cards/product-prominentvideo/template.hbs index a25c5f932..d01f4a9d3 100644 --- a/cards/product-prominentvideo/template.hbs +++ b/cards/product-prominentvideo/template.hbs @@ -76,13 +76,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -109,9 +111,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/product-standard/template.hbs b/cards/product-standard/template.hbs index 7b6147899..a1a245d6d 100644 --- a/cards/product-standard/template.hbs +++ b/cards/product-standard/template.hbs @@ -70,13 +70,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -94,8 +96,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/professional-location/template.hbs b/cards/professional-location/template.hbs index 4adc7ff19..83c8763ab 100644 --- a/cards/professional-location/template.hbs +++ b/cards/professional-location/template.hbs @@ -99,13 +99,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -169,10 +171,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }}
{{/if}} diff --git a/cards/professional-standard/template.hbs b/cards/professional-standard/template.hbs index 08d6234a1..4ea666620 100644 --- a/cards/professional-standard/template.hbs +++ b/cards/professional-standard/template.hbs @@ -65,13 +65,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -133,10 +135,12 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }} +
{{/if}}
diff --git a/cards/standard/template.hbs b/cards/standard/template.hbs index bc52487d3..9c37fe70d 100644 --- a/cards/standard/template.hbs +++ b/cards/standard/template.hbs @@ -65,13 +65,15 @@ {{#if showExcessDetailsToggle}} {{/if}}
@@ -98,10 +100,12 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
-
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }} +
{{/if}}
diff --git a/commands/helpers/utils/argumentmetadata.js b/commands/helpers/utils/argumentmetadata.js index 49c546995..7e1ce1abf 100644 --- a/commands/helpers/utils/argumentmetadata.js +++ b/commands/helpers/utils/argumentmetadata.js @@ -16,9 +16,9 @@ Object.freeze(ArgumentType); class ArgumentMetadata { constructor(type, description, isRequired, defaultValue, itemType) { this._type = type; + this._description = description; this._isRequired = isRequired; this._defaultValue = defaultValue; - this._description = description; this._itemType = itemType; } diff --git a/commands/helpers/utils/logger.js b/commands/helpers/utils/logger.js new file mode 100644 index 000000000..01e74bd6a --- /dev/null +++ b/commands/helpers/utils/logger.js @@ -0,0 +1,41 @@ +const log = require('npmlog'); + +log.heading = 'jambo'; +log.headingStyle = { fg: 'magenta' }; + +// Don't display a log prefix. +const PREFIX = ''; + +/** + * Sets the global logging level. + */ +exports.setLogLevel = function(level) { + log.level = level; +} + +/** + * Logs an error. + * + * @param {...any} args + */ +exports.error = function(...args) { + log.error(PREFIX, ...args) +} + +/** + * Logs a warning. + * + * @param {...any} args + */ +exports.warn = function(...args) { + log.warn(PREFIX, ...args) +} + +/** + * Logs info. + * + * @param {...any} args + */ +exports.info = function(...args) { + log.info(PREFIX, ...args) +} diff --git a/directanswercards/allfields-standard/template.hbs b/directanswercards/allfields-standard/template.hbs index 1eb3e93ea..bc3210a53 100644 --- a/directanswercards/allfields-standard/template.hbs +++ b/directanswercards/allfields-standard/template.hbs @@ -19,14 +19,12 @@ {{#*inline 'icon'}} {{#if (any iconName iconUrl)}} -
+
+ {{> icons/iconPartial + iconName=iconName + iconUrl=(relativePathHandler url=iconUrl relativePath=@root.relativePath) + }} +
{{/if}} {{/inline}} @@ -132,11 +130,9 @@ {{footerText}}