@outerjoyn/react-native 1.1.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.
@@ -0,0 +1,666 @@
1
+ /**
2
+ * i18n — Lightweight localization for the OuterJoyn RN SDK
3
+ *
4
+ * Custom ~100 LOC string lookup (not i18next — too heavy for an SDK).
5
+ * Uses expo-localization for device locale detection.
6
+ * Customers can override any string via the provider's `translations` prop.
7
+ *
8
+ * Supported languages: EN, ES, FR, PT, DE, JA
9
+ * ~50 translatable strings, all bundled (~20KB total).
10
+ */
11
+
12
+ // =============================================================================
13
+ // String Tables
14
+ // =============================================================================
15
+
16
+ const strings: Record<string, Record<string, string>> = {
17
+ en: {
18
+ // Banner
19
+ 'banner.pay_with_points': 'Pay with Points',
20
+ 'banner.new_pay_with_points': 'NEW: Pay with Points',
21
+ 'banner.available': '{{amount}} available',
22
+ 'banner.use_points_here': 'Use your loyalty points here',
23
+ 'banner.connect_programs': 'Connect Your Programs',
24
+ 'banner.points_from': '{{count}} points from {{programs}} programs',
25
+
26
+ // Balance
27
+ 'balance.total_value': 'Total Available Value',
28
+ 'balance.points_across': '{{count}} points across {{programs}} programs',
29
+ 'balance.in_rewards': '{{amount}} in rewards',
30
+
31
+ // Connect
32
+ 'connect.title': 'Connect a Program',
33
+ 'connect.link_loyalty': 'Link Your Loyalty',
34
+ 'connect.link_desc': 'Connect your rewards programs to earn and redeem points',
35
+ 'connect.search': 'Search programs...',
36
+ 'connect.connected': 'Connected',
37
+ 'connect.authorize': 'Authorize',
38
+ 'connect.deny': 'Deny',
39
+ 'connect.authorize_access': 'Authorize Access',
40
+ 'connect.requesting_access': '{{brand}} is requesting access to your {{program}} account.',
41
+ 'connect.view_balance': 'View your points balance',
42
+ 'connect.redeem_points': 'Redeem points for purchases',
43
+ 'connect.view_tier': 'View your membership tier',
44
+ 'connect.secured': 'Secured by OuterJoyn',
45
+ 'connect.success': 'Connected!',
46
+ 'connect.success_desc': '{{program}} has been linked to your account.',
47
+ 'connect.all_connected': 'All Programs Connected!',
48
+ 'connect.remove_title': 'Remove Program',
49
+ 'connect.remove_confirm': 'Disconnect {{program}} from your account?',
50
+
51
+ // Pay
52
+ 'pay.apply_points': 'Apply Points',
53
+ 'pay.use_max': 'Use Max',
54
+ 'pay.points_off': '{{points}} pts = {{amount}} off',
55
+ 'pay.applied': '{{points}} pts applied',
56
+ 'pay.fully_covered': 'Fully covered by points!',
57
+ 'pay.order_summary': 'Order Summary',
58
+
59
+ // Exchange
60
+ 'exchange.title': 'Exchange Points',
61
+ 'exchange.from': 'From',
62
+ 'exchange.to': 'To',
63
+ 'exchange.rate': '{{rate}}x rate',
64
+ 'exchange.confirm': 'Confirm Exchange',
65
+ 'exchange.success': 'Exchange Complete',
66
+ 'exchange.success_desc': 'Exchanged {{from_amount}} {{from_currency}} → {{to_amount}} {{to_currency}}',
67
+
68
+ // Redeem
69
+ 'redeem.title': 'Redeem Rewards',
70
+ 'redeem.search': 'Search rewards...',
71
+ 'redeem.points': '{{cost}} points',
72
+ 'redeem.confirm': 'Redeem {{name}} for {{cost}} points?',
73
+ 'redeem.success': 'Redeemed successfully!',
74
+ 'redeem.insufficient': 'Not enough points',
75
+ 'redeem.copy_code': 'Copy Code',
76
+ 'redeem.copied': 'Copied!',
77
+ 'redeem.browse_more': 'Browse More',
78
+
79
+ // Account
80
+ 'account.title': 'My Account',
81
+ 'account.programs_linked': '{{count}} programs linked',
82
+ 'account.recent_activity': 'Recent Activity',
83
+ 'account.no_activity': 'No activity yet',
84
+ 'account.unlink': 'Disconnect',
85
+
86
+ // Profile
87
+ 'profile.loyalty_programs': 'Loyalty Programs',
88
+ 'profile.manage': 'Manage',
89
+ 'profile.connect_programs': 'Connect Loyalty Programs',
90
+ 'profile.total_value': '~{{amount}} value across {{count}} programs',
91
+
92
+ // Post-checkout
93
+ 'postcheckout.save_title': 'Save Your Programs',
94
+ 'postcheckout.save_desc': 'Save your linked programs for next time — verify your phone number',
95
+ 'postcheckout.phone_placeholder': 'Phone number',
96
+ 'postcheckout.send_code': 'Send Code',
97
+ 'postcheckout.enter_code': 'Enter verification code',
98
+ 'postcheckout.verify': 'Verify',
99
+ 'postcheckout.skip': 'Skip for now',
100
+ 'postcheckout.secured': 'Your credentials are never shared.',
101
+
102
+ // Common
103
+ 'common.loading': 'Loading...',
104
+ 'common.retry': 'Retry',
105
+ 'common.close': 'Close',
106
+ 'common.cancel': 'Cancel',
107
+ 'common.remove': 'Remove',
108
+ 'common.ok': 'OK',
109
+ 'common.done': 'Done',
110
+ 'common.error': 'Something went wrong',
111
+ 'common.offline': "You're offline. Some features are unavailable.",
112
+ 'common.last_updated': 'Last updated {{time}}',
113
+ 'common.sync_to_view': 'Sync to view',
114
+ 'common.powered_by': 'Powered by OuterJoyn',
115
+ },
116
+
117
+ es: {
118
+ // Banner
119
+ 'banner.pay_with_points': 'Pagar con Puntos',
120
+ 'banner.new_pay_with_points': 'NUEVO: Pagar con Puntos',
121
+ 'banner.available': '{{amount}} disponible',
122
+ 'banner.use_points_here': 'Usa tus puntos de fidelidad aquí',
123
+ 'banner.connect_programs': 'Conectar Programas',
124
+ 'banner.points_from': '{{count}} puntos de {{programs}} programas',
125
+
126
+ // Balance
127
+ 'balance.total_value': 'Valor Total Disponible',
128
+ 'balance.points_across': '{{count}} puntos en {{programs}} programas',
129
+ 'balance.in_rewards': '{{amount}} en recompensas',
130
+
131
+ // Connect
132
+ 'connect.title': 'Conectar un Programa',
133
+ 'connect.link_loyalty': 'Vincula tu Fidelidad',
134
+ 'connect.link_desc': 'Conecta tus programas de recompensas para ganar y canjear puntos',
135
+ 'connect.search': 'Buscar programas...',
136
+ 'connect.connected': 'Conectado',
137
+ 'connect.authorize': 'Autorizar',
138
+ 'connect.deny': 'Denegar',
139
+ 'connect.authorize_access': 'Autorizar Acceso',
140
+ 'connect.requesting_access': '{{brand}} solicita acceso a tu cuenta de {{program}}.',
141
+ 'connect.view_balance': 'Ver tu saldo de puntos',
142
+ 'connect.redeem_points': 'Canjear puntos por compras',
143
+ 'connect.view_tier': 'Ver tu nivel de membresía',
144
+ 'connect.secured': 'Protegido por OuterJoyn',
145
+ 'connect.success': '¡Conectado!',
146
+ 'connect.success_desc': '{{program}} ha sido vinculado a tu cuenta.',
147
+ 'connect.all_connected': '¡Todos los Programas Conectados!',
148
+ 'connect.remove_title': 'Eliminar Programa',
149
+ 'connect.remove_confirm': '¿Desconectar {{program}} de tu cuenta?',
150
+
151
+ // Pay
152
+ 'pay.apply_points': 'Aplicar Puntos',
153
+ 'pay.use_max': 'Usar Máximo',
154
+ 'pay.points_off': '{{points}} pts = {{amount}} de descuento',
155
+ 'pay.applied': '{{points}} pts aplicados',
156
+ 'pay.fully_covered': '¡Totalmente cubierto con puntos!',
157
+ 'pay.order_summary': 'Resumen del Pedido',
158
+
159
+ // Exchange
160
+ 'exchange.title': 'Intercambiar Puntos',
161
+ 'exchange.from': 'Desde',
162
+ 'exchange.to': 'Hacia',
163
+ 'exchange.rate': 'Tasa {{rate}}x',
164
+ 'exchange.confirm': 'Confirmar Intercambio',
165
+ 'exchange.success': 'Intercambio Completado',
166
+ 'exchange.success_desc': 'Intercambiado {{from_amount}} {{from_currency}} → {{to_amount}} {{to_currency}}',
167
+
168
+ // Redeem
169
+ 'redeem.title': 'Canjear Recompensas',
170
+ 'redeem.search': 'Buscar recompensas...',
171
+ 'redeem.points': '{{cost}} puntos',
172
+ 'redeem.confirm': '¿Canjear {{name}} por {{cost}} puntos?',
173
+ 'redeem.success': '¡Canjeado con éxito!',
174
+ 'redeem.insufficient': 'Puntos insuficientes',
175
+ 'redeem.copy_code': 'Copiar Código',
176
+ 'redeem.copied': '¡Copiado!',
177
+ 'redeem.browse_more': 'Ver Más',
178
+
179
+ // Account
180
+ 'account.title': 'Mi Cuenta',
181
+ 'account.programs_linked': '{{count}} programas vinculados',
182
+ 'account.recent_activity': 'Actividad Reciente',
183
+ 'account.no_activity': 'Sin actividad aún',
184
+ 'account.unlink': 'Desvincular',
185
+
186
+ // Profile
187
+ 'profile.loyalty_programs': 'Programas de Fidelidad',
188
+ 'profile.manage': 'Gestionar',
189
+ 'profile.connect_programs': 'Conectar Programas de Fidelidad',
190
+ 'profile.total_value': '~{{amount}} de valor en {{count}} programas',
191
+
192
+ // Post-checkout
193
+ 'postcheckout.save_title': 'Guardar tus Programas',
194
+ 'postcheckout.save_desc': 'Guarda tus programas vinculados para la próxima vez — verifica tu número de teléfono',
195
+ 'postcheckout.phone_placeholder': 'Número de teléfono',
196
+ 'postcheckout.send_code': 'Enviar Código',
197
+ 'postcheckout.enter_code': 'Ingresa el código de verificación',
198
+ 'postcheckout.verify': 'Verificar',
199
+ 'postcheckout.skip': 'Omitir por ahora',
200
+ 'postcheckout.secured': 'Tus credenciales nunca se comparten.',
201
+
202
+ // Common
203
+ 'common.loading': 'Cargando...',
204
+ 'common.retry': 'Reintentar',
205
+ 'common.close': 'Cerrar',
206
+ 'common.cancel': 'Cancelar',
207
+ 'common.remove': 'Eliminar',
208
+ 'common.ok': 'OK',
209
+ 'common.done': 'Listo',
210
+ 'common.error': 'Algo salió mal',
211
+ 'common.offline': 'Estás sin conexión. Algunas funciones no están disponibles.',
212
+ 'common.last_updated': 'Última actualización {{time}}',
213
+ 'common.sync_to_view': 'Sincronizar para ver',
214
+ 'common.powered_by': 'Desarrollado por OuterJoyn',
215
+ },
216
+
217
+ fr: {
218
+ // Banner
219
+ 'banner.pay_with_points': 'Payer avec des Points',
220
+ 'banner.new_pay_with_points': 'NOUVEAU : Payer avec des Points',
221
+ 'banner.available': '{{amount}} disponible',
222
+ 'banner.use_points_here': 'Utilisez vos points de fidélité ici',
223
+ 'banner.connect_programs': 'Connecter vos Programmes',
224
+ 'banner.points_from': '{{count}} points de {{programs}} programmes',
225
+
226
+ // Balance
227
+ 'balance.total_value': 'Valeur Totale Disponible',
228
+ 'balance.points_across': '{{count}} points dans {{programs}} programmes',
229
+ 'balance.in_rewards': '{{amount}} en récompenses',
230
+
231
+ // Connect
232
+ 'connect.title': 'Connecter un Programme',
233
+ 'connect.link_loyalty': 'Liez votre Fidélité',
234
+ 'connect.link_desc': 'Connectez vos programmes de récompenses pour gagner et échanger des points',
235
+ 'connect.search': 'Rechercher des programmes...',
236
+ 'connect.connected': 'Connecté',
237
+ 'connect.authorize': 'Autoriser',
238
+ 'connect.deny': 'Refuser',
239
+ 'connect.authorize_access': 'Autoriser l\'accès',
240
+ 'connect.requesting_access': '{{brand}} demande l\'accès à votre compte {{program}}.',
241
+ 'connect.view_balance': 'Voir votre solde de points',
242
+ 'connect.redeem_points': 'Échanger des points contre des achats',
243
+ 'connect.view_tier': 'Voir votre niveau de membre',
244
+ 'connect.secured': 'Sécurisé par OuterJoyn',
245
+ 'connect.success': 'Connecté !',
246
+ 'connect.success_desc': '{{program}} a été lié à votre compte.',
247
+ 'connect.all_connected': 'Tous les Programmes Connectés !',
248
+ 'connect.remove_title': 'Supprimer le Programme',
249
+ 'connect.remove_confirm': 'Déconnecter {{program}} de votre compte ?',
250
+
251
+ // Pay
252
+ 'pay.apply_points': 'Appliquer les Points',
253
+ 'pay.use_max': 'Utiliser le Maximum',
254
+ 'pay.points_off': '{{points}} pts = {{amount}} de réduction',
255
+ 'pay.applied': '{{points}} pts appliqués',
256
+ 'pay.fully_covered': 'Entièrement couvert par les points !',
257
+ 'pay.order_summary': 'Récapitulatif de Commande',
258
+
259
+ // Exchange
260
+ 'exchange.title': 'Échanger des Points',
261
+ 'exchange.from': 'De',
262
+ 'exchange.to': 'Vers',
263
+ 'exchange.rate': 'Taux {{rate}}x',
264
+ 'exchange.confirm': 'Confirmer l\'Échange',
265
+ 'exchange.success': 'Échange Terminé',
266
+ 'exchange.success_desc': 'Échangé {{from_amount}} {{from_currency}} → {{to_amount}} {{to_currency}}',
267
+
268
+ // Redeem
269
+ 'redeem.title': 'Échanger des Récompenses',
270
+ 'redeem.search': 'Rechercher des récompenses...',
271
+ 'redeem.points': '{{cost}} points',
272
+ 'redeem.confirm': 'Échanger {{name}} pour {{cost}} points ?',
273
+ 'redeem.success': 'Échangé avec succès !',
274
+ 'redeem.insufficient': 'Points insuffisants',
275
+ 'redeem.copy_code': 'Copier le Code',
276
+ 'redeem.copied': 'Copié !',
277
+ 'redeem.browse_more': 'Voir Plus',
278
+
279
+ // Account
280
+ 'account.title': 'Mon Compte',
281
+ 'account.programs_linked': '{{count}} programmes liés',
282
+ 'account.recent_activity': 'Activité Récente',
283
+ 'account.no_activity': 'Aucune activité pour le moment',
284
+ 'account.unlink': 'Délier',
285
+
286
+ // Profile
287
+ 'profile.loyalty_programs': 'Programmes de Fidélité',
288
+ 'profile.manage': 'Gérer',
289
+ 'profile.connect_programs': 'Connecter des Programmes de Fidélité',
290
+ 'profile.total_value': '~{{amount}} de valeur dans {{count}} programmes',
291
+
292
+ // Post-checkout
293
+ 'postcheckout.save_title': 'Enregistrer vos Programmes',
294
+ 'postcheckout.save_desc': 'Enregistrez vos programmes liés pour la prochaine fois — vérifiez votre numéro de téléphone',
295
+ 'postcheckout.phone_placeholder': 'Numéro de téléphone',
296
+ 'postcheckout.send_code': 'Envoyer le Code',
297
+ 'postcheckout.enter_code': 'Entrez le code de vérification',
298
+ 'postcheckout.verify': 'Vérifier',
299
+ 'postcheckout.skip': 'Passer pour le moment',
300
+ 'postcheckout.secured': 'Vos identifiants ne sont jamais partagés.',
301
+
302
+ // Common
303
+ 'common.loading': 'Chargement...',
304
+ 'common.retry': 'Réessayer',
305
+ 'common.close': 'Fermer',
306
+ 'common.cancel': 'Annuler',
307
+ 'common.remove': 'Supprimer',
308
+ 'common.ok': 'OK',
309
+ 'common.done': 'Terminé',
310
+ 'common.error': 'Une erreur est survenue',
311
+ 'common.offline': 'Vous êtes hors ligne. Certaines fonctionnalités sont indisponibles.',
312
+ 'common.last_updated': 'Dernière mise à jour {{time}}',
313
+ 'common.sync_to_view': 'Synchroniser pour voir',
314
+ 'common.powered_by': 'Propulsé par OuterJoyn',
315
+ },
316
+
317
+ pt: {
318
+ // Banner
319
+ 'banner.pay_with_points': 'Pagar com Pontos',
320
+ 'banner.new_pay_with_points': 'NOVO: Pagar com Pontos',
321
+ 'banner.available': '{{amount}} disponível',
322
+ 'banner.use_points_here': 'Use seus pontos de fidelidade aqui',
323
+ 'banner.connect_programs': 'Conectar Programas',
324
+ 'banner.points_from': '{{count}} pontos de {{programs}} programas',
325
+
326
+ // Balance
327
+ 'balance.total_value': 'Valor Total Disponível',
328
+ 'balance.points_across': '{{count}} pontos em {{programs}} programas',
329
+ 'balance.in_rewards': '{{amount}} em recompensas',
330
+
331
+ // Connect
332
+ 'connect.title': 'Conectar um Programa',
333
+ 'connect.link_loyalty': 'Vincule sua Fidelidade',
334
+ 'connect.link_desc': 'Conecte seus programas de recompensas para ganhar e resgatar pontos',
335
+ 'connect.search': 'Buscar programas...',
336
+ 'connect.connected': 'Conectado',
337
+ 'connect.authorize': 'Autorizar',
338
+ 'connect.deny': 'Negar',
339
+ 'connect.authorize_access': 'Autorizar Acesso',
340
+ 'connect.requesting_access': '{{brand}} está solicitando acesso à sua conta {{program}}.',
341
+ 'connect.view_balance': 'Ver seu saldo de pontos',
342
+ 'connect.redeem_points': 'Resgatar pontos por compras',
343
+ 'connect.view_tier': 'Ver seu nível de membro',
344
+ 'connect.secured': 'Protegido por OuterJoyn',
345
+ 'connect.success': 'Conectado!',
346
+ 'connect.success_desc': '{{program}} foi vinculado à sua conta.',
347
+ 'connect.all_connected': 'Todos os Programas Conectados!',
348
+ 'connect.remove_title': 'Remover Programa',
349
+ 'connect.remove_confirm': 'Desconectar {{program}} da sua conta?',
350
+
351
+ // Pay
352
+ 'pay.apply_points': 'Aplicar Pontos',
353
+ 'pay.use_max': 'Usar Máximo',
354
+ 'pay.points_off': '{{points}} pts = {{amount}} de desconto',
355
+ 'pay.applied': '{{points}} pts aplicados',
356
+ 'pay.fully_covered': 'Totalmente coberto com pontos!',
357
+ 'pay.order_summary': 'Resumo do Pedido',
358
+
359
+ // Exchange
360
+ 'exchange.title': 'Trocar Pontos',
361
+ 'exchange.from': 'De',
362
+ 'exchange.to': 'Para',
363
+ 'exchange.rate': 'Taxa {{rate}}x',
364
+ 'exchange.confirm': 'Confirmar Troca',
365
+ 'exchange.success': 'Troca Concluída',
366
+ 'exchange.success_desc': 'Trocou {{from_amount}} {{from_currency}} → {{to_amount}} {{to_currency}}',
367
+
368
+ // Redeem
369
+ 'redeem.title': 'Resgatar Recompensas',
370
+ 'redeem.search': 'Buscar recompensas...',
371
+ 'redeem.points': '{{cost}} pontos',
372
+ 'redeem.confirm': 'Resgatar {{name}} por {{cost}} pontos?',
373
+ 'redeem.success': 'Resgatado com sucesso!',
374
+ 'redeem.insufficient': 'Pontos insuficientes',
375
+ 'redeem.copy_code': 'Copiar Código',
376
+ 'redeem.copied': 'Copiado!',
377
+ 'redeem.browse_more': 'Ver Mais',
378
+
379
+ // Account
380
+ 'account.title': 'Minha Conta',
381
+ 'account.programs_linked': '{{count}} programas vinculados',
382
+ 'account.recent_activity': 'Atividade Recente',
383
+ 'account.no_activity': 'Nenhuma atividade ainda',
384
+ 'account.unlink': 'Desvincular',
385
+
386
+ // Profile
387
+ 'profile.loyalty_programs': 'Programas de Fidelidade',
388
+ 'profile.manage': 'Gerenciar',
389
+ 'profile.connect_programs': 'Conectar Programas de Fidelidade',
390
+ 'profile.total_value': '~{{amount}} de valor em {{count}} programas',
391
+
392
+ // Post-checkout
393
+ 'postcheckout.save_title': 'Salvar seus Programas',
394
+ 'postcheckout.save_desc': 'Salve seus programas vinculados para a próxima vez — verifique seu número de telefone',
395
+ 'postcheckout.phone_placeholder': 'Número de telefone',
396
+ 'postcheckout.send_code': 'Enviar Código',
397
+ 'postcheckout.enter_code': 'Digite o código de verificação',
398
+ 'postcheckout.verify': 'Verificar',
399
+ 'postcheckout.skip': 'Pular por enquanto',
400
+ 'postcheckout.secured': 'Suas credenciais nunca são compartilhadas.',
401
+
402
+ // Common
403
+ 'common.loading': 'Carregando...',
404
+ 'common.retry': 'Tentar novamente',
405
+ 'common.close': 'Fechar',
406
+ 'common.cancel': 'Cancelar',
407
+ 'common.remove': 'Remover',
408
+ 'common.ok': 'OK',
409
+ 'common.done': 'Concluído',
410
+ 'common.error': 'Algo deu errado',
411
+ 'common.offline': 'Você está offline. Alguns recursos estão indisponíveis.',
412
+ 'common.last_updated': 'Última atualização {{time}}',
413
+ 'common.sync_to_view': 'Sincronizar para ver',
414
+ 'common.powered_by': 'Desenvolvido por OuterJoyn',
415
+ },
416
+
417
+ de: {
418
+ // Banner
419
+ 'banner.pay_with_points': 'Mit Punkten bezahlen',
420
+ 'banner.new_pay_with_points': 'NEU: Mit Punkten bezahlen',
421
+ 'banner.available': '{{amount}} verfügbar',
422
+ 'banner.use_points_here': 'Nutzen Sie Ihre Treuepunkte hier',
423
+ 'banner.connect_programs': 'Programme verbinden',
424
+ 'banner.points_from': '{{count}} Punkte aus {{programs}} Programmen',
425
+
426
+ // Balance
427
+ 'balance.total_value': 'Verfügbarer Gesamtwert',
428
+ 'balance.points_across': '{{count}} Punkte in {{programs}} Programmen',
429
+ 'balance.in_rewards': '{{amount}} an Prämien',
430
+
431
+ // Connect
432
+ 'connect.title': 'Programm verbinden',
433
+ 'connect.link_loyalty': 'Treueprogramm verknüpfen',
434
+ 'connect.link_desc': 'Verbinden Sie Ihre Prämienprogramme, um Punkte zu sammeln und einzulösen',
435
+ 'connect.search': 'Programme suchen...',
436
+ 'connect.connected': 'Verbunden',
437
+ 'connect.authorize': 'Autorisieren',
438
+ 'connect.deny': 'Ablehnen',
439
+ 'connect.authorize_access': 'Zugriff autorisieren',
440
+ 'connect.requesting_access': '{{brand}} fordert Zugriff auf Ihr {{program}}-Konto an.',
441
+ 'connect.view_balance': 'Punktestand anzeigen',
442
+ 'connect.redeem_points': 'Punkte für Einkäufe einlösen',
443
+ 'connect.view_tier': 'Mitgliedsstufe anzeigen',
444
+ 'connect.secured': 'Gesichert durch OuterJoyn',
445
+ 'connect.success': 'Verbunden!',
446
+ 'connect.success_desc': '{{program}} wurde mit Ihrem Konto verknüpft.',
447
+ 'connect.all_connected': 'Alle Programme Verbunden!',
448
+ 'connect.remove_title': 'Programm entfernen',
449
+ 'connect.remove_confirm': '{{program}} von Ihrem Konto trennen?',
450
+
451
+ // Pay
452
+ 'pay.apply_points': 'Punkte einlösen',
453
+ 'pay.use_max': 'Maximum verwenden',
454
+ 'pay.points_off': '{{points}} Pkt = {{amount}} Rabatt',
455
+ 'pay.applied': '{{points}} Pkt angewendet',
456
+ 'pay.fully_covered': 'Vollständig mit Punkten bezahlt!',
457
+ 'pay.order_summary': 'Bestellübersicht',
458
+
459
+ // Exchange
460
+ 'exchange.title': 'Punkte tauschen',
461
+ 'exchange.from': 'Von',
462
+ 'exchange.to': 'Nach',
463
+ 'exchange.rate': '{{rate}}x Kurs',
464
+ 'exchange.confirm': 'Tausch bestätigen',
465
+ 'exchange.success': 'Tausch abgeschlossen',
466
+ 'exchange.success_desc': '{{from_amount}} {{from_currency}} → {{to_amount}} {{to_currency}} getauscht',
467
+
468
+ // Redeem
469
+ 'redeem.title': 'Prämien einlösen',
470
+ 'redeem.search': 'Prämien suchen...',
471
+ 'redeem.points': '{{cost}} Punkte',
472
+ 'redeem.confirm': '{{name}} für {{cost}} Punkte einlösen?',
473
+ 'redeem.success': 'Erfolgreich eingelöst!',
474
+ 'redeem.insufficient': 'Nicht genügend Punkte',
475
+ 'redeem.copy_code': 'Code kopieren',
476
+ 'redeem.copied': 'Kopiert!',
477
+ 'redeem.browse_more': 'Mehr ansehen',
478
+
479
+ // Account
480
+ 'account.title': 'Mein Konto',
481
+ 'account.programs_linked': '{{count}} Programme verknüpft',
482
+ 'account.recent_activity': 'Letzte Aktivität',
483
+ 'account.no_activity': 'Noch keine Aktivität',
484
+ 'account.unlink': 'Trennen',
485
+
486
+ // Profile
487
+ 'profile.loyalty_programs': 'Treueprogramme',
488
+ 'profile.manage': 'Verwalten',
489
+ 'profile.connect_programs': 'Treueprogramme verbinden',
490
+ 'profile.total_value': '~{{amount}} Wert in {{count}} Programmen',
491
+
492
+ // Post-checkout
493
+ 'postcheckout.save_title': 'Programme speichern',
494
+ 'postcheckout.save_desc': 'Speichern Sie Ihre verknüpften Programme für das nächste Mal — bestätigen Sie Ihre Telefonnummer',
495
+ 'postcheckout.phone_placeholder': 'Telefonnummer',
496
+ 'postcheckout.send_code': 'Code senden',
497
+ 'postcheckout.enter_code': 'Bestätigungscode eingeben',
498
+ 'postcheckout.verify': 'Bestätigen',
499
+ 'postcheckout.skip': 'Jetzt überspringen',
500
+ 'postcheckout.secured': 'Ihre Zugangsdaten werden niemals weitergegeben.',
501
+
502
+ // Common
503
+ 'common.loading': 'Laden...',
504
+ 'common.retry': 'Erneut versuchen',
505
+ 'common.close': 'Schließen',
506
+ 'common.cancel': 'Abbrechen',
507
+ 'common.remove': 'Entfernen',
508
+ 'common.ok': 'OK',
509
+ 'common.done': 'Fertig',
510
+ 'common.error': 'Etwas ist schiefgelaufen',
511
+ 'common.offline': 'Sie sind offline. Einige Funktionen sind nicht verfügbar.',
512
+ 'common.last_updated': 'Zuletzt aktualisiert {{time}}',
513
+ 'common.sync_to_view': 'Synchronisieren zum Anzeigen',
514
+ 'common.powered_by': 'Bereitgestellt von OuterJoyn',
515
+ },
516
+
517
+ ja: {
518
+ // Banner
519
+ 'banner.pay_with_points': 'ポイントで支払う',
520
+ 'banner.new_pay_with_points': '新機能:ポイントで支払う',
521
+ 'banner.available': '{{amount}} 利用可能',
522
+ 'banner.use_points_here': 'ロイヤルティポイントをここで使う',
523
+ 'banner.connect_programs': 'プログラムを接続',
524
+ 'banner.points_from': '{{programs}}個のプログラムから{{count}}ポイント',
525
+
526
+ // Balance
527
+ 'balance.total_value': '利用可能な合計額',
528
+ 'balance.points_across': '{{programs}}個のプログラムで{{count}}ポイント',
529
+ 'balance.in_rewards': '{{amount}} の特典',
530
+
531
+ // Connect
532
+ 'connect.title': 'プログラムを接続',
533
+ 'connect.link_loyalty': 'ロイヤルティを連携',
534
+ 'connect.link_desc': 'リワードプログラムを接続してポイントを獲得・交換',
535
+ 'connect.search': 'プログラムを検索...',
536
+ 'connect.connected': '接続済み',
537
+ 'connect.authorize': '承認する',
538
+ 'connect.deny': '拒否する',
539
+ 'connect.authorize_access': 'アクセスを承認',
540
+ 'connect.requesting_access': '{{brand}}が{{program}}アカウントへのアクセスを要求しています。',
541
+ 'connect.view_balance': 'ポイント残高を見る',
542
+ 'connect.redeem_points': 'ポイントで購入する',
543
+ 'connect.view_tier': '会員ランクを見る',
544
+ 'connect.secured': 'OuterJoynによるセキュリティ保護',
545
+ 'connect.success': '接続完了!',
546
+ 'connect.success_desc': '{{program}}がアカウントに連携されました。',
547
+ 'connect.all_connected': 'すべてのプログラムが接続済み!',
548
+ 'connect.remove_title': 'プログラムを削除',
549
+ 'connect.remove_confirm': '{{program}}をアカウントから切断しますか?',
550
+
551
+ // Pay
552
+ 'pay.apply_points': 'ポイントを適用',
553
+ 'pay.use_max': '最大使用',
554
+ 'pay.points_off': '{{points}} pts = {{amount}} 割引',
555
+ 'pay.applied': '{{points}} pts 適用済み',
556
+ 'pay.fully_covered': 'ポイントで全額カバー!',
557
+ 'pay.order_summary': '注文概要',
558
+
559
+ // Exchange
560
+ 'exchange.title': 'ポイント交換',
561
+ 'exchange.from': '元',
562
+ 'exchange.to': '先',
563
+ 'exchange.rate': '{{rate}}倍レート',
564
+ 'exchange.confirm': '交換を確認',
565
+ 'exchange.success': '交換完了',
566
+ 'exchange.success_desc': '{{from_amount}} {{from_currency}} → {{to_amount}} {{to_currency}} に交換しました',
567
+
568
+ // Redeem
569
+ 'redeem.title': '特典を引き換え',
570
+ 'redeem.search': '特典を検索...',
571
+ 'redeem.points': '{{cost}} ポイント',
572
+ 'redeem.confirm': '{{name}}を{{cost}}ポイントで引き換えますか?',
573
+ 'redeem.success': '引き換え完了!',
574
+ 'redeem.insufficient': 'ポイントが不足しています',
575
+ 'redeem.copy_code': 'コードをコピー',
576
+ 'redeem.copied': 'コピーしました!',
577
+ 'redeem.browse_more': 'もっと見る',
578
+
579
+ // Account
580
+ 'account.title': 'マイアカウント',
581
+ 'account.programs_linked': '{{count}}個のプログラムが連携済み',
582
+ 'account.recent_activity': '最近のアクティビティ',
583
+ 'account.no_activity': 'まだアクティビティがありません',
584
+ 'account.unlink': '連携解除',
585
+
586
+ // Profile
587
+ 'profile.loyalty_programs': 'ロイヤルティプログラム',
588
+ 'profile.manage': '管理',
589
+ 'profile.connect_programs': 'ロイヤルティプログラムを接続',
590
+ 'profile.total_value': '{{count}}個のプログラムで約{{amount}}の価値',
591
+
592
+ // Post-checkout
593
+ 'postcheckout.save_title': 'プログラムを保存',
594
+ 'postcheckout.save_desc': '連携したプログラムを次回のために保存 — 電話番号を確認してください',
595
+ 'postcheckout.phone_placeholder': '電話番号',
596
+ 'postcheckout.send_code': 'コードを送信',
597
+ 'postcheckout.enter_code': '確認コードを入力',
598
+ 'postcheckout.verify': '確認する',
599
+ 'postcheckout.skip': '今はスキップ',
600
+ 'postcheckout.secured': '認証情報は共有されません。',
601
+
602
+ // Common
603
+ 'common.loading': '読み込み中...',
604
+ 'common.retry': '再試行',
605
+ 'common.close': '閉じる',
606
+ 'common.cancel': 'キャンセル',
607
+ 'common.remove': '削除',
608
+ 'common.ok': 'OK',
609
+ 'common.done': '完了',
610
+ 'common.error': 'エラーが発生しました',
611
+ 'common.offline': 'オフラインです。一部の機能が利用できません。',
612
+ 'common.last_updated': '最終更新 {{time}}',
613
+ 'common.sync_to_view': '同期して表示',
614
+ 'common.powered_by': 'Powered by OuterJoyn',
615
+ },
616
+ };
617
+
618
+ // =============================================================================
619
+ // i18n Class
620
+ // =============================================================================
621
+
622
+ type StringKey = string;
623
+
624
+ export class SDKi18n {
625
+ private locale: string = 'en';
626
+ private overrides: Record<string, string> = {};
627
+
628
+ /** Set locale from device or explicit prop */
629
+ setLocale(locale: string) {
630
+ const lang = locale.split('-')[0].toLowerCase();
631
+ this.locale = strings[lang] ? lang : 'en';
632
+ }
633
+
634
+ /** Customer can override any string */
635
+ setOverrides(overrides: Record<string, string>) {
636
+ this.overrides = overrides;
637
+ }
638
+
639
+ /** Translate a key with optional parameter interpolation */
640
+ t(key: StringKey, params?: Record<string, string | number>): string {
641
+ let str = this.overrides[key]
642
+ ?? strings[this.locale]?.[key]
643
+ ?? strings['en'][key]
644
+ ?? key;
645
+
646
+ if (params) {
647
+ for (const [k, v] of Object.entries(params)) {
648
+ str = str.replace(new RegExp(`\\{\\{${k}\\}\\}`, 'g'), String(v));
649
+ }
650
+ }
651
+ return str;
652
+ }
653
+
654
+ /** Check if current locale is RTL */
655
+ get isRTL(): boolean {
656
+ return ['ar', 'he', 'fa', 'ur'].includes(this.locale);
657
+ }
658
+
659
+ /** Get current locale code */
660
+ get currentLocale(): string {
661
+ return this.locale;
662
+ }
663
+ }
664
+
665
+ /** Singleton instance used by the SDK */
666
+ export const i18n = new SDKi18n();