@sheet-i18n/react-client 1.5.0-canary.3 → 1.5.0-canary.4
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/dist/index.js +22 -4
- package/dist/index.mjs +22 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -227,23 +227,41 @@ var TranslationService = class {
|
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
229
|
findTargetTranslation(id, $tParams) {
|
|
230
|
-
var _a, _b, _c, _d, _e;
|
|
230
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
231
|
+
console.log(
|
|
232
|
+
"1) \u2705 intlInstance in findTargetTranslation",
|
|
233
|
+
this == null ? void 0 : this.intlInstance
|
|
234
|
+
);
|
|
231
235
|
const targetTranslation = (_b = (_a = this == null ? void 0 : this.intlInstance) == null ? void 0 : _a.messages) == null ? void 0 : _b[id];
|
|
232
236
|
if (import_shared_utils3.validator.isNullish(targetTranslation)) {
|
|
233
237
|
return id;
|
|
234
238
|
}
|
|
239
|
+
console.log(
|
|
240
|
+
"2) \u2705 targetTranslation in findTargetTranslation",
|
|
241
|
+
targetTranslation
|
|
242
|
+
);
|
|
235
243
|
if (typeof targetTranslation === "string" && targetTranslation.trim() === "") {
|
|
236
244
|
return "";
|
|
237
245
|
}
|
|
246
|
+
console.log("3) \u2705 $tParams in findTargetTranslation", $tParams);
|
|
238
247
|
if (!$tParams || !($tParams == null ? void 0 : $tParams.descriptor)) {
|
|
239
248
|
return "";
|
|
240
249
|
}
|
|
241
|
-
|
|
242
|
-
|
|
250
|
+
console.log(
|
|
251
|
+
"4) \u2705 $tParams.descriptor in findTargetTranslation",
|
|
252
|
+
(_d = (_c = this.intlInstance) == null ? void 0 : _c.$t) == null ? void 0 : _d.call(
|
|
253
|
+
_c,
|
|
254
|
+
$tParams.descriptor,
|
|
255
|
+
$tParams.values,
|
|
256
|
+
$tParams.opts
|
|
257
|
+
)
|
|
258
|
+
);
|
|
259
|
+
return (_g = (_f = (_e = this.intlInstance) == null ? void 0 : _e.$t) == null ? void 0 : _f.call(
|
|
260
|
+
_e,
|
|
243
261
|
$tParams.descriptor,
|
|
244
262
|
$tParams.values,
|
|
245
263
|
$tParams.opts
|
|
246
|
-
)) != null ?
|
|
264
|
+
)) != null ? _g : "";
|
|
247
265
|
}
|
|
248
266
|
};
|
|
249
267
|
|
package/dist/index.mjs
CHANGED
|
@@ -204,23 +204,41 @@ var TranslationService = class {
|
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
findTargetTranslation(id, $tParams) {
|
|
207
|
-
var _a, _b, _c, _d, _e;
|
|
207
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
208
|
+
console.log(
|
|
209
|
+
"1) \u2705 intlInstance in findTargetTranslation",
|
|
210
|
+
this == null ? void 0 : this.intlInstance
|
|
211
|
+
);
|
|
208
212
|
const targetTranslation = (_b = (_a = this == null ? void 0 : this.intlInstance) == null ? void 0 : _a.messages) == null ? void 0 : _b[id];
|
|
209
213
|
if (validator3.isNullish(targetTranslation)) {
|
|
210
214
|
return id;
|
|
211
215
|
}
|
|
216
|
+
console.log(
|
|
217
|
+
"2) \u2705 targetTranslation in findTargetTranslation",
|
|
218
|
+
targetTranslation
|
|
219
|
+
);
|
|
212
220
|
if (typeof targetTranslation === "string" && targetTranslation.trim() === "") {
|
|
213
221
|
return "";
|
|
214
222
|
}
|
|
223
|
+
console.log("3) \u2705 $tParams in findTargetTranslation", $tParams);
|
|
215
224
|
if (!$tParams || !($tParams == null ? void 0 : $tParams.descriptor)) {
|
|
216
225
|
return "";
|
|
217
226
|
}
|
|
218
|
-
|
|
219
|
-
|
|
227
|
+
console.log(
|
|
228
|
+
"4) \u2705 $tParams.descriptor in findTargetTranslation",
|
|
229
|
+
(_d = (_c = this.intlInstance) == null ? void 0 : _c.$t) == null ? void 0 : _d.call(
|
|
230
|
+
_c,
|
|
231
|
+
$tParams.descriptor,
|
|
232
|
+
$tParams.values,
|
|
233
|
+
$tParams.opts
|
|
234
|
+
)
|
|
235
|
+
);
|
|
236
|
+
return (_g = (_f = (_e = this.intlInstance) == null ? void 0 : _e.$t) == null ? void 0 : _f.call(
|
|
237
|
+
_e,
|
|
220
238
|
$tParams.descriptor,
|
|
221
239
|
$tParams.values,
|
|
222
240
|
$tParams.opts
|
|
223
|
-
)) != null ?
|
|
241
|
+
)) != null ? _g : "";
|
|
224
242
|
}
|
|
225
243
|
};
|
|
226
244
|
|