@schematichq/schematic-components 2.28.0 → 2.29.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.
@@ -13134,6 +13134,7 @@ var en = {
13134
13134
  "An invoice is created when charges reach $X; the rest is billed monthly.": "An invoice is created when charges reach {{amount}}; the rest is billed monthly.",
13135
13135
  "An unknown error occurred.": "An unknown error occurred.",
13136
13136
  "Billed": "Billed {{period}}",
13137
+ "Billing threshold": "Billing threshold",
13137
13138
  "Bundle selected": "Bundle selected",
13138
13139
  "Buy credits": "Buy credits",
13139
13140
  "Cancel": "Cancel",
@@ -13168,8 +13169,11 @@ var en = {
13168
13169
  "Due today": "Due today",
13169
13170
  "Edit payment details": "Edit payment details",
13170
13171
  "Edit": "Edit",
13172
+ "Email": "Email",
13171
13173
  "Ends on": "Ends on {{date}}",
13172
13174
  "Enter discount code": "Enter discount code",
13175
+ "Enter email address": "Enter email address",
13176
+ "Error": "Error",
13173
13177
  "Error initializing payment method change. Please try again.": "Error initializing payment method change. Please try again.",
13174
13178
  "Error processing payment. Please try a different payment method.": "Error processing payment. Please try a different payment method.",
13175
13179
  "Error retrieving plan details. Please try again in a moment.": "Error retrieving plan details. Please try again in a moment.",
@@ -13190,6 +13194,7 @@ var en = {
13190
13194
  "Invoice credit tooltip": "Credit \u2014 this amount was returned to your account, typically due to a plan change or proration",
13191
13195
  "Invoice charge tooltip": "Charge \u2014 you were billed this amount",
13192
13196
  "Invoices": "Invoices",
13197
+ "Limit": "Limit",
13193
13198
  "Limit of": "Limit of {{amount}}",
13194
13199
  "Loading": "Loading",
13195
13200
  "Manage plan": "Manage plan",
@@ -13214,6 +13219,8 @@ var en = {
13214
13219
  "Payment Details": "Payment Details",
13215
13220
  "Plan selected": "Plan selected",
13216
13221
  "Please accept the agreement to continue.": "Please accept the agreement to continue.",
13222
+ "Please try again later.": "Please try again later.",
13223
+ "Portal not found": "Portal not found",
13217
13224
  "Plan": "Plan",
13218
13225
  "Plans": "Plans",
13219
13226
  "Please provide an access token.": "Please provide an access token.",
@@ -13265,6 +13272,7 @@ var en = {
13265
13272
  "There was a problem retrieving your upcoming invoice.": "There was a problem retrieving your upcoming invoice.",
13266
13273
  "There was a problem retrieving your invoices.": "There was a problem retrieving your invoices.",
13267
13274
  "Tier-based": "Tier-based",
13275
+ "Tiered pricing": "Tiered pricing",
13268
13276
  "Tiers apply progressively as quantity increases.": "Tiers apply progressively as quantity increases.",
13269
13277
  "Top up balance with:": "Top up balance with:",
13270
13278
  "Top-ups": "Top-ups",
@@ -13338,6 +13346,15 @@ var en = {
13338
13346
  "$X/unit/period": "{{cost}}/{{unit}}/{{period}}",
13339
13347
  "$X/Y units/period": "{{cost}}/{{size}} {{units}}/{{period}}",
13340
13348
  "day": "day",
13349
+ "day_one": "day",
13350
+ "day_other": "days",
13351
+ "hour_one": "hour",
13352
+ "hour_other": "hours",
13353
+ "minute_one": "minute",
13354
+ "minute_other": "minutes",
13355
+ "second_one": "second",
13356
+ "second_other": "seconds",
13357
+ "week": "week",
13341
13358
  "month": "month",
13342
13359
  "quarter": "quarter",
13343
13360
  "year": "year",
@@ -13346,6 +13363,13 @@ var en = {
13346
13363
  "yr": "yr",
13347
13364
  "one time": "one time",
13348
13365
  "billing period": "billing period",
13366
+ "billing period_one": "billing period",
13367
+ "billing period_other": "billing periods",
13368
+ "daily": "daily",
13369
+ "weekly": "weekly",
13370
+ "monthly": "monthly",
13371
+ "quarterly": "quarterly",
13372
+ "yearly": "yearly",
13349
13373
  "expires after purchase": "expires {{amount}} {{unit}} after purchase",
13350
13374
  "expires at the end of the billing period": "expires at the end of the billing period",
13351
13375
  "expires at the end of the next billing period": "expires at the end of the next billing period",
@@ -14035,11 +14059,9 @@ function formatBundleExpiry(bundle, t3) {
14035
14059
  if (typeof bundle.expiryUnitCount !== "number") {
14036
14060
  return void 0;
14037
14061
  }
14038
- const unit = bundle.expiryUnit === BillingCreditExpiryUnit.BillingPeriods ? t3("billing period") : t3("day");
14039
- return t3("expires after purchase", {
14040
- amount: bundle.expiryUnitCount,
14041
- unit: pluralize(unit, bundle.expiryUnitCount)
14042
- });
14062
+ const count = bundle.expiryUnitCount;
14063
+ const unit = bundle.expiryUnit === BillingCreditExpiryUnit.BillingPeriods ? t3("billing period", { count }) : t3("day", { count });
14064
+ return t3("expires after purchase", { amount: count, unit });
14043
14065
  }
14044
14066
  case BillingCreditExpiryType.EndOfBillingPeriod:
14045
14067
  return t3("expires at the end of the billing period");
@@ -14284,16 +14306,33 @@ function entitlementHasHardLimit(entitlement) {
14284
14306
  }
14285
14307
 
14286
14308
  // src/utils/api/feature.ts
14287
- function getFeatureName(feature, count = 0, ignore = false) {
14288
- const shouldBePlural = count === 0 || count > 1;
14309
+ function isEnglish(locale) {
14310
+ try {
14311
+ return new Intl.Locale(locale).language === "en";
14312
+ } catch {
14313
+ return true;
14314
+ }
14315
+ }
14316
+ function isOne(count, locale) {
14317
+ return new Intl.PluralRules(locale).select(count) === "one";
14318
+ }
14319
+ function getFeatureName(feature, locale, count, ignore = false) {
14320
+ if (!isEnglish(locale)) {
14321
+ const named = ignore ? { name: feature.name } : feature;
14322
+ const singularName2 = named.singularName || named.name;
14323
+ const pluralName2 = named.pluralName || singularName2;
14324
+ return count !== void 0 && isOne(count, locale) ? singularName2 : pluralName2;
14325
+ }
14326
+ const resolvedCount = count ?? 0;
14327
+ const shouldBePlural = resolvedCount === 0 || resolvedCount > 1;
14289
14328
  const { name, singularName, pluralName } = feature;
14290
14329
  if (!ignore && pluralName && shouldBePlural) {
14291
14330
  return pluralName;
14292
14331
  }
14293
14332
  if (!ignore && singularName) {
14294
- return shouldBePlural ? pluralize(singularName, count) : singularName;
14333
+ return shouldBePlural ? pluralize(singularName, resolvedCount) : singularName;
14295
14334
  }
14296
- return pluralize(name, count);
14335
+ return pluralize(name, resolvedCount);
14297
14336
  }
14298
14337
 
14299
14338
  // src/utils/color.ts
@@ -14503,8 +14542,21 @@ function formatCurrency(amount, {
14503
14542
  function formatOrdinal(n2, t3) {
14504
14543
  return t3("Ordinal", { count: n2, ordinal: true });
14505
14544
  }
14506
- function adjectify(str) {
14507
- return `${str}ly`;
14545
+ function adjectify(period, t3) {
14546
+ switch (period) {
14547
+ case "day":
14548
+ return t3("daily");
14549
+ case "week":
14550
+ return t3("weekly");
14551
+ case "month":
14552
+ return t3("monthly");
14553
+ case "quarter":
14554
+ return t3("quarterly");
14555
+ case "year":
14556
+ return t3("yearly");
14557
+ default:
14558
+ return period;
14559
+ }
14508
14560
  }
14509
14561
  var CURRENCY_FLAGS = {
14510
14562
  usd: "\u{1F1FA}\u{1F1F8}",
@@ -14620,11 +14672,12 @@ function getBillingPreviewText({
14620
14672
  );
14621
14673
  }
14622
14674
  const schedule = scheduleParts.length > 0 ? `${scheduleParts.join(" ")} ` : "";
14675
+ const period = t3(planPeriod);
14623
14676
  if (!discount) {
14624
14677
  return t3("You will be billed", {
14625
14678
  price: subscriptionPrice,
14626
14679
  usage,
14627
- period: planPeriod,
14680
+ period,
14628
14681
  schedule
14629
14682
  });
14630
14683
  }
@@ -14633,7 +14686,7 @@ function getBillingPreviewText({
14633
14686
  return t3("You will be billed", {
14634
14687
  price: discountedPrice,
14635
14688
  usage,
14636
- period: planPeriod,
14689
+ period,
14637
14690
  schedule
14638
14691
  });
14639
14692
  }
@@ -14641,7 +14694,7 @@ function getBillingPreviewText({
14641
14694
  return t3("You will be billed with discount window", {
14642
14695
  price: discountedPrice,
14643
14696
  usage,
14644
- period: planPeriod,
14697
+ period,
14645
14698
  schedule,
14646
14699
  window: t3("for the next months", { count: durationInMonths }),
14647
14700
  fullPrice: subscriptionPrice
@@ -14650,7 +14703,7 @@ function getBillingPreviewText({
14650
14703
  return t3("You will be billed next bill discount", {
14651
14704
  price: discountedPrice,
14652
14705
  usage,
14653
- period: planPeriod,
14706
+ period,
14654
14707
  schedule,
14655
14708
  fullPrice: subscriptionPrice
14656
14709
  });
@@ -15425,7 +15478,7 @@ var reducer = (state, action) => {
15425
15478
  // src/context/EmbedProvider.tsx
15426
15479
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
15427
15480
  var getCustomHeaders = (sessionId) => ({
15428
- "X-Schematic-Components-Version": "2.28.0",
15481
+ "X-Schematic-Components-Version": "2.29.0",
15429
15482
  "X-Schematic-Session-ID": sessionId
15430
15483
  });
15431
15484
  var normalizeCurrencyFilter = (filter2) => {
@@ -16349,6 +16402,7 @@ function useRequest(fn) {
16349
16402
  import { useMemo as useMemo8 } from "react";
16350
16403
  function useTrialEnd() {
16351
16404
  const { data } = useEmbed();
16405
+ const { t: t3 } = useTranslation();
16352
16406
  const { endDate, amount, units } = useMemo8(() => {
16353
16407
  const billingSubscription = data?.company?.billingSubscription;
16354
16408
  const end = typeof billingSubscription?.trialEnd === "number" ? new Date(billingSubscription.trialEnd * 1e3) : void 0;
@@ -16371,10 +16425,10 @@ function useTrialEnd() {
16371
16425
  amount2 = Math.floor(difference / SECONDS_IN_MS);
16372
16426
  unit = "second";
16373
16427
  }
16374
- units2 = pluralize(unit, amount2);
16428
+ units2 = t3(unit, { count: amount2 });
16375
16429
  }
16376
16430
  return { endDate: end, amount: amount2, units: units2 };
16377
- }, [data?.company?.billingSubscription]);
16431
+ }, [data?.company?.billingSubscription, t3]);
16378
16432
  return { endDate, amount, units };
16379
16433
  }
16380
16434
 
@@ -17789,7 +17843,7 @@ var AutoTopupNotice = ({
17789
17843
  trigger: /* @__PURE__ */ jsx14(
17790
17844
  Icon3,
17791
17845
  {
17792
- title: "auto top-up",
17846
+ title: t3("Auto Top-up"),
17793
17847
  name: "info-rounded",
17794
17848
  color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
17795
17849
  style: { lineHeight: 0 }
@@ -17828,7 +17882,7 @@ var BillingThresholdTooltip = ({
17828
17882
  trigger: /* @__PURE__ */ jsx15(
17829
17883
  Icon3,
17830
17884
  {
17831
- title: "billing threshold",
17885
+ title: t3("Billing threshold"),
17832
17886
  name: "info-rounded",
17833
17887
  color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
17834
17888
  style: { lineHeight: 0 }
@@ -18024,7 +18078,7 @@ var Entitlement = ({
18024
18078
  packageSize,
18025
18079
  " "
18026
18080
  ] }),
18027
- getFeatureName(entitlement.feature, packageSize),
18081
+ getFeatureName(entitlement.feature, locale, packageSize),
18028
18082
  entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ jsxs8(Fragment4, { children: [
18029
18083
  " ",
18030
18084
  t3("per"),
@@ -18049,12 +18103,13 @@ var Entitlement = ({
18049
18103
  " ",
18050
18104
  getFeatureName(
18051
18105
  entitlement.valueCredit,
18106
+ locale,
18052
18107
  entitlement.consumptionRate || void 0
18053
18108
  ),
18054
18109
  " ",
18055
18110
  t3("per"),
18056
18111
  " ",
18057
- getFeatureName(entitlement.feature, 1)
18112
+ getFeatureName(entitlement.feature, locale, 1)
18058
18113
  ] });
18059
18114
  }
18060
18115
  if (entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && creditBasedEntitlementLimit) {
@@ -18062,13 +18117,17 @@ var Entitlement = ({
18062
18117
  amount: creditBasedEntitlementLimit.limit,
18063
18118
  units: getFeatureName(
18064
18119
  entitlement.feature,
18120
+ locale,
18065
18121
  creditBasedEntitlementLimit.limit
18066
18122
  ),
18067
- period: creditBasedEntitlementLimit.period
18123
+ period: t3(
18124
+ creditBasedEntitlementLimit.period
18125
+ )
18068
18126
  }) : t3("Up to X units", {
18069
18127
  amount: creditBasedEntitlementLimit.limit,
18070
18128
  units: getFeatureName(
18071
18129
  entitlement.feature,
18130
+ locale,
18072
18131
  creditBasedEntitlementLimit.limit
18073
18132
  )
18074
18133
  }) });
@@ -18076,11 +18135,11 @@ var Entitlement = ({
18076
18135
  if (hasNumericValue) {
18077
18136
  return /* @__PURE__ */ jsxs8(Fragment4, { children: [
18078
18137
  entitlement.valueType === EntitlementValueType.Unlimited && !entitlement.priceBehavior ? t3("Unlimited", {
18079
- item: getFeatureName(entitlement.feature)
18138
+ item: getFeatureName(entitlement.feature, locale)
18080
18139
  }) : typeof limit === "number" && /* @__PURE__ */ jsxs8(Fragment4, { children: [
18081
18140
  formatNumber(limit, { locale }),
18082
18141
  " ",
18083
- getFeatureName(entitlement.feature, limit)
18142
+ getFeatureName(entitlement.feature, locale, limit)
18084
18143
  ] }),
18085
18144
  metricPeriodName && /* @__PURE__ */ jsxs8(Fragment4, { children: [
18086
18145
  " ",
@@ -18119,7 +18178,7 @@ var Entitlement = ({
18119
18178
  packageSize,
18120
18179
  " "
18121
18180
  ] }),
18122
- getFeatureName(entitlement.feature, packageSize),
18181
+ getFeatureName(entitlement.feature, locale, packageSize),
18123
18182
  entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ jsxs8(Fragment4, { children: [
18124
18183
  "/",
18125
18184
  shortenPeriod(period, t3)
@@ -18459,7 +18518,7 @@ var AutoTopup = ({
18459
18518
  updateAutoTopupConfig
18460
18519
  }) => {
18461
18520
  const { settings } = useEmbed();
18462
- const { t: t3 } = useTranslation();
18521
+ const { t: t3, locale } = useTranslation();
18463
18522
  const cardPadding = settings.theme.card.padding / TEXT_BASE_SIZE;
18464
18523
  const configurableCreditGrants = useMemo12(() => {
18465
18524
  return planCreditGrants.reduce(
@@ -18506,7 +18565,7 @@ var AutoTopup = ({
18506
18565
  }) }) }),
18507
18566
  /* @__PURE__ */ jsx20(Box, { as: "p", $marginBottom: "2rem", children: /* @__PURE__ */ jsx20(Text, { children: t3(
18508
18567
  "Automatically purchase more credits when your balance is low",
18509
- { units: getFeatureName(grant.credit) }
18568
+ { units: getFeatureName(grant.credit, locale) }
18510
18569
  ) }) })
18511
18570
  ] }),
18512
18571
  /* @__PURE__ */ jsxs10(Flex, { $alignItems: "center", $gap: "0.5rem", $marginBottom: "1rem", children: [
@@ -18703,7 +18762,7 @@ var Quantity = ({
18703
18762
  $color: settings.theme.typography.text.color,
18704
18763
  children: t3("Currently using", {
18705
18764
  quantity: entitlement.usage,
18706
- unit: getFeatureName(entitlement.feature)
18765
+ unit: getFeatureName(entitlement.feature, locale)
18707
18766
  })
18708
18767
  }
18709
18768
  ),
@@ -18768,7 +18827,11 @@ var Quantity = ({
18768
18827
  packageSize,
18769
18828
  " "
18770
18829
  ] }),
18771
- getFeatureName(entitlement.feature, packageSize),
18830
+ getFeatureName(
18831
+ entitlement.feature,
18832
+ locale,
18833
+ packageSize
18834
+ ),
18772
18835
  "/",
18773
18836
  shortenPeriod(period, t3)
18774
18837
  ] })
@@ -18805,12 +18868,14 @@ var Quantity = ({
18805
18868
  quantity: entitlement.quantity,
18806
18869
  licenseName: getFeatureName(
18807
18870
  entitlement.feature,
18871
+ locale,
18808
18872
  entitlement.quantity
18809
18873
  ),
18810
18874
  perUnit: perLicenseGrant.amount,
18811
18875
  total: includedCredits,
18812
18876
  creditName: getFeatureName(
18813
18877
  licenseCredit,
18878
+ locale,
18814
18879
  includedCredits
18815
18880
  ),
18816
18881
  period: shortenPeriod(licenseCredit.period, t3)
@@ -18832,11 +18897,13 @@ var Quantity = ({
18832
18897
  added: addedQuantity,
18833
18898
  licenseName: getFeatureName(
18834
18899
  entitlement.feature,
18900
+ locale,
18835
18901
  addedQuantity
18836
18902
  ),
18837
18903
  credits: addedCredits,
18838
18904
  creditName: getFeatureName(
18839
18905
  licenseCredit,
18906
+ locale,
18840
18907
  addedCredits
18841
18908
  )
18842
18909
  }),
@@ -18846,9 +18913,10 @@ var Quantity = ({
18846
18913
  total: includedCredits,
18847
18914
  creditName: getFeatureName(
18848
18915
  licenseCredit,
18916
+ locale,
18849
18917
  includedCredits
18850
18918
  ),
18851
- cadence: adjectify(licenseCredit.period),
18919
+ cadence: adjectify(licenseCredit.period, t3),
18852
18920
  day: formatOrdinal(renewalDate.getDate(), t3)
18853
18921
  })
18854
18922
  ] })
@@ -18887,6 +18955,7 @@ function renderMeteredEntitlementPricing({
18887
18955
  "/",
18888
18956
  feature ? getFeatureName(
18889
18957
  feature,
18958
+ locale,
18890
18959
  packageSize
18891
18960
  ) : featureName || "unit"
18892
18961
  ] });
@@ -18904,6 +18973,7 @@ function renderMeteredEntitlementPricing({
18904
18973
  ] }),
18905
18974
  feature ? getFeatureName(
18906
18975
  feature,
18976
+ locale,
18907
18977
  packageSize
18908
18978
  ) : featureName || "unit"
18909
18979
  ] });
@@ -19221,7 +19291,7 @@ var Credits = ({
19221
19291
  /* @__PURE__ */ jsx23(Box, { children: /* @__PURE__ */ jsxs13(Text, { display: "heading6", children: [
19222
19292
  formatNumber(bundle.quantity ?? 0, { locale }),
19223
19293
  " ",
19224
- getFeatureName(bundle)
19294
+ getFeatureName(bundle, locale)
19225
19295
  ] }) })
19226
19296
  ] }),
19227
19297
  typeof price === "number" && /* @__PURE__ */ jsx23(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx23(Text, { children: formatCurrency(price, {
@@ -21180,7 +21250,7 @@ var CurrencyPeriodMismatchNotice = ({
21180
21250
  style: { opacity: 0.85, textAlign: "center" },
21181
21251
  children: t3("No {{currency}} price for the {{period}} billing period.", {
21182
21252
  currency: currency.toUpperCase(),
21183
- period
21253
+ period: adjectify(period, t3)
21184
21254
  })
21185
21255
  }
21186
21256
  )
@@ -21342,7 +21412,7 @@ var HardLimitTooltip = ({
21342
21412
  feature,
21343
21413
  limit
21344
21414
  }) => {
21345
- const { t: t3 } = useTranslation();
21415
+ const { t: t3, locale } = useTranslation();
21346
21416
  const { data } = useEmbed();
21347
21417
  const isLightBackground = useIsLightBackground();
21348
21418
  const showHardLimit = data?.displaySettings?.showHardLimit ?? false;
@@ -21356,7 +21426,7 @@ var HardLimitTooltip = ({
21356
21426
  trigger: /* @__PURE__ */ jsx32(
21357
21427
  Icon3,
21358
21428
  {
21359
- title: "limit",
21429
+ title: t3("Limit"),
21360
21430
  name: "info-rounded",
21361
21431
  color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
21362
21432
  style: { lineHeight: 0 }
@@ -21364,7 +21434,7 @@ var HardLimitTooltip = ({
21364
21434
  ),
21365
21435
  content: /* @__PURE__ */ jsx32(Text, { children: t3("Up to a limit of", {
21366
21436
  amount: limit,
21367
- units: getFeatureName(feature, limit)
21437
+ units: getFeatureName(feature, locale, limit)
21368
21438
  }) })
21369
21439
  }
21370
21440
  );
@@ -21733,7 +21803,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
21733
21803
  )
21734
21804
  ] }),
21735
21805
  stripe && collectEmail && /* @__PURE__ */ jsxs25(Box, { "data-field": "name", $marginBottom: "1.5rem", $verticalAlign: "top", children: [
21736
- /* @__PURE__ */ jsx36(Label, { htmlFor: "email", children: "Email" }),
21806
+ /* @__PURE__ */ jsx36(Label, { htmlFor: "email", children: t3("Email") }),
21737
21807
  /* @__PURE__ */ jsx36(
21738
21808
  Input2,
21739
21809
  {
@@ -21742,7 +21812,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
21742
21812
  type: "email",
21743
21813
  value: email,
21744
21814
  autoComplete: "email",
21745
- placeholder: "Enter email address",
21815
+ placeholder: t3("Enter email address"),
21746
21816
  required: true,
21747
21817
  onChange: (e) => {
21748
21818
  userEditedEmailRef.current = true;
@@ -21869,7 +21939,7 @@ var PeriodToggle = ({
21869
21939
  },
21870
21940
  $size: 15,
21871
21941
  $weight: option === selectedOption ? 600 : 400,
21872
- children: t3("Billed", { period: adjectify(option) })
21942
+ children: t3("Billed", { period: adjectify(option, t3) })
21873
21943
  }
21874
21944
  )
21875
21945
  },
@@ -21909,7 +21979,7 @@ var PlanCreditText = ({
21909
21979
  entitlements,
21910
21980
  children
21911
21981
  }) => {
21912
- const { t: t3 } = useTranslation();
21982
+ const { t: t3, locale } = useTranslation();
21913
21983
  const { settings } = useEmbed();
21914
21984
  const sources = entitlements ?? [];
21915
21985
  const { perLicenseGrants } = credit;
@@ -21917,7 +21987,7 @@ var PlanCreditText = ({
21917
21987
  return /* @__PURE__ */ jsxs26(Text, { children: [
21918
21988
  credit.quantity,
21919
21989
  " ",
21920
- getFeatureName(credit, credit.quantity),
21990
+ getFeatureName(credit, locale, credit.quantity),
21921
21991
  credit.period && /* @__PURE__ */ jsxs26(Fragment11, { children: [
21922
21992
  " ",
21923
21993
  t3("per"),
@@ -21929,18 +21999,18 @@ var PlanCreditText = ({
21929
21999
  }
21930
22000
  const resolveLicenseName = (grant) => {
21931
22001
  const licenseFeature = (findLicenseSource(sources, grant.licenseId) ?? (grant.licenseId ? void 0 : findSoleLicenseSource(sources)))?.feature;
21932
- return licenseFeature ? getFeatureName(licenseFeature, 1) : t3("license");
22002
+ return licenseFeature ? getFeatureName(licenseFeature, locale, 1) : t3("license");
21933
22003
  };
21934
22004
  return /* @__PURE__ */ jsxs26(Flex, { $flexDirection: "column", $gap: "0.25rem", children: [
21935
22005
  perLicenseGrants.map((grant, grantIndex) => /* @__PURE__ */ jsxs26(Text, { children: [
21936
22006
  credit.period ? t3("X credits per license per period", {
21937
22007
  amount: grant.amount,
21938
- creditName: getFeatureName(credit, grant.amount),
22008
+ creditName: getFeatureName(credit, locale, grant.amount),
21939
22009
  licenseName: resolveLicenseName(grant),
21940
22010
  period: t3(credit.period)
21941
22011
  }) : t3("X credits per license", {
21942
22012
  amount: grant.amount,
21943
- creditName: getFeatureName(credit, grant.amount),
22013
+ creditName: getFeatureName(credit, locale, grant.amount),
21944
22014
  licenseName: resolveLicenseName(grant)
21945
22015
  }),
21946
22016
  grantIndex === 0 && children
@@ -21953,7 +22023,7 @@ var PlanCreditText = ({
21953
22023
  $color: settings.theme.typography.text.color,
21954
22024
  children: t3("Plus X credits per period for your company", {
21955
22025
  amount: credit.fixedQuantity,
21956
- creditName: getFeatureName(credit, credit.fixedQuantity),
22026
+ creditName: getFeatureName(credit, locale, credit.fixedQuantity),
21957
22027
  period: t3(credit.period)
21958
22028
  })
21959
22029
  }
@@ -21982,7 +22052,7 @@ var PriceText = ({
21982
22052
  formatCurrency(perUnitPrice, { locale, currency }),
21983
22053
  /* @__PURE__ */ jsxs27("sub", { children: [
21984
22054
  "/",
21985
- getFeatureName(feature, 1)
22055
+ getFeatureName(feature, locale, 1)
21986
22056
  ] })
21987
22057
  ] });
21988
22058
  }
@@ -21999,7 +22069,7 @@ var PriceText = ({
21999
22069
  formatCurrency(perUnitPrice, { locale, currency }),
22000
22070
  /* @__PURE__ */ jsxs27("sub", { children: [
22001
22071
  "/",
22002
- getFeatureName(feature, 1)
22072
+ getFeatureName(feature, locale, 1)
22003
22073
  ] }),
22004
22074
  " + ",
22005
22075
  formatCurrency(flatAmount, { locale, currency }),
@@ -22060,7 +22130,7 @@ var PricingTiersTooltip = ({
22060
22130
  trigger: /* @__PURE__ */ jsx40(
22061
22131
  Icon3,
22062
22132
  {
22063
- title: "tiered pricing",
22133
+ title: t3("Tiered pricing"),
22064
22134
  name: "info-rounded",
22065
22135
  color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
22066
22136
  style: { lineHeight: 0 }
@@ -22569,11 +22639,11 @@ var EntitlementRow = (props) => {
22569
22639
  /* @__PURE__ */ jsx42(Box, { children: /* @__PURE__ */ jsx42(Text, { display: "heading4", children: priceBehavior === EntitlementPriceBehavior.PayInAdvance ? /* @__PURE__ */ jsxs30(Fragment14, { children: [
22570
22640
  quantity,
22571
22641
  " ",
22572
- getFeatureName(feature, quantity)
22642
+ getFeatureName(feature, locale, quantity)
22573
22643
  ] }) : priceBehavior === EntitlementPriceBehavior.Overage && typeof softLimit === "number" ? /* @__PURE__ */ jsxs30(Fragment14, { children: [
22574
22644
  softLimit,
22575
22645
  " ",
22576
- getFeatureName(feature, softLimit)
22646
+ getFeatureName(feature, locale, softLimit)
22577
22647
  ] }) : feature.name }) }),
22578
22648
  /* @__PURE__ */ jsx42(Box, { $whiteSpace: "nowrap", $lineHeight: 1, children: priceBehavior === EntitlementPriceBehavior.PayInAdvance ? (
22579
22649
  // A tiered scheme still resolves to a fixed amount at the chosen
@@ -22604,7 +22674,7 @@ var EntitlementRow = (props) => {
22604
22674
  packageSize,
22605
22675
  " "
22606
22676
  ] }),
22607
- getFeatureName(feature, packageSize),
22677
+ getFeatureName(feature, locale, packageSize),
22608
22678
  feature.featureType === FeatureType.Trait && /* @__PURE__ */ jsxs30(Fragment14, { children: [
22609
22679
  "/",
22610
22680
  shortenPeriod(planPeriod, t3)
@@ -22901,7 +22971,7 @@ var SubscriptionSidebar = forwardRef7(
22901
22971
  $color: settings.theme.typography.text.color,
22902
22972
  children: t3("Includes X credits per period", {
22903
22973
  total: includedCredits,
22904
- creditName: getFeatureName(credit, includedCredits),
22974
+ creditName: getFeatureName(credit, locale, includedCredits),
22905
22975
  period: shortenPeriod(credit.period, t3)
22906
22976
  })
22907
22977
  }
@@ -23639,7 +23709,7 @@ var SubscriptionSidebar = forwardRef7(
23639
23709
  /* @__PURE__ */ jsx44(Box, { children: /* @__PURE__ */ jsxs32(Text, { children: [
23640
23710
  formatNumber(amount, { locale }),
23641
23711
  " ",
23642
- getFeatureName(bundle, amount),
23712
+ getFeatureName(bundle, locale, amount),
23643
23713
  expiry && ` \xB7 ${expiry}`
23644
23714
  ] }) })
23645
23715
  ] }),
@@ -23933,21 +24003,21 @@ var TieredPricingDetails = ({
23933
24003
  if (flatAmount === 0 && perUnitPrice === 0) {
23934
24004
  return t3("Up to X units for free", {
23935
24005
  X: upTo,
23936
- units: getFeatureName(entitlement.feature, upTo)
24006
+ units: getFeatureName(entitlement.feature, locale, upTo)
23937
24007
  });
23938
24008
  }
23939
24009
  if (flatAmount === 0 && perUnitPrice > 0) {
23940
24010
  return t3("Up to X units at $Y/unit", {
23941
24011
  X: upTo,
23942
- units: getFeatureName(entitlement.feature, upTo),
24012
+ units: getFeatureName(entitlement.feature, locale, upTo),
23943
24013
  Y: formatCurrency(perUnitPrice, { locale, currency }),
23944
- unit: getFeatureName(entitlement.feature, 1)
24014
+ unit: getFeatureName(entitlement.feature, locale, 1)
23945
24015
  });
23946
24016
  }
23947
24017
  if (flatAmount > 0 && perUnitPrice === 0) {
23948
24018
  return t3("Up to X units for $Y/period", {
23949
24019
  X: upTo,
23950
- units: getFeatureName(entitlement.feature, upTo),
24020
+ units: getFeatureName(entitlement.feature, locale, upTo),
23951
24021
  Y: formatCurrency(flatAmount, { locale, currency }),
23952
24022
  period
23953
24023
  });
@@ -23955,9 +24025,9 @@ var TieredPricingDetails = ({
23955
24025
  if (flatAmount > 0 && perUnitPrice > 0) {
23956
24026
  return t3("Up to X units at $Y/unit + $Z/period", {
23957
24027
  X: upTo,
23958
- units: getFeatureName(entitlement.feature, upTo),
24028
+ units: getFeatureName(entitlement.feature, locale, upTo),
23959
24029
  Y: formatCurrency(perUnitPrice, { locale, currency }),
23960
- unit: getFeatureName(entitlement.feature, 1),
24030
+ unit: getFeatureName(entitlement.feature, locale, 1),
23961
24031
  Z: formatCurrency(flatAmount, { locale, currency }),
23962
24032
  period
23963
24033
  });
@@ -24260,6 +24330,7 @@ var Badge = () => {
24260
24330
  // src/components/layout/RenderLayout.tsx
24261
24331
  import { jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
24262
24332
  var Disabled = () => {
24333
+ const { t: t3 } = useTranslation();
24263
24334
  return /* @__PURE__ */ jsx48(Box, { $width: "max-content", $height: "max-content", children: /* @__PURE__ */ jsx48(Card, { children: /* @__PURE__ */ jsxs35(
24264
24335
  Element,
24265
24336
  {
@@ -24269,8 +24340,8 @@ var Disabled = () => {
24269
24340
  $alignItems: "center",
24270
24341
  $whiteSpace: "nowrap",
24271
24342
  children: [
24272
- /* @__PURE__ */ jsx48(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx48(Text, { as: "h1", display: "heading1", children: "Portal not found" }) }),
24273
- /* @__PURE__ */ jsx48(Text, { as: "p", children: "Please try again later." })
24343
+ /* @__PURE__ */ jsx48(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx48(Text, { as: "h1", display: "heading1", children: t3("Portal not found") }) }),
24344
+ /* @__PURE__ */ jsx48(Text, { as: "p", children: t3("Please try again later.") })
24274
24345
  ]
24275
24346
  }
24276
24347
  ) }) });
@@ -24464,12 +24535,12 @@ var UsageDetails = ({ entitlement, layout }) => {
24464
24535
  if (priceBehavior === EntitlementPriceBehavior.PayInAdvance && typeof allocation === "number") {
24465
24536
  return t3("X units", {
24466
24537
  amount: formatNumber(allocation, { locale }),
24467
- units: getFeatureName(feature, allocation)
24538
+ units: getFeatureName(feature, locale, allocation)
24468
24539
  });
24469
24540
  }
24470
24541
  if (priceBehavior === EntitlementPriceBehavior.PayAsYouGo && typeof price === "number") {
24471
24542
  const formattedCost = formatCurrency(price, { locale, currency });
24472
- const featureName = getFeatureName(feature, packageSize);
24543
+ const featureName = getFeatureName(feature, locale, packageSize);
24473
24544
  return packageSize > 1 ? t3("$X per Y units", {
24474
24545
  cost: formattedCost,
24475
24546
  size: packageSize,
@@ -24479,15 +24550,15 @@ var UsageDetails = ({ entitlement, layout }) => {
24479
24550
  if (priceBehavior === EntitlementPriceBehavior.Overage && typeof softLimit === "number") {
24480
24551
  return t3("X units", {
24481
24552
  amount: formatNumber(softLimit, { locale }),
24482
- units: getFeatureName(feature, softLimit)
24553
+ units: getFeatureName(feature, locale, softLimit)
24483
24554
  });
24484
24555
  }
24485
24556
  if (priceBehavior === EntitlementPriceBehavior.Tier) {
24486
24557
  return typeof currentTier?.to === "number" && (currentTier?.to === Infinity ? t3("Unlimited in this tier", {
24487
- feature: getFeatureName(feature)
24558
+ feature: getFeatureName(feature, locale)
24488
24559
  }) : t3("Up to X units in this tier", {
24489
24560
  amount: formatNumber(currentTier.to, { locale }),
24490
- feature: getFeatureName(feature, currentTier.to)
24561
+ feature: getFeatureName(feature, locale, currentTier.to)
24491
24562
  }));
24492
24563
  }
24493
24564
  if (showCredits && priceBehavior === EntitlementPriceBehavior.CreditBurndown && planEntitlement?.valueCredit && typeof planEntitlement?.consumptionRate === "number") {
@@ -24495,6 +24566,7 @@ var UsageDetails = ({ entitlement, layout }) => {
24495
24566
  amount: formatConsumptionRate(planEntitlement.consumptionRate, locale),
24496
24567
  units: getFeatureName(
24497
24568
  planEntitlement.valueCredit,
24569
+ locale,
24498
24570
  planEntitlement.consumptionRate
24499
24571
  )
24500
24572
  });
@@ -24502,18 +24574,18 @@ var UsageDetails = ({ entitlement, layout }) => {
24502
24574
  if (priceBehavior === EntitlementPriceBehavior.CreditBurndown && typeof limit === "number") {
24503
24575
  return t3("X units remaining", {
24504
24576
  amount: formatNumber(limit, { locale }),
24505
- units: getFeatureName(feature, limit)
24577
+ units: getFeatureName(feature, locale, limit)
24506
24578
  });
24507
24579
  }
24508
24580
  if (!priceBehavior && typeof allocation === "number") {
24509
24581
  const numericLimit = limit ?? allocation;
24510
24582
  return t3("X units", {
24511
24583
  amount: formatNumber(numericLimit, { locale }),
24512
- units: getFeatureName(feature, numericLimit)
24584
+ units: getFeatureName(feature, locale, numericLimit)
24513
24585
  });
24514
24586
  }
24515
24587
  if (!priceBehavior && allocationType === "unlimited") {
24516
- return t3("Unlimited", { item: getFeatureName(feature) });
24588
+ return t3("Unlimited", { item: getFeatureName(feature, locale) });
24517
24589
  }
24518
24590
  }, [
24519
24591
  t3,
@@ -24542,11 +24614,11 @@ var UsageDetails = ({ entitlement, layout }) => {
24542
24614
  /* @__PURE__ */ jsx51(Fragment17, { children: packageSize > 1 ? t3("$X/Y units/period", {
24543
24615
  cost: formatCurrency(price, { locale, currency }),
24544
24616
  size: packageSize,
24545
- units: getFeatureName(feature, packageSize),
24617
+ units: getFeatureName(feature, locale, packageSize),
24546
24618
  period: shortenPeriod(period, t3)
24547
24619
  }) : t3("$X/unit/period", {
24548
24620
  cost: formatCurrency(price, { locale, currency }),
24549
- unit: getFeatureName(feature, packageSize),
24621
+ unit: getFeatureName(feature, locale, packageSize),
24550
24622
  period: shortenPeriod(period, t3)
24551
24623
  }) }, index)
24552
24624
  );
@@ -24555,7 +24627,7 @@ var UsageDetails = ({ entitlement, layout }) => {
24555
24627
  acc.push(
24556
24628
  /* @__PURE__ */ jsx51(Fragment17, { children: t3("X units used", {
24557
24629
  amount: usage,
24558
- units: getFeatureName(feature, usage)
24630
+ units: getFeatureName(feature, locale, usage)
24559
24631
  }) }, index)
24560
24632
  );
24561
24633
  index += 1;
@@ -24785,9 +24857,10 @@ var IncludedFeatures = forwardRef10(({ className, ...rest }, ref) => {
24785
24857
  singularName: grant.singularName,
24786
24858
  pluralName: grant.pluralName
24787
24859
  },
24860
+ locale,
24788
24861
  grant.creditAmount
24789
24862
  ),
24790
- licenseName: entitlement.feature ? getFeatureName(entitlement.feature, 1) : ""
24863
+ licenseName: entitlement.feature ? getFeatureName(entitlement.feature, locale, 1) : ""
24791
24864
  }) }, grantIndex)),
24792
24865
  props.entitlementExpiration.isVisible && entitlement.entitlementExpirationDate && /* @__PURE__ */ jsx52(
24793
24866
  Text,
@@ -25121,7 +25194,7 @@ var PriceDetails = ({
25121
25194
  packageSize,
25122
25195
  " "
25123
25196
  ] }),
25124
- getFeatureName(feature, packageSize),
25197
+ getFeatureName(feature, locale, packageSize),
25125
25198
  feature.featureType === FeatureType.Trait && period && /* @__PURE__ */ jsxs40(Fragment21, { children: [
25126
25199
  "/",
25127
25200
  shortenPeriod(period, t3)
@@ -25146,7 +25219,7 @@ var PriceDetails = ({
25146
25219
  typeof amount === "number" && /* @__PURE__ */ jsx55(Fragment21, { children: priceBehavior === EntitlementPriceBehavior.Overage ? /* @__PURE__ */ jsxs40(Text, { children: [
25147
25220
  formatNumber(amount, { locale }),
25148
25221
  " ",
25149
- getFeatureName(feature, amount),
25222
+ getFeatureName(feature, locale, amount),
25150
25223
  " \xB7 ",
25151
25224
  formatCurrency(currentTierPerUnitPrice * amount, {
25152
25225
  locale,
@@ -25274,7 +25347,7 @@ var UsageByUser = ({ source, unit }) => {
25274
25347
  const total = current?.section?.total ?? 0;
25275
25348
  const totalUsers = current?.section?.totalUsers ?? 0;
25276
25349
  const unattributed = current?.section?.unattributed;
25277
- const formatAmount = (amount) => `${formatNumber(amount, { locale })} ${getFeatureName(unit, amount)}`;
25350
+ const formatAmount = (amount) => `${formatNumber(amount, { locale })} ${getFeatureName(unit, locale, amount)}`;
25278
25351
  if (error) {
25279
25352
  return /* @__PURE__ */ jsxs41(Flex, { $flexDirection: "column", $gap: "0.5rem", $alignItems: "flex-start", children: [
25280
25353
  /* @__PURE__ */ jsx56(Text, { display: "heading4", children: t3("Usage by user") }),
@@ -25379,10 +25452,10 @@ var Limit = ({ entitlement, usageDetails, fontStyle }) => {
25379
25452
  const acc = [];
25380
25453
  acc.push(
25381
25454
  priceBehavior === EntitlementPriceBehavior.Tier && typeof currentTier?.to === "number" && typeof feature !== "undefined" ? currentTier?.to === Infinity ? t3("Unlimited in this tier", {
25382
- feature: getFeatureName(feature)
25455
+ feature: getFeatureName(feature, locale)
25383
25456
  }) : t3("Up to X units in this tier", {
25384
25457
  amount: currentTier.to,
25385
- feature: getFeatureName(feature)
25458
+ feature: getFeatureName(feature, locale)
25386
25459
  }) : priceBehavior === EntitlementPriceBehavior.Overage && typeof limit === "number" ? t3("X included", {
25387
25460
  amount: formatNumber(limit, { locale })
25388
25461
  }) : priceBehavior === EntitlementPriceBehavior.PayInAdvance && typeof usage === "number" ? `${formatNumber(usage, { locale })} ${t3("used")}` : priceBehavior === EntitlementPriceBehavior.PayAsYouGo && typeof cost === "number" ? formatCurrency(cost, { locale, currency: billingPrice?.currency }) : data?.displaySettings?.showCredits && priceBehavior === EntitlementPriceBehavior.CreditBurndown && typeof planEntitlement?.valueCredit !== "undefined" && typeof planEntitlement?.consumptionRate === "number" ? t3("X units per use", {
@@ -25392,11 +25465,12 @@ var Limit = ({ entitlement, usageDetails, fontStyle }) => {
25392
25465
  ),
25393
25466
  units: getFeatureName(
25394
25467
  planEntitlement.valueCredit,
25468
+ locale,
25395
25469
  planEntitlement.consumptionRate
25396
25470
  )
25397
25471
  }) : priceBehavior === EntitlementPriceBehavior.CreditBurndown && typeof feature !== "undefined" && typeof limit === "number" ? t3("X units remaining", {
25398
25472
  amount: formatNumber(limit, { locale }),
25399
- units: getFeatureName(feature, limit)
25473
+ units: getFeatureName(feature, locale, limit)
25400
25474
  }) : typeof limit === "number" ? t3("Limit of", {
25401
25475
  amount: formatNumber(limit, { locale })
25402
25476
  }) : t3("No limit")
@@ -25598,11 +25672,11 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25598
25672
  formatNumber(limit, { locale }),
25599
25673
  " "
25600
25674
  ] }),
25601
- getFeatureName(feature, limit)
25675
+ getFeatureName(feature, locale, limit)
25602
25676
  ] }) : typeof usage === "number" && /* @__PURE__ */ jsxs42(Fragment22, { children: [
25603
25677
  formatNumber(usage, { locale }),
25604
25678
  " ",
25605
- getFeatureName(feature, usage),
25679
+ getFeatureName(feature, locale, usage),
25606
25680
  " ",
25607
25681
  t3("used")
25608
25682
  ] }) }) }),
@@ -25691,6 +25765,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25691
25765
  }),
25692
25766
  units: getFeatureName(
25693
25767
  credit,
25768
+ locale,
25694
25769
  credit.total.remaining
25695
25770
  )
25696
25771
  }) }) }),
@@ -25732,6 +25807,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25732
25807
  quantity: licenseQuantity,
25733
25808
  licenseName: getFeatureName(
25734
25809
  licenseFeature,
25810
+ locale,
25735
25811
  licenseQuantity
25736
25812
  ),
25737
25813
  perUnit: perLicenseGrant.amount
@@ -25756,7 +25832,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25756
25832
  children: [
25757
25833
  t3("Your plan includes credits", {
25758
25834
  total,
25759
- creditName: getFeatureName(credit, total),
25835
+ creditName: getFeatureName(credit, locale, total),
25760
25836
  period: shortenPeriod(composition.period, t3),
25761
25837
  composition: ` \u2014 ${parts.join(" + ")}`
25762
25838
  }),
@@ -25791,6 +25867,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25791
25867
  amount: grant.quantity,
25792
25868
  item: getFeatureName(
25793
25869
  credit,
25870
+ locale,
25794
25871
  grant.quantity
25795
25872
  )
25796
25873
  }) }) }),
@@ -25812,7 +25889,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25812
25889
  ] }) : /* @__PURE__ */ jsxs42(Fragment22, { children: [
25813
25890
  /* @__PURE__ */ jsx57(Box, { $display: "table-cell", $padding: padding, children: /* @__PURE__ */ jsx57(Text, { children: grant.grantReason === BillingCreditGrantReason.Purchased ? /* @__PURE__ */ jsx57(Fragment22, { children: t3("X item bundle", {
25814
25891
  amount: grant.quantity,
25815
- item: getFeatureName(credit, 1),
25892
+ item: getFeatureName(credit, locale, 1),
25816
25893
  createdAt: toPrettyDate(
25817
25894
  grant.createdAt,
25818
25895
  { locale, month: "short" }
@@ -25821,6 +25898,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25821
25898
  amount: grant.quantity,
25822
25899
  item: getFeatureName(
25823
25900
  credit,
25901
+ locale,
25824
25902
  grant.quantity
25825
25903
  ),
25826
25904
  createdAt: toPrettyDate(
@@ -25831,6 +25909,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25831
25909
  amount: grant.quantity,
25832
25910
  item: getFeatureName(
25833
25911
  credit,
25912
+ locale,
25834
25913
  grant.quantity
25835
25914
  ),
25836
25915
  createdAt: toPrettyDate(
@@ -26798,7 +26877,7 @@ var UsageDetails2 = ({
26798
26877
  packageSize,
26799
26878
  " "
26800
26879
  ] }),
26801
- getFeatureName(entitlement.feature, packageSize),
26880
+ getFeatureName(entitlement.feature, locale, packageSize),
26802
26881
  entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ jsxs46(Fragment24, { children: [
26803
26882
  "/",
26804
26883
  shortenPeriod(period, t3)
@@ -26818,6 +26897,7 @@ var UsageDetails2 = ({
26818
26897
  " ",
26819
26898
  getFeatureName(
26820
26899
  entitlement.planEntitlement.valueCredit,
26900
+ locale,
26821
26901
  entitlement.planEntitlement.consumptionRate
26822
26902
  ),
26823
26903
  " ",
@@ -26853,7 +26933,7 @@ var UsageDetails2 = ({
26853
26933
  /* @__PURE__ */ jsx62(Text, { display: layout.addOns.fontStyle, children: typeof quantity === "number" ? /* @__PURE__ */ jsxs46(Fragment24, { children: [
26854
26934
  quantity,
26855
26935
  " ",
26856
- getFeatureName(entitlement.feature, quantity, true)
26936
+ getFeatureName(entitlement.feature, locale, quantity, true)
26857
26937
  ] }) : entitlement.feature.name }),
26858
26938
  /* @__PURE__ */ jsxs46(Text, { children: [
26859
26939
  description.length > 0 && /* @__PURE__ */ jsx62(
@@ -27314,9 +27394,14 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27314
27394
  amount: perLicenseGrant.amount,
27315
27395
  creditName: getFeatureName(
27316
27396
  group,
27397
+ locale,
27317
27398
  perLicenseGrant.amount
27318
27399
  ),
27319
- licenseName: getFeatureName(licenseFeature, 1)
27400
+ licenseName: getFeatureName(
27401
+ licenseFeature,
27402
+ locale,
27403
+ 1
27404
+ )
27320
27405
  }),
27321
27406
  composition.fixedQuantity > 0 && creditPeriod && /* @__PURE__ */ jsxs47(Fragment25, { children: [
27322
27407
  " ",
@@ -27324,6 +27409,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27324
27409
  amount: composition.fixedQuantity,
27325
27410
  creditName: getFeatureName(
27326
27411
  group,
27412
+ locale,
27327
27413
  composition.fixedQuantity
27328
27414
  ),
27329
27415
  period: t3(
@@ -27334,7 +27420,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27334
27420
  ] }) : /* @__PURE__ */ jsxs47(Fragment25, { children: [
27335
27421
  group.total.value,
27336
27422
  " ",
27337
- getFeatureName(group, group.total.value),
27423
+ getFeatureName(group, locale, group.total.value),
27338
27424
  " ",
27339
27425
  subscriptionInterval && /* @__PURE__ */ jsxs47(Fragment25, { children: [
27340
27426
  t3("per"),
@@ -27377,6 +27463,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27377
27463
  quantity: licenseQuantity,
27378
27464
  licenseName: getFeatureName(
27379
27465
  licenseFeature,
27466
+ locale,
27380
27467
  licenseQuantity
27381
27468
  ),
27382
27469
  perUnit: perLicenseGrant.amount,
@@ -27384,6 +27471,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27384
27471
  total: resolvedTotal,
27385
27472
  creditName: getFeatureName(
27386
27473
  group,
27474
+ locale,
27387
27475
  resolvedTotal
27388
27476
  ),
27389
27477
  period: shortenPeriod(creditPeriod, t3)
@@ -27391,12 +27479,14 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27391
27479
  quantity: licenseQuantity,
27392
27480
  licenseName: getFeatureName(
27393
27481
  licenseFeature,
27482
+ locale,
27394
27483
  licenseQuantity
27395
27484
  ),
27396
27485
  perUnit: perLicenseGrant.amount,
27397
27486
  total: resolvedTotal,
27398
27487
  creditName: getFeatureName(
27399
27488
  group,
27489
+ locale,
27400
27490
  resolvedTotal
27401
27491
  ),
27402
27492
  period: shortenPeriod(creditPeriod, t3)
@@ -27438,7 +27528,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27438
27528
  if (!autoTopupEnabled) {
27439
27529
  acc.push(
27440
27530
  /* @__PURE__ */ jsx63(Text, { $leading: "tight", children: t3("Auto top-up disabled for token", {
27441
- unit: getFeatureName(grant.credit, 1)
27531
+ unit: getFeatureName(grant.credit, locale, 1)
27442
27532
  }) }, grant.id)
27443
27533
  );
27444
27534
  return acc;
@@ -27450,6 +27540,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27450
27540
  /* @__PURE__ */ jsx63(Text, { $leading: "tight", children: t3("Adds X tokens when Y remaining in balance", {
27451
27541
  unit: getFeatureName(
27452
27542
  grant.credit,
27543
+ locale,
27453
27544
  autoTopupAmount
27454
27545
  ),
27455
27546
  amount: autoTopupAmount,
@@ -27509,7 +27600,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27509
27600
  " (",
27510
27601
  group.quantity,
27511
27602
  " ",
27512
- getFeatureName(group, group.quantity),
27603
+ getFeatureName(group, locale, group.quantity),
27513
27604
  ")"
27514
27605
  ] }) : /* @__PURE__ */ jsxs47(Text, { display: props.addOns.fontStyle, children: [
27515
27606
  group.grants.length > 1 && /* @__PURE__ */ jsxs47(Text, { style: { opacity: 0.5 }, children: [
@@ -27520,7 +27611,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27520
27611
  ] }),
27521
27612
  group.quantity,
27522
27613
  " ",
27523
- getFeatureName(group, group.quantity)
27614
+ getFeatureName(group, locale, group.quantity)
27524
27615
  ] }),
27525
27616
  group.total.used > 0 && /* @__PURE__ */ jsxs47(
27526
27617
  Text,
@@ -27580,12 +27671,12 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27580
27671
  " (",
27581
27672
  group.quantity,
27582
27673
  " ",
27583
- getFeatureName(group, group.quantity),
27674
+ getFeatureName(group, locale, group.quantity),
27584
27675
  ")"
27585
27676
  ] }) : /* @__PURE__ */ jsxs47(Text, { display: props.addOns.fontStyle, children: [
27586
27677
  group.quantity,
27587
27678
  " ",
27588
- getFeatureName(group, group.quantity)
27679
+ getFeatureName(group, locale, group.quantity)
27589
27680
  ] }),
27590
27681
  group.total.used > 0 && /* @__PURE__ */ jsxs47(
27591
27682
  Text,
@@ -27636,7 +27727,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27636
27727
  /* @__PURE__ */ jsxs47(Text, { display: props.addOns.fontStyle, children: [
27637
27728
  group.quantity,
27638
27729
  " ",
27639
- getFeatureName(group, group.quantity)
27730
+ getFeatureName(group, locale, group.quantity)
27640
27731
  ] }),
27641
27732
  group.total.used > 0 && /* @__PURE__ */ jsxs47(
27642
27733
  Text,
@@ -27716,6 +27807,7 @@ function renderMeteredEntitlementPricing2({
27716
27807
  "/",
27717
27808
  feature ? getFeatureName(
27718
27809
  feature,
27810
+ locale,
27719
27811
  packageSize
27720
27812
  ) : featureName || "unit"
27721
27813
  ] });
@@ -27733,6 +27825,7 @@ function renderMeteredEntitlementPricing2({
27733
27825
  ] }),
27734
27826
  feature ? getFeatureName(
27735
27827
  feature,
27828
+ locale,
27736
27829
  packageSize
27737
27830
  ) : featureName || "unit"
27738
27831
  ] });
@@ -27922,7 +28015,7 @@ var AddOn2 = ({
27922
28015
  {
27923
28016
  $flexDirection: "column",
27924
28017
  $justifyContent: "center",
27925
- children: /* @__PURE__ */ jsx64(Text, { children: getFeatureName(entitlement.feature) })
28018
+ children: /* @__PURE__ */ jsx64(Text, { children: getFeatureName(entitlement.feature, locale) })
27926
28019
  }
27927
28020
  )
27928
28021
  ] }),
@@ -28084,7 +28177,11 @@ var Entitlement2 = ({
28084
28177
  formatNumber(entitlementPackageSize, { locale }),
28085
28178
  " "
28086
28179
  ] }),
28087
- getFeatureName(entitlement.feature, entitlementPackageSize),
28180
+ getFeatureName(
28181
+ entitlement.feature,
28182
+ locale,
28183
+ entitlementPackageSize
28184
+ ),
28088
28185
  entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ jsxs49(Fragment27, { children: [
28089
28186
  " ",
28090
28187
  t3("per"),
@@ -28102,12 +28199,13 @@ var Entitlement2 = ({
28102
28199
  " ",
28103
28200
  getFeatureName(
28104
28201
  entitlement.valueCredit,
28202
+ locale,
28105
28203
  entitlement.consumptionRate
28106
28204
  ),
28107
28205
  " ",
28108
28206
  t3("per"),
28109
28207
  " ",
28110
- getFeatureName(entitlement.feature, 1)
28208
+ getFeatureName(entitlement.feature, locale, 1)
28111
28209
  ] }) : entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && creditBasedEntitlementLimit ? /* @__PURE__ */ jsx65(Fragment27, { children: creditBasedEntitlementLimit?.period ? t3("Up to X units per period", {
28112
28210
  amount: formatNumber(
28113
28211
  creditBasedEntitlementLimit.limit,
@@ -28115,9 +28213,12 @@ var Entitlement2 = ({
28115
28213
  ),
28116
28214
  units: getFeatureName(
28117
28215
  entitlement.feature,
28216
+ locale,
28118
28217
  creditBasedEntitlementLimit.limit
28119
28218
  ),
28120
- period: creditBasedEntitlementLimit.period
28219
+ period: t3(
28220
+ creditBasedEntitlementLimit.period
28221
+ )
28121
28222
  }) : t3("Up to X units", {
28122
28223
  amount: formatNumber(
28123
28224
  creditBasedEntitlementLimit.limit,
@@ -28125,17 +28226,18 @@ var Entitlement2 = ({
28125
28226
  ),
28126
28227
  units: getFeatureName(
28127
28228
  entitlement.feature,
28229
+ locale,
28128
28230
  creditBasedEntitlementLimit.limit
28129
28231
  )
28130
28232
  }) }) : entitlement.valueType === EntitlementValueType.Numeric || entitlement.valueType === EntitlementValueType.Unlimited || entitlement.valueType === EntitlementValueType.Trait ? /* @__PURE__ */ jsxs49(Fragment27, { children: [
28131
28233
  entitlement.valueType === EntitlementValueType.Unlimited && !entitlement.priceBehavior ? t3("Unlimited", {
28132
- item: getFeatureName(entitlement.feature)
28234
+ item: getFeatureName(entitlement.feature, locale)
28133
28235
  }) : /* @__PURE__ */ jsxs49(Fragment27, { children: [
28134
28236
  typeof limit === "number" && /* @__PURE__ */ jsxs49(Fragment27, { children: [
28135
28237
  formatNumber(limit, { locale }),
28136
28238
  " "
28137
28239
  ] }),
28138
- getFeatureName(entitlement.feature, limit)
28240
+ getFeatureName(entitlement.feature, locale, limit)
28139
28241
  ] }),
28140
28242
  metricPeriodName && /* @__PURE__ */ jsxs49(Fragment27, { children: [
28141
28243
  " ",
@@ -28164,6 +28266,7 @@ var Entitlement2 = ({
28164
28266
  ] }),
28165
28267
  getFeatureName(
28166
28268
  entitlement.feature,
28269
+ locale,
28167
28270
  entitlementPackageSize
28168
28271
  ),
28169
28272
  entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ jsxs49(Fragment27, { children: [
@@ -28643,7 +28746,7 @@ var PricingTable = forwardRef15(({ className, ...rest }, ref) => {
28643
28746
  $alignItems: "center",
28644
28747
  $justifyContent: "center",
28645
28748
  $padding: `${settings.theme.card.padding / TEXT_BASE_SIZE}rem`,
28646
- children: /* @__PURE__ */ jsx67(Loader, { "aria-label": "loading", $size: "2xl" })
28749
+ children: /* @__PURE__ */ jsx67(Loader, { "aria-label": t3("Loading"), $size: "2xl" })
28647
28750
  }
28648
28751
  );
28649
28752
  }
@@ -31860,6 +31963,7 @@ var Loading = () => {
31860
31963
  };
31861
31964
  var Error2 = ({ message }) => {
31862
31965
  const { settings } = useEmbed();
31966
+ const { t: t3 } = useTranslation();
31863
31967
  return /* @__PURE__ */ jsxs53(
31864
31968
  Flex,
31865
31969
  {
@@ -31871,7 +31975,7 @@ var Error2 = ({ message }) => {
31871
31975
  $alignItems: "center",
31872
31976
  $justifyContent: "center",
31873
31977
  children: [
31874
- /* @__PURE__ */ jsx71(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx71(Text, { display: "heading1", children: "Error" }) }),
31978
+ /* @__PURE__ */ jsx71(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx71(Text, { display: "heading1", children: t3("Error") }) }),
31875
31979
  /* @__PURE__ */ jsx71(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx71(Text, { children: message }) })
31876
31980
  ]
31877
31981
  }
@@ -31879,6 +31983,7 @@ var Error2 = ({ message }) => {
31879
31983
  };
31880
31984
  var SchematicEmbed = ({ id, accessToken }) => {
31881
31985
  const theme = useContext3(nt);
31986
+ const { t: t3 } = useTranslation();
31882
31987
  const {
31883
31988
  data,
31884
31989
  error,
@@ -31949,13 +32054,15 @@ var SchematicEmbed = ({ id, accessToken }) => {
31949
32054
  return /* @__PURE__ */ jsx71(Error2, { message: error.message });
31950
32055
  }
31951
32056
  if (accessToken?.length === 0) {
31952
- return /* @__PURE__ */ jsx71(Error2, { message: "Please provide an access token." });
32057
+ return /* @__PURE__ */ jsx71(Error2, { message: t3("Please provide an access token.") });
31953
32058
  }
31954
32059
  if (!accessToken?.startsWith("token_")) {
31955
32060
  return /* @__PURE__ */ jsx71(
31956
32061
  Error2,
31957
32062
  {
31958
- message: 'Invalid access token; your temporary access token will start with "token_".'
32063
+ message: t3(
32064
+ "Invalid access token; your temporary access token will start with `token_`."
32065
+ )
31959
32066
  }
31960
32067
  );
31961
32068
  }