@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.
@@ -13259,6 +13259,7 @@ var en = {
13259
13259
  "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.",
13260
13260
  "An unknown error occurred.": "An unknown error occurred.",
13261
13261
  "Billed": "Billed {{period}}",
13262
+ "Billing threshold": "Billing threshold",
13262
13263
  "Bundle selected": "Bundle selected",
13263
13264
  "Buy credits": "Buy credits",
13264
13265
  "Cancel": "Cancel",
@@ -13293,8 +13294,11 @@ var en = {
13293
13294
  "Due today": "Due today",
13294
13295
  "Edit payment details": "Edit payment details",
13295
13296
  "Edit": "Edit",
13297
+ "Email": "Email",
13296
13298
  "Ends on": "Ends on {{date}}",
13297
13299
  "Enter discount code": "Enter discount code",
13300
+ "Enter email address": "Enter email address",
13301
+ "Error": "Error",
13298
13302
  "Error initializing payment method change. Please try again.": "Error initializing payment method change. Please try again.",
13299
13303
  "Error processing payment. Please try a different payment method.": "Error processing payment. Please try a different payment method.",
13300
13304
  "Error retrieving plan details. Please try again in a moment.": "Error retrieving plan details. Please try again in a moment.",
@@ -13315,6 +13319,7 @@ var en = {
13315
13319
  "Invoice credit tooltip": "Credit \u2014 this amount was returned to your account, typically due to a plan change or proration",
13316
13320
  "Invoice charge tooltip": "Charge \u2014 you were billed this amount",
13317
13321
  "Invoices": "Invoices",
13322
+ "Limit": "Limit",
13318
13323
  "Limit of": "Limit of {{amount}}",
13319
13324
  "Loading": "Loading",
13320
13325
  "Manage plan": "Manage plan",
@@ -13339,6 +13344,8 @@ var en = {
13339
13344
  "Payment Details": "Payment Details",
13340
13345
  "Plan selected": "Plan selected",
13341
13346
  "Please accept the agreement to continue.": "Please accept the agreement to continue.",
13347
+ "Please try again later.": "Please try again later.",
13348
+ "Portal not found": "Portal not found",
13342
13349
  "Plan": "Plan",
13343
13350
  "Plans": "Plans",
13344
13351
  "Please provide an access token.": "Please provide an access token.",
@@ -13390,6 +13397,7 @@ var en = {
13390
13397
  "There was a problem retrieving your upcoming invoice.": "There was a problem retrieving your upcoming invoice.",
13391
13398
  "There was a problem retrieving your invoices.": "There was a problem retrieving your invoices.",
13392
13399
  "Tier-based": "Tier-based",
13400
+ "Tiered pricing": "Tiered pricing",
13393
13401
  "Tiers apply progressively as quantity increases.": "Tiers apply progressively as quantity increases.",
13394
13402
  "Top up balance with:": "Top up balance with:",
13395
13403
  "Top-ups": "Top-ups",
@@ -13463,6 +13471,15 @@ var en = {
13463
13471
  "$X/unit/period": "{{cost}}/{{unit}}/{{period}}",
13464
13472
  "$X/Y units/period": "{{cost}}/{{size}} {{units}}/{{period}}",
13465
13473
  "day": "day",
13474
+ "day_one": "day",
13475
+ "day_other": "days",
13476
+ "hour_one": "hour",
13477
+ "hour_other": "hours",
13478
+ "minute_one": "minute",
13479
+ "minute_other": "minutes",
13480
+ "second_one": "second",
13481
+ "second_other": "seconds",
13482
+ "week": "week",
13466
13483
  "month": "month",
13467
13484
  "quarter": "quarter",
13468
13485
  "year": "year",
@@ -13471,6 +13488,13 @@ var en = {
13471
13488
  "yr": "yr",
13472
13489
  "one time": "one time",
13473
13490
  "billing period": "billing period",
13491
+ "billing period_one": "billing period",
13492
+ "billing period_other": "billing periods",
13493
+ "daily": "daily",
13494
+ "weekly": "weekly",
13495
+ "monthly": "monthly",
13496
+ "quarterly": "quarterly",
13497
+ "yearly": "yearly",
13474
13498
  "expires after purchase": "expires {{amount}} {{unit}} after purchase",
13475
13499
  "expires at the end of the billing period": "expires at the end of the billing period",
13476
13500
  "expires at the end of the next billing period": "expires at the end of the next billing period",
@@ -14160,11 +14184,9 @@ function formatBundleExpiry(bundle, t3) {
14160
14184
  if (typeof bundle.expiryUnitCount !== "number") {
14161
14185
  return void 0;
14162
14186
  }
14163
- const unit = bundle.expiryUnit === BillingCreditExpiryUnit.BillingPeriods ? t3("billing period") : t3("day");
14164
- return t3("expires after purchase", {
14165
- amount: bundle.expiryUnitCount,
14166
- unit: pluralize(unit, bundle.expiryUnitCount)
14167
- });
14187
+ const count = bundle.expiryUnitCount;
14188
+ const unit = bundle.expiryUnit === BillingCreditExpiryUnit.BillingPeriods ? t3("billing period", { count }) : t3("day", { count });
14189
+ return t3("expires after purchase", { amount: count, unit });
14168
14190
  }
14169
14191
  case BillingCreditExpiryType.EndOfBillingPeriod:
14170
14192
  return t3("expires at the end of the billing period");
@@ -14409,16 +14431,33 @@ function entitlementHasHardLimit(entitlement) {
14409
14431
  }
14410
14432
 
14411
14433
  // src/utils/api/feature.ts
14412
- function getFeatureName(feature, count = 0, ignore = false) {
14413
- const shouldBePlural = count === 0 || count > 1;
14434
+ function isEnglish(locale) {
14435
+ try {
14436
+ return new Intl.Locale(locale).language === "en";
14437
+ } catch {
14438
+ return true;
14439
+ }
14440
+ }
14441
+ function isOne(count, locale) {
14442
+ return new Intl.PluralRules(locale).select(count) === "one";
14443
+ }
14444
+ function getFeatureName(feature, locale, count, ignore = false) {
14445
+ if (!isEnglish(locale)) {
14446
+ const named = ignore ? { name: feature.name } : feature;
14447
+ const singularName2 = named.singularName || named.name;
14448
+ const pluralName2 = named.pluralName || singularName2;
14449
+ return count !== void 0 && isOne(count, locale) ? singularName2 : pluralName2;
14450
+ }
14451
+ const resolvedCount = count ?? 0;
14452
+ const shouldBePlural = resolvedCount === 0 || resolvedCount > 1;
14414
14453
  const { name, singularName, pluralName } = feature;
14415
14454
  if (!ignore && pluralName && shouldBePlural) {
14416
14455
  return pluralName;
14417
14456
  }
14418
14457
  if (!ignore && singularName) {
14419
- return shouldBePlural ? pluralize(singularName, count) : singularName;
14458
+ return shouldBePlural ? pluralize(singularName, resolvedCount) : singularName;
14420
14459
  }
14421
- return pluralize(name, count);
14460
+ return pluralize(name, resolvedCount);
14422
14461
  }
14423
14462
 
14424
14463
  // src/utils/color.ts
@@ -14628,8 +14667,21 @@ function formatCurrency(amount, {
14628
14667
  function formatOrdinal(n2, t3) {
14629
14668
  return t3("Ordinal", { count: n2, ordinal: true });
14630
14669
  }
14631
- function adjectify(str) {
14632
- return `${str}ly`;
14670
+ function adjectify(period, t3) {
14671
+ switch (period) {
14672
+ case "day":
14673
+ return t3("daily");
14674
+ case "week":
14675
+ return t3("weekly");
14676
+ case "month":
14677
+ return t3("monthly");
14678
+ case "quarter":
14679
+ return t3("quarterly");
14680
+ case "year":
14681
+ return t3("yearly");
14682
+ default:
14683
+ return period;
14684
+ }
14633
14685
  }
14634
14686
  var CURRENCY_FLAGS = {
14635
14687
  usd: "\u{1F1FA}\u{1F1F8}",
@@ -14745,11 +14797,12 @@ function getBillingPreviewText({
14745
14797
  );
14746
14798
  }
14747
14799
  const schedule = scheduleParts.length > 0 ? `${scheduleParts.join(" ")} ` : "";
14800
+ const period = t3(planPeriod);
14748
14801
  if (!discount) {
14749
14802
  return t3("You will be billed", {
14750
14803
  price: subscriptionPrice,
14751
14804
  usage,
14752
- period: planPeriod,
14805
+ period,
14753
14806
  schedule
14754
14807
  });
14755
14808
  }
@@ -14758,7 +14811,7 @@ function getBillingPreviewText({
14758
14811
  return t3("You will be billed", {
14759
14812
  price: discountedPrice,
14760
14813
  usage,
14761
- period: planPeriod,
14814
+ period,
14762
14815
  schedule
14763
14816
  });
14764
14817
  }
@@ -14766,7 +14819,7 @@ function getBillingPreviewText({
14766
14819
  return t3("You will be billed with discount window", {
14767
14820
  price: discountedPrice,
14768
14821
  usage,
14769
- period: planPeriod,
14822
+ period,
14770
14823
  schedule,
14771
14824
  window: t3("for the next months", { count: durationInMonths }),
14772
14825
  fullPrice: subscriptionPrice
@@ -14775,7 +14828,7 @@ function getBillingPreviewText({
14775
14828
  return t3("You will be billed next bill discount", {
14776
14829
  price: discountedPrice,
14777
14830
  usage,
14778
- period: planPeriod,
14831
+ period,
14779
14832
  schedule,
14780
14833
  fullPrice: subscriptionPrice
14781
14834
  });
@@ -15550,7 +15603,7 @@ var reducer = (state, action) => {
15550
15603
  // src/context/EmbedProvider.tsx
15551
15604
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
15552
15605
  var getCustomHeaders = (sessionId) => ({
15553
- "X-Schematic-Components-Version": "2.28.0",
15606
+ "X-Schematic-Components-Version": "2.29.0",
15554
15607
  "X-Schematic-Session-ID": sessionId
15555
15608
  });
15556
15609
  var normalizeCurrencyFilter = (filter2) => {
@@ -16474,6 +16527,7 @@ function useRequest(fn) {
16474
16527
  import { useMemo as useMemo8 } from "react";
16475
16528
  function useTrialEnd() {
16476
16529
  const { data } = useEmbed();
16530
+ const { t: t3 } = useTranslation();
16477
16531
  const { endDate, amount, units } = useMemo8(() => {
16478
16532
  const billingSubscription = data?.company?.billingSubscription;
16479
16533
  const end = typeof billingSubscription?.trialEnd === "number" ? new Date(billingSubscription.trialEnd * 1e3) : void 0;
@@ -16496,10 +16550,10 @@ function useTrialEnd() {
16496
16550
  amount2 = Math.floor(difference / SECONDS_IN_MS);
16497
16551
  unit = "second";
16498
16552
  }
16499
- units2 = pluralize(unit, amount2);
16553
+ units2 = t3(unit, { count: amount2 });
16500
16554
  }
16501
16555
  return { endDate: end, amount: amount2, units: units2 };
16502
- }, [data?.company?.billingSubscription]);
16556
+ }, [data?.company?.billingSubscription, t3]);
16503
16557
  return { endDate, amount, units };
16504
16558
  }
16505
16559
 
@@ -17914,7 +17968,7 @@ var AutoTopupNotice = ({
17914
17968
  trigger: /* @__PURE__ */ jsx14(
17915
17969
  Icon3,
17916
17970
  {
17917
- title: "auto top-up",
17971
+ title: t3("Auto Top-up"),
17918
17972
  name: "info-rounded",
17919
17973
  color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
17920
17974
  style: { lineHeight: 0 }
@@ -17953,7 +18007,7 @@ var BillingThresholdTooltip = ({
17953
18007
  trigger: /* @__PURE__ */ jsx15(
17954
18008
  Icon3,
17955
18009
  {
17956
- title: "billing threshold",
18010
+ title: t3("Billing threshold"),
17957
18011
  name: "info-rounded",
17958
18012
  color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
17959
18013
  style: { lineHeight: 0 }
@@ -18149,7 +18203,7 @@ var Entitlement = ({
18149
18203
  packageSize,
18150
18204
  " "
18151
18205
  ] }),
18152
- getFeatureName(entitlement.feature, packageSize),
18206
+ getFeatureName(entitlement.feature, locale, packageSize),
18153
18207
  entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ jsxs8(Fragment4, { children: [
18154
18208
  " ",
18155
18209
  t3("per"),
@@ -18174,12 +18228,13 @@ var Entitlement = ({
18174
18228
  " ",
18175
18229
  getFeatureName(
18176
18230
  entitlement.valueCredit,
18231
+ locale,
18177
18232
  entitlement.consumptionRate || void 0
18178
18233
  ),
18179
18234
  " ",
18180
18235
  t3("per"),
18181
18236
  " ",
18182
- getFeatureName(entitlement.feature, 1)
18237
+ getFeatureName(entitlement.feature, locale, 1)
18183
18238
  ] });
18184
18239
  }
18185
18240
  if (entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && creditBasedEntitlementLimit) {
@@ -18187,13 +18242,17 @@ var Entitlement = ({
18187
18242
  amount: creditBasedEntitlementLimit.limit,
18188
18243
  units: getFeatureName(
18189
18244
  entitlement.feature,
18245
+ locale,
18190
18246
  creditBasedEntitlementLimit.limit
18191
18247
  ),
18192
- period: creditBasedEntitlementLimit.period
18248
+ period: t3(
18249
+ creditBasedEntitlementLimit.period
18250
+ )
18193
18251
  }) : t3("Up to X units", {
18194
18252
  amount: creditBasedEntitlementLimit.limit,
18195
18253
  units: getFeatureName(
18196
18254
  entitlement.feature,
18255
+ locale,
18197
18256
  creditBasedEntitlementLimit.limit
18198
18257
  )
18199
18258
  }) });
@@ -18201,11 +18260,11 @@ var Entitlement = ({
18201
18260
  if (hasNumericValue) {
18202
18261
  return /* @__PURE__ */ jsxs8(Fragment4, { children: [
18203
18262
  entitlement.valueType === EntitlementValueType.Unlimited && !entitlement.priceBehavior ? t3("Unlimited", {
18204
- item: getFeatureName(entitlement.feature)
18263
+ item: getFeatureName(entitlement.feature, locale)
18205
18264
  }) : typeof limit === "number" && /* @__PURE__ */ jsxs8(Fragment4, { children: [
18206
18265
  formatNumber(limit, { locale }),
18207
18266
  " ",
18208
- getFeatureName(entitlement.feature, limit)
18267
+ getFeatureName(entitlement.feature, locale, limit)
18209
18268
  ] }),
18210
18269
  metricPeriodName && /* @__PURE__ */ jsxs8(Fragment4, { children: [
18211
18270
  " ",
@@ -18244,7 +18303,7 @@ var Entitlement = ({
18244
18303
  packageSize,
18245
18304
  " "
18246
18305
  ] }),
18247
- getFeatureName(entitlement.feature, packageSize),
18306
+ getFeatureName(entitlement.feature, locale, packageSize),
18248
18307
  entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ jsxs8(Fragment4, { children: [
18249
18308
  "/",
18250
18309
  shortenPeriod(period, t3)
@@ -18584,7 +18643,7 @@ var AutoTopup = ({
18584
18643
  updateAutoTopupConfig
18585
18644
  }) => {
18586
18645
  const { settings } = useEmbed();
18587
- const { t: t3 } = useTranslation();
18646
+ const { t: t3, locale } = useTranslation();
18588
18647
  const cardPadding = settings.theme.card.padding / TEXT_BASE_SIZE;
18589
18648
  const configurableCreditGrants = useMemo12(() => {
18590
18649
  return planCreditGrants.reduce(
@@ -18631,7 +18690,7 @@ var AutoTopup = ({
18631
18690
  }) }) }),
18632
18691
  /* @__PURE__ */ jsx20(Box, { as: "p", $marginBottom: "2rem", children: /* @__PURE__ */ jsx20(Text, { children: t3(
18633
18692
  "Automatically purchase more credits when your balance is low",
18634
- { units: getFeatureName(grant.credit) }
18693
+ { units: getFeatureName(grant.credit, locale) }
18635
18694
  ) }) })
18636
18695
  ] }),
18637
18696
  /* @__PURE__ */ jsxs10(Flex, { $alignItems: "center", $gap: "0.5rem", $marginBottom: "1rem", children: [
@@ -18828,7 +18887,7 @@ var Quantity = ({
18828
18887
  $color: settings.theme.typography.text.color,
18829
18888
  children: t3("Currently using", {
18830
18889
  quantity: entitlement.usage,
18831
- unit: getFeatureName(entitlement.feature)
18890
+ unit: getFeatureName(entitlement.feature, locale)
18832
18891
  })
18833
18892
  }
18834
18893
  ),
@@ -18893,7 +18952,11 @@ var Quantity = ({
18893
18952
  packageSize,
18894
18953
  " "
18895
18954
  ] }),
18896
- getFeatureName(entitlement.feature, packageSize),
18955
+ getFeatureName(
18956
+ entitlement.feature,
18957
+ locale,
18958
+ packageSize
18959
+ ),
18897
18960
  "/",
18898
18961
  shortenPeriod(period, t3)
18899
18962
  ] })
@@ -18930,12 +18993,14 @@ var Quantity = ({
18930
18993
  quantity: entitlement.quantity,
18931
18994
  licenseName: getFeatureName(
18932
18995
  entitlement.feature,
18996
+ locale,
18933
18997
  entitlement.quantity
18934
18998
  ),
18935
18999
  perUnit: perLicenseGrant.amount,
18936
19000
  total: includedCredits,
18937
19001
  creditName: getFeatureName(
18938
19002
  licenseCredit,
19003
+ locale,
18939
19004
  includedCredits
18940
19005
  ),
18941
19006
  period: shortenPeriod(licenseCredit.period, t3)
@@ -18957,11 +19022,13 @@ var Quantity = ({
18957
19022
  added: addedQuantity,
18958
19023
  licenseName: getFeatureName(
18959
19024
  entitlement.feature,
19025
+ locale,
18960
19026
  addedQuantity
18961
19027
  ),
18962
19028
  credits: addedCredits,
18963
19029
  creditName: getFeatureName(
18964
19030
  licenseCredit,
19031
+ locale,
18965
19032
  addedCredits
18966
19033
  )
18967
19034
  }),
@@ -18971,9 +19038,10 @@ var Quantity = ({
18971
19038
  total: includedCredits,
18972
19039
  creditName: getFeatureName(
18973
19040
  licenseCredit,
19041
+ locale,
18974
19042
  includedCredits
18975
19043
  ),
18976
- cadence: adjectify(licenseCredit.period),
19044
+ cadence: adjectify(licenseCredit.period, t3),
18977
19045
  day: formatOrdinal(renewalDate.getDate(), t3)
18978
19046
  })
18979
19047
  ] })
@@ -19012,6 +19080,7 @@ function renderMeteredEntitlementPricing({
19012
19080
  "/",
19013
19081
  feature ? getFeatureName(
19014
19082
  feature,
19083
+ locale,
19015
19084
  packageSize
19016
19085
  ) : featureName || "unit"
19017
19086
  ] });
@@ -19029,6 +19098,7 @@ function renderMeteredEntitlementPricing({
19029
19098
  ] }),
19030
19099
  feature ? getFeatureName(
19031
19100
  feature,
19101
+ locale,
19032
19102
  packageSize
19033
19103
  ) : featureName || "unit"
19034
19104
  ] });
@@ -19346,7 +19416,7 @@ var Credits = ({
19346
19416
  /* @__PURE__ */ jsx23(Box, { children: /* @__PURE__ */ jsxs13(Text, { display: "heading6", children: [
19347
19417
  formatNumber(bundle.quantity ?? 0, { locale }),
19348
19418
  " ",
19349
- getFeatureName(bundle)
19419
+ getFeatureName(bundle, locale)
19350
19420
  ] }) })
19351
19421
  ] }),
19352
19422
  typeof price === "number" && /* @__PURE__ */ jsx23(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx23(Text, { children: formatCurrency(price, {
@@ -21305,7 +21375,7 @@ var CurrencyPeriodMismatchNotice = ({
21305
21375
  style: { opacity: 0.85, textAlign: "center" },
21306
21376
  children: t3("No {{currency}} price for the {{period}} billing period.", {
21307
21377
  currency: currency.toUpperCase(),
21308
- period
21378
+ period: adjectify(period, t3)
21309
21379
  })
21310
21380
  }
21311
21381
  )
@@ -21467,7 +21537,7 @@ var HardLimitTooltip = ({
21467
21537
  feature,
21468
21538
  limit
21469
21539
  }) => {
21470
- const { t: t3 } = useTranslation();
21540
+ const { t: t3, locale } = useTranslation();
21471
21541
  const { data } = useEmbed();
21472
21542
  const isLightBackground = useIsLightBackground();
21473
21543
  const showHardLimit = data?.displaySettings?.showHardLimit ?? false;
@@ -21481,7 +21551,7 @@ var HardLimitTooltip = ({
21481
21551
  trigger: /* @__PURE__ */ jsx32(
21482
21552
  Icon3,
21483
21553
  {
21484
- title: "limit",
21554
+ title: t3("Limit"),
21485
21555
  name: "info-rounded",
21486
21556
  color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
21487
21557
  style: { lineHeight: 0 }
@@ -21489,7 +21559,7 @@ var HardLimitTooltip = ({
21489
21559
  ),
21490
21560
  content: /* @__PURE__ */ jsx32(Text, { children: t3("Up to a limit of", {
21491
21561
  amount: limit,
21492
- units: getFeatureName(feature, limit)
21562
+ units: getFeatureName(feature, locale, limit)
21493
21563
  }) })
21494
21564
  }
21495
21565
  );
@@ -21858,7 +21928,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
21858
21928
  )
21859
21929
  ] }),
21860
21930
  stripe && collectEmail && /* @__PURE__ */ jsxs25(Box, { "data-field": "name", $marginBottom: "1.5rem", $verticalAlign: "top", children: [
21861
- /* @__PURE__ */ jsx36(Label, { htmlFor: "email", children: "Email" }),
21931
+ /* @__PURE__ */ jsx36(Label, { htmlFor: "email", children: t3("Email") }),
21862
21932
  /* @__PURE__ */ jsx36(
21863
21933
  Input2,
21864
21934
  {
@@ -21867,7 +21937,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
21867
21937
  type: "email",
21868
21938
  value: email,
21869
21939
  autoComplete: "email",
21870
- placeholder: "Enter email address",
21940
+ placeholder: t3("Enter email address"),
21871
21941
  required: true,
21872
21942
  onChange: (e) => {
21873
21943
  userEditedEmailRef.current = true;
@@ -21994,7 +22064,7 @@ var PeriodToggle = ({
21994
22064
  },
21995
22065
  $size: 15,
21996
22066
  $weight: option === selectedOption ? 600 : 400,
21997
- children: t3("Billed", { period: adjectify(option) })
22067
+ children: t3("Billed", { period: adjectify(option, t3) })
21998
22068
  }
21999
22069
  )
22000
22070
  },
@@ -22034,7 +22104,7 @@ var PlanCreditText = ({
22034
22104
  entitlements,
22035
22105
  children
22036
22106
  }) => {
22037
- const { t: t3 } = useTranslation();
22107
+ const { t: t3, locale } = useTranslation();
22038
22108
  const { settings } = useEmbed();
22039
22109
  const sources = entitlements ?? [];
22040
22110
  const { perLicenseGrants } = credit;
@@ -22042,7 +22112,7 @@ var PlanCreditText = ({
22042
22112
  return /* @__PURE__ */ jsxs26(Text, { children: [
22043
22113
  credit.quantity,
22044
22114
  " ",
22045
- getFeatureName(credit, credit.quantity),
22115
+ getFeatureName(credit, locale, credit.quantity),
22046
22116
  credit.period && /* @__PURE__ */ jsxs26(Fragment11, { children: [
22047
22117
  " ",
22048
22118
  t3("per"),
@@ -22054,18 +22124,18 @@ var PlanCreditText = ({
22054
22124
  }
22055
22125
  const resolveLicenseName = (grant) => {
22056
22126
  const licenseFeature = (findLicenseSource(sources, grant.licenseId) ?? (grant.licenseId ? void 0 : findSoleLicenseSource(sources)))?.feature;
22057
- return licenseFeature ? getFeatureName(licenseFeature, 1) : t3("license");
22127
+ return licenseFeature ? getFeatureName(licenseFeature, locale, 1) : t3("license");
22058
22128
  };
22059
22129
  return /* @__PURE__ */ jsxs26(Flex, { $flexDirection: "column", $gap: "0.25rem", children: [
22060
22130
  perLicenseGrants.map((grant, grantIndex) => /* @__PURE__ */ jsxs26(Text, { children: [
22061
22131
  credit.period ? t3("X credits per license per period", {
22062
22132
  amount: grant.amount,
22063
- creditName: getFeatureName(credit, grant.amount),
22133
+ creditName: getFeatureName(credit, locale, grant.amount),
22064
22134
  licenseName: resolveLicenseName(grant),
22065
22135
  period: t3(credit.period)
22066
22136
  }) : t3("X credits per license", {
22067
22137
  amount: grant.amount,
22068
- creditName: getFeatureName(credit, grant.amount),
22138
+ creditName: getFeatureName(credit, locale, grant.amount),
22069
22139
  licenseName: resolveLicenseName(grant)
22070
22140
  }),
22071
22141
  grantIndex === 0 && children
@@ -22078,7 +22148,7 @@ var PlanCreditText = ({
22078
22148
  $color: settings.theme.typography.text.color,
22079
22149
  children: t3("Plus X credits per period for your company", {
22080
22150
  amount: credit.fixedQuantity,
22081
- creditName: getFeatureName(credit, credit.fixedQuantity),
22151
+ creditName: getFeatureName(credit, locale, credit.fixedQuantity),
22082
22152
  period: t3(credit.period)
22083
22153
  })
22084
22154
  }
@@ -22107,7 +22177,7 @@ var PriceText = ({
22107
22177
  formatCurrency(perUnitPrice, { locale, currency }),
22108
22178
  /* @__PURE__ */ jsxs27("sub", { children: [
22109
22179
  "/",
22110
- getFeatureName(feature, 1)
22180
+ getFeatureName(feature, locale, 1)
22111
22181
  ] })
22112
22182
  ] });
22113
22183
  }
@@ -22124,7 +22194,7 @@ var PriceText = ({
22124
22194
  formatCurrency(perUnitPrice, { locale, currency }),
22125
22195
  /* @__PURE__ */ jsxs27("sub", { children: [
22126
22196
  "/",
22127
- getFeatureName(feature, 1)
22197
+ getFeatureName(feature, locale, 1)
22128
22198
  ] }),
22129
22199
  " + ",
22130
22200
  formatCurrency(flatAmount, { locale, currency }),
@@ -22185,7 +22255,7 @@ var PricingTiersTooltip = ({
22185
22255
  trigger: /* @__PURE__ */ jsx40(
22186
22256
  Icon3,
22187
22257
  {
22188
- title: "tiered pricing",
22258
+ title: t3("Tiered pricing"),
22189
22259
  name: "info-rounded",
22190
22260
  color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
22191
22261
  style: { lineHeight: 0 }
@@ -22694,11 +22764,11 @@ var EntitlementRow = (props) => {
22694
22764
  /* @__PURE__ */ jsx42(Box, { children: /* @__PURE__ */ jsx42(Text, { display: "heading4", children: priceBehavior === EntitlementPriceBehavior.PayInAdvance ? /* @__PURE__ */ jsxs30(Fragment14, { children: [
22695
22765
  quantity,
22696
22766
  " ",
22697
- getFeatureName(feature, quantity)
22767
+ getFeatureName(feature, locale, quantity)
22698
22768
  ] }) : priceBehavior === EntitlementPriceBehavior.Overage && typeof softLimit === "number" ? /* @__PURE__ */ jsxs30(Fragment14, { children: [
22699
22769
  softLimit,
22700
22770
  " ",
22701
- getFeatureName(feature, softLimit)
22771
+ getFeatureName(feature, locale, softLimit)
22702
22772
  ] }) : feature.name }) }),
22703
22773
  /* @__PURE__ */ jsx42(Box, { $whiteSpace: "nowrap", $lineHeight: 1, children: priceBehavior === EntitlementPriceBehavior.PayInAdvance ? (
22704
22774
  // A tiered scheme still resolves to a fixed amount at the chosen
@@ -22729,7 +22799,7 @@ var EntitlementRow = (props) => {
22729
22799
  packageSize,
22730
22800
  " "
22731
22801
  ] }),
22732
- getFeatureName(feature, packageSize),
22802
+ getFeatureName(feature, locale, packageSize),
22733
22803
  feature.featureType === FeatureType.Trait && /* @__PURE__ */ jsxs30(Fragment14, { children: [
22734
22804
  "/",
22735
22805
  shortenPeriod(planPeriod, t3)
@@ -23026,7 +23096,7 @@ var SubscriptionSidebar = forwardRef7(
23026
23096
  $color: settings.theme.typography.text.color,
23027
23097
  children: t3("Includes X credits per period", {
23028
23098
  total: includedCredits,
23029
- creditName: getFeatureName(credit, includedCredits),
23099
+ creditName: getFeatureName(credit, locale, includedCredits),
23030
23100
  period: shortenPeriod(credit.period, t3)
23031
23101
  })
23032
23102
  }
@@ -23764,7 +23834,7 @@ var SubscriptionSidebar = forwardRef7(
23764
23834
  /* @__PURE__ */ jsx44(Box, { children: /* @__PURE__ */ jsxs32(Text, { children: [
23765
23835
  formatNumber(amount, { locale }),
23766
23836
  " ",
23767
- getFeatureName(bundle, amount),
23837
+ getFeatureName(bundle, locale, amount),
23768
23838
  expiry && ` \xB7 ${expiry}`
23769
23839
  ] }) })
23770
23840
  ] }),
@@ -24058,21 +24128,21 @@ var TieredPricingDetails = ({
24058
24128
  if (flatAmount === 0 && perUnitPrice === 0) {
24059
24129
  return t3("Up to X units for free", {
24060
24130
  X: upTo,
24061
- units: getFeatureName(entitlement.feature, upTo)
24131
+ units: getFeatureName(entitlement.feature, locale, upTo)
24062
24132
  });
24063
24133
  }
24064
24134
  if (flatAmount === 0 && perUnitPrice > 0) {
24065
24135
  return t3("Up to X units at $Y/unit", {
24066
24136
  X: upTo,
24067
- units: getFeatureName(entitlement.feature, upTo),
24137
+ units: getFeatureName(entitlement.feature, locale, upTo),
24068
24138
  Y: formatCurrency(perUnitPrice, { locale, currency }),
24069
- unit: getFeatureName(entitlement.feature, 1)
24139
+ unit: getFeatureName(entitlement.feature, locale, 1)
24070
24140
  });
24071
24141
  }
24072
24142
  if (flatAmount > 0 && perUnitPrice === 0) {
24073
24143
  return t3("Up to X units for $Y/period", {
24074
24144
  X: upTo,
24075
- units: getFeatureName(entitlement.feature, upTo),
24145
+ units: getFeatureName(entitlement.feature, locale, upTo),
24076
24146
  Y: formatCurrency(flatAmount, { locale, currency }),
24077
24147
  period
24078
24148
  });
@@ -24080,9 +24150,9 @@ var TieredPricingDetails = ({
24080
24150
  if (flatAmount > 0 && perUnitPrice > 0) {
24081
24151
  return t3("Up to X units at $Y/unit + $Z/period", {
24082
24152
  X: upTo,
24083
- units: getFeatureName(entitlement.feature, upTo),
24153
+ units: getFeatureName(entitlement.feature, locale, upTo),
24084
24154
  Y: formatCurrency(perUnitPrice, { locale, currency }),
24085
- unit: getFeatureName(entitlement.feature, 1),
24155
+ unit: getFeatureName(entitlement.feature, locale, 1),
24086
24156
  Z: formatCurrency(flatAmount, { locale, currency }),
24087
24157
  period
24088
24158
  });
@@ -24385,6 +24455,7 @@ var Badge = () => {
24385
24455
  // src/components/layout/RenderLayout.tsx
24386
24456
  import { jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
24387
24457
  var Disabled = () => {
24458
+ const { t: t3 } = useTranslation();
24388
24459
  return /* @__PURE__ */ jsx48(Box, { $width: "max-content", $height: "max-content", children: /* @__PURE__ */ jsx48(Card, { children: /* @__PURE__ */ jsxs35(
24389
24460
  Element,
24390
24461
  {
@@ -24394,8 +24465,8 @@ var Disabled = () => {
24394
24465
  $alignItems: "center",
24395
24466
  $whiteSpace: "nowrap",
24396
24467
  children: [
24397
- /* @__PURE__ */ jsx48(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx48(Text, { as: "h1", display: "heading1", children: "Portal not found" }) }),
24398
- /* @__PURE__ */ jsx48(Text, { as: "p", children: "Please try again later." })
24468
+ /* @__PURE__ */ jsx48(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx48(Text, { as: "h1", display: "heading1", children: t3("Portal not found") }) }),
24469
+ /* @__PURE__ */ jsx48(Text, { as: "p", children: t3("Please try again later.") })
24399
24470
  ]
24400
24471
  }
24401
24472
  ) }) });
@@ -24589,12 +24660,12 @@ var UsageDetails = ({ entitlement, layout }) => {
24589
24660
  if (priceBehavior === EntitlementPriceBehavior.PayInAdvance && typeof allocation === "number") {
24590
24661
  return t3("X units", {
24591
24662
  amount: formatNumber(allocation, { locale }),
24592
- units: getFeatureName(feature, allocation)
24663
+ units: getFeatureName(feature, locale, allocation)
24593
24664
  });
24594
24665
  }
24595
24666
  if (priceBehavior === EntitlementPriceBehavior.PayAsYouGo && typeof price === "number") {
24596
24667
  const formattedCost = formatCurrency(price, { locale, currency });
24597
- const featureName = getFeatureName(feature, packageSize);
24668
+ const featureName = getFeatureName(feature, locale, packageSize);
24598
24669
  return packageSize > 1 ? t3("$X per Y units", {
24599
24670
  cost: formattedCost,
24600
24671
  size: packageSize,
@@ -24604,15 +24675,15 @@ var UsageDetails = ({ entitlement, layout }) => {
24604
24675
  if (priceBehavior === EntitlementPriceBehavior.Overage && typeof softLimit === "number") {
24605
24676
  return t3("X units", {
24606
24677
  amount: formatNumber(softLimit, { locale }),
24607
- units: getFeatureName(feature, softLimit)
24678
+ units: getFeatureName(feature, locale, softLimit)
24608
24679
  });
24609
24680
  }
24610
24681
  if (priceBehavior === EntitlementPriceBehavior.Tier) {
24611
24682
  return typeof currentTier?.to === "number" && (currentTier?.to === Infinity ? t3("Unlimited in this tier", {
24612
- feature: getFeatureName(feature)
24683
+ feature: getFeatureName(feature, locale)
24613
24684
  }) : t3("Up to X units in this tier", {
24614
24685
  amount: formatNumber(currentTier.to, { locale }),
24615
- feature: getFeatureName(feature, currentTier.to)
24686
+ feature: getFeatureName(feature, locale, currentTier.to)
24616
24687
  }));
24617
24688
  }
24618
24689
  if (showCredits && priceBehavior === EntitlementPriceBehavior.CreditBurndown && planEntitlement?.valueCredit && typeof planEntitlement?.consumptionRate === "number") {
@@ -24620,6 +24691,7 @@ var UsageDetails = ({ entitlement, layout }) => {
24620
24691
  amount: formatConsumptionRate(planEntitlement.consumptionRate, locale),
24621
24692
  units: getFeatureName(
24622
24693
  planEntitlement.valueCredit,
24694
+ locale,
24623
24695
  planEntitlement.consumptionRate
24624
24696
  )
24625
24697
  });
@@ -24627,18 +24699,18 @@ var UsageDetails = ({ entitlement, layout }) => {
24627
24699
  if (priceBehavior === EntitlementPriceBehavior.CreditBurndown && typeof limit === "number") {
24628
24700
  return t3("X units remaining", {
24629
24701
  amount: formatNumber(limit, { locale }),
24630
- units: getFeatureName(feature, limit)
24702
+ units: getFeatureName(feature, locale, limit)
24631
24703
  });
24632
24704
  }
24633
24705
  if (!priceBehavior && typeof allocation === "number") {
24634
24706
  const numericLimit = limit ?? allocation;
24635
24707
  return t3("X units", {
24636
24708
  amount: formatNumber(numericLimit, { locale }),
24637
- units: getFeatureName(feature, numericLimit)
24709
+ units: getFeatureName(feature, locale, numericLimit)
24638
24710
  });
24639
24711
  }
24640
24712
  if (!priceBehavior && allocationType === "unlimited") {
24641
- return t3("Unlimited", { item: getFeatureName(feature) });
24713
+ return t3("Unlimited", { item: getFeatureName(feature, locale) });
24642
24714
  }
24643
24715
  }, [
24644
24716
  t3,
@@ -24667,11 +24739,11 @@ var UsageDetails = ({ entitlement, layout }) => {
24667
24739
  /* @__PURE__ */ jsx51(Fragment17, { children: packageSize > 1 ? t3("$X/Y units/period", {
24668
24740
  cost: formatCurrency(price, { locale, currency }),
24669
24741
  size: packageSize,
24670
- units: getFeatureName(feature, packageSize),
24742
+ units: getFeatureName(feature, locale, packageSize),
24671
24743
  period: shortenPeriod(period, t3)
24672
24744
  }) : t3("$X/unit/period", {
24673
24745
  cost: formatCurrency(price, { locale, currency }),
24674
- unit: getFeatureName(feature, packageSize),
24746
+ unit: getFeatureName(feature, locale, packageSize),
24675
24747
  period: shortenPeriod(period, t3)
24676
24748
  }) }, index)
24677
24749
  );
@@ -24680,7 +24752,7 @@ var UsageDetails = ({ entitlement, layout }) => {
24680
24752
  acc.push(
24681
24753
  /* @__PURE__ */ jsx51(Fragment17, { children: t3("X units used", {
24682
24754
  amount: usage,
24683
- units: getFeatureName(feature, usage)
24755
+ units: getFeatureName(feature, locale, usage)
24684
24756
  }) }, index)
24685
24757
  );
24686
24758
  index += 1;
@@ -24910,9 +24982,10 @@ var IncludedFeatures = forwardRef10(({ className, ...rest }, ref) => {
24910
24982
  singularName: grant.singularName,
24911
24983
  pluralName: grant.pluralName
24912
24984
  },
24985
+ locale,
24913
24986
  grant.creditAmount
24914
24987
  ),
24915
- licenseName: entitlement.feature ? getFeatureName(entitlement.feature, 1) : ""
24988
+ licenseName: entitlement.feature ? getFeatureName(entitlement.feature, locale, 1) : ""
24916
24989
  }) }, grantIndex)),
24917
24990
  props.entitlementExpiration.isVisible && entitlement.entitlementExpirationDate && /* @__PURE__ */ jsx52(
24918
24991
  Text,
@@ -25246,7 +25319,7 @@ var PriceDetails = ({
25246
25319
  packageSize,
25247
25320
  " "
25248
25321
  ] }),
25249
- getFeatureName(feature, packageSize),
25322
+ getFeatureName(feature, locale, packageSize),
25250
25323
  feature.featureType === FeatureType.Trait && period && /* @__PURE__ */ jsxs40(Fragment21, { children: [
25251
25324
  "/",
25252
25325
  shortenPeriod(period, t3)
@@ -25271,7 +25344,7 @@ var PriceDetails = ({
25271
25344
  typeof amount === "number" && /* @__PURE__ */ jsx55(Fragment21, { children: priceBehavior === EntitlementPriceBehavior.Overage ? /* @__PURE__ */ jsxs40(Text, { children: [
25272
25345
  formatNumber(amount, { locale }),
25273
25346
  " ",
25274
- getFeatureName(feature, amount),
25347
+ getFeatureName(feature, locale, amount),
25275
25348
  " \xB7 ",
25276
25349
  formatCurrency(currentTierPerUnitPrice * amount, {
25277
25350
  locale,
@@ -25399,7 +25472,7 @@ var UsageByUser = ({ source, unit }) => {
25399
25472
  const total = current?.section?.total ?? 0;
25400
25473
  const totalUsers = current?.section?.totalUsers ?? 0;
25401
25474
  const unattributed = current?.section?.unattributed;
25402
- const formatAmount = (amount) => `${formatNumber(amount, { locale })} ${getFeatureName(unit, amount)}`;
25475
+ const formatAmount = (amount) => `${formatNumber(amount, { locale })} ${getFeatureName(unit, locale, amount)}`;
25403
25476
  if (error) {
25404
25477
  return /* @__PURE__ */ jsxs41(Flex, { $flexDirection: "column", $gap: "0.5rem", $alignItems: "flex-start", children: [
25405
25478
  /* @__PURE__ */ jsx56(Text, { display: "heading4", children: t3("Usage by user") }),
@@ -25504,10 +25577,10 @@ var Limit = ({ entitlement, usageDetails, fontStyle }) => {
25504
25577
  const acc = [];
25505
25578
  acc.push(
25506
25579
  priceBehavior === EntitlementPriceBehavior.Tier && typeof currentTier?.to === "number" && typeof feature !== "undefined" ? currentTier?.to === Infinity ? t3("Unlimited in this tier", {
25507
- feature: getFeatureName(feature)
25580
+ feature: getFeatureName(feature, locale)
25508
25581
  }) : t3("Up to X units in this tier", {
25509
25582
  amount: currentTier.to,
25510
- feature: getFeatureName(feature)
25583
+ feature: getFeatureName(feature, locale)
25511
25584
  }) : priceBehavior === EntitlementPriceBehavior.Overage && typeof limit === "number" ? t3("X included", {
25512
25585
  amount: formatNumber(limit, { locale })
25513
25586
  }) : 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", {
@@ -25517,11 +25590,12 @@ var Limit = ({ entitlement, usageDetails, fontStyle }) => {
25517
25590
  ),
25518
25591
  units: getFeatureName(
25519
25592
  planEntitlement.valueCredit,
25593
+ locale,
25520
25594
  planEntitlement.consumptionRate
25521
25595
  )
25522
25596
  }) : priceBehavior === EntitlementPriceBehavior.CreditBurndown && typeof feature !== "undefined" && typeof limit === "number" ? t3("X units remaining", {
25523
25597
  amount: formatNumber(limit, { locale }),
25524
- units: getFeatureName(feature, limit)
25598
+ units: getFeatureName(feature, locale, limit)
25525
25599
  }) : typeof limit === "number" ? t3("Limit of", {
25526
25600
  amount: formatNumber(limit, { locale })
25527
25601
  }) : t3("No limit")
@@ -25723,11 +25797,11 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25723
25797
  formatNumber(limit, { locale }),
25724
25798
  " "
25725
25799
  ] }),
25726
- getFeatureName(feature, limit)
25800
+ getFeatureName(feature, locale, limit)
25727
25801
  ] }) : typeof usage === "number" && /* @__PURE__ */ jsxs42(Fragment22, { children: [
25728
25802
  formatNumber(usage, { locale }),
25729
25803
  " ",
25730
- getFeatureName(feature, usage),
25804
+ getFeatureName(feature, locale, usage),
25731
25805
  " ",
25732
25806
  t3("used")
25733
25807
  ] }) }) }),
@@ -25816,6 +25890,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25816
25890
  }),
25817
25891
  units: getFeatureName(
25818
25892
  credit,
25893
+ locale,
25819
25894
  credit.total.remaining
25820
25895
  )
25821
25896
  }) }) }),
@@ -25857,6 +25932,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25857
25932
  quantity: licenseQuantity,
25858
25933
  licenseName: getFeatureName(
25859
25934
  licenseFeature,
25935
+ locale,
25860
25936
  licenseQuantity
25861
25937
  ),
25862
25938
  perUnit: perLicenseGrant.amount
@@ -25881,7 +25957,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25881
25957
  children: [
25882
25958
  t3("Your plan includes credits", {
25883
25959
  total,
25884
- creditName: getFeatureName(credit, total),
25960
+ creditName: getFeatureName(credit, locale, total),
25885
25961
  period: shortenPeriod(composition.period, t3),
25886
25962
  composition: ` \u2014 ${parts.join(" + ")}`
25887
25963
  }),
@@ -25916,6 +25992,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25916
25992
  amount: grant.quantity,
25917
25993
  item: getFeatureName(
25918
25994
  credit,
25995
+ locale,
25919
25996
  grant.quantity
25920
25997
  )
25921
25998
  }) }) }),
@@ -25937,7 +26014,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25937
26014
  ] }) : /* @__PURE__ */ jsxs42(Fragment22, { children: [
25938
26015
  /* @__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", {
25939
26016
  amount: grant.quantity,
25940
- item: getFeatureName(credit, 1),
26017
+ item: getFeatureName(credit, locale, 1),
25941
26018
  createdAt: toPrettyDate(
25942
26019
  grant.createdAt,
25943
26020
  { locale, month: "short" }
@@ -25946,6 +26023,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25946
26023
  amount: grant.quantity,
25947
26024
  item: getFeatureName(
25948
26025
  credit,
26026
+ locale,
25949
26027
  grant.quantity
25950
26028
  ),
25951
26029
  createdAt: toPrettyDate(
@@ -25956,6 +26034,7 @@ var MeteredFeatures = forwardRef12(({ className, ...rest }, ref) => {
25956
26034
  amount: grant.quantity,
25957
26035
  item: getFeatureName(
25958
26036
  credit,
26037
+ locale,
25959
26038
  grant.quantity
25960
26039
  ),
25961
26040
  createdAt: toPrettyDate(
@@ -26923,7 +27002,7 @@ var UsageDetails2 = ({
26923
27002
  packageSize,
26924
27003
  " "
26925
27004
  ] }),
26926
- getFeatureName(entitlement.feature, packageSize),
27005
+ getFeatureName(entitlement.feature, locale, packageSize),
26927
27006
  entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ jsxs46(Fragment24, { children: [
26928
27007
  "/",
26929
27008
  shortenPeriod(period, t3)
@@ -26943,6 +27022,7 @@ var UsageDetails2 = ({
26943
27022
  " ",
26944
27023
  getFeatureName(
26945
27024
  entitlement.planEntitlement.valueCredit,
27025
+ locale,
26946
27026
  entitlement.planEntitlement.consumptionRate
26947
27027
  ),
26948
27028
  " ",
@@ -26978,7 +27058,7 @@ var UsageDetails2 = ({
26978
27058
  /* @__PURE__ */ jsx62(Text, { display: layout.addOns.fontStyle, children: typeof quantity === "number" ? /* @__PURE__ */ jsxs46(Fragment24, { children: [
26979
27059
  quantity,
26980
27060
  " ",
26981
- getFeatureName(entitlement.feature, quantity, true)
27061
+ getFeatureName(entitlement.feature, locale, quantity, true)
26982
27062
  ] }) : entitlement.feature.name }),
26983
27063
  /* @__PURE__ */ jsxs46(Text, { children: [
26984
27064
  description.length > 0 && /* @__PURE__ */ jsx62(
@@ -27439,9 +27519,14 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27439
27519
  amount: perLicenseGrant.amount,
27440
27520
  creditName: getFeatureName(
27441
27521
  group,
27522
+ locale,
27442
27523
  perLicenseGrant.amount
27443
27524
  ),
27444
- licenseName: getFeatureName(licenseFeature, 1)
27525
+ licenseName: getFeatureName(
27526
+ licenseFeature,
27527
+ locale,
27528
+ 1
27529
+ )
27445
27530
  }),
27446
27531
  composition.fixedQuantity > 0 && creditPeriod && /* @__PURE__ */ jsxs47(Fragment25, { children: [
27447
27532
  " ",
@@ -27449,6 +27534,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27449
27534
  amount: composition.fixedQuantity,
27450
27535
  creditName: getFeatureName(
27451
27536
  group,
27537
+ locale,
27452
27538
  composition.fixedQuantity
27453
27539
  ),
27454
27540
  period: t3(
@@ -27459,7 +27545,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27459
27545
  ] }) : /* @__PURE__ */ jsxs47(Fragment25, { children: [
27460
27546
  group.total.value,
27461
27547
  " ",
27462
- getFeatureName(group, group.total.value),
27548
+ getFeatureName(group, locale, group.total.value),
27463
27549
  " ",
27464
27550
  subscriptionInterval && /* @__PURE__ */ jsxs47(Fragment25, { children: [
27465
27551
  t3("per"),
@@ -27502,6 +27588,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27502
27588
  quantity: licenseQuantity,
27503
27589
  licenseName: getFeatureName(
27504
27590
  licenseFeature,
27591
+ locale,
27505
27592
  licenseQuantity
27506
27593
  ),
27507
27594
  perUnit: perLicenseGrant.amount,
@@ -27509,6 +27596,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27509
27596
  total: resolvedTotal,
27510
27597
  creditName: getFeatureName(
27511
27598
  group,
27599
+ locale,
27512
27600
  resolvedTotal
27513
27601
  ),
27514
27602
  period: shortenPeriod(creditPeriod, t3)
@@ -27516,12 +27604,14 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27516
27604
  quantity: licenseQuantity,
27517
27605
  licenseName: getFeatureName(
27518
27606
  licenseFeature,
27607
+ locale,
27519
27608
  licenseQuantity
27520
27609
  ),
27521
27610
  perUnit: perLicenseGrant.amount,
27522
27611
  total: resolvedTotal,
27523
27612
  creditName: getFeatureName(
27524
27613
  group,
27614
+ locale,
27525
27615
  resolvedTotal
27526
27616
  ),
27527
27617
  period: shortenPeriod(creditPeriod, t3)
@@ -27563,7 +27653,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27563
27653
  if (!autoTopupEnabled) {
27564
27654
  acc.push(
27565
27655
  /* @__PURE__ */ jsx63(Text, { $leading: "tight", children: t3("Auto top-up disabled for token", {
27566
- unit: getFeatureName(grant.credit, 1)
27656
+ unit: getFeatureName(grant.credit, locale, 1)
27567
27657
  }) }, grant.id)
27568
27658
  );
27569
27659
  return acc;
@@ -27575,6 +27665,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27575
27665
  /* @__PURE__ */ jsx63(Text, { $leading: "tight", children: t3("Adds X tokens when Y remaining in balance", {
27576
27666
  unit: getFeatureName(
27577
27667
  grant.credit,
27668
+ locale,
27578
27669
  autoTopupAmount
27579
27670
  ),
27580
27671
  amount: autoTopupAmount,
@@ -27634,7 +27725,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27634
27725
  " (",
27635
27726
  group.quantity,
27636
27727
  " ",
27637
- getFeatureName(group, group.quantity),
27728
+ getFeatureName(group, locale, group.quantity),
27638
27729
  ")"
27639
27730
  ] }) : /* @__PURE__ */ jsxs47(Text, { display: props.addOns.fontStyle, children: [
27640
27731
  group.grants.length > 1 && /* @__PURE__ */ jsxs47(Text, { style: { opacity: 0.5 }, children: [
@@ -27645,7 +27736,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27645
27736
  ] }),
27646
27737
  group.quantity,
27647
27738
  " ",
27648
- getFeatureName(group, group.quantity)
27739
+ getFeatureName(group, locale, group.quantity)
27649
27740
  ] }),
27650
27741
  group.total.used > 0 && /* @__PURE__ */ jsxs47(
27651
27742
  Text,
@@ -27705,12 +27796,12 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27705
27796
  " (",
27706
27797
  group.quantity,
27707
27798
  " ",
27708
- getFeatureName(group, group.quantity),
27799
+ getFeatureName(group, locale, group.quantity),
27709
27800
  ")"
27710
27801
  ] }) : /* @__PURE__ */ jsxs47(Text, { display: props.addOns.fontStyle, children: [
27711
27802
  group.quantity,
27712
27803
  " ",
27713
- getFeatureName(group, group.quantity)
27804
+ getFeatureName(group, locale, group.quantity)
27714
27805
  ] }),
27715
27806
  group.total.used > 0 && /* @__PURE__ */ jsxs47(
27716
27807
  Text,
@@ -27761,7 +27852,7 @@ var PlanManager = forwardRef14(({ children, className, portal, ...rest }, ref) =
27761
27852
  /* @__PURE__ */ jsxs47(Text, { display: props.addOns.fontStyle, children: [
27762
27853
  group.quantity,
27763
27854
  " ",
27764
- getFeatureName(group, group.quantity)
27855
+ getFeatureName(group, locale, group.quantity)
27765
27856
  ] }),
27766
27857
  group.total.used > 0 && /* @__PURE__ */ jsxs47(
27767
27858
  Text,
@@ -27841,6 +27932,7 @@ function renderMeteredEntitlementPricing2({
27841
27932
  "/",
27842
27933
  feature ? getFeatureName(
27843
27934
  feature,
27935
+ locale,
27844
27936
  packageSize
27845
27937
  ) : featureName || "unit"
27846
27938
  ] });
@@ -27858,6 +27950,7 @@ function renderMeteredEntitlementPricing2({
27858
27950
  ] }),
27859
27951
  feature ? getFeatureName(
27860
27952
  feature,
27953
+ locale,
27861
27954
  packageSize
27862
27955
  ) : featureName || "unit"
27863
27956
  ] });
@@ -28047,7 +28140,7 @@ var AddOn2 = ({
28047
28140
  {
28048
28141
  $flexDirection: "column",
28049
28142
  $justifyContent: "center",
28050
- children: /* @__PURE__ */ jsx64(Text, { children: getFeatureName(entitlement.feature) })
28143
+ children: /* @__PURE__ */ jsx64(Text, { children: getFeatureName(entitlement.feature, locale) })
28051
28144
  }
28052
28145
  )
28053
28146
  ] }),
@@ -28209,7 +28302,11 @@ var Entitlement2 = ({
28209
28302
  formatNumber(entitlementPackageSize, { locale }),
28210
28303
  " "
28211
28304
  ] }),
28212
- getFeatureName(entitlement.feature, entitlementPackageSize),
28305
+ getFeatureName(
28306
+ entitlement.feature,
28307
+ locale,
28308
+ entitlementPackageSize
28309
+ ),
28213
28310
  entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ jsxs49(Fragment27, { children: [
28214
28311
  " ",
28215
28312
  t3("per"),
@@ -28227,12 +28324,13 @@ var Entitlement2 = ({
28227
28324
  " ",
28228
28325
  getFeatureName(
28229
28326
  entitlement.valueCredit,
28327
+ locale,
28230
28328
  entitlement.consumptionRate
28231
28329
  ),
28232
28330
  " ",
28233
28331
  t3("per"),
28234
28332
  " ",
28235
- getFeatureName(entitlement.feature, 1)
28333
+ getFeatureName(entitlement.feature, locale, 1)
28236
28334
  ] }) : entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && creditBasedEntitlementLimit ? /* @__PURE__ */ jsx65(Fragment27, { children: creditBasedEntitlementLimit?.period ? t3("Up to X units per period", {
28237
28335
  amount: formatNumber(
28238
28336
  creditBasedEntitlementLimit.limit,
@@ -28240,9 +28338,12 @@ var Entitlement2 = ({
28240
28338
  ),
28241
28339
  units: getFeatureName(
28242
28340
  entitlement.feature,
28341
+ locale,
28243
28342
  creditBasedEntitlementLimit.limit
28244
28343
  ),
28245
- period: creditBasedEntitlementLimit.period
28344
+ period: t3(
28345
+ creditBasedEntitlementLimit.period
28346
+ )
28246
28347
  }) : t3("Up to X units", {
28247
28348
  amount: formatNumber(
28248
28349
  creditBasedEntitlementLimit.limit,
@@ -28250,17 +28351,18 @@ var Entitlement2 = ({
28250
28351
  ),
28251
28352
  units: getFeatureName(
28252
28353
  entitlement.feature,
28354
+ locale,
28253
28355
  creditBasedEntitlementLimit.limit
28254
28356
  )
28255
28357
  }) }) : entitlement.valueType === EntitlementValueType.Numeric || entitlement.valueType === EntitlementValueType.Unlimited || entitlement.valueType === EntitlementValueType.Trait ? /* @__PURE__ */ jsxs49(Fragment27, { children: [
28256
28358
  entitlement.valueType === EntitlementValueType.Unlimited && !entitlement.priceBehavior ? t3("Unlimited", {
28257
- item: getFeatureName(entitlement.feature)
28359
+ item: getFeatureName(entitlement.feature, locale)
28258
28360
  }) : /* @__PURE__ */ jsxs49(Fragment27, { children: [
28259
28361
  typeof limit === "number" && /* @__PURE__ */ jsxs49(Fragment27, { children: [
28260
28362
  formatNumber(limit, { locale }),
28261
28363
  " "
28262
28364
  ] }),
28263
- getFeatureName(entitlement.feature, limit)
28365
+ getFeatureName(entitlement.feature, locale, limit)
28264
28366
  ] }),
28265
28367
  metricPeriodName && /* @__PURE__ */ jsxs49(Fragment27, { children: [
28266
28368
  " ",
@@ -28289,6 +28391,7 @@ var Entitlement2 = ({
28289
28391
  ] }),
28290
28392
  getFeatureName(
28291
28393
  entitlement.feature,
28394
+ locale,
28292
28395
  entitlementPackageSize
28293
28396
  ),
28294
28397
  entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ jsxs49(Fragment27, { children: [
@@ -28768,7 +28871,7 @@ var PricingTable = forwardRef15(({ className, ...rest }, ref) => {
28768
28871
  $alignItems: "center",
28769
28872
  $justifyContent: "center",
28770
28873
  $padding: `${settings.theme.card.padding / TEXT_BASE_SIZE}rem`,
28771
- children: /* @__PURE__ */ jsx67(Loader, { "aria-label": "loading", $size: "2xl" })
28874
+ children: /* @__PURE__ */ jsx67(Loader, { "aria-label": t3("Loading"), $size: "2xl" })
28772
28875
  }
28773
28876
  );
28774
28877
  }
@@ -31985,6 +32088,7 @@ var Loading = () => {
31985
32088
  };
31986
32089
  var Error2 = ({ message }) => {
31987
32090
  const { settings } = useEmbed();
32091
+ const { t: t3 } = useTranslation();
31988
32092
  return /* @__PURE__ */ jsxs53(
31989
32093
  Flex,
31990
32094
  {
@@ -31996,7 +32100,7 @@ var Error2 = ({ message }) => {
31996
32100
  $alignItems: "center",
31997
32101
  $justifyContent: "center",
31998
32102
  children: [
31999
- /* @__PURE__ */ jsx71(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx71(Text, { display: "heading1", children: "Error" }) }),
32103
+ /* @__PURE__ */ jsx71(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx71(Text, { display: "heading1", children: t3("Error") }) }),
32000
32104
  /* @__PURE__ */ jsx71(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx71(Text, { children: message }) })
32001
32105
  ]
32002
32106
  }
@@ -32004,6 +32108,7 @@ var Error2 = ({ message }) => {
32004
32108
  };
32005
32109
  var SchematicEmbed = ({ id, accessToken }) => {
32006
32110
  const theme = useContext3(yt);
32111
+ const { t: t3 } = useTranslation();
32007
32112
  const {
32008
32113
  data,
32009
32114
  error,
@@ -32074,13 +32179,15 @@ var SchematicEmbed = ({ id, accessToken }) => {
32074
32179
  return /* @__PURE__ */ jsx71(Error2, { message: error.message });
32075
32180
  }
32076
32181
  if (accessToken?.length === 0) {
32077
- return /* @__PURE__ */ jsx71(Error2, { message: "Please provide an access token." });
32182
+ return /* @__PURE__ */ jsx71(Error2, { message: t3("Please provide an access token.") });
32078
32183
  }
32079
32184
  if (!accessToken?.startsWith("token_")) {
32080
32185
  return /* @__PURE__ */ jsx71(
32081
32186
  Error2,
32082
32187
  {
32083
- message: 'Invalid access token; your temporary access token will start with "token_".'
32188
+ message: t3(
32189
+ "Invalid access token; your temporary access token will start with `token_`."
32190
+ )
32084
32191
  }
32085
32192
  );
32086
32193
  }