@meterbox/react 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/package.json +1 -1
- package/src/BillingDetailsButton.js +98 -0
- package/src/CreditBalance.js +9 -12
- package/src/CreditGrantsTable.js +26 -27
- package/src/CreditUtilization.js +8 -11
- package/src/InvoiceHistory.js +28 -16
- package/src/PlanChangeCard.js +18 -13
- package/src/PricingTable.js +53 -52
- package/src/SubscriptionPreview.js +17 -24
- package/src/i18n.js +662 -0
- package/src/index.js +9 -0
package/src/i18n.js
ADDED
|
@@ -0,0 +1,662 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* i18n.js — the components' words, dates and amounts in the customer's
|
|
3
|
+
* language.
|
|
4
|
+
*
|
|
5
|
+
* <LocaleProvider locale="fr" messages={{ "cancel.button": "Arrêter" }}>…
|
|
6
|
+
*
|
|
7
|
+
* translates every component inside it. Built in: English (the default),
|
|
8
|
+
* Spanish, French and German, picked by the locale's language ("fr-CA" →
|
|
9
|
+
* French). `messages` overrides any string by its key, or translates them
|
|
10
|
+
* all for a language that isn't built in; a string missing from both falls
|
|
11
|
+
* back to English. `{name}` placeholders are filled in; a key with
|
|
12
|
+
* `.one` / `.other` forms is pluralized by `count`.
|
|
13
|
+
*
|
|
14
|
+
* Dates and amounts are formatted for `locale` with Intl (the browser's own
|
|
15
|
+
* locale when none is given). Text the tenant entered (plan names, features,
|
|
16
|
+
* offers) and server error messages are shown as they are.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const React = require("react");
|
|
20
|
+
|
|
21
|
+
const en = {
|
|
22
|
+
"portal.account": "Account",
|
|
23
|
+
"portal.plans": "Plans",
|
|
24
|
+
"portal.credits": "Credits",
|
|
25
|
+
|
|
26
|
+
"account.loading": "Loading account…",
|
|
27
|
+
"account.error": "Could not load account.",
|
|
28
|
+
"account.name": "Name",
|
|
29
|
+
"account.email": "Email",
|
|
30
|
+
"account.plan": "Plan",
|
|
31
|
+
"account.status": "Status",
|
|
32
|
+
"account.periodEnds": "Current period ends",
|
|
33
|
+
"account.endsOn": "Ends on",
|
|
34
|
+
"status.active": "active",
|
|
35
|
+
"status.trialing": "trialing",
|
|
36
|
+
"status.past_due": "past due",
|
|
37
|
+
"status.incomplete": "incomplete",
|
|
38
|
+
"status.cancelling": "cancelling",
|
|
39
|
+
"status.cancelled": "cancelled",
|
|
40
|
+
|
|
41
|
+
"plans.loading": "Loading plans…",
|
|
42
|
+
"plans.error": "Could not load plans.",
|
|
43
|
+
"plans.annualNote":
|
|
44
|
+
"Cost preview isn't available for annual billing yet — the amount due will be confirmed at checkout.",
|
|
45
|
+
|
|
46
|
+
"cancel.button": "Cancel subscription",
|
|
47
|
+
"cancel.why": "Why are you cancelling?",
|
|
48
|
+
"cancel.reasonLabel": "Reason for cancelling",
|
|
49
|
+
"cancel.reason.too_expensive": "It's too expensive",
|
|
50
|
+
"cancel.reason.missing_features": "It's missing features I need",
|
|
51
|
+
"cancel.reason.switched_to_competitor": "I'm switching to another product",
|
|
52
|
+
"cancel.reason.not_using": "I'm not using it enough",
|
|
53
|
+
"cancel.reason.other": "Something else",
|
|
54
|
+
"cancel.detailPlaceholder": "Anything else we should know? (optional)",
|
|
55
|
+
"cancel.detailLabel": "More about why",
|
|
56
|
+
"cancel.continue": "Continue",
|
|
57
|
+
"cancel.keep": "Keep my subscription",
|
|
58
|
+
"cancel.offersTitle": "Before you go, would one of these help?",
|
|
59
|
+
"cancel.accept": "Accept",
|
|
60
|
+
"cancel.confirm": "Cancel at the end of the period",
|
|
61
|
+
"cancel.endsOn": "Your subscription ends on {date}. You keep access until then.",
|
|
62
|
+
"cancel.endsAtPeriodEnd":
|
|
63
|
+
"Your subscription ends at the end of the period. You keep access until then.",
|
|
64
|
+
"cancel.offerTaken": "Done: {offer}. Your subscription continues.",
|
|
65
|
+
"cancel.error": "Something went wrong.",
|
|
66
|
+
|
|
67
|
+
"pricing.loading": "Loading plans…",
|
|
68
|
+
"pricing.empty": "No plans available.",
|
|
69
|
+
"pricing.monthly": "Monthly",
|
|
70
|
+
"pricing.annual": "Annual",
|
|
71
|
+
"pricing.current": "Current",
|
|
72
|
+
"pricing.currentlyOn": "Currently on {plan}",
|
|
73
|
+
"pricing.choose": "Choose {plan}",
|
|
74
|
+
"pricing.currentPlan": "Current plan",
|
|
75
|
+
"pricing.choosePlan": "Choose plan",
|
|
76
|
+
"pricing.perMonth": "/ month",
|
|
77
|
+
"pricing.billedAnnually": "billed annually",
|
|
78
|
+
"pricing.trial": "{days}-day free trial",
|
|
79
|
+
"pricing.includes": "Includes {parts} a month",
|
|
80
|
+
"pricing.inputTokens": "{n} input tokens",
|
|
81
|
+
"pricing.outputTokens": "{n} output tokens",
|
|
82
|
+
"pricing.apiCalls": "{n} API calls",
|
|
83
|
+
"pricing.per1M": "Per 1M tokens:",
|
|
84
|
+
"pricing.past.billed": "Past that, per 1M tokens:",
|
|
85
|
+
"pricing.past.blocked": "Usage stops there until next month.",
|
|
86
|
+
"pricing.past.upgrade": "Past that, your plan is upgraded automatically.",
|
|
87
|
+
"pricing.models": "Models: {names}",
|
|
88
|
+
"pricing.modelRates": "{model}: {input} in, {output} out",
|
|
89
|
+
"pricing.apiCallRates": "API calls: {ladder} per 1K",
|
|
90
|
+
"pricing.upTo": "{rate} to {n}",
|
|
91
|
+
"pricing.then": "then",
|
|
92
|
+
|
|
93
|
+
"planChange.scheduledOn": "Scheduled: applies on {date}.",
|
|
94
|
+
"planChange.changed": "Plan changed.",
|
|
95
|
+
"planChange.changedTo": "Plan changed to {plan}.",
|
|
96
|
+
"planChange.failed": "Plan change failed.",
|
|
97
|
+
"planChange.scheduledCancelled": "Scheduled change cancelled.",
|
|
98
|
+
"planChange.cancelFailed": "Cancel failed.",
|
|
99
|
+
"planChange.pending": "Scheduled change to {plan} on {date}.",
|
|
100
|
+
"planChange.cancel": "Cancel",
|
|
101
|
+
"planChange.working": "Working…",
|
|
102
|
+
"planChange.now": "Change now",
|
|
103
|
+
"planChange.schedule": "Schedule for end of period",
|
|
104
|
+
|
|
105
|
+
"preview.loading": "Loading preview…",
|
|
106
|
+
"preview.error": "Could not load preview.",
|
|
107
|
+
"preview.empty": "No preview available.",
|
|
108
|
+
"preview.from": "From",
|
|
109
|
+
"preview.to": "To",
|
|
110
|
+
"preview.effective": "Effective",
|
|
111
|
+
"preview.mrrNow": "MRR now",
|
|
112
|
+
"preview.mrrAfter": "MRR after",
|
|
113
|
+
"preview.dueToday": "Prorated charge today",
|
|
114
|
+
|
|
115
|
+
"credits.balance": "Credit balance",
|
|
116
|
+
"credits.balanceLoading": "Loading credit balance…",
|
|
117
|
+
"credits.balanceError": "Could not load credit balance.",
|
|
118
|
+
"credits.activeGrants.one": "{count} active grant",
|
|
119
|
+
"credits.activeGrants.other": "{count} active grants",
|
|
120
|
+
"credits.topUp": "Top up credits",
|
|
121
|
+
"credits.grants": "Credit grants",
|
|
122
|
+
"credits.grantsLoading": "Loading credit grants…",
|
|
123
|
+
"credits.grantsError": "Could not load credits.",
|
|
124
|
+
"credits.noGrants": "No credit grants.",
|
|
125
|
+
"credits.noMatching": "No matching grants.",
|
|
126
|
+
"credits.balanceOf": "Balance {amount}",
|
|
127
|
+
"credits.source": "Source",
|
|
128
|
+
"credits.amount": "Amount",
|
|
129
|
+
"credits.remaining": "Remaining",
|
|
130
|
+
"credits.expires": "Expires",
|
|
131
|
+
"credits.status": "Status",
|
|
132
|
+
"credits.utilLoading": "Loading utilization…",
|
|
133
|
+
"credits.utilError": "Could not load utilization.",
|
|
134
|
+
"credits.utilEmpty": "No utilization in window.",
|
|
135
|
+
"credits.overTime": "Credit balance over time",
|
|
136
|
+
"grant.active": "active",
|
|
137
|
+
"grant.depleted": "depleted",
|
|
138
|
+
"grant.expired": "expired",
|
|
139
|
+
"grant.revoked": "revoked",
|
|
140
|
+
|
|
141
|
+
"invoices.title": "Invoices",
|
|
142
|
+
"invoices.loading": "Loading invoices…",
|
|
143
|
+
"invoices.error": "Could not load invoices.",
|
|
144
|
+
"invoices.empty": "No invoices yet.",
|
|
145
|
+
"invoices.date": "Date",
|
|
146
|
+
"invoices.number": "Invoice",
|
|
147
|
+
"invoices.status": "Status",
|
|
148
|
+
"invoices.amount": "Amount",
|
|
149
|
+
"invoices.pdf": "PDF",
|
|
150
|
+
"invoices.downloadPdf": "Download PDF of {number}",
|
|
151
|
+
"invoices.pay": "Pay",
|
|
152
|
+
"invoices.view": "View",
|
|
153
|
+
"invoice.open": "Due",
|
|
154
|
+
"invoice.paid": "Paid",
|
|
155
|
+
"invoice.void": "Void",
|
|
156
|
+
"invoice.uncollectible": "Uncollectible",
|
|
157
|
+
"invoice.draft": "Draft",
|
|
158
|
+
|
|
159
|
+
"billing.update": "Update payment method and billing details",
|
|
160
|
+
"billing.redirecting": "Redirecting…",
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const es = {
|
|
164
|
+
"portal.account": "Cuenta",
|
|
165
|
+
"portal.plans": "Planes",
|
|
166
|
+
"portal.credits": "Créditos",
|
|
167
|
+
|
|
168
|
+
"account.loading": "Cargando la cuenta…",
|
|
169
|
+
"account.error": "No se pudo cargar la cuenta.",
|
|
170
|
+
"account.name": "Nombre",
|
|
171
|
+
"account.email": "Correo electrónico",
|
|
172
|
+
"account.plan": "Plan",
|
|
173
|
+
"account.status": "Estado",
|
|
174
|
+
"account.periodEnds": "El período actual termina",
|
|
175
|
+
"account.endsOn": "Termina el",
|
|
176
|
+
"status.active": "activa",
|
|
177
|
+
"status.trialing": "en prueba",
|
|
178
|
+
"status.past_due": "pago atrasado",
|
|
179
|
+
"status.incomplete": "incompleta",
|
|
180
|
+
"status.cancelling": "cancelación programada",
|
|
181
|
+
"status.cancelled": "cancelada",
|
|
182
|
+
|
|
183
|
+
"plans.loading": "Cargando planes…",
|
|
184
|
+
"plans.error": "No se pudieron cargar los planes.",
|
|
185
|
+
"plans.annualNote":
|
|
186
|
+
"La vista previa del costo aún no está disponible para la facturación anual. El importe se confirma al pagar.",
|
|
187
|
+
|
|
188
|
+
"cancel.button": "Cancelar suscripción",
|
|
189
|
+
"cancel.why": "¿Por qué cancelas?",
|
|
190
|
+
"cancel.reasonLabel": "Motivo de la cancelación",
|
|
191
|
+
"cancel.reason.too_expensive": "Es demasiado caro",
|
|
192
|
+
"cancel.reason.missing_features": "Le faltan funciones que necesito",
|
|
193
|
+
"cancel.reason.switched_to_competitor": "Me cambio a otro producto",
|
|
194
|
+
"cancel.reason.not_using": "No lo uso lo suficiente",
|
|
195
|
+
"cancel.reason.other": "Otro motivo",
|
|
196
|
+
"cancel.detailPlaceholder": "¿Algo más que debamos saber? (opcional)",
|
|
197
|
+
"cancel.detailLabel": "Más detalles",
|
|
198
|
+
"cancel.continue": "Continuar",
|
|
199
|
+
"cancel.keep": "Mantener mi suscripción",
|
|
200
|
+
"cancel.offersTitle": "Antes de irte, ¿te ayudaría alguna de estas opciones?",
|
|
201
|
+
"cancel.accept": "Aceptar",
|
|
202
|
+
"cancel.confirm": "Cancelar al final del período",
|
|
203
|
+
"cancel.endsOn": "Tu suscripción termina el {date}. Mantienes el acceso hasta entonces.",
|
|
204
|
+
"cancel.endsAtPeriodEnd":
|
|
205
|
+
"Tu suscripción termina al final del período. Mantienes el acceso hasta entonces.",
|
|
206
|
+
"cancel.offerTaken": "Listo: {offer}. Tu suscripción continúa.",
|
|
207
|
+
"cancel.error": "Algo salió mal.",
|
|
208
|
+
|
|
209
|
+
"pricing.loading": "Cargando planes…",
|
|
210
|
+
"pricing.empty": "No hay planes disponibles.",
|
|
211
|
+
"pricing.monthly": "Mensual",
|
|
212
|
+
"pricing.annual": "Anual",
|
|
213
|
+
"pricing.current": "Actual",
|
|
214
|
+
"pricing.currentlyOn": "Tu plan actual: {plan}",
|
|
215
|
+
"pricing.choose": "Elegir {plan}",
|
|
216
|
+
"pricing.currentPlan": "Plan actual",
|
|
217
|
+
"pricing.choosePlan": "Elegir plan",
|
|
218
|
+
"pricing.perMonth": "/ mes",
|
|
219
|
+
"pricing.billedAnnually": "facturado anualmente",
|
|
220
|
+
"pricing.trial": "Prueba gratuita de {days} días",
|
|
221
|
+
"pricing.includes": "Incluye {parts} al mes",
|
|
222
|
+
"pricing.inputTokens": "{n} tokens de entrada",
|
|
223
|
+
"pricing.outputTokens": "{n} tokens de salida",
|
|
224
|
+
"pricing.apiCalls": "{n} llamadas a la API",
|
|
225
|
+
"pricing.per1M": "Por 1M de tokens:",
|
|
226
|
+
"pricing.past.billed": "Después, por 1M de tokens:",
|
|
227
|
+
"pricing.past.blocked": "El uso se detiene ahí hasta el próximo mes.",
|
|
228
|
+
"pricing.past.upgrade": "Después, tu plan se mejora automáticamente.",
|
|
229
|
+
"pricing.models": "Modelos: {names}",
|
|
230
|
+
"pricing.modelRates": "{model}: {input} entrada, {output} salida",
|
|
231
|
+
"pricing.apiCallRates": "Llamadas a la API: {ladder} por cada 1000",
|
|
232
|
+
"pricing.upTo": "{rate} hasta {n}",
|
|
233
|
+
"pricing.then": "luego",
|
|
234
|
+
|
|
235
|
+
"planChange.scheduledOn": "Programado: se aplica el {date}.",
|
|
236
|
+
"planChange.changed": "Plan cambiado.",
|
|
237
|
+
"planChange.changedTo": "Plan cambiado a {plan}.",
|
|
238
|
+
"planChange.failed": "No se pudo cambiar el plan.",
|
|
239
|
+
"planChange.scheduledCancelled": "Cambio programado cancelado.",
|
|
240
|
+
"planChange.cancelFailed": "No se pudo cancelar.",
|
|
241
|
+
"planChange.pending": "Cambio programado a {plan} el {date}.",
|
|
242
|
+
"planChange.cancel": "Cancelar",
|
|
243
|
+
"planChange.working": "Procesando…",
|
|
244
|
+
"planChange.now": "Cambiar ahora",
|
|
245
|
+
"planChange.schedule": "Programar para el final del período",
|
|
246
|
+
|
|
247
|
+
"preview.loading": "Cargando la vista previa…",
|
|
248
|
+
"preview.error": "No se pudo cargar la vista previa.",
|
|
249
|
+
"preview.empty": "No hay vista previa disponible.",
|
|
250
|
+
"preview.from": "De",
|
|
251
|
+
"preview.to": "A",
|
|
252
|
+
"preview.effective": "Vigente desde",
|
|
253
|
+
"preview.mrrNow": "MRR actual",
|
|
254
|
+
"preview.mrrAfter": "MRR después",
|
|
255
|
+
"preview.dueToday": "Cargo prorrateado hoy",
|
|
256
|
+
|
|
257
|
+
"credits.balance": "Saldo de créditos",
|
|
258
|
+
"credits.balanceLoading": "Cargando el saldo de créditos…",
|
|
259
|
+
"credits.balanceError": "No se pudo cargar el saldo de créditos.",
|
|
260
|
+
"credits.activeGrants.one": "{count} concesión activa",
|
|
261
|
+
"credits.activeGrants.other": "{count} concesiones activas",
|
|
262
|
+
"credits.topUp": "Recargar créditos",
|
|
263
|
+
"credits.grants": "Concesiones de crédito",
|
|
264
|
+
"credits.grantsLoading": "Cargando concesiones de crédito…",
|
|
265
|
+
"credits.grantsError": "No se pudieron cargar los créditos.",
|
|
266
|
+
"credits.noGrants": "No hay concesiones de crédito.",
|
|
267
|
+
"credits.noMatching": "No hay concesiones que coincidan.",
|
|
268
|
+
"credits.balanceOf": "Saldo {amount}",
|
|
269
|
+
"credits.source": "Origen",
|
|
270
|
+
"credits.amount": "Importe",
|
|
271
|
+
"credits.remaining": "Restante",
|
|
272
|
+
"credits.expires": "Vence",
|
|
273
|
+
"credits.status": "Estado",
|
|
274
|
+
"credits.utilLoading": "Cargando el uso…",
|
|
275
|
+
"credits.utilError": "No se pudo cargar el uso.",
|
|
276
|
+
"credits.utilEmpty": "Sin uso en este período.",
|
|
277
|
+
"credits.overTime": "Saldo de créditos a lo largo del tiempo",
|
|
278
|
+
"grant.active": "activa",
|
|
279
|
+
"grant.depleted": "agotada",
|
|
280
|
+
"grant.expired": "vencida",
|
|
281
|
+
"grant.revoked": "revocada",
|
|
282
|
+
|
|
283
|
+
"invoices.title": "Facturas",
|
|
284
|
+
"invoices.loading": "Cargando facturas…",
|
|
285
|
+
"invoices.error": "No se pudieron cargar las facturas.",
|
|
286
|
+
"invoices.empty": "Aún no hay facturas.",
|
|
287
|
+
"invoices.date": "Fecha",
|
|
288
|
+
"invoices.number": "Factura",
|
|
289
|
+
"invoices.status": "Estado",
|
|
290
|
+
"invoices.amount": "Importe",
|
|
291
|
+
"invoices.pdf": "PDF",
|
|
292
|
+
"invoices.downloadPdf": "Descargar el PDF de {number}",
|
|
293
|
+
"invoices.pay": "Pagar",
|
|
294
|
+
"invoices.view": "Ver",
|
|
295
|
+
"invoice.open": "Pendiente",
|
|
296
|
+
"invoice.paid": "Pagada",
|
|
297
|
+
"invoice.void": "Anulada",
|
|
298
|
+
"invoice.uncollectible": "Incobrable",
|
|
299
|
+
"invoice.draft": "Borrador",
|
|
300
|
+
|
|
301
|
+
"billing.update": "Actualizar el método de pago y los datos de facturación",
|
|
302
|
+
"billing.redirecting": "Redirigiendo…",
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
const fr = {
|
|
306
|
+
"portal.account": "Compte",
|
|
307
|
+
"portal.plans": "Forfaits",
|
|
308
|
+
"portal.credits": "Crédits",
|
|
309
|
+
|
|
310
|
+
"account.loading": "Chargement du compte…",
|
|
311
|
+
"account.error": "Impossible de charger le compte.",
|
|
312
|
+
"account.name": "Nom",
|
|
313
|
+
"account.email": "E-mail",
|
|
314
|
+
"account.plan": "Forfait",
|
|
315
|
+
"account.status": "Statut",
|
|
316
|
+
"account.periodEnds": "Fin de la période en cours",
|
|
317
|
+
"account.endsOn": "Se termine le",
|
|
318
|
+
"status.active": "actif",
|
|
319
|
+
"status.trialing": "en essai",
|
|
320
|
+
"status.past_due": "paiement en retard",
|
|
321
|
+
"status.incomplete": "incomplet",
|
|
322
|
+
"status.cancelling": "résiliation programmée",
|
|
323
|
+
"status.cancelled": "résilié",
|
|
324
|
+
|
|
325
|
+
"plans.loading": "Chargement des forfaits…",
|
|
326
|
+
"plans.error": "Impossible de charger les forfaits.",
|
|
327
|
+
"plans.annualNote":
|
|
328
|
+
"L'aperçu du coût n'est pas encore disponible pour la facturation annuelle. Le montant dû est confirmé au paiement.",
|
|
329
|
+
|
|
330
|
+
"cancel.button": "Résilier l'abonnement",
|
|
331
|
+
"cancel.why": "Pourquoi résiliez-vous ?",
|
|
332
|
+
"cancel.reasonLabel": "Motif de la résiliation",
|
|
333
|
+
"cancel.reason.too_expensive": "C'est trop cher",
|
|
334
|
+
"cancel.reason.missing_features": "Il manque des fonctionnalités dont j'ai besoin",
|
|
335
|
+
"cancel.reason.switched_to_competitor": "Je passe à un autre produit",
|
|
336
|
+
"cancel.reason.not_using": "Je ne l'utilise pas assez",
|
|
337
|
+
"cancel.reason.other": "Autre chose",
|
|
338
|
+
"cancel.detailPlaceholder": "Autre chose à nous dire ? (facultatif)",
|
|
339
|
+
"cancel.detailLabel": "Plus de détails",
|
|
340
|
+
"cancel.continue": "Continuer",
|
|
341
|
+
"cancel.keep": "Garder mon abonnement",
|
|
342
|
+
"cancel.offersTitle": "Avant de partir, l'une de ces offres vous aiderait-elle ?",
|
|
343
|
+
"cancel.accept": "Accepter",
|
|
344
|
+
"cancel.confirm": "Résilier à la fin de la période",
|
|
345
|
+
"cancel.endsOn": "Votre abonnement se termine le {date}. Vous gardez l'accès jusque-là.",
|
|
346
|
+
"cancel.endsAtPeriodEnd":
|
|
347
|
+
"Votre abonnement se termine à la fin de la période. Vous gardez l'accès jusque-là.",
|
|
348
|
+
"cancel.offerTaken": "C'est fait : {offer}. Votre abonnement continue.",
|
|
349
|
+
"cancel.error": "Une erreur s'est produite.",
|
|
350
|
+
|
|
351
|
+
"pricing.loading": "Chargement des forfaits…",
|
|
352
|
+
"pricing.empty": "Aucun forfait disponible.",
|
|
353
|
+
"pricing.monthly": "Mensuel",
|
|
354
|
+
"pricing.annual": "Annuel",
|
|
355
|
+
"pricing.current": "Actuel",
|
|
356
|
+
"pricing.currentlyOn": "Forfait actuel : {plan}",
|
|
357
|
+
"pricing.choose": "Choisir {plan}",
|
|
358
|
+
"pricing.currentPlan": "Forfait actuel",
|
|
359
|
+
"pricing.choosePlan": "Choisir ce forfait",
|
|
360
|
+
"pricing.perMonth": "/ mois",
|
|
361
|
+
"pricing.billedAnnually": "facturé annuellement",
|
|
362
|
+
"pricing.trial": "Essai gratuit de {days} jours",
|
|
363
|
+
"pricing.includes": "Inclut {parts} par mois",
|
|
364
|
+
"pricing.inputTokens": "{n} tokens en entrée",
|
|
365
|
+
"pricing.outputTokens": "{n} tokens en sortie",
|
|
366
|
+
"pricing.apiCalls": "{n} appels API",
|
|
367
|
+
"pricing.per1M": "Par million de tokens :",
|
|
368
|
+
"pricing.past.billed": "Au-delà, par million de tokens :",
|
|
369
|
+
"pricing.past.blocked": "L'utilisation s'arrête là jusqu'au mois prochain.",
|
|
370
|
+
"pricing.past.upgrade": "Au-delà, votre forfait passe automatiquement au niveau supérieur.",
|
|
371
|
+
"pricing.models": "Modèles : {names}",
|
|
372
|
+
"pricing.modelRates": "{model} : {input} en entrée, {output} en sortie",
|
|
373
|
+
"pricing.apiCallRates": "Appels API : {ladder} les 1 000",
|
|
374
|
+
"pricing.upTo": "{rate} jusqu'à {n}",
|
|
375
|
+
"pricing.then": "puis",
|
|
376
|
+
|
|
377
|
+
"planChange.scheduledOn": "Programmé : s'applique le {date}.",
|
|
378
|
+
"planChange.changed": "Forfait modifié.",
|
|
379
|
+
"planChange.changedTo": "Forfait changé pour {plan}.",
|
|
380
|
+
"planChange.failed": "Le changement de forfait a échoué.",
|
|
381
|
+
"planChange.scheduledCancelled": "Changement programmé annulé.",
|
|
382
|
+
"planChange.cancelFailed": "L'annulation a échoué.",
|
|
383
|
+
"planChange.pending": "Passage à {plan} programmé le {date}.",
|
|
384
|
+
"planChange.cancel": "Annuler",
|
|
385
|
+
"planChange.working": "En cours…",
|
|
386
|
+
"planChange.now": "Changer maintenant",
|
|
387
|
+
"planChange.schedule": "Programmer en fin de période",
|
|
388
|
+
|
|
389
|
+
"preview.loading": "Chargement de l'aperçu…",
|
|
390
|
+
"preview.error": "Impossible de charger l'aperçu.",
|
|
391
|
+
"preview.empty": "Aucun aperçu disponible.",
|
|
392
|
+
"preview.from": "De",
|
|
393
|
+
"preview.to": "Vers",
|
|
394
|
+
"preview.effective": "Prend effet",
|
|
395
|
+
"preview.mrrNow": "MRR actuel",
|
|
396
|
+
"preview.mrrAfter": "MRR après",
|
|
397
|
+
"preview.dueToday": "Montant au prorata aujourd'hui",
|
|
398
|
+
|
|
399
|
+
"credits.balance": "Solde de crédits",
|
|
400
|
+
"credits.balanceLoading": "Chargement du solde de crédits…",
|
|
401
|
+
"credits.balanceError": "Impossible de charger le solde de crédits.",
|
|
402
|
+
"credits.activeGrants.one": "{count} attribution active",
|
|
403
|
+
"credits.activeGrants.other": "{count} attributions actives",
|
|
404
|
+
"credits.topUp": "Recharger les crédits",
|
|
405
|
+
"credits.grants": "Attributions de crédits",
|
|
406
|
+
"credits.grantsLoading": "Chargement des attributions de crédits…",
|
|
407
|
+
"credits.grantsError": "Impossible de charger les crédits.",
|
|
408
|
+
"credits.noGrants": "Aucune attribution de crédits.",
|
|
409
|
+
"credits.noMatching": "Aucune attribution correspondante.",
|
|
410
|
+
"credits.balanceOf": "Solde {amount}",
|
|
411
|
+
"credits.source": "Source",
|
|
412
|
+
"credits.amount": "Montant",
|
|
413
|
+
"credits.remaining": "Restant",
|
|
414
|
+
"credits.expires": "Expire",
|
|
415
|
+
"credits.status": "Statut",
|
|
416
|
+
"credits.utilLoading": "Chargement de l'utilisation…",
|
|
417
|
+
"credits.utilError": "Impossible de charger l'utilisation.",
|
|
418
|
+
"credits.utilEmpty": "Aucune utilisation sur la période.",
|
|
419
|
+
"credits.overTime": "Évolution du solde de crédits",
|
|
420
|
+
"grant.active": "active",
|
|
421
|
+
"grant.depleted": "épuisée",
|
|
422
|
+
"grant.expired": "expirée",
|
|
423
|
+
"grant.revoked": "révoquée",
|
|
424
|
+
|
|
425
|
+
"invoices.title": "Factures",
|
|
426
|
+
"invoices.loading": "Chargement des factures…",
|
|
427
|
+
"invoices.error": "Impossible de charger les factures.",
|
|
428
|
+
"invoices.empty": "Aucune facture pour l'instant.",
|
|
429
|
+
"invoices.date": "Date",
|
|
430
|
+
"invoices.number": "Facture",
|
|
431
|
+
"invoices.status": "Statut",
|
|
432
|
+
"invoices.amount": "Montant",
|
|
433
|
+
"invoices.pdf": "PDF",
|
|
434
|
+
"invoices.downloadPdf": "Télécharger le PDF de {number}",
|
|
435
|
+
"invoices.pay": "Payer",
|
|
436
|
+
"invoices.view": "Voir",
|
|
437
|
+
"invoice.open": "À payer",
|
|
438
|
+
"invoice.paid": "Payée",
|
|
439
|
+
"invoice.void": "Annulée",
|
|
440
|
+
"invoice.uncollectible": "Irrécouvrable",
|
|
441
|
+
"invoice.draft": "Brouillon",
|
|
442
|
+
|
|
443
|
+
"billing.update": "Mettre à jour le moyen de paiement et les informations de facturation",
|
|
444
|
+
"billing.redirecting": "Redirection…",
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
const de = {
|
|
448
|
+
"portal.account": "Konto",
|
|
449
|
+
"portal.plans": "Tarife",
|
|
450
|
+
"portal.credits": "Guthaben",
|
|
451
|
+
|
|
452
|
+
"account.loading": "Konto wird geladen…",
|
|
453
|
+
"account.error": "Das Konto konnte nicht geladen werden.",
|
|
454
|
+
"account.name": "Name",
|
|
455
|
+
"account.email": "E-Mail",
|
|
456
|
+
"account.plan": "Tarif",
|
|
457
|
+
"account.status": "Status",
|
|
458
|
+
"account.periodEnds": "Aktueller Zeitraum endet",
|
|
459
|
+
"account.endsOn": "Endet am",
|
|
460
|
+
"status.active": "aktiv",
|
|
461
|
+
"status.trialing": "Testphase",
|
|
462
|
+
"status.past_due": "Zahlung überfällig",
|
|
463
|
+
"status.incomplete": "unvollständig",
|
|
464
|
+
"status.cancelling": "Kündigung vorgemerkt",
|
|
465
|
+
"status.cancelled": "gekündigt",
|
|
466
|
+
|
|
467
|
+
"plans.loading": "Tarife werden geladen…",
|
|
468
|
+
"plans.error": "Die Tarife konnten nicht geladen werden.",
|
|
469
|
+
"plans.annualNote":
|
|
470
|
+
"Eine Kostenvorschau ist für die jährliche Abrechnung noch nicht verfügbar. Der fällige Betrag wird beim Bezahlen bestätigt.",
|
|
471
|
+
|
|
472
|
+
"cancel.button": "Abonnement kündigen",
|
|
473
|
+
"cancel.why": "Warum möchten Sie kündigen?",
|
|
474
|
+
"cancel.reasonLabel": "Kündigungsgrund",
|
|
475
|
+
"cancel.reason.too_expensive": "Es ist zu teuer",
|
|
476
|
+
"cancel.reason.missing_features": "Mir fehlen Funktionen, die ich brauche",
|
|
477
|
+
"cancel.reason.switched_to_competitor": "Ich wechsle zu einem anderen Produkt",
|
|
478
|
+
"cancel.reason.not_using": "Ich nutze es zu wenig",
|
|
479
|
+
"cancel.reason.other": "Etwas anderes",
|
|
480
|
+
"cancel.detailPlaceholder": "Gibt es noch etwas, das wir wissen sollten? (optional)",
|
|
481
|
+
"cancel.detailLabel": "Weitere Details",
|
|
482
|
+
"cancel.continue": "Weiter",
|
|
483
|
+
"cancel.keep": "Abonnement behalten",
|
|
484
|
+
"cancel.offersTitle": "Bevor Sie gehen: Würde Ihnen eines dieser Angebote helfen?",
|
|
485
|
+
"cancel.accept": "Annehmen",
|
|
486
|
+
"cancel.confirm": "Zum Ende des Zeitraums kündigen",
|
|
487
|
+
"cancel.endsOn": "Ihr Abonnement endet am {date}. Bis dahin behalten Sie den Zugang.",
|
|
488
|
+
"cancel.endsAtPeriodEnd":
|
|
489
|
+
"Ihr Abonnement endet zum Ende des Zeitraums. Bis dahin behalten Sie den Zugang.",
|
|
490
|
+
"cancel.offerTaken": "Erledigt: {offer}. Ihr Abonnement läuft weiter.",
|
|
491
|
+
"cancel.error": "Etwas ist schiefgelaufen.",
|
|
492
|
+
|
|
493
|
+
"pricing.loading": "Tarife werden geladen…",
|
|
494
|
+
"pricing.empty": "Keine Tarife verfügbar.",
|
|
495
|
+
"pricing.monthly": "Monatlich",
|
|
496
|
+
"pricing.annual": "Jährlich",
|
|
497
|
+
"pricing.current": "Aktuell",
|
|
498
|
+
"pricing.currentlyOn": "Aktueller Tarif: {plan}",
|
|
499
|
+
"pricing.choose": "{plan} wählen",
|
|
500
|
+
"pricing.currentPlan": "Aktueller Tarif",
|
|
501
|
+
"pricing.choosePlan": "Tarif wählen",
|
|
502
|
+
"pricing.perMonth": "/ Monat",
|
|
503
|
+
"pricing.billedAnnually": "jährlich abgerechnet",
|
|
504
|
+
"pricing.trial": "{days} Tage kostenlos testen",
|
|
505
|
+
"pricing.includes": "Enthält {parts} pro Monat",
|
|
506
|
+
"pricing.inputTokens": "{n} Input-Tokens",
|
|
507
|
+
"pricing.outputTokens": "{n} Output-Tokens",
|
|
508
|
+
"pricing.apiCalls": "{n} API-Aufrufe",
|
|
509
|
+
"pricing.per1M": "Pro 1 Mio. Tokens:",
|
|
510
|
+
"pricing.past.billed": "Darüber hinaus pro 1 Mio. Tokens:",
|
|
511
|
+
"pricing.past.blocked": "Die Nutzung stoppt dann bis zum nächsten Monat.",
|
|
512
|
+
"pricing.past.upgrade": "Darüber hinaus wird Ihr Tarif automatisch hochgestuft.",
|
|
513
|
+
"pricing.models": "Modelle: {names}",
|
|
514
|
+
"pricing.modelRates": "{model}: {input} Input, {output} Output",
|
|
515
|
+
"pricing.apiCallRates": "API-Aufrufe: {ladder} pro 1.000",
|
|
516
|
+
"pricing.upTo": "{rate} bis {n}",
|
|
517
|
+
"pricing.then": "danach",
|
|
518
|
+
|
|
519
|
+
"planChange.scheduledOn": "Geplant: gilt ab {date}.",
|
|
520
|
+
"planChange.changed": "Tarif geändert.",
|
|
521
|
+
"planChange.changedTo": "Tarif geändert zu {plan}.",
|
|
522
|
+
"planChange.failed": "Der Tarifwechsel ist fehlgeschlagen.",
|
|
523
|
+
"planChange.scheduledCancelled": "Geplante Änderung storniert.",
|
|
524
|
+
"planChange.cancelFailed": "Die Stornierung ist fehlgeschlagen.",
|
|
525
|
+
"planChange.pending": "Geplanter Wechsel zu {plan} am {date}.",
|
|
526
|
+
"planChange.cancel": "Stornieren",
|
|
527
|
+
"planChange.working": "Wird bearbeitet…",
|
|
528
|
+
"planChange.now": "Jetzt wechseln",
|
|
529
|
+
"planChange.schedule": "Zum Ende des Zeitraums planen",
|
|
530
|
+
|
|
531
|
+
"preview.loading": "Vorschau wird geladen…",
|
|
532
|
+
"preview.error": "Die Vorschau konnte nicht geladen werden.",
|
|
533
|
+
"preview.empty": "Keine Vorschau verfügbar.",
|
|
534
|
+
"preview.from": "Von",
|
|
535
|
+
"preview.to": "Zu",
|
|
536
|
+
"preview.effective": "Gültig ab",
|
|
537
|
+
"preview.mrrNow": "MRR jetzt",
|
|
538
|
+
"preview.mrrAfter": "MRR danach",
|
|
539
|
+
"preview.dueToday": "Anteilige Gebühr heute",
|
|
540
|
+
|
|
541
|
+
"credits.balance": "Guthaben",
|
|
542
|
+
"credits.balanceLoading": "Guthaben wird geladen…",
|
|
543
|
+
"credits.balanceError": "Das Guthaben konnte nicht geladen werden.",
|
|
544
|
+
"credits.activeGrants.one": "{count} aktive Gutschrift",
|
|
545
|
+
"credits.activeGrants.other": "{count} aktive Gutschriften",
|
|
546
|
+
"credits.topUp": "Guthaben aufladen",
|
|
547
|
+
"credits.grants": "Gutschriften",
|
|
548
|
+
"credits.grantsLoading": "Gutschriften werden geladen…",
|
|
549
|
+
"credits.grantsError": "Das Guthaben konnte nicht geladen werden.",
|
|
550
|
+
"credits.noGrants": "Keine Gutschriften.",
|
|
551
|
+
"credits.noMatching": "Keine passenden Gutschriften.",
|
|
552
|
+
"credits.balanceOf": "Guthaben {amount}",
|
|
553
|
+
"credits.source": "Quelle",
|
|
554
|
+
"credits.amount": "Betrag",
|
|
555
|
+
"credits.remaining": "Verbleibend",
|
|
556
|
+
"credits.expires": "Läuft ab",
|
|
557
|
+
"credits.status": "Status",
|
|
558
|
+
"credits.utilLoading": "Nutzung wird geladen…",
|
|
559
|
+
"credits.utilError": "Die Nutzung konnte nicht geladen werden.",
|
|
560
|
+
"credits.utilEmpty": "Keine Nutzung im Zeitraum.",
|
|
561
|
+
"credits.overTime": "Guthaben im Zeitverlauf",
|
|
562
|
+
"grant.active": "aktiv",
|
|
563
|
+
"grant.depleted": "aufgebraucht",
|
|
564
|
+
"grant.expired": "abgelaufen",
|
|
565
|
+
"grant.revoked": "widerrufen",
|
|
566
|
+
|
|
567
|
+
"invoices.title": "Rechnungen",
|
|
568
|
+
"invoices.loading": "Rechnungen werden geladen…",
|
|
569
|
+
"invoices.error": "Die Rechnungen konnten nicht geladen werden.",
|
|
570
|
+
"invoices.empty": "Noch keine Rechnungen.",
|
|
571
|
+
"invoices.date": "Datum",
|
|
572
|
+
"invoices.number": "Rechnung",
|
|
573
|
+
"invoices.status": "Status",
|
|
574
|
+
"invoices.amount": "Betrag",
|
|
575
|
+
"invoices.pdf": "PDF",
|
|
576
|
+
"invoices.downloadPdf": "PDF von {number} herunterladen",
|
|
577
|
+
"invoices.pay": "Bezahlen",
|
|
578
|
+
"invoices.view": "Ansehen",
|
|
579
|
+
"invoice.open": "Fällig",
|
|
580
|
+
"invoice.paid": "Bezahlt",
|
|
581
|
+
"invoice.void": "Storniert",
|
|
582
|
+
"invoice.uncollectible": "Uneinbringlich",
|
|
583
|
+
"invoice.draft": "Entwurf",
|
|
584
|
+
|
|
585
|
+
"billing.update": "Zahlungsmethode und Rechnungsdaten aktualisieren",
|
|
586
|
+
"billing.redirecting": "Weiterleitung…",
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
const CATALOGS = { en, es, fr, de };
|
|
590
|
+
|
|
591
|
+
// A locale Intl accepts, or undefined (the browser's own).
|
|
592
|
+
function intlLocale(locale) {
|
|
593
|
+
if (!locale) return undefined;
|
|
594
|
+
try {
|
|
595
|
+
return Intl.getCanonicalLocales(locale)[0];
|
|
596
|
+
} catch (_) {
|
|
597
|
+
return undefined;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/** The translator and formatters for `locale`, with `messages` overriding the catalog. */
|
|
602
|
+
function createI18n(locale, messages) {
|
|
603
|
+
const tag = intlLocale(locale);
|
|
604
|
+
const lang = (tag || "en").split("-")[0].toLowerCase();
|
|
605
|
+
const table = { ...en, ...CATALOGS[lang], ...messages };
|
|
606
|
+
|
|
607
|
+
// `fallback` (default: the key itself) when no catalog has the key.
|
|
608
|
+
function t(key, vars, fallback = key) {
|
|
609
|
+
let msg = table[key];
|
|
610
|
+
if (typeof vars?.count === "number" && table[`${key}.other`] != null) {
|
|
611
|
+
const form = new Intl.PluralRules(tag).select(vars.count);
|
|
612
|
+
msg = table[`${key}.${form}`] ?? table[`${key}.other`];
|
|
613
|
+
}
|
|
614
|
+
if (msg == null) return fallback;
|
|
615
|
+
return String(msg).replace(/\{(\w+)\}/g, (m, name) =>
|
|
616
|
+
vars?.[name] != null ? String(vars[name]) : m,
|
|
617
|
+
);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
function number(n, options) {
|
|
621
|
+
return new Intl.NumberFormat(tag, options).format(n);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
// `amount` in the currency's major unit, whole amounts without decimals;
|
|
625
|
+
// "—" when there's none.
|
|
626
|
+
function money(amount, currency = "USD", options = {}) {
|
|
627
|
+
if (amount == null) return "—";
|
|
628
|
+
const n = Number(amount);
|
|
629
|
+
const whole = n % 1 === 0 ? { minimumFractionDigits: 0, maximumFractionDigits: 0 } : {};
|
|
630
|
+
try {
|
|
631
|
+
return number(n, { style: "currency", currency, ...whole, ...options });
|
|
632
|
+
} catch (_) {
|
|
633
|
+
return `${currency} ${amount}`;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
// The calendar date of an ISO timestamp, as written in `locale` (UTC, so a
|
|
638
|
+
// date never shifts a day with the viewer's time zone).
|
|
639
|
+
function date(iso) {
|
|
640
|
+
if (!iso) return "—";
|
|
641
|
+
const d = new Date(iso);
|
|
642
|
+
if (Number.isNaN(d.getTime())) return String(iso);
|
|
643
|
+
return new Intl.DateTimeFormat(tag, { dateStyle: "medium", timeZone: "UTC" }).format(d);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
return { locale: tag, t, number, money, date };
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
const DEFAULT = createI18n();
|
|
650
|
+
const I18nContext = React.createContext(DEFAULT);
|
|
651
|
+
|
|
652
|
+
function LocaleProvider({ locale, messages, children }) {
|
|
653
|
+
const value = React.useMemo(() => createI18n(locale, messages), [locale, messages]);
|
|
654
|
+
return React.createElement(I18nContext.Provider, { value }, children);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
/** `{ t, locale, number, money, date }` for the nearest <LocaleProvider> (English otherwise). */
|
|
658
|
+
function useI18n() {
|
|
659
|
+
return React.useContext(I18nContext);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
module.exports = { LocaleProvider, useI18n, createI18n, CATALOGS };
|