@redhat-cloud-services/frontend-components-config-utilities 4.13.5 → 4.14.0

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.
@@ -102,6 +102,7 @@ export type CRDObject = {
102
102
  navigationSegments?: DirectNavItem[];
103
103
  module: ChromeModule;
104
104
  searchEntries?: ChromeStaticSearchEntry[];
105
+ locales?: Record<string, Record<string, string>>;
105
106
  serviceTiles?: ServiceTile[];
106
107
  widgetRegistry?: ChromeWidgetEntry[];
107
108
  feoConfigEnabled?: boolean;
@@ -729,6 +729,19 @@
729
729
  "feoConfigEnabled": {
730
730
  "type": "boolean"
731
731
  },
732
+ "locales": {
733
+ "type": "object",
734
+ "description": "Generated translations keyed by locale and stable message ID",
735
+ "propertyNames": {
736
+ "format": "bcp47"
737
+ },
738
+ "additionalProperties": {
739
+ "type": "object",
740
+ "additionalProperties": {
741
+ "type": "string"
742
+ }
743
+ }
744
+ },
732
745
  "akamaiCacheBustDisable": {
733
746
  "type": "boolean"
734
747
  },
@@ -21,6 +21,17 @@ function validateFrontendCrd(crd) {
21
21
  var validator = new _2020_1.default({
22
22
  strict: true,
23
23
  });
24
+ validator.addFormat('bcp47', {
25
+ type: 'string',
26
+ validate: function (locale) {
27
+ try {
28
+ return Intl.getCanonicalLocales(locale).length === 1;
29
+ }
30
+ catch (_a) {
31
+ return false;
32
+ }
33
+ },
34
+ });
24
35
  var crdInternal = typeof crd === 'string' ? readCrdYaml(crd) : crd;
25
36
  delete frontend_crd_schema_json_1.default.$schema;
26
37
  var validate = validator.compile(frontend_crd_schema_json_1.default);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redhat-cloud-services/frontend-components-config-utilities",
3
- "version": "4.13.5",
3
+ "version": "4.14.0",
4
4
  "description": "Utilities for shared config used in Red Hat Cloud Services project.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",