@k-int/stripes-kint-components 3.0.1 → 3.0.2
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/CHANGELOG.md
CHANGED
|
@@ -50,17 +50,19 @@ var CustomPropertiesViewCtx = function CustomPropertiesViewCtx(_ref) {
|
|
|
50
50
|
id: 'customProperties',
|
|
51
51
|
overrideValue: labelOverrides.noContext
|
|
52
52
|
});
|
|
53
|
-
} //
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if (labelOverrides[ctx]) {
|
|
57
|
-
return labelOverrides[ctx];
|
|
58
|
-
} // Label override for default title or finally built in default
|
|
53
|
+
} // Chain formatKintMessages together using provided fallbackMessage to
|
|
54
|
+
// allow for "If override or translation exists, use it, else use default"
|
|
59
55
|
|
|
60
56
|
|
|
61
57
|
return kintIntl.formatKintMessage({
|
|
62
|
-
id:
|
|
63
|
-
overrideValue: labelOverrides
|
|
58
|
+
id: "customProperties.ctx.".concat(ctx),
|
|
59
|
+
overrideValue: labelOverrides[ctx],
|
|
60
|
+
fallbackMessage: kintIntl.formatKintMessage({
|
|
61
|
+
id: 'customProperties.defaultTitle',
|
|
62
|
+
overrideValue: labelOverrides.defaultTitle
|
|
63
|
+
}, {
|
|
64
|
+
ctx: ctx
|
|
65
|
+
})
|
|
64
66
|
}, {
|
|
65
67
|
ctx: ctx
|
|
66
68
|
});
|
package/package.json
CHANGED
|
@@ -28,16 +28,16 @@ const CustomPropertiesViewCtx = ({
|
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
return labelOverrides[ctx];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Label override for default title or finally built in default
|
|
31
|
+
// Chain formatKintMessages together using provided fallbackMessage to
|
|
32
|
+
// allow for "If override or translation exists, use it, else use default"
|
|
37
33
|
return (
|
|
38
34
|
kintIntl.formatKintMessage({
|
|
39
|
-
id:
|
|
40
|
-
overrideValue: labelOverrides
|
|
35
|
+
id: `customProperties.ctx.${ctx}`,
|
|
36
|
+
overrideValue: labelOverrides[ctx],
|
|
37
|
+
fallbackMessage: kintIntl.formatKintMessage({
|
|
38
|
+
id: 'customProperties.defaultTitle',
|
|
39
|
+
overrideValue: labelOverrides.defaultTitle
|
|
40
|
+
}, { ctx })
|
|
41
41
|
}, { ctx })
|
|
42
42
|
);
|
|
43
43
|
};
|