@pithy-sh/i18n 0.12.0 → 0.14.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.
- package/dist/capability.d.ts +1 -1
- package/dist/capability.d.ts.map +1 -1
- package/dist/capability.js +1 -1
- package/dist/catalogs/es/errors.d.ts.map +1 -1
- package/dist/catalogs/es/errors.js +18 -0
- package/dist/catalogs/es/screens.d.ts.map +1 -1
- package/dist/catalogs/es/screens.js +79 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +0 -1
- package/dist/native/environment.d.ts +16 -0
- package/dist/native/environment.d.ts.map +1 -0
- package/dist/native/environment.js +56 -0
- package/dist/native/useNativeDirection.d.ts +13 -0
- package/dist/native/useNativeDirection.d.ts.map +1 -0
- package/dist/native/useNativeDirection.js +25 -0
- package/dist/react/browserLocaleEnvironment.d.ts +6 -0
- package/dist/react/browserLocaleEnvironment.d.ts.map +1 -0
- package/dist/react/browserLocaleEnvironment.js +28 -0
- package/dist/react/localeEnvironment.d.ts +29 -0
- package/dist/react/localeEnvironment.d.ts.map +1 -0
- package/dist/react/localeEnvironment.js +2 -0
- package/dist/react/useDocumentLocale.d.ts +10 -0
- package/dist/react/useDocumentLocale.d.ts.map +1 -0
- package/dist/react/useDocumentLocale.js +23 -0
- package/dist/react/useNegotiatedLocale.d.ts +16 -3
- package/dist/react/useNegotiatedLocale.d.ts.map +1 -1
- package/dist/react/useNegotiatedLocale.js +30 -37
- package/dist/resolve/browser.d.ts +2 -1
- package/dist/resolve/browser.d.ts.map +1 -1
- package/dist/resolve/browser.js +2 -1
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +1 -1
- package/package.json +20 -3
- package/src/capability.ts +5 -9
- package/src/catalogs/es/errors.ts +20 -0
- package/src/catalogs/es/screens.ts +94 -1
- package/src/config/config.ts +0 -1
- package/src/native/environment.ts +57 -0
- package/src/native/useNativeDirection.ts +24 -0
- package/src/react/browserLocaleEnvironment.ts +32 -0
- package/src/react/localeEnvironment.ts +31 -0
- package/src/react/useDocumentLocale.ts +18 -0
- package/src/react/useNegotiatedLocale.ts +52 -51
- package/src/resolve/browser.ts +2 -1
- package/src/version.generated.ts +1 -1
package/dist/capability.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export interface I18nCapability extends Capability {
|
|
|
37
37
|
* 1. the adopter's catalog for the resolved locale,
|
|
38
38
|
* 2. the adopter's catalog for the project default,
|
|
39
39
|
* 3. **the kit's translation** for the resolved locale — the `es` this package ships,
|
|
40
|
-
* 4. every composed capability's
|
|
40
|
+
* 4. every composed capability's own copy for the resolved locale,
|
|
41
41
|
* 5. every composed capability's copy for the project default,
|
|
42
42
|
* 6. and their English, which is the language the kit is written in.
|
|
43
43
|
*
|
package/dist/capability.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,0CAA0C,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKtF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKnE;;;;;;GAMG;AACH,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,sGAAsG;IACtG,UAAU,EAAE,UAAU,CAAC;IACvB,qGAAqG;IACrG,gBAAgB,EAAE,cAAc,CAAC;IACjC,wEAAwE;IACxE,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,EAAE,CAAC;CACpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,IAAI,CAAC,MAAM,GAAE,eAAoB,GAAG,cAAc,
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,0CAA0C,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKtF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKnE;;;;;;GAMG;AACH,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,sGAAsG;IACtG,UAAU,EAAE,UAAU,CAAC;IACvB,qGAAqG;IACrG,gBAAgB,EAAE,cAAc,CAAC;IACjC,wEAAwE;IACxE,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,EAAE,CAAC;CACpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,IAAI,CAAC,MAAM,GAAE,eAAoB,GAAG,cAAc,CAyEjE;AAED,uGAAuG;AACvG,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,IAAI,cAAc,CAErF"}
|
package/dist/capability.js
CHANGED
|
@@ -28,7 +28,7 @@ import { DEFAULT_LOCALE } from "@pithy-sh/core/src/i18n/translator";
|
|
|
28
28
|
* 1. the adopter's catalog for the resolved locale,
|
|
29
29
|
* 2. the adopter's catalog for the project default,
|
|
30
30
|
* 3. **the kit's translation** for the resolved locale — the `es` this package ships,
|
|
31
|
-
* 4. every composed capability's
|
|
31
|
+
* 4. every composed capability's own copy for the resolved locale,
|
|
32
32
|
* 5. every composed capability's copy for the project default,
|
|
33
33
|
* 6. and their English, which is the language the kit is written in.
|
|
34
34
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/catalogs/es/errors.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/catalogs/es/errors.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,QAAQ,EAAE,cAqNtB,CAAC"}
|
|
@@ -45,6 +45,7 @@ const esErrors = {
|
|
|
45
45
|
"auth/session_not_fresh": "Has entrado, pero no hace poco. Vuelve a entrar y reinténtalo. No se ha cambiado nada.",
|
|
46
46
|
"auth/account_suspended": "Tu cuenta está suspendida.",
|
|
47
47
|
"auth/account_deleted": "Tu cuenta está eliminada. Aún se puede recuperar durante un tiempo.",
|
|
48
|
+
"auth/handoff_invalid": "Ese código de acceso ya se usó o ha caducado. Vuelve a iniciar sesión.",
|
|
48
49
|
"core/not_found": "No existe el recurso solicitado.",
|
|
49
50
|
"core/conflict": "La solicitud entra en conflicto con el estado actual.",
|
|
50
51
|
"rate_limit/exceeded": "Demasiadas solicitudes. Inténtalo más tarde.",
|
|
@@ -56,6 +57,8 @@ const esErrors = {
|
|
|
56
57
|
"core/unknown_workflow": "La operación solicitada no existe.",
|
|
57
58
|
"core/workflow_failed": "La operación no se ha completado.",
|
|
58
59
|
"core/webhook_unverified": "La firma de la notificación no es válida.",
|
|
60
|
+
"core/presence_ticket_invalid": "Ese pase de presencia no es válido.",
|
|
61
|
+
"core/presence_room_full": "La sala está llena.",
|
|
59
62
|
"cloudflare/not_configured": "Este servicio no está disponible ahora.",
|
|
60
63
|
"cloudflare/request_failed": "No se ha podido completar la llamada a Cloudflare{apiAnswer}.",
|
|
61
64
|
"cloudflare/invalid_response": "La respuesta de Cloudflare no tiene el formato esperado.",
|
|
@@ -103,12 +106,23 @@ const esErrors = {
|
|
|
103
106
|
"ledger/insufficient_funds": "El saldo no es suficiente.",
|
|
104
107
|
"ledger/hold_not_open": "Esa reserva de saldo ya está resuelta.",
|
|
105
108
|
"ledger/invalid_amount": "El importe debe ser un número entero positivo.",
|
|
109
|
+
"ledger/entry_not_found": "Ese movimiento no existe.",
|
|
110
|
+
"ledger/entry_not_reversible": "Ese movimiento no se puede revertir.",
|
|
111
|
+
"ledger/ref_conflict": "Esa referencia ya pertenece a otro movimiento.",
|
|
106
112
|
"rating/unknown_algorithm": "Ese algoritmo de valoración no existe.",
|
|
107
113
|
"rating/unsupported_player_count": "Ese número de jugadores no es compatible con esta valoración.",
|
|
108
114
|
"rating/invalid_params": "Los parámetros de valoración no son válidos.",
|
|
109
115
|
"rating/game_not_found": "Ese juego no tiene valoración.",
|
|
110
116
|
"rating/pool_not_found": "Ese grupo de valoración no existe.",
|
|
111
117
|
"rating/record_forbidden": "No puedes registrar resultados valorados.",
|
|
118
|
+
"consent/unknown_purpose": "Ese propósito de consentimiento no existe.",
|
|
119
|
+
"consent/stale_notice": "El aviso ha cambiado. Vuelve a leerlo antes de aceptar.",
|
|
120
|
+
"consent/method_below_minimum": "Este consentimiento necesita una firma más fuerte.",
|
|
121
|
+
"consent/withdrawal_below_grant": "Para retirar este consentimiento, fírmalo igual que lo diste.",
|
|
122
|
+
"consent/evidence_missing": "Falta la firma o el documento que este consentimiento necesita.",
|
|
123
|
+
"consent/expiry_passed": "Esa fecha de caducidad ya ha pasado.",
|
|
124
|
+
"consent/document_not_found": "Ese documento firmado no existe.",
|
|
125
|
+
"consent/evidence_store_missing": "No se pudo guardar la firma.",
|
|
112
126
|
"matchmaking/room_not_found": "Ese código no corresponde a ninguna sala abierta.",
|
|
113
127
|
"matchmaking/room_full": "Esa sala ya no admite más jugadores.",
|
|
114
128
|
"matchmaking/invalid_code": "Ese código de sala no es válido.",
|
|
@@ -167,6 +181,10 @@ const esErrors = {
|
|
|
167
181
|
"organization/last_administrator": "La organización se quedaría sin nadie que pueda administrarla.",
|
|
168
182
|
"organization/slug_taken": "Ese identificador ya está en uso.",
|
|
169
183
|
"organization/nomination_invalid": "No hay ninguna oferta de titularidad que puedas aceptar.",
|
|
184
|
+
"organization/last_owner": "Es la única persona titular de la organización. Transfiere la titularidad primero.",
|
|
185
|
+
"organization/already_member": "Esa persona ya es miembro de la organización.",
|
|
186
|
+
"organization/seat_limit_reached": "La organización no tiene plazas libres.",
|
|
187
|
+
"organization/organization_suspended": "Esta organización está suspendida. Tu propia cuenta no se ve afectada.",
|
|
170
188
|
"artifacts/not_found": "Ese repositorio no existe.",
|
|
171
189
|
"artifacts/forbidden": "No puedes hacer eso en este repositorio.",
|
|
172
190
|
"artifacts/invalid_name": "Ese nombre de repositorio no es válido.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../../src/catalogs/es/screens.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../../src/catalogs/es/screens.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,SAAS,EAAE,cA2PvB,CAAC"}
|
|
@@ -51,6 +51,10 @@ const esScreens = {
|
|
|
51
51
|
"auth/otp.failed": "Ese código no funcionó. Inténtalo otra vez o pide uno nuevo.",
|
|
52
52
|
"auth/otp.submit": "Entrar",
|
|
53
53
|
"auth/otp.resend": "Enviar un código nuevo",
|
|
54
|
+
"auth/otp.ask.submit": "Envíame un código",
|
|
55
|
+
"auth/otp.ask.provider_unconfigured": "{provider} no está configurado aquí. Usa un código.",
|
|
56
|
+
"auth/otp.ask.provider_silent": "{provider} no respondió. Usa un código.",
|
|
57
|
+
"auth/otp.ask.signup_email_only": "Te enviamos un código y se crea una. Los botones de arriba solo entran en cuentas que ya existen.",
|
|
54
58
|
"auth/callback.title": "Entrando.",
|
|
55
59
|
"auth/callback.body": "Un momento.",
|
|
56
60
|
"auth/suspended.title": "Tu cuenta está suspendida.",
|
|
@@ -63,6 +67,37 @@ const esScreens = {
|
|
|
63
67
|
"auth/deleted.detail": "Hasta entonces se puede recuperar. Te enviamos la fecha a la dirección de tu cuenta.",
|
|
64
68
|
"auth/deleted.contact": "Para recuperarla, responde a ese correo antes de esa fecha.",
|
|
65
69
|
"auth/deleted.sign_out": "Cerrar sesión",
|
|
70
|
+
"auth/consent.title": "Una aplicación quiere actuar en tu nombre.",
|
|
71
|
+
"auth/consent.reported": "Se presenta como {name}. Ese nombre lo puso ella, y nadie lo ha comprobado.",
|
|
72
|
+
"auth/consent.unnamed": "No dio ningún nombre.",
|
|
73
|
+
"auth/consent.verified": "Comprobado: se publica en",
|
|
74
|
+
"auth/consent.redirect": "El acceso se enviará a",
|
|
75
|
+
"auth/consent.redirect_note": "Aprueba solo si empezaste esto desde esa aplicación.",
|
|
76
|
+
"auth/consent.can_do": "Si apruebas, podrá:",
|
|
77
|
+
"auth/consent.count.one": "{reachable} de {count} operación en {capability}.",
|
|
78
|
+
"auth/consent.count.other": "{reachable} de {count} operaciones en {capability}.",
|
|
79
|
+
"auth/consent.withheld.one": "{count} más necesita un rol que no tienes.",
|
|
80
|
+
"auth/consent.withheld.other": "{count} más necesitan un rol que no tienes.",
|
|
81
|
+
"auth/consent.nothing": "Tu rol todavía no le permite nada aquí. Gana lo que gane tu rol.",
|
|
82
|
+
"auth/consent.refused_scope": "{scope}: {reason}",
|
|
83
|
+
"auth/consent.not_granted.role": "Solicitado, y no concedido, porque tu rol no lo incluye.",
|
|
84
|
+
"auth/consent.not_granted.unknown": "Solicitado, y no concedido, porque esta aplicación no tiene ese permiso.",
|
|
85
|
+
"auth/consent.bound": "Si apruebas, esta aplicación actuará en tu nombre. Nunca podrá hacer más de lo que tu rol permite, y pierde todo lo que tu rol pierda.",
|
|
86
|
+
"auth/consent.approve": "Dejar que actúe en mi nombre",
|
|
87
|
+
"auth/consent.deny": "No permitir",
|
|
88
|
+
"auth/consent.expired": "Esta solicitud ha caducado. Empieza de nuevo desde la aplicación.",
|
|
89
|
+
"auth/consent.effect.writes": "cambia datos",
|
|
90
|
+
"auth/consent.effect.sends": "envía un mensaje",
|
|
91
|
+
"auth/consent.effect.charges": "cobra dinero",
|
|
92
|
+
"auth/consent.effect.deletes": "borra datos",
|
|
93
|
+
"auth/connected.title": "Aplicaciones que actúan en tu nombre",
|
|
94
|
+
"auth/connected.empty": "Ninguna. Nada actúa en tu nombre.",
|
|
95
|
+
"auth/connected.unnamed": "Una aplicación sin nombre",
|
|
96
|
+
"auth/connected.verified": "Publicada en {host}. Eso está comprobado.",
|
|
97
|
+
"auth/connected.approved": "Aprobada el {date}. El acceso va a {redirect}.",
|
|
98
|
+
"auth/connected.revoke": "Revocar",
|
|
99
|
+
"auth/connected.failed": "No pudimos cargar tus aplicaciones.",
|
|
100
|
+
"auth/connected.retry": "Reintentar",
|
|
66
101
|
"organization/suspended.title": "Esta organización está suspendida.",
|
|
67
102
|
"organization/suspended.body": "Nadie puede usarla hasta que se reactive. Tu propia cuenta no se ve afectada.",
|
|
68
103
|
"organization/suspended.contact": "A sus propietarios se les dijo el motivo. Pregunta a uno de ellos.",
|
|
@@ -74,6 +109,18 @@ const esScreens = {
|
|
|
74
109
|
"organization/choose.empty.body": "No eres miembro de ninguna cuenta. Pide que alguien te invite.",
|
|
75
110
|
"organization/choose.failed": "No hemos podido cargar tus cuentas.",
|
|
76
111
|
"organization/choose.retry": "Reintentar",
|
|
112
|
+
"organization/invitation.title": "Únete a {organization}",
|
|
113
|
+
"organization/invitation.invited_by": "{inviter} te invitó como {role}.",
|
|
114
|
+
"organization/invitation.invited": "Te invitaron como {role}.",
|
|
115
|
+
"organization/invitation.expires": "La invitación caduca el {date}.",
|
|
116
|
+
"organization/invitation.as": "Te unirás como {email}.",
|
|
117
|
+
"organization/invitation.accept": "Unirme",
|
|
118
|
+
"organization/invitation.sign_in": "Inicia sesión para aceptar",
|
|
119
|
+
"organization/invitation.invalid.title": "Esta invitación no se puede usar.",
|
|
120
|
+
"organization/invitation.invalid.body": "Caducó, ya se usó o se retiró, o se envió a otra dirección. Pide una nueva a quien te invitó.",
|
|
121
|
+
"organization/invitation.failed": "No hemos podido cargar esta invitación.",
|
|
122
|
+
"organization/invitation.join_failed": "No hemos podido terminar de unirte.",
|
|
123
|
+
"organization/invitation.retry": "Reintentar",
|
|
77
124
|
"payments/paywall.title": "Ve más lejos.",
|
|
78
125
|
"payments/paywall.body": "Elige lo que necesitas. Puedes cambiar de idea más tarde.",
|
|
79
126
|
"payments/paywall.buy": "Comprar {product}",
|
|
@@ -84,6 +131,10 @@ const esScreens = {
|
|
|
84
131
|
"payments/paywall.done.title": "Todo listo.",
|
|
85
132
|
"payments/paywall.done.body": "Gracias. Tu compra ya está en tu cuenta.",
|
|
86
133
|
"payments/paywall.done.home": "Ir al inicio",
|
|
134
|
+
"payments/paywall.restore": "Restaurar compras",
|
|
135
|
+
"payments/paywall.nothing_to_restore": "La tienda no tiene nada que restaurar para esta cuenta.",
|
|
136
|
+
"payments/paywall.restored_elsewhere": "Tus compras se han restaurado. Ninguna incluye lo que se vende aquí.",
|
|
137
|
+
"payments/paywall.pending": "La tienda aún está procesando esta compra. Aparecerá en tu cuenta cuando se confirme.",
|
|
87
138
|
"payments/pricing.title": "Lo que cuesta.",
|
|
88
139
|
"payments/pricing.body": "Los precios son para donde estás. Los impuestos los calcula Paddle, no nosotros.",
|
|
89
140
|
"payments/pricing.anonymous": "Cualquiera puede ver un precio. Comprar necesita cuenta.",
|
|
@@ -93,6 +144,11 @@ const esScreens = {
|
|
|
93
144
|
"payments/pricing.sign_in": "Entra para comprar {product}",
|
|
94
145
|
"payments/pricing.buy": "Comprar {product}",
|
|
95
146
|
"payments/pricing.holdings": "¿Qué tengo ya?",
|
|
147
|
+
"payments/pricing.store_body": "Los precios son los de la tienda, para donde estás.",
|
|
148
|
+
"payments/pricing.at_checkout": "Verás el precio al pagar.",
|
|
149
|
+
"payments/pricing.done": "Gracias. Tu compra ya está en tu cuenta.",
|
|
150
|
+
"payments/pricing.pending": "La tienda aún está procesando esta compra. Aparecerá en tu cuenta cuando se confirme.",
|
|
151
|
+
"payments/pricing.empty.rail": "Nada de aquí se vende por el método de pago de esta plataforma. Dale a un producto su SKU en ese método en",
|
|
96
152
|
"payments/pricing.every.one": "al {interval}",
|
|
97
153
|
"payments/pricing.every.other": "cada {count} {interval}s",
|
|
98
154
|
"payments/pricing.empty.title": "Aquí no hay precios.",
|
|
@@ -111,6 +167,28 @@ const esScreens = {
|
|
|
111
167
|
"payments/subscription.apple": "Comprado en la App Store",
|
|
112
168
|
"payments/subscription.google": "Comprado en Google Play",
|
|
113
169
|
"payments/subscription.more": "Ver qué más hay",
|
|
170
|
+
"payments/checkout.in_page": "Este pago se abre dentro de una página web, y la app no puede mostrarla.",
|
|
171
|
+
"payments/store.unavailable": "La tienda no ha respondido. Inténtalo de nuevo en un momento.",
|
|
172
|
+
"payments/store.refused": "La tienda no ha terminado la compra.",
|
|
173
|
+
"payments/store.no_token": "Este dispositivo no ha podido guardar lo que marca una compra como tuya, así que no se ha comprado nada.",
|
|
174
|
+
"payments/store.signed_out": "Inicia sesión antes de comprar.",
|
|
175
|
+
"payments/store.no_answer": "La tienda no ha respondido. Si la compra se completa, llegará a tu cuenta sola.",
|
|
176
|
+
"consent/settings.title": "Tus opciones de privacidad.",
|
|
177
|
+
"consent/settings.loading": "Un momento.",
|
|
178
|
+
"consent/settings.unreadable": "No pudimos cargar tus opciones.",
|
|
179
|
+
"consent/settings.none": "Aquí nada pide tu consentimiento.",
|
|
180
|
+
"consent/settings.on": "Activado.",
|
|
181
|
+
"consent/settings.off": "Desactivado.",
|
|
182
|
+
"consent/settings.renew": "El aviso ha cambiado. Acepta de nuevo para mantenerlo.",
|
|
183
|
+
"consent/settings.expired": "Ha caducado.",
|
|
184
|
+
"consent/settings.agree": "Aceptar",
|
|
185
|
+
"consent/settings.withdraw": "Retirar",
|
|
186
|
+
"consent/settings.signed_elsewhere": "Necesita tu firma en el documento que cubre.",
|
|
187
|
+
"consent/settings.type_name": "Escribe tu nombre completo para retirarlo por escrito",
|
|
188
|
+
"consent/settings.draw_name": "Firma abajo para retirarlo por escrito",
|
|
189
|
+
"consent/settings.clear": "Borrar",
|
|
190
|
+
"consent/settings.signed_with_provider": "Lo firmaste con un servicio de firma electrónica. Retíralo donde lo firmaste.",
|
|
191
|
+
"consent/settings.saved": "Guardado.",
|
|
114
192
|
"app/loading": "Un momento.",
|
|
115
193
|
"app/not_found.title": "Aquí no hay nada.",
|
|
116
194
|
"app/not_found.body": "Nada responde en {path}.",
|
|
@@ -124,6 +202,7 @@ const esScreens = {
|
|
|
124
202
|
"app/home.bare.checking": "comprobando",
|
|
125
203
|
"app/home.bare.unknown": "desconocido",
|
|
126
204
|
"app/home.bare.unreachable": "inaccesible",
|
|
205
|
+
"app/locale.reload_required": "Reinicia la app para terminar de cambiar el idioma.",
|
|
127
206
|
"client/unreachable": "No hemos podido conectar.",
|
|
128
207
|
"client/unreadable": "La respuesta no se ha podido leer.",
|
|
129
208
|
"client/cross_origin": "Esa petición habría salido de este sitio, así que no se ha enviado.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;;;;;EAE2F,CAAC;AACvH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;EAIzB,CAAC;AACJ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;;;;;EAE2F,CAAC;AACvH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;EAIzB,CAAC;AACJ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AA+B9D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;iBA4E8E,CAAC;AACtG,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AACrD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
package/dist/config/config.js
CHANGED
|
@@ -40,7 +40,6 @@ const DEFAULT_SERVER_RESOLVERS = [
|
|
|
40
40
|
"header",
|
|
41
41
|
"default"
|
|
42
42
|
];
|
|
43
|
-
/** The browser chain's default order — `?lang=`, account, local storage, the server's answer, default. */
|
|
44
43
|
/**
|
|
45
44
|
* The browser chain's default order — `?lang=`, account, this device's memory, the reader's own
|
|
46
45
|
* browser languages, what the server declared, the project default.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import type { LocaleEnvironment } from "../react/localeEnvironment";
|
|
4
|
+
/**
|
|
5
|
+
* React Native's locale environment. Pass it as `useNegotiatedLocale(projection, { environment: nativeLocaleEnvironment })`.
|
|
6
|
+
*
|
|
7
|
+
* - **Starting signals:** the device's preferred languages from `expo-localization`, in the order the reader set
|
|
8
|
+
* them, and a choice remembered in AsyncStorage. `useLocales` re-renders when the operating system's language
|
|
9
|
+
* changes, so the app follows it while it runs. There is no query string and no server-rendered `lang`, so those
|
|
10
|
+
* two links of the chain answer nothing.
|
|
11
|
+
* - **Remember:** AsyncStorage, under the projection's `storageKey`. A locale is not a secret, so it is not kept in
|
|
12
|
+
* the secure store.
|
|
13
|
+
* - **Apply:** `I18nManager`, whose direction takes effect after a reload. `reloadRequired` says when.
|
|
14
|
+
*/
|
|
15
|
+
export declare const nativeLocaleEnvironment: LocaleEnvironment;
|
|
16
|
+
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/native/environment.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAc,MAAM,4BAA4B,CAAC;AAIhF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,iBAIrC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { useNativeDirection } from "./useNativeDirection.js";
|
|
4
|
+
import { useRead } from "@pithy-sh/ui-core/src/read";
|
|
5
|
+
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
6
|
+
import { useLocales } from "expo-localization";
|
|
7
|
+
import { useMemo } from "react";
|
|
8
|
+
//#region src/native/environment.ts
|
|
9
|
+
/**
|
|
10
|
+
* React Native's locale environment. Pass it as `useNegotiatedLocale(projection, { environment: nativeLocaleEnvironment })`.
|
|
11
|
+
*
|
|
12
|
+
* - **Starting signals:** the device's preferred languages from `expo-localization`, in the order the reader set
|
|
13
|
+
* them, and a choice remembered in AsyncStorage. `useLocales` re-renders when the operating system's language
|
|
14
|
+
* changes, so the app follows it while it runs. There is no query string and no server-rendered `lang`, so those
|
|
15
|
+
* two links of the chain answer nothing.
|
|
16
|
+
* - **Remember:** AsyncStorage, under the projection's `storageKey`. A locale is not a secret, so it is not kept in
|
|
17
|
+
* the secure store.
|
|
18
|
+
* - **Apply:** `I18nManager`, whose direction takes effect after a reload. `reloadRequired` says when.
|
|
19
|
+
*/
|
|
20
|
+
const nativeLocaleEnvironment = {
|
|
21
|
+
useSignals: useNativeSignals,
|
|
22
|
+
remember: (locale, keys) => AsyncStorage.setItem(keys.storageKey, locale),
|
|
23
|
+
useApply: (enabled, _locale, direction) => useNativeDirection(enabled, direction)
|
|
24
|
+
};
|
|
25
|
+
/** The device's languages and this device's remembered choice; `undefined` until the memory has been read. */
|
|
26
|
+
function useNativeSignals(keys) {
|
|
27
|
+
const device = useLocales();
|
|
28
|
+
const storageKey = keys?.storageKey;
|
|
29
|
+
const memory = useRead(`pithy-locale-memory:${storageKey ?? ""}`, async () => storageKey === void 0 ? null : readMemory(storageKey), { skip: storageKey === void 0 });
|
|
30
|
+
const navigator = useMemo(() => {
|
|
31
|
+
const tags = device.map((entry) => entry.languageTag).filter((tag) => tag.trim().length > 0);
|
|
32
|
+
return tags.length > 0 ? tags : null;
|
|
33
|
+
}, [device]);
|
|
34
|
+
const remembered = memory.value ?? null;
|
|
35
|
+
const ready = storageKey !== void 0 && !memory.loading;
|
|
36
|
+
return useMemo(() => ready ? {
|
|
37
|
+
query: null,
|
|
38
|
+
storage: remembered,
|
|
39
|
+
navigator,
|
|
40
|
+
server: null
|
|
41
|
+
} : void 0, [
|
|
42
|
+
ready,
|
|
43
|
+
remembered,
|
|
44
|
+
navigator
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
/** The remembered choice, or `null` when there is none or the store refuses. */
|
|
48
|
+
async function readMemory(storageKey) {
|
|
49
|
+
try {
|
|
50
|
+
return await AsyncStorage.getItem(storageKey);
|
|
51
|
+
} catch {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { nativeLocaleEnvironment };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
/**
|
|
4
|
+
* Keep `I18nManager`'s direction in step with the locale in force, and answer whether it needs a reload.
|
|
5
|
+
*
|
|
6
|
+
* React Native reads the direction once, at launch: `forceRTL` changes the next launch, and `isRTL` keeps answering
|
|
7
|
+
* for this one. So the answer is a comparison, not a flag the effect sets. `allowRTL` moves with `forceRTL`, so an
|
|
8
|
+
* English choice on an Arabic device lays out left to right rather than following the device.
|
|
9
|
+
*
|
|
10
|
+
* `enabled` false touches nothing and asks for no reload.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useNativeDirection(enabled: boolean, direction: "ltr" | "rtl"): boolean;
|
|
13
|
+
//# sourceMappingURL=useNativeDirection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNativeDirection.d.ts","sourceRoot":"","sources":["../../src/native/useNativeDirection.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,GAAG,KAAK,GAAG,OAAO,CAQtF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { useEffect } from "react";
|
|
4
|
+
import { I18nManager } from "react-native";
|
|
5
|
+
//#region src/native/useNativeDirection.ts
|
|
6
|
+
/**
|
|
7
|
+
* Keep `I18nManager`'s direction in step with the locale in force, and answer whether it needs a reload.
|
|
8
|
+
*
|
|
9
|
+
* React Native reads the direction once, at launch: `forceRTL` changes the next launch, and `isRTL` keeps answering
|
|
10
|
+
* for this one. So the answer is a comparison, not a flag the effect sets. `allowRTL` moves with `forceRTL`, so an
|
|
11
|
+
* English choice on an Arabic device lays out left to right rather than following the device.
|
|
12
|
+
*
|
|
13
|
+
* `enabled` false touches nothing and asks for no reload.
|
|
14
|
+
*/
|
|
15
|
+
function useNativeDirection(enabled, direction) {
|
|
16
|
+
const rtl = direction === "rtl";
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (!enabled) return;
|
|
19
|
+
I18nManager.allowRTL(rtl);
|
|
20
|
+
I18nManager.forceRTL(rtl);
|
|
21
|
+
}, [enabled, rtl]);
|
|
22
|
+
return enabled && I18nManager.isRTL !== rtl;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { useNativeDirection };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import type { LocaleEnvironment } from "./localeEnvironment";
|
|
4
|
+
/** The browser's locale environment: what `useNegotiatedLocale` uses when it is handed none. */
|
|
5
|
+
export declare const browserLocaleEnvironment: LocaleEnvironment;
|
|
6
|
+
//# sourceMappingURL=browserLocaleEnvironment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browserLocaleEnvironment.d.ts","sourceRoot":"","sources":["../../src/react/browserLocaleEnvironment.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAc,MAAM,qBAAqB,CAAC;AAoBzE,gGAAgG;AAChG,eAAO,MAAM,wBAAwB,EAAE,iBAItC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { readBrowserSignals, rememberBrowserLocale } from "../browser/signals.js";
|
|
4
|
+
import { useDocumentLocale } from "./useDocumentLocale.js";
|
|
5
|
+
import { useMemo } from "react";
|
|
6
|
+
//#region src/react/browserLocaleEnvironment.ts
|
|
7
|
+
/** The query string, `localStorage`, `navigator` and `<html lang>`, read once per pair of names. */
|
|
8
|
+
function useBrowserSignals(keys) {
|
|
9
|
+
const queryParam = keys?.queryParam;
|
|
10
|
+
const storageKey = keys?.storageKey;
|
|
11
|
+
return useMemo(() => queryParam === void 0 || storageKey === void 0 ? void 0 : readBrowserSignals({
|
|
12
|
+
queryParam,
|
|
13
|
+
storageKey
|
|
14
|
+
}), [queryParam, storageKey]);
|
|
15
|
+
}
|
|
16
|
+
/** `lang` and `dir` on the document. A browser lays out a new direction at once, so no reload is ever needed. */
|
|
17
|
+
function useDocumentApply(enabled, locale, direction) {
|
|
18
|
+
useDocumentLocale(enabled, locale, direction);
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
/** The browser's locale environment: what `useNegotiatedLocale` uses when it is handed none. */
|
|
22
|
+
const browserLocaleEnvironment = {
|
|
23
|
+
useSignals: useBrowserSignals,
|
|
24
|
+
remember: rememberBrowserLocale,
|
|
25
|
+
useApply: useDocumentApply
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { browserLocaleEnvironment };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import type { BrowserChain, BrowserLocaleSignals } from "../resolve/browser";
|
|
4
|
+
/** The two names a client looks its own signals up by. */
|
|
5
|
+
export type LocaleKeys = Pick<BrowserChain, "queryParam" | "storageKey">;
|
|
6
|
+
/**
|
|
7
|
+
* Where `useNegotiatedLocale` gets its starting signals, where it remembers a choice, and how it applies the locale.
|
|
8
|
+
*
|
|
9
|
+
* The browser's is the default; `@pithy-sh/i18n/src/native/environment` is React Native's. Both hooks are called on
|
|
10
|
+
* every render, so the environment a component passes must be the same one for the life of that component: a module
|
|
11
|
+
* constant, never an object built in the render.
|
|
12
|
+
*/
|
|
13
|
+
export interface LocaleEnvironment {
|
|
14
|
+
/**
|
|
15
|
+
* The signals this platform holds, as a hook, so a source that changes while the app runs, or answers after the
|
|
16
|
+
* first render, re-renders the caller. `undefined` while a signal is still being read: nothing is negotiated, no
|
|
17
|
+
* catalog is asked for and nothing is applied until it answers. `keys` is `null` when the capability is not
|
|
18
|
+
* composed, and nothing is read.
|
|
19
|
+
*/
|
|
20
|
+
readonly useSignals: (keys: LocaleKeys | null) => BrowserLocaleSignals | undefined;
|
|
21
|
+
/** Remember a choice on this device. Not awaited; a rejection is caught. */
|
|
22
|
+
readonly remember: (locale: string, keys: LocaleKeys) => void | Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Apply the locale in force, as a hook. Answers `true` when the direction it applied takes effect only after the
|
|
25
|
+
* app reloads, which is React Native's rule for `I18nManager`. The browser always answers `false`.
|
|
26
|
+
*/
|
|
27
|
+
readonly useApply: (enabled: boolean, locale: string, direction: "ltr" | "rtl") => boolean;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=localeEnvironment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localeEnvironment.d.ts","sourceRoot":"","sources":["../../src/react/localeEnvironment.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE7E,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,YAAY,CAAC,CAAC;AAEzE;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,KAAK,oBAAoB,GAAG,SAAS,CAAC;IACnF,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,GAAG,KAAK,KAAK,OAAO,CAAC;CAC5F"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
/**
|
|
4
|
+
* Keep `lang` and `dir` on the document in step with the locale in force.
|
|
5
|
+
*
|
|
6
|
+
* `enabled` false writes nothing: a project without the capability keeps the `lang` its `index.html` shipped,
|
|
7
|
+
* because restamping the document with a locale no chain chose would declare a language nothing negotiated.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useDocumentLocale(enabled: boolean, locale: string, direction: "ltr" | "rtl"): void;
|
|
10
|
+
//# sourceMappingURL=useDocumentLocale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDocumentLocale.d.ts","sourceRoot":"","sources":["../../src/react/useDocumentLocale.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAKlG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { applyDocumentLocale } from "../browser/signals.js";
|
|
4
|
+
import { useEffect } from "react";
|
|
5
|
+
//#region src/react/useDocumentLocale.ts
|
|
6
|
+
/**
|
|
7
|
+
* Keep `lang` and `dir` on the document in step with the locale in force.
|
|
8
|
+
*
|
|
9
|
+
* `enabled` false writes nothing: a project without the capability keeps the `lang` its `index.html` shipped,
|
|
10
|
+
* because restamping the document with a locale no chain chose would declare a language nothing negotiated.
|
|
11
|
+
*/
|
|
12
|
+
function useDocumentLocale(enabled, locale, direction) {
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (!enabled) return;
|
|
15
|
+
applyDocumentLocale(locale, direction);
|
|
16
|
+
}, [
|
|
17
|
+
enabled,
|
|
18
|
+
locale,
|
|
19
|
+
direction
|
|
20
|
+
]);
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { useDocumentLocale };
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
import type { MessageCatalog } from "@pithy-sh/core/src/i18n/catalog";
|
|
4
4
|
import type { I18nClientProjection } from "../client/projection";
|
|
5
|
+
import type { LocaleEnvironment } from "./localeEnvironment";
|
|
5
6
|
import type { TranslatorSource } from "./translator";
|
|
6
7
|
/** What the hook hands back: what to mount, what was chosen, and how to choose again. */
|
|
7
8
|
export interface NegotiatedLocale {
|
|
@@ -13,8 +14,14 @@ export interface NegotiatedLocale {
|
|
|
13
14
|
readonly source: TranslatorSource | null;
|
|
14
15
|
/** The catalog locale in force — the words the app has. */
|
|
15
16
|
readonly locale: string;
|
|
16
|
-
/** Choose a language. Remembers it on this device and
|
|
17
|
+
/** Choose a language. Remembers it on this device and applies it through the environment. */
|
|
17
18
|
readonly choose: (locale: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* `true` when the locale in force lays out in the other direction from the one this launch started with, and the
|
|
21
|
+
* new direction takes effect only after the app reloads. React Native's rule; a browser never answers `true`. A
|
|
22
|
+
* screen says so rather than flip half a layout.
|
|
23
|
+
*/
|
|
24
|
+
readonly reloadRequired: boolean;
|
|
18
25
|
}
|
|
19
26
|
/** What the caller knows that the browser cannot work out for itself. */
|
|
20
27
|
export interface NegotiatedLocaleOptions {
|
|
@@ -42,10 +49,16 @@ export interface NegotiatedLocaleOptions {
|
|
|
42
49
|
* catch it here where you know what your API meant.
|
|
43
50
|
*/
|
|
44
51
|
readonly persist?: (locale: string) => void | Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Where the starting signals come from, where a choice is remembered and how the locale is applied. The browser's
|
|
54
|
+
* by default; pass `nativeLocaleEnvironment` from `@pithy-sh/i18n/src/native/environment` on React Native. Keep it
|
|
55
|
+
* the same object for the life of the component.
|
|
56
|
+
*/
|
|
57
|
+
readonly environment?: LocaleEnvironment;
|
|
45
58
|
}
|
|
46
59
|
/**
|
|
47
|
-
* Negotiate the reader's locale
|
|
48
|
-
*
|
|
60
|
+
* Negotiate the reader's locale, load that locale's catalog, and keep the platform in step: the document in a
|
|
61
|
+
* browser, `I18nManager` on React Native, through `options.environment`.
|
|
49
62
|
*
|
|
50
63
|
* **It takes what a browser holds.** `projection` is `virtual:pithy/i18n` — locale metadata and nothing
|
|
51
64
|
* else — so a screen reads the chain order **this project** configured rather than one the front end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNegotiatedLocale.d.ts","sourceRoot":"","sources":["../../src/react/useNegotiatedLocale.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"useNegotiatedLocale.d.ts","sourceRoot":"","sources":["../../src/react/useNegotiatedLocale.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAGjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,yFAAyF;AACzF,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACzC,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6FAA6F;IAC7F,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CAClC;AAED,yEAAyE;AACzE,MAAM,WAAW,uBAAuB;IACtC,kGAAkG;IAClG,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,gGAAgG;IAChG,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,SAAS,CAAC,CAAC,CAAC;IACzE;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAC;CAC1C;AAWD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,oBAAoB,EAChC,OAAO,GAAE,uBAA4B,GACpC,gBAAgB,CAgGlB"}
|