@shipeasy/sdk 2.1.1 → 2.1.3
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/client/index.js +2 -1
- package/dist/client/index.mjs +2 -1
- package/dist/server/index.js +1 -1
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
package/dist/client/index.js
CHANGED
|
@@ -812,7 +812,8 @@ var i18n = {
|
|
|
812
812
|
*/
|
|
813
813
|
tEl(key, fallback, variables, desc) {
|
|
814
814
|
const hasTranslation = typeof window !== "undefined" && Boolean(window.i18n) || Boolean(getSSRI18nStore()?.strings[key]);
|
|
815
|
-
const
|
|
815
|
+
const translated = hasTranslation ? this.t(key, variables) : void 0;
|
|
816
|
+
const text = translated && translated !== key ? translated : fallback;
|
|
816
817
|
if (!_createElement) return text;
|
|
817
818
|
return _createElement("span", labelAttrs(key, variables, desc), text);
|
|
818
819
|
},
|
package/dist/client/index.mjs
CHANGED
|
@@ -769,7 +769,8 @@ var i18n = {
|
|
|
769
769
|
*/
|
|
770
770
|
tEl(key, fallback, variables, desc) {
|
|
771
771
|
const hasTranslation = typeof window !== "undefined" && Boolean(window.i18n) || Boolean(getSSRI18nStore()?.strings[key]);
|
|
772
|
-
const
|
|
772
|
+
const translated = hasTranslation ? this.t(key, variables) : void 0;
|
|
773
|
+
const text = translated && translated !== key ? translated : fallback;
|
|
773
774
|
if (!_createElement) return text;
|
|
774
775
|
return _createElement("span", labelAttrs(key, variables, desc), text);
|
|
775
776
|
},
|
package/dist/server/index.js
CHANGED
|
@@ -438,7 +438,7 @@ async function shipeasy(opts) {
|
|
|
438
438
|
const clientKey = opts.clientKey ?? opts.apiKey ?? "";
|
|
439
439
|
const profile = opts.i18nDefaultProfile ?? "en:prod";
|
|
440
440
|
flags.configure({ apiKey });
|
|
441
|
-
await Promise.allSettled([flags.initOnce(), i18n.init(
|
|
441
|
+
await Promise.allSettled([flags.initOnce(), i18n.init(clientKey, profile)]);
|
|
442
442
|
const bootstrap = flags.evaluate(opts.user ?? {}, opts.urlOverrides);
|
|
443
443
|
const i18nData = i18n.getForRequest();
|
|
444
444
|
return {
|
package/dist/server/index.mjs
CHANGED
|
@@ -405,7 +405,7 @@ async function shipeasy(opts) {
|
|
|
405
405
|
const clientKey = opts.clientKey ?? opts.apiKey ?? "";
|
|
406
406
|
const profile = opts.i18nDefaultProfile ?? "en:prod";
|
|
407
407
|
flags.configure({ apiKey });
|
|
408
|
-
await Promise.allSettled([flags.initOnce(), i18n.init(
|
|
408
|
+
await Promise.allSettled([flags.initOnce(), i18n.init(clientKey, profile)]);
|
|
409
409
|
const bootstrap = flags.evaluate(opts.user ?? {}, opts.urlOverrides);
|
|
410
410
|
const i18nData = i18n.getForRequest();
|
|
411
411
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipeasy/sdk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Shipeasy SDK — feature gates, runtime configs, experiments, and metrics for the Shipeasy hosted service.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://shipeasy.ai",
|