@c8y/ngx-components 1021.49.1 → 1021.49.6
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/core/common/ApplicationOptions.d.ts +1 -1
- package/core/docs/docs.service.d.ts +1 -1
- package/core/docs/docs.service.d.ts.map +1 -1
- package/core/i18n/translate.service.d.ts.map +1 -1
- package/esm2022/branding/shared/lazy/branding-form/branding-form.component.mjs +3 -3
- package/esm2022/core/common/ApplicationOptions.mjs +1 -1
- package/esm2022/core/docs/defaults.items.mjs +5 -5
- package/esm2022/core/docs/docs.service.mjs +2 -2
- package/esm2022/core/i18n/translate.service.mjs +7 -5
- package/esm2022/widgets/implementations/cockpit-welcome/welcome.component.mjs +2 -2
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +2 -2
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +11 -9
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -4070,13 +4070,15 @@ class TranslateService {
|
|
|
4070
4070
|
return this.getQueryParameter('lang');
|
|
4071
4071
|
}
|
|
4072
4072
|
parseLocaleCode(localeCode, outputSeparator = '_') {
|
|
4073
|
-
|
|
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}"
|
|
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
|
|
4079
|
-
const langCountryCode = `${langCode}${
|
|
4080
|
+
const regionCode = matches[3]?.toUpperCase();
|
|
4081
|
+
const langCountryCode = `${langCode}${regionCode ? `${outputSeparator}${regionCode}` : ''}`;
|
|
4080
4082
|
return { langCode, langCountryCode };
|
|
4081
4083
|
}
|
|
4082
4084
|
/**
|
|
@@ -13446,25 +13448,25 @@ const documentationItems = [
|
|
|
13446
13448
|
{
|
|
13447
13449
|
icon: 'c8y-user',
|
|
13448
13450
|
label: gettext$1('Getting started`KEEP_ORIGINAL`'),
|
|
13449
|
-
url: '/docs/
|
|
13451
|
+
url: '/docs/sector/getting_started',
|
|
13450
13452
|
type: 'doc'
|
|
13451
13453
|
},
|
|
13452
13454
|
{
|
|
13453
13455
|
icon: 'c8y-administration',
|
|
13454
13456
|
label: gettext$1('Platform administration`KEEP_ORIGINAL`'),
|
|
13455
|
-
url: '/docs/
|
|
13457
|
+
url: '/docs/sector/platform_administration',
|
|
13456
13458
|
type: 'doc'
|
|
13457
13459
|
},
|
|
13458
13460
|
{
|
|
13459
13461
|
icon: 'c8y-device-management',
|
|
13460
13462
|
label: gettext$1('Device Management'),
|
|
13461
|
-
url: '/docs/
|
|
13463
|
+
url: '/docs/sector/device_management',
|
|
13462
13464
|
type: 'doc'
|
|
13463
13465
|
},
|
|
13464
13466
|
{
|
|
13465
13467
|
icon: 'c8y-cockpit',
|
|
13466
13468
|
label: gettext$1('Application enablement`KEEP_ORIGINAL`'),
|
|
13467
|
-
url: '/docs/
|
|
13469
|
+
url: '/docs/sector/app_enablement',
|
|
13468
13470
|
type: 'doc'
|
|
13469
13471
|
},
|
|
13470
13472
|
{
|
|
@@ -13524,7 +13526,7 @@ class DocsService extends ExtensionPointWithoutStateForPlugins {
|
|
|
13524
13526
|
/**
|
|
13525
13527
|
* Default documentation URL.
|
|
13526
13528
|
*/
|
|
13527
|
-
this.DEFAULT_DOCS_BASE_URL = 'https://
|
|
13529
|
+
this.DEFAULT_DOCS_BASE_URL = 'https://cumulocity.com';
|
|
13528
13530
|
this.items$ = this.setupItemsObservable();
|
|
13529
13531
|
}
|
|
13530
13532
|
getBaseUrl(uiVersion) {
|