@zeesoft/i18n-verify 3.2.3 → 3.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/executor.mjs CHANGED
@@ -5763,6 +5763,7 @@ class BaseValidator {
5763
5763
  }
5764
5764
  #getCompatibleLocale(locale) {
5765
5765
  if (this.isQaLocale()) {
5766
+ Logger.warn(`Detected QA lcoale so defaulting to 'en'.`);
5766
5767
  return "en";
5767
5768
  }
5768
5769
  locale = locale.replace(/[-_ ]/g, "-");
@@ -5772,10 +5773,14 @@ class BaseValidator {
5772
5773
  suitableLocale = locale;
5773
5774
  } else {
5774
5775
  const temp = locale.split("-")[0];
5775
- if (locales.find((l) => l === temp)) {
5776
- suitableLocale = temp;
5776
+ const firstMatch = locales.find((l) => l.startsWith(temp));
5777
+ if (firstMatch) {
5778
+ suitableLocale = firstMatch;
5777
5779
  } else {
5778
- suitableLocale = locale;
5780
+ Logger.warn(
5781
+ `No suitable locale found for ${locale}. Defaulting to 'en'.`
5782
+ );
5783
+ suitableLocale = "en";
5779
5784
  }
5780
5785
  }
5781
5786
  return suitableLocale;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeesoft/i18n-verify",
3
- "version": "3.2.3",
3
+ "version": "3.2.5",
4
4
  "description": "Library to perform I18n verification on Nightwatch, WebdriverIO or Selenium framework projects",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",