@amagaki/amagaki 2.2.1 → 2.2.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.
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LocalizableData = exports.Locale = exports.LocaleSet = void 0;
4
+ const _1 = require(".");
4
5
  const RTL_REGEX = /^(ar|fa|he|ur)(\W|$)/;
5
6
  class LocaleSet extends Set {
6
7
  static fromIds(localeIds, pod) {
@@ -137,7 +138,9 @@ class LocalizableData {
137
138
  * "default".
138
139
  */
139
140
  localize(locale) {
140
- return this.data[locale.id] ?? this.data['default'];
141
+ const result = this.data[locale.id] ?? this.data['default'];
142
+ // Handle nested `LocalizableData` structures.
143
+ return (0, _1.localizeData)(result, locale);
141
144
  }
142
145
  }
143
146
  exports.LocalizableData = LocalizableData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amagaki/amagaki",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "license": "MIT",
5
5
  "homepage": "https://amagaki.dev",
6
6
  "repository": {