@c8y/ngx-components 1021.22.40 → 1021.22.44

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.
@@ -4070,13 +4070,15 @@ class TranslateService {
4070
4070
  return this.getQueryParameter('lang');
4071
4071
  }
4072
4072
  parseLocaleCode(localeCode, outputSeparator = '_') {
4073
- const matches = localeCode.match(/^([a-z]{2})([_-]([a-z]{2}))?$/i);
4073
+ // - 2 letter language code
4074
+ // - optional region code that's either 2 letters OR 3 digits
4075
+ const matches = localeCode.match(/^([a-z]{2})([_-]([a-z]{2}|[0-9]{3}))?$/i);
4074
4076
  if (!matches) {
4075
- throw new Error(`Could not parse locale code "${localeCode}", make sure it's a two- or four-letter code (case insensitive) separated with "_" or "-".`);
4077
+ throw new Error(`Could not parse locale code "${localeCode}". Expected format: language code (2 letters) optionally followed by region code (2 letters or 3 digits) separated with "_" or "-", e.g. "en-US" or "es-419".`);
4076
4078
  }
4077
4079
  const langCode = matches[1].toLowerCase();
4078
- const countryCode = matches[3]?.toUpperCase();
4079
- const langCountryCode = `${langCode}${countryCode ? `${outputSeparator}${countryCode}` : ''}`;
4080
+ const regionCode = matches[3]?.toUpperCase();
4081
+ const langCountryCode = `${langCode}${regionCode ? `${outputSeparator}${regionCode}` : ''}`;
4080
4082
  return { langCode, langCountryCode };
4081
4083
  }
4082
4084
  /**
@@ -13429,25 +13431,25 @@ const documentationItems = [
13429
13431
  {
13430
13432
  icon: 'c8y-user',
13431
13433
  label: gettext$1('Getting started`KEEP_ORIGINAL`'),
13432
- url: '/docs/section/getting_started',
13434
+ url: '/docs/sector/getting_started',
13433
13435
  type: 'doc'
13434
13436
  },
13435
13437
  {
13436
13438
  icon: 'c8y-administration',
13437
13439
  label: gettext$1('Platform administration`KEEP_ORIGINAL`'),
13438
- url: '/docs/section/platform_administration',
13440
+ url: '/docs/sector/platform_administration',
13439
13441
  type: 'doc'
13440
13442
  },
13441
13443
  {
13442
13444
  icon: 'c8y-device-management',
13443
13445
  label: gettext$1('Device Management'),
13444
- url: '/docs/section/device_management',
13446
+ url: '/docs/sector/device_management',
13445
13447
  type: 'doc'
13446
13448
  },
13447
13449
  {
13448
13450
  icon: 'c8y-cockpit',
13449
13451
  label: gettext$1('Application enablement`KEEP_ORIGINAL`'),
13450
- url: '/docs/section/app_enablement',
13452
+ url: '/docs/sector/app_enablement',
13451
13453
  type: 'doc'
13452
13454
  },
13453
13455
  {
@@ -13507,7 +13509,7 @@ class DocsService extends ExtensionPointWithoutStateForPlugins {
13507
13509
  /**
13508
13510
  * Default documentation URL.
13509
13511
  */
13510
- this.DEFAULT_DOCS_BASE_URL = 'https://www.cumulocity.com';
13512
+ this.DEFAULT_DOCS_BASE_URL = 'https://cumulocity.com';
13511
13513
  this.items$ = this.setupItemsObservable();
13512
13514
  }
13513
13515
  getBaseUrl(uiVersion) {