@firebase-oss/ui-translations 0.0.2-exp.c228b3f → 0.0.2-exp.cfc61d6
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/LICENSE +202 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +8 -9
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2016 Google Inc
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var o={errors:{userNotFound:"No account found with this email address",wrongPassword:"Incorrect password",invalidEmail:"Please enter a valid email address",userDisabled:"This account has been disabled",networkRequestFailed:"Unable to connect to the server. Please check your internet connection",tooManyRequests:"Too many failed attempts. Please try again later",missingVerificationCode:"Please enter the verification code",emailAlreadyInUse:"An account already exists with this email",invalidCredential:"The provided credentials are invalid.",weakPassword:"Password should be at least 8 characters",unverifiedEmail:"Please verify your email address to continue.",operationNotAllowed:"This operation is not allowed. Please contact support.",invalidPhoneNumber:"The phone number is invalid",missingPhoneNumber:"Please provide a phone number",quotaExceeded:"SMS quota exceeded. Please try again later",codeExpired:"The verification code has expired",captchaCheckFailed:"reCAPTCHA verification failed. Please try again.",missingVerificationId:"Please complete the reCAPTCHA verification first.",missingEmail:"Please provide an email address",invalidActionCode:"The password reset link is invalid or has expired",credentialAlreadyInUse:"An account already exists with this email. Please sign in with that account.",requiresRecentLogin:"This operation requires a recent login. Please sign in again.",providerAlreadyLinked:"This phone number is already linked to another account",invalidVerificationCode:"Invalid verification code. Please try again",unknownError:"An unexpected error occurred",popupClosed:"The sign-in popup was closed. Please try again.",accountExistsWithDifferentCredential:"An account already exists with this email. Please sign in with the original provider.",displayNameRequired:"Please provide a display name",secondFactorAlreadyInUse:"This phone number is already enrolled with this account."},messages:{passwordResetEmailSent:"Password reset email sent successfully",signInLinkSent:"Sign-in link sent successfully",verificationCodeFirst:"Please request a verification code first",checkEmailForReset:"Check your email for password reset instructions",dividerOr:"or",termsAndPrivacy:"By continuing, you agree to our {tos} and {privacy}.",mfaSmsAssertionPrompt:"A verification code will be sent to {phoneNumber} to complete the authentication process."},labels:{emailAddress:"Email Address",password:"Password",displayName:"Display Name",forgotPassword:"Forgot Password?",signUp:"Sign Up",signIn:"Sign In",resetPassword:"Reset Password",createAccount:"Create Account",backToSignIn:"Back to Sign In",signInWithPhone:"Sign in with Phone",phoneNumber:"Phone Number",verificationCode:"Verification Code",sendCode:"Send Code",verifyCode:"Verify Code",signInWithGoogle:"Sign in with Google",signInWithFacebook:"Sign in with Facebook",signInWithApple:"Sign in with Apple",signInWithMicrosoft:"Sign in with Microsoft",signInWithGitHub:"Sign in with GitHub",signInWithTwitter:"Sign in with X",signInWithEmailLink:"Sign in with Email Link",sendSignInLink:"Send Sign-in Link",termsOfService:"Terms of Service",privacyPolicy:"Privacy Policy",resendCode:"Resend Code",sending:"Sending...",multiFactorEnrollment:"Multi-factor Enrollment",multiFactorAssertion:"Multi-factor Authentication",mfaTotpVerification:"TOTP Verification",mfaSmsVerification:"SMS Verification",generateQrCode:"Generate QR Code"},prompts:{noAccount:"Don't have an account?",haveAccount:"Already have an account?",enterEmailToReset:"Enter your email address to reset your password",signInToAccount:"Sign in to your account",smsVerificationPrompt:"Enter the verification code sent to your phone number",enterDetailsToCreate:"Enter your details to create a new account",enterPhoneNumber:"Enter your phone number",enterVerificationCode:"Enter the verification code",enterEmailForLink:"Enter your email to receive a sign-in link",mfaEnrollmentPrompt:"Select a new multi-factor enrollment method",mfaAssertionPrompt:"Please complete the multi-factor authentication process",mfaAssertionFactorPrompt:"Please choose a multi-factor authentication method",mfaTotpQrCodePrompt:"Scan this QR code with your authenticator app",mfaTotpEnrollmentVerificationPrompt:"Add the code generated by your authenticator app"}};var p={"auth/user-not-found":"userNotFound","auth/wrong-password":"wrongPassword","auth/invalid-email":"invalidEmail","auth/unverified-email":"unverifiedEmail","auth/user-disabled":"userDisabled","auth/missing-code":"missingVerificationCode","auth/invalid-credential":"invalidCredential","auth/network-request-failed":"networkRequestFailed","auth/too-many-requests":"tooManyRequests","auth/email-already-in-use":"emailAlreadyInUse","auth/weak-password":"weakPassword","auth/operation-not-allowed":"operationNotAllowed","auth/invalid-phone-number":"invalidPhoneNumber","auth/missing-phone-number":"missingPhoneNumber","auth/quota-exceeded":"quotaExceeded","auth/code-expired":"codeExpired","auth/captcha-check-failed":"captchaCheckFailed","auth/missing-verification-id":"missingVerificationId","auth/missing-email":"missingEmail","auth/invalid-action-code":"invalidActionCode","auth/credential-already-in-use":"credentialAlreadyInUse","auth/requires-recent-login":"requiresRecentLogin","auth/provider-already-linked":"providerAlreadyLinked","auth/invalid-verification-code":"invalidVerificationCode","auth/account-exists-with-different-credential":"accountExistsWithDifferentCredential","auth/display-name-required":"displayNameRequired","auth/second-factor-already-in-use":"secondFactorAlreadyInUse"};function d(i,t,n,r){let s=i.translations[t]?.[n],e;if(s)e=s;else if(i.fallback){let a=d(i.fallback,t,n);a&&(e=a);}else e=o[t][n];return r&&(e=e?.replace(/{(\w+)}/g,(a,l)=>r[l]||a)),e||""}function c(i,t,n){return {locale:i,translations:t,fallback:n}}var y=c("en-US",o);exports.ERROR_CODE_MAP=p;exports.enUs=y;exports.getTranslation=d;exports.registerLocale=c;//# sourceMappingURL=index.cjs.map
|
|
1
|
+
'use strict';var l={errors:{userNotFound:"Nebyl nalezen \u017E\xE1dn\xFD \xFA\u010Det s touto e-mailovou adresou",wrongPassword:"Nespr\xE1vn\xE9 heslo",invalidEmail:"Zadejte pros\xEDm platnou e-mailovou adresu",userDisabled:"Tento \xFA\u010Det byl deaktivov\xE1n",networkRequestFailed:"Nelze se p\u0159ipojit k serveru. Zkontrolujte pros\xEDm sv\xE9 internetov\xE9 p\u0159ipojen\xED",tooManyRequests:"P\u0159\xEDli\u0161 mnoho ne\xFAsp\u011B\u0161n\xFDch pokus\u016F. Zkuste to pros\xEDm pozd\u011Bji",missingVerificationCode:"Zadejte pros\xEDm ov\u011B\u0159ovac\xED k\xF3d",emailAlreadyInUse:"\xDA\u010Det s touto e-mailovou adresou ji\u017E existuje",invalidCredential:"Zadan\xE9 p\u0159ihla\u0161ovac\xED \xFAdaje nejsou platn\xE9.",weakPassword:"Heslo mus\xED m\xEDt alespo\u0148 8 znak\u016F",unverifiedEmail:"Pro pokra\u010Dov\xE1n\xED pros\xEDm ov\u011B\u0159te svou e-mailovou adresu.",operationNotAllowed:"Tato operace nen\xED povolena. Kontaktujte pros\xEDm podporu.",invalidPhoneNumber:"Telefonn\xED \u010D\xEDslo nen\xED platn\xE9",missingPhoneNumber:"Zadejte pros\xEDm telefonn\xED \u010D\xEDslo",quotaExceeded:"Limit pro odes\xEDl\xE1n\xED SMS byl p\u0159ekro\u010Den. Zkuste to pros\xEDm pozd\u011Bji",codeExpired:"Ov\u011B\u0159ovac\xED k\xF3d vypr\u0161el",captchaCheckFailed:"Ov\u011B\u0159en\xED reCAPTCHA selhalo. Zkuste to pros\xEDm znovu.",missingVerificationId:"Nejprve pros\xEDm dokon\u010Dete ov\u011B\u0159en\xED reCAPTCHA.",missingEmail:"Zadejte pros\xEDm e-mailovou adresu",invalidActionCode:"Odkaz pro obnoven\xED hesla je neplatn\xFD nebo vypr\u0161el",credentialAlreadyInUse:"\xDA\u010Det s touto e-mailovou adresou ji\u017E existuje. P\u0159ihlaste se pros\xEDm k tomuto \xFA\u010Dtu.",requiresRecentLogin:"Tato operace vy\u017Eaduje ned\xE1vn\xE9 p\u0159ihl\xE1\u0161en\xED. P\u0159ihlaste se pros\xEDm znovu.",providerAlreadyLinked:"Toto telefonn\xED \u010D\xEDslo je ji\u017E propojeno s jin\xFDm \xFA\u010Dtem",invalidVerificationCode:"Neplatn\xFD ov\u011B\u0159ovac\xED k\xF3d. Zkuste to pros\xEDm znovu",unknownError:"Do\u0161lo k neo\u010Dek\xE1van\xE9 chyb\u011B",popupClosed:"P\u0159ihla\u0161ovac\xED okno bylo zav\u0159eno. Zkuste to pros\xEDm znovu.",accountExistsWithDifferentCredential:"\xDA\u010Det s touto e-mailovou adresou ji\u017E existuje. P\u0159ihlaste se pros\xEDm pomoc\xED p\u016Fvodn\xEDho poskytovatele.",displayNameRequired:"Zadejte pros\xEDm jm\xE9no",secondFactorAlreadyInUse:"Toto telefonn\xED \u010D\xEDslo je ji\u017E p\u0159id\xE1no k tomuto \xFA\u010Dtu."},messages:{passwordResetEmailSent:"E-mail pro obnoven\xED hesla byl \xFAsp\u011B\u0161n\u011B odesl\xE1n",signInLinkSent:"P\u0159ihla\u0161ovac\xED odkaz byl \xFAsp\u011B\u0161n\u011B odesl\xE1n",verificationCodeFirst:"Nejprve si pros\xEDm vy\u017E\xE1dejte ov\u011B\u0159ovac\xED k\xF3d",checkEmailForReset:"Zkontrolujte e-mail s instrukcemi pro obnoven\xED hesla",dividerOr:"nebo",termsAndPrivacy:"Pokra\u010Dov\xE1n\xEDm souhlas\xEDte s na\u0161imi {tos} a {privacy}.",mfaSmsAssertionPrompt:"Na \u010D\xEDslo {phoneNumber} bude odesl\xE1n ov\u011B\u0159ovac\xED k\xF3d pro dokon\u010Den\xED procesu ov\u011B\u0159en\xED."},labels:{emailAddress:"E-mailov\xE1 adresa",password:"Heslo",displayName:"Jm\xE9no",forgotPassword:"Zapomn\u011Bli jste heslo?",signUp:"Registrovat se",signIn:"P\u0159ihl\xE1sit se",resetPassword:"Obnovit heslo",createAccount:"Vytvo\u0159it \xFA\u010Det",backToSignIn:"Zp\u011Bt na p\u0159ihl\xE1\u0161en\xED",signInWithPhone:"P\u0159ihl\xE1sit se pomoc\xED telefonu",phoneNumber:"Telefonn\xED \u010D\xEDslo",verificationCode:"Ov\u011B\u0159ovac\xED k\xF3d",sendCode:"Odeslat k\xF3d",verifyCode:"Ov\u011B\u0159it k\xF3d",signInWithGoogle:"P\u0159ihl\xE1sit se pomoc\xED Google",signInWithFacebook:"P\u0159ihl\xE1sit se pomoc\xED Facebook",signInWithApple:"P\u0159ihl\xE1sit se pomoc\xED Apple",signInWithMicrosoft:"P\u0159ihl\xE1sit se pomoc\xED Microsoft",signInWithGitHub:"P\u0159ihl\xE1sit se pomoc\xED GitHub",signInWithTwitter:"P\u0159ihl\xE1sit se pomoc\xED X",signInWithEmailLink:"P\u0159ihl\xE1sit se pomoc\xED e-mailov\xE9ho odkazu",sendSignInLink:"Odeslat p\u0159ihla\u0161ovac\xED odkaz",termsOfService:"Podm\xEDnky pou\u017Eit\xED",privacyPolicy:"Z\xE1sady ochrany osobn\xEDch \xFAdaj\u016F",resendCode:"Znovu odeslat k\xF3d",sending:"Odes\xEDl\xE1n\xED...",multiFactorEnrollment:"Registrace v\xEDcefaktorov\xE9ho ov\u011B\u0159en\xED",multiFactorAssertion:"V\xEDcefaktorov\xE9 ov\u011B\u0159en\xED",mfaTotpVerification:"Ov\u011B\u0159en\xED TOTP",mfaSmsVerification:"Ov\u011B\u0159en\xED SMS",generateQrCode:"Vygenerovat QR k\xF3d"},prompts:{noAccount:"Nem\xE1te \xFA\u010Det?",haveAccount:"U\u017E m\xE1te \xFA\u010Det?",enterEmailToReset:"Zadejte svou e-mailovou adresu pro obnoven\xED hesla",signInToAccount:"P\u0159ihlaste se ke sv\xE9mu \xFA\u010Dtu",smsVerificationPrompt:"Zadejte ov\u011B\u0159ovac\xED k\xF3d zaslan\xFD na va\u0161e telefonn\xED \u010D\xEDslo",enterDetailsToCreate:"Zadejte sv\xE9 \xFAdaje pro vytvo\u0159en\xED nov\xE9ho \xFA\u010Dtu",enterPhoneNumber:"Zadejte sv\xE9 telefonn\xED \u010D\xEDslo",enterVerificationCode:"Zadejte ov\u011B\u0159ovac\xED k\xF3d",enterEmailForLink:"Zadejte sv\u016Fj e-mail pro zasl\xE1n\xED p\u0159ihla\u0161ovac\xEDho odkazu",mfaEnrollmentPrompt:"Vyberte nov\xFD zp\u016Fsob v\xEDcefaktorov\xE9ho ov\u011B\u0159en\xED",mfaAssertionPrompt:"Dokon\u010Dete pros\xEDm proces v\xEDcefaktorov\xE9ho ov\u011B\u0159en\xED",mfaAssertionFactorPrompt:"Vyberte pros\xEDm metodu v\xEDcefaktorov\xE9ho ov\u011B\u0159en\xED",mfaTotpQrCodePrompt:"Naskenujte tento QR k\xF3d pomoc\xED sv\xE9 autentiza\u010Dn\xED aplikace",mfaTotpEnrollmentVerificationPrompt:"Zadejte k\xF3d vygenerovan\xFD va\u0161\xED autentiza\u010Dn\xED aplikac\xED"}};var a={errors:{userNotFound:"No account found with this email address",wrongPassword:"Incorrect password",invalidEmail:"Please enter a valid email address",userDisabled:"This account has been disabled",networkRequestFailed:"Unable to connect to the server. Please check your internet connection",tooManyRequests:"Too many failed attempts. Please try again later",missingVerificationCode:"Please enter the verification code",emailAlreadyInUse:"An account already exists with this email",invalidCredential:"The provided credentials are invalid.",weakPassword:"Password should be at least 8 characters",unverifiedEmail:"Please verify your email address to continue.",operationNotAllowed:"This operation is not allowed. Please contact support.",invalidPhoneNumber:"The phone number is invalid",missingPhoneNumber:"Please provide a phone number",quotaExceeded:"SMS quota exceeded. Please try again later",codeExpired:"The verification code has expired",captchaCheckFailed:"reCAPTCHA verification failed. Please try again.",missingVerificationId:"Please complete the reCAPTCHA verification first.",missingEmail:"Please provide an email address",invalidActionCode:"The password reset link is invalid or has expired",credentialAlreadyInUse:"An account already exists with this email. Please sign in with that account.",requiresRecentLogin:"This operation requires a recent login. Please sign in again.",providerAlreadyLinked:"This phone number is already linked to another account",invalidVerificationCode:"Invalid verification code. Please try again",unknownError:"An unexpected error occurred",popupClosed:"The sign-in popup was closed. Please try again.",accountExistsWithDifferentCredential:"An account already exists with this email. Please sign in with the original provider.",displayNameRequired:"Please provide a display name",secondFactorAlreadyInUse:"This phone number is already enrolled with this account."},messages:{passwordResetEmailSent:"Password reset email sent successfully",signInLinkSent:"Sign-in link sent successfully",verificationCodeFirst:"Please request a verification code first",checkEmailForReset:"Check your email for password reset instructions",dividerOr:"or",termsAndPrivacy:"By continuing, you agree to our {tos} and {privacy}.",mfaSmsAssertionPrompt:"A verification code will be sent to {phoneNumber} to complete the authentication process."},labels:{emailAddress:"Email Address",password:"Password",displayName:"Display Name",forgotPassword:"Forgot Password?",signUp:"Sign Up",signIn:"Sign In",resetPassword:"Reset Password",createAccount:"Create Account",backToSignIn:"Back to Sign In",signInWithPhone:"Sign in with Phone",phoneNumber:"Phone Number",verificationCode:"Verification Code",sendCode:"Send Code",verifyCode:"Verify Code",signInWithGoogle:"Sign in with Google",signInWithFacebook:"Sign in with Facebook",signInWithApple:"Sign in with Apple",signInWithMicrosoft:"Sign in with Microsoft",signInWithGitHub:"Sign in with GitHub",signInWithYahoo:"Sign in with Yahoo",signInWithTwitter:"Sign in with X",signInWithEmailLink:"Sign in with Email Link",signInWithEmail:"Sign in with Email",sendSignInLink:"Send Sign-in Link",termsOfService:"Terms of Service",privacyPolicy:"Privacy Policy",resendCode:"Resend Code",sending:"Sending...",multiFactorEnrollment:"Multi-factor Enrollment",multiFactorAssertion:"Multi-factor Authentication",mfaTotpVerification:"TOTP Verification",mfaSmsVerification:"SMS Verification",generateQrCode:"Generate QR Code"},prompts:{noAccount:"Don't have an account?",haveAccount:"Already have an account?",enterEmailToReset:"Enter your email address to reset your password",signInToAccount:"Sign in to your account",smsVerificationPrompt:"Enter the verification code sent to your phone number",enterDetailsToCreate:"Enter your details to create a new account",enterPhoneNumber:"Enter your phone number",enterVerificationCode:"Enter the verification code",enterEmailForLink:"Enter your email to receive a sign-in link",mfaEnrollmentPrompt:"Select a new multi-factor enrollment method",mfaAssertionPrompt:"Please complete the multi-factor authentication process",mfaAssertionFactorPrompt:"Please choose a multi-factor authentication method",mfaTotpQrCodePrompt:"Scan this QR code with your authenticator app",mfaTotpEnrollmentVerificationPrompt:"Add the code generated by your authenticator app"}};var f={"auth/user-not-found":"userNotFound","auth/wrong-password":"wrongPassword","auth/invalid-email":"invalidEmail","auth/unverified-email":"unverifiedEmail","auth/user-disabled":"userDisabled","auth/missing-code":"missingVerificationCode","auth/invalid-credential":"invalidCredential","auth/network-request-failed":"networkRequestFailed","auth/too-many-requests":"tooManyRequests","auth/email-already-in-use":"emailAlreadyInUse","auth/weak-password":"weakPassword","auth/operation-not-allowed":"operationNotAllowed","auth/invalid-phone-number":"invalidPhoneNumber","auth/missing-phone-number":"missingPhoneNumber","auth/quota-exceeded":"quotaExceeded","auth/code-expired":"codeExpired","auth/captcha-check-failed":"captchaCheckFailed","auth/missing-verification-id":"missingVerificationId","auth/missing-email":"missingEmail","auth/invalid-action-code":"invalidActionCode","auth/credential-already-in-use":"credentialAlreadyInUse","auth/requires-recent-login":"requiresRecentLogin","auth/provider-already-linked":"providerAlreadyLinked","auth/invalid-verification-code":"invalidVerificationCode","auth/account-exists-with-different-credential":"accountExistsWithDifferentCredential","auth/display-name-required":"displayNameRequired","auth/second-factor-already-in-use":"secondFactorAlreadyInUse"};function u(o,i,n,s){let r=o.translations[i]?.[n],e;if(r)e=r;else if(o.fallback){let t=u(o.fallback,i,n);t&&(e=t);}else e=a[i][n];return s&&(e=e?.replace(/{(\w+)}/g,(t,c)=>s[c]||t)),e||""}function d(o,i,n){return {locale:o,translations:i,fallback:n}}var P=d("en-US",a),w=d("cs-CZ",l);exports.ERROR_CODE_MAP=f;exports.csCz=w;exports.enUs=P;exports.getTranslation=u;exports.registerLocale=d;//# sourceMappingURL=index.cjs.map
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/locales/en-us.ts","../src/mapping.ts","../src/index.ts"],"names":["enUS","ERROR_CODE_MAP","getTranslation","locale","category","key","replacements","translatedString","str","fallbackTranslation","match","p1","registerLocale","translations","fallback","enUs"],"mappings":"aAmBO,IAAMA,CAAAA,CAAO,CAClB,MAAA,CAAQ,CACN,aAAc,0CAAA,CACd,aAAA,CAAe,oBAAA,CACf,YAAA,CAAc,qCACd,YAAA,CAAc,gCAAA,CACd,oBAAA,CAAsB,wEAAA,CACtB,gBAAiB,kDAAA,CACjB,uBAAA,CAAyB,oCAAA,CACzB,iBAAA,CAAmB,4CACnB,iBAAA,CAAmB,uCAAA,CACnB,YAAA,CAAc,0CAAA,CACd,gBAAiB,+CAAA,CACjB,mBAAA,CAAqB,wDAAA,CACrB,kBAAA,CAAoB,8BACpB,kBAAA,CAAoB,+BAAA,CACpB,aAAA,CAAe,4CAAA,CACf,YAAa,mCAAA,CACb,kBAAA,CAAoB,kDAAA,CACpB,qBAAA,CAAuB,oDACvB,YAAA,CAAc,iCAAA,CACd,iBAAA,CAAmB,mDAAA,CACnB,uBAAwB,8EAAA,CACxB,mBAAA,CAAqB,+DAAA,CACrB,qBAAA,CAAuB,yDACvB,uBAAA,CAAyB,6CAAA,CACzB,YAAA,CAAc,8BAAA,CACd,YAAa,iDAAA,CACb,oCAAA,CACE,uFAAA,CACF,mBAAA,CAAqB,gCACrB,wBAAA,CAA0B,0DAC5B,CAAA,CACA,QAAA,CAAU,CACR,sBAAA,CAAwB,wCAAA,CACxB,cAAA,CAAgB,gCAAA,CAChB,sBAAuB,0CAAA,CACvB,kBAAA,CAAoB,kDAAA,CACpB,SAAA,CAAW,KACX,eAAA,CAAiB,sDAAA,CACjB,qBAAA,CAAuB,2FACzB,CAAA,CACA,MAAA,CAAQ,CACN,YAAA,CAAc,gBACd,QAAA,CAAU,UAAA,CACV,WAAA,CAAa,cAAA,CACb,eAAgB,kBAAA,CAChB,MAAA,CAAQ,SAAA,CACR,MAAA,CAAQ,UACR,a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,CAGO,IAAMC,CAAAA,CAAOH,CAAAA,CAAe,QAASZ,CAAI","file":"index.cjs","sourcesContent":["/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { type Translations } from \"../types\";\n\n/** English US (en-US) translation set with all default translations. */\nexport const enUS = {\n errors: {\n userNotFound: \"No account found with this email address\",\n wrongPassword: \"Incorrect password\",\n invalidEmail: \"Please enter a valid email address\",\n userDisabled: \"This account has been disabled\",\n networkRequestFailed: \"Unable to connect to the server. Please check your internet connection\",\n tooManyRequests: \"Too many failed attempts. Please try again later\",\n missingVerificationCode: \"Please enter the verification code\",\n emailAlreadyInUse: \"An account already exists with this email\",\n invalidCredential: \"The provided credentials are invalid.\",\n weakPassword: \"Password should be at least 8 characters\",\n unverifiedEmail: \"Please verify your email address to continue.\",\n operationNotAllowed: \"This operation is not allowed. Please contact support.\",\n invalidPhoneNumber: \"The phone number is invalid\",\n missingPhoneNumber: \"Please provide a phone number\",\n quotaExceeded: \"SMS quota exceeded. Please try again later\",\n codeExpired: \"The verification code has expired\",\n captchaCheckFailed: \"reCAPTCHA verification failed. Please try again.\",\n missingVerificationId: \"Please complete the reCAPTCHA verification first.\",\n missingEmail: \"Please provide an email address\",\n invalidActionCode: \"The password reset link is invalid or has expired\",\n credentialAlreadyInUse: \"An account already exists with this email. Please sign in with that account.\",\n requiresRecentLogin: \"This operation requires a recent login. Please sign in again.\",\n providerAlreadyLinked: \"This phone number is already linked to another account\",\n invalidVerificationCode: \"Invalid verification code. Please try again\",\n unknownError: \"An unexpected error occurred\",\n popupClosed: \"The sign-in popup was closed. Please try again.\",\n accountExistsWithDifferentCredential:\n \"An account already exists with this email. Please sign in with the original provider.\",\n displayNameRequired: \"Please provide a display name\",\n secondFactorAlreadyInUse: \"This phone number is already enrolled with this account.\",\n },\n messages: {\n passwordResetEmailSent: \"Password reset email sent successfully\",\n signInLinkSent: \"Sign-in link sent successfully\",\n verificationCodeFirst: \"Please request a verification code first\",\n checkEmailForReset: \"Check your email for password reset instructions\",\n dividerOr: \"or\",\n termsAndPrivacy: \"By continuing, you agree to our {tos} and {privacy}.\",\n mfaSmsAssertionPrompt: \"A verification code will be sent to {phoneNumber} to complete the authentication process.\",\n },\n labels: {\n emailAddress: \"Email Address\",\n password: \"Password\",\n displayName: \"Display Name\",\n forgotPassword: \"Forgot Password?\",\n signUp: \"Sign Up\",\n signIn: \"Sign In\",\n resetPassword: \"Reset Password\",\n createAccount: \"Create Account\",\n backToSignIn: \"Back to Sign In\",\n signInWithPhone: \"Sign in with Phone\",\n phoneNumber: \"Phone Number\",\n verificationCode: \"Verification Code\",\n sendCode: \"Send Code\",\n verifyCode: \"Verify Code\",\n signInWithGoogle: \"Sign in with Google\",\n signInWithFacebook: \"Sign in with Facebook\",\n signInWithApple: \"Sign in with Apple\",\n signInWithMicrosoft: \"Sign in with Microsoft\",\n signInWithGitHub: \"Sign in with GitHub\",\n signInWithTwitter: \"Sign in with X\",\n signInWithEmailLink: \"Sign in with Email Link\",\n sendSignInLink: \"Send Sign-in Link\",\n termsOfService: \"Terms of Service\",\n privacyPolicy: \"Privacy Policy\",\n resendCode: \"Resend Code\",\n sending: \"Sending...\",\n multiFactorEnrollment: \"Multi-factor Enrollment\",\n multiFactorAssertion: \"Multi-factor Authentication\",\n mfaTotpVerification: \"TOTP Verification\",\n mfaSmsVerification: \"SMS Verification\",\n generateQrCode: \"Generate QR Code\",\n },\n prompts: {\n noAccount: \"Don't have an account?\",\n haveAccount: \"Already have an account?\",\n enterEmailToReset: \"Enter your email address to reset your password\",\n signInToAccount: \"Sign in to your account\",\n smsVerificationPrompt: \"Enter the verification code sent to your phone number\",\n enterDetailsToCreate: \"Enter your details to create a new account\",\n enterPhoneNumber: \"Enter your phone number\",\n enterVerificationCode: \"Enter the verification code\",\n enterEmailForLink: \"Enter your email to receive a sign-in link\",\n mfaEnrollmentPrompt: \"Select a new multi-factor enrollment method\",\n mfaAssertionPrompt: \"Please complete the multi-factor authentication process\",\n mfaAssertionFactorPrompt: \"Please choose a multi-factor authentication method\",\n mfaTotpQrCodePrompt: \"Scan this QR code with your authenticator app\",\n mfaTotpEnrollmentVerificationPrompt: \"Add the code generated by your authenticator app\",\n },\n} satisfies Translations;\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { enUS } from \"./locales/en-us\";\nimport { type RegisteredLocale } from \".\";\nimport type { ErrorKey, TranslationCategory, TranslationKey, TranslationSet } from \"./types\";\n\n/** Maps Firebase authentication error codes to translation keys. */\nexport const ERROR_CODE_MAP = {\n \"auth/user-not-found\": \"userNotFound\",\n \"auth/wrong-password\": \"wrongPassword\",\n \"auth/invalid-email\": \"invalidEmail\",\n \"auth/unverified-email\": \"unverifiedEmail\",\n \"auth/user-disabled\": \"userDisabled\",\n \"auth/missing-code\": \"missingVerificationCode\",\n \"auth/invalid-credential\": \"invalidCredential\",\n \"auth/network-request-failed\": \"networkRequestFailed\",\n \"auth/too-many-requests\": \"tooManyRequests\",\n \"auth/email-already-in-use\": \"emailAlreadyInUse\",\n \"auth/weak-password\": \"weakPassword\",\n \"auth/operation-not-allowed\": \"operationNotAllowed\",\n \"auth/invalid-phone-number\": \"invalidPhoneNumber\",\n \"auth/missing-phone-number\": \"missingPhoneNumber\",\n \"auth/quota-exceeded\": \"quotaExceeded\",\n \"auth/code-expired\": \"codeExpired\",\n \"auth/captcha-check-failed\": \"captchaCheckFailed\",\n \"auth/missing-verification-id\": \"missingVerificationId\",\n \"auth/missing-email\": \"missingEmail\",\n \"auth/invalid-action-code\": \"invalidActionCode\",\n \"auth/credential-already-in-use\": \"credentialAlreadyInUse\",\n \"auth/requires-recent-login\": \"requiresRecentLogin\",\n \"auth/provider-already-linked\": \"providerAlreadyLinked\",\n \"auth/invalid-verification-code\": \"invalidVerificationCode\",\n \"auth/account-exists-with-different-credential\": \"accountExistsWithDifferentCredential\",\n \"auth/display-name-required\": \"displayNameRequired\",\n \"auth/second-factor-already-in-use\": \"secondFactorAlreadyInUse\",\n} satisfies Record<string, ErrorKey>;\n\n/** Firebase authentication error code type. */\nexport type ErrorCode = keyof typeof ERROR_CODE_MAP;\n\n/**\n * Retrieves a translation string for a given locale, category, and key.\n *\n * Falls back to the locale's fallback locale or English US if the translation is not found.\n * Supports string replacements using {placeholder} syntax.\n *\n * @param locale - The registered locale to get the translation from.\n * @param category - The translation category (e.g., \"errors\", \"labels\").\n * @param key - The translation key within the category.\n * @param replacements - Optional object with replacement values for placeholders in the translation string.\n * @returns The translated string, or an empty string if not found.\n */\nexport function getTranslation<T extends TranslationCategory>(\n locale: RegisteredLocale,\n category: T,\n key: TranslationKey<T>,\n replacements?: Record<string, string>\n): string {\n const userTranslationSet = locale.translations[category] as TranslationSet<T> | undefined;\n const translatedString = userTranslationSet?.[key];\n\n let str: string | undefined;\n\n if (translatedString) {\n str = translatedString;\n } else if (locale.fallback) {\n const fallbackTranslation = getTranslation(locale.fallback, category, key);\n\n if (fallbackTranslation) {\n str = fallbackTranslation;\n }\n } else {\n const fallbackTranslationSet = enUS[category] as TranslationSet<T>;\n str = fallbackTranslationSet[key];\n }\n\n if (replacements) {\n str = str?.replace(/{(\\w+)}/g, (match, p1) => replacements[p1] || match);\n }\n\n return str || \"\";\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { enUS } from \"./locales/en-us\";\nimport { type Translations } from \"./types\";\n\nexport type * from \"./types\";\nexport * from \"./mapping\";\n\n/** Locale identifier string. Supports BCP 47 format (e.g., \"en-US\") or any string. */\nexport type Locale = \"en-US\" | `${string}-${string}` | string;\n\n/**\n * Registers a locale with its translations and optional fallback locale.\n *\n * @param locale - The locale identifier (e.g., \"en-US\", \"fr-FR\").\n * @param translations - The translation object for this locale.\n * @param fallback - Optional fallback locale to use when a translation is missing.\n * @returns A registered locale object.\n */\nexport function registerLocale(\n locale: Locale,\n translations: Translations,\n fallback?: RegisteredLocale\n): RegisteredLocale {\n return {\n locale,\n translations,\n fallback,\n };\n}\n\n/** Pre-registered English US locale with default translations. */\nexport const enUs = registerLocale(\"en-US\", enUS);\n\n/** A registered locale with its translations and optional fallback. */\nexport type RegisteredLocale = {\n /** The locale identifier. */\n locale: Locale;\n /** The translation object for this locale. */\n translations: Translations;\n /** Optional fallback locale to use when a translation is missing. */\n fallback?: RegisteredLocale;\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/locales/cs-cz.ts","../src/locales/en-us.ts","../src/mapping.ts","../src/index.ts"],"names":["csCZ","enUS","ERROR_CODE_MAP","getTranslation","locale","category","key","replacements","translatedString","str","fallbackTranslation","match","p1","registerLocale","translations","fallback","enUs","csCz"],"mappings":"aAGO,IAAMA,CAAAA,CAAO,CAClB,MAAA,CAAQ,CACN,YAAA,CAAc,wEAAA,CACd,aAAA,CAAe,uBAAA,CACf,YAAA,CAAc,6CAAA,CACd,YAA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["import { type Translations } from \"../types\";\n\n/** Czech CZ (cs-CZ) translation set. */\nexport const csCZ = {\n errors: {\n userNotFound: \"Nebyl nalezen žádný účet s touto e-mailovou adresou\",\n wrongPassword: \"Nesprávné heslo\",\n invalidEmail: \"Zadejte prosím platnou e-mailovou adresu\",\n userDisabled: \"Tento účet byl deaktivován\",\n networkRequestFailed: \"Nelze se připojit k serveru. Zkontrolujte prosím své internetové připojení\",\n tooManyRequests: \"Příliš mnoho neúspěšných pokusů. Zkuste to prosím později\",\n missingVerificationCode: \"Zadejte prosím ověřovací kód\",\n emailAlreadyInUse: \"Účet s touto e-mailovou adresou již existuje\",\n invalidCredential: \"Zadané přihlašovací údaje nejsou platné.\",\n weakPassword: \"Heslo musí mít alespoň 8 znaků\",\n unverifiedEmail: \"Pro pokračování prosím ověřte svou e-mailovou adresu.\",\n operationNotAllowed: \"Tato operace není povolena. Kontaktujte prosím podporu.\",\n invalidPhoneNumber: \"Telefonní číslo není platné\",\n missingPhoneNumber: \"Zadejte prosím telefonní číslo\",\n quotaExceeded: \"Limit pro odesílání SMS byl překročen. Zkuste to prosím později\",\n codeExpired: \"Ověřovací kód vypršel\",\n captchaCheckFailed: \"Ověření reCAPTCHA selhalo. Zkuste to prosím znovu.\",\n missingVerificationId: \"Nejprve prosím dokončete ověření reCAPTCHA.\",\n missingEmail: \"Zadejte prosím e-mailovou adresu\",\n invalidActionCode: \"Odkaz pro obnovení hesla je neplatný nebo vypršel\",\n credentialAlreadyInUse: \"Účet s touto e-mailovou adresou již existuje. Přihlaste se prosím k tomuto účtu.\",\n requiresRecentLogin: \"Tato operace vyžaduje nedávné přihlášení. Přihlaste se prosím znovu.\",\n providerAlreadyLinked: \"Toto telefonní číslo je již propojeno s jiným účtem\",\n invalidVerificationCode: \"Neplatný ověřovací kód. Zkuste to prosím znovu\",\n unknownError: \"Došlo k neočekávané chybě\",\n popupClosed: \"Přihlašovací okno bylo zavřeno. Zkuste to prosím znovu.\",\n accountExistsWithDifferentCredential:\n \"Účet s touto e-mailovou adresou již existuje. Přihlaste se prosím pomocí původního poskytovatele.\",\n displayNameRequired: \"Zadejte prosím jméno\",\n secondFactorAlreadyInUse: \"Toto telefonní číslo je již přidáno k tomuto účtu.\",\n },\n messages: {\n passwordResetEmailSent: \"E-mail pro obnovení hesla byl úspěšně odeslán\",\n signInLinkSent: \"Přihlašovací odkaz byl úspěšně odeslán\",\n verificationCodeFirst: \"Nejprve si prosím vyžádejte ověřovací kód\",\n checkEmailForReset: \"Zkontrolujte e-mail s instrukcemi pro obnovení hesla\",\n dividerOr: \"nebo\",\n termsAndPrivacy: \"Pokračováním souhlasíte s našimi {tos} a {privacy}.\",\n mfaSmsAssertionPrompt: \"Na číslo {phoneNumber} bude odeslán ověřovací kód pro dokončení procesu ověření.\",\n },\n labels: {\n emailAddress: \"E-mailová adresa\",\n password: \"Heslo\",\n displayName: \"Jméno\",\n forgotPassword: \"Zapomněli jste heslo?\",\n signUp: \"Registrovat se\",\n signIn: \"Přihlásit se\",\n resetPassword: \"Obnovit heslo\",\n createAccount: \"Vytvořit účet\",\n backToSignIn: \"Zpět na přihlášení\",\n signInWithPhone: \"Přihlásit se pomocí telefonu\",\n phoneNumber: \"Telefonní číslo\",\n verificationCode: \"Ověřovací kód\",\n sendCode: \"Odeslat kód\",\n verifyCode: \"Ověřit kód\",\n signInWithGoogle: \"Přihlásit se pomocí Google\",\n signInWithFacebook: \"Přihlásit se pomocí Facebook\",\n signInWithApple: \"Přihlásit se pomocí Apple\",\n signInWithMicrosoft: \"Přihlásit se pomocí Microsoft\",\n signInWithGitHub: \"Přihlásit se pomocí GitHub\",\n signInWithTwitter: \"Přihlásit se pomocí X\",\n signInWithEmailLink: \"Přihlásit se pomocí e-mailového odkazu\",\n sendSignInLink: \"Odeslat přihlašovací odkaz\",\n termsOfService: \"Podmínky použití\",\n privacyPolicy: \"Zásady ochrany osobních údajů\",\n resendCode: \"Znovu odeslat kód\",\n sending: \"Odesílání...\",\n multiFactorEnrollment: \"Registrace vícefaktorového ověření\",\n multiFactorAssertion: \"Vícefaktorové ověření\",\n mfaTotpVerification: \"Ověření TOTP\",\n mfaSmsVerification: \"Ověření SMS\",\n generateQrCode: \"Vygenerovat QR kód\",\n },\n prompts: {\n noAccount: \"Nemáte účet?\",\n haveAccount: \"Už máte účet?\",\n enterEmailToReset: \"Zadejte svou e-mailovou adresu pro obnovení hesla\",\n signInToAccount: \"Přihlaste se ke svému účtu\",\n smsVerificationPrompt: \"Zadejte ověřovací kód zaslaný na vaše telefonní číslo\",\n enterDetailsToCreate: \"Zadejte své údaje pro vytvoření nového účtu\",\n enterPhoneNumber: \"Zadejte své telefonní číslo\",\n enterVerificationCode: \"Zadejte ověřovací kód\",\n enterEmailForLink: \"Zadejte svůj e-mail pro zaslání přihlašovacího odkazu\",\n mfaEnrollmentPrompt: \"Vyberte nový způsob vícefaktorového ověření\",\n mfaAssertionPrompt: \"Dokončete prosím proces vícefaktorového ověření\",\n mfaAssertionFactorPrompt: \"Vyberte prosím metodu vícefaktorového ověření\",\n mfaTotpQrCodePrompt: \"Naskenujte tento QR kód pomocí své autentizační aplikace\",\n mfaTotpEnrollmentVerificationPrompt: \"Zadejte kód vygenerovaný vaší autentizační aplikací\",\n },\n} satisfies Translations;\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { type Translations } from \"../types\";\n\n/** English US (en-US) translation set with all default translations. */\nexport const enUS = {\n errors: {\n userNotFound: \"No account found with this email address\",\n wrongPassword: \"Incorrect password\",\n invalidEmail: \"Please enter a valid email address\",\n userDisabled: \"This account has been disabled\",\n networkRequestFailed: \"Unable to connect to the server. Please check your internet connection\",\n tooManyRequests: \"Too many failed attempts. Please try again later\",\n missingVerificationCode: \"Please enter the verification code\",\n emailAlreadyInUse: \"An account already exists with this email\",\n invalidCredential: \"The provided credentials are invalid.\",\n weakPassword: \"Password should be at least 8 characters\",\n unverifiedEmail: \"Please verify your email address to continue.\",\n operationNotAllowed: \"This operation is not allowed. Please contact support.\",\n invalidPhoneNumber: \"The phone number is invalid\",\n missingPhoneNumber: \"Please provide a phone number\",\n quotaExceeded: \"SMS quota exceeded. Please try again later\",\n codeExpired: \"The verification code has expired\",\n captchaCheckFailed: \"reCAPTCHA verification failed. Please try again.\",\n missingVerificationId: \"Please complete the reCAPTCHA verification first.\",\n missingEmail: \"Please provide an email address\",\n invalidActionCode: \"The password reset link is invalid or has expired\",\n credentialAlreadyInUse: \"An account already exists with this email. Please sign in with that account.\",\n requiresRecentLogin: \"This operation requires a recent login. Please sign in again.\",\n providerAlreadyLinked: \"This phone number is already linked to another account\",\n invalidVerificationCode: \"Invalid verification code. Please try again\",\n unknownError: \"An unexpected error occurred\",\n popupClosed: \"The sign-in popup was closed. Please try again.\",\n accountExistsWithDifferentCredential:\n \"An account already exists with this email. Please sign in with the original provider.\",\n displayNameRequired: \"Please provide a display name\",\n secondFactorAlreadyInUse: \"This phone number is already enrolled with this account.\",\n },\n messages: {\n passwordResetEmailSent: \"Password reset email sent successfully\",\n signInLinkSent: \"Sign-in link sent successfully\",\n verificationCodeFirst: \"Please request a verification code first\",\n checkEmailForReset: \"Check your email for password reset instructions\",\n dividerOr: \"or\",\n termsAndPrivacy: \"By continuing, you agree to our {tos} and {privacy}.\",\n mfaSmsAssertionPrompt: \"A verification code will be sent to {phoneNumber} to complete the authentication process.\",\n },\n labels: {\n emailAddress: \"Email Address\",\n password: \"Password\",\n displayName: \"Display Name\",\n forgotPassword: \"Forgot Password?\",\n signUp: \"Sign Up\",\n signIn: \"Sign In\",\n resetPassword: \"Reset Password\",\n createAccount: \"Create Account\",\n backToSignIn: \"Back to Sign In\",\n signInWithPhone: \"Sign in with Phone\",\n phoneNumber: \"Phone Number\",\n verificationCode: \"Verification Code\",\n sendCode: \"Send Code\",\n verifyCode: \"Verify Code\",\n signInWithGoogle: \"Sign in with Google\",\n signInWithFacebook: \"Sign in with Facebook\",\n signInWithApple: \"Sign in with Apple\",\n signInWithMicrosoft: \"Sign in with Microsoft\",\n signInWithGitHub: \"Sign in with GitHub\",\n signInWithYahoo: \"Sign in with Yahoo\",\n signInWithTwitter: \"Sign in with X\",\n signInWithEmailLink: \"Sign in with Email Link\",\n signInWithEmail: \"Sign in with Email\",\n sendSignInLink: \"Send Sign-in Link\",\n termsOfService: \"Terms of Service\",\n privacyPolicy: \"Privacy Policy\",\n resendCode: \"Resend Code\",\n sending: \"Sending...\",\n multiFactorEnrollment: \"Multi-factor Enrollment\",\n multiFactorAssertion: \"Multi-factor Authentication\",\n mfaTotpVerification: \"TOTP Verification\",\n mfaSmsVerification: \"SMS Verification\",\n generateQrCode: \"Generate QR Code\",\n },\n prompts: {\n noAccount: \"Don't have an account?\",\n haveAccount: \"Already have an account?\",\n enterEmailToReset: \"Enter your email address to reset your password\",\n signInToAccount: \"Sign in to your account\",\n smsVerificationPrompt: \"Enter the verification code sent to your phone number\",\n enterDetailsToCreate: \"Enter your details to create a new account\",\n enterPhoneNumber: \"Enter your phone number\",\n enterVerificationCode: \"Enter the verification code\",\n enterEmailForLink: \"Enter your email to receive a sign-in link\",\n mfaEnrollmentPrompt: \"Select a new multi-factor enrollment method\",\n mfaAssertionPrompt: \"Please complete the multi-factor authentication process\",\n mfaAssertionFactorPrompt: \"Please choose a multi-factor authentication method\",\n mfaTotpQrCodePrompt: \"Scan this QR code with your authenticator app\",\n mfaTotpEnrollmentVerificationPrompt: \"Add the code generated by your authenticator app\",\n },\n} satisfies Translations;\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { enUS } from \"./locales/en-us\";\nimport { type RegisteredLocale } from \".\";\nimport type { ErrorKey, TranslationCategory, TranslationKey, TranslationSet } from \"./types\";\n\n/** Maps Firebase authentication error codes to translation keys. */\nexport const ERROR_CODE_MAP = {\n \"auth/user-not-found\": \"userNotFound\",\n \"auth/wrong-password\": \"wrongPassword\",\n \"auth/invalid-email\": \"invalidEmail\",\n \"auth/unverified-email\": \"unverifiedEmail\",\n \"auth/user-disabled\": \"userDisabled\",\n \"auth/missing-code\": \"missingVerificationCode\",\n \"auth/invalid-credential\": \"invalidCredential\",\n \"auth/network-request-failed\": \"networkRequestFailed\",\n \"auth/too-many-requests\": \"tooManyRequests\",\n \"auth/email-already-in-use\": \"emailAlreadyInUse\",\n \"auth/weak-password\": \"weakPassword\",\n \"auth/operation-not-allowed\": \"operationNotAllowed\",\n \"auth/invalid-phone-number\": \"invalidPhoneNumber\",\n \"auth/missing-phone-number\": \"missingPhoneNumber\",\n \"auth/quota-exceeded\": \"quotaExceeded\",\n \"auth/code-expired\": \"codeExpired\",\n \"auth/captcha-check-failed\": \"captchaCheckFailed\",\n \"auth/missing-verification-id\": \"missingVerificationId\",\n \"auth/missing-email\": \"missingEmail\",\n \"auth/invalid-action-code\": \"invalidActionCode\",\n \"auth/credential-already-in-use\": \"credentialAlreadyInUse\",\n \"auth/requires-recent-login\": \"requiresRecentLogin\",\n \"auth/provider-already-linked\": \"providerAlreadyLinked\",\n \"auth/invalid-verification-code\": \"invalidVerificationCode\",\n \"auth/account-exists-with-different-credential\": \"accountExistsWithDifferentCredential\",\n \"auth/display-name-required\": \"displayNameRequired\",\n \"auth/second-factor-already-in-use\": \"secondFactorAlreadyInUse\",\n} satisfies Record<string, ErrorKey>;\n\n/** Firebase authentication error code type. */\nexport type ErrorCode = keyof typeof ERROR_CODE_MAP;\n\n/**\n * Retrieves a translation string for a given locale, category, and key.\n *\n * Falls back to the locale's fallback locale or English US if the translation is not found.\n * Supports string replacements using {placeholder} syntax.\n *\n * @param locale - The registered locale to get the translation from.\n * @param category - The translation category (e.g., \"errors\", \"labels\").\n * @param key - The translation key within the category.\n * @param replacements - Optional object with replacement values for placeholders in the translation string.\n * @returns The translated string, or an empty string if not found.\n */\nexport function getTranslation<T extends TranslationCategory>(\n locale: RegisteredLocale,\n category: T,\n key: TranslationKey<T>,\n replacements?: Record<string, string>\n): string {\n const userTranslationSet = locale.translations[category] as TranslationSet<T> | undefined;\n const translatedString = userTranslationSet?.[key];\n\n let str: string | undefined;\n\n if (translatedString) {\n str = translatedString;\n } else if (locale.fallback) {\n const fallbackTranslation = getTranslation(locale.fallback, category, key);\n\n if (fallbackTranslation) {\n str = fallbackTranslation;\n }\n } else {\n const fallbackTranslationSet = enUS[category] as TranslationSet<T>;\n str = fallbackTranslationSet[key];\n }\n\n if (replacements) {\n str = str?.replace(/{(\\w+)}/g, (match, p1) => replacements[p1] || match);\n }\n\n return str || \"\";\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { csCZ } from \"./locales/cs-cz\";\nimport { enUS } from \"./locales/en-us\";\nimport { type Translations } from \"./types\";\n\nexport type * from \"./types\";\nexport * from \"./mapping\";\n\n/** Locale identifier string. Supports BCP 47 format (e.g., \"en-US\") or any string. */\nexport type Locale = \"en-US\" | `${string}-${string}` | string;\n\n/**\n * Registers a locale with its translations and optional fallback locale.\n *\n * @param locale - The locale identifier (e.g., \"en-US\", \"fr-FR\").\n * @param translations - The translation object for this locale.\n * @param fallback - Optional fallback locale to use when a translation is missing.\n * @returns A registered locale object.\n */\nexport function registerLocale(\n locale: Locale,\n translations: Translations,\n fallback?: RegisteredLocale\n): RegisteredLocale {\n return {\n locale,\n translations,\n fallback,\n };\n}\n\n/** Pre-registered English US locale with default translations. */\nexport const enUs = registerLocale(\"en-US\", enUS);\n\n/** Other pre-registerd locales */\nexport const csCz = registerLocale(\"cs-CZ\", csCZ);\n\n/** A registered locale with its translations and optional fallback. */\nexport type RegisteredLocale = {\n /** The locale identifier. */\n locale: Locale;\n /** The translation object for this locale. */\n translations: Translations;\n /** Optional fallback locale to use when a translation is missing. */\n fallback?: RegisteredLocale;\n};\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -151,6 +151,8 @@ type Translations = {
|
|
|
151
151
|
signInWithMicrosoft?: string;
|
|
152
152
|
/** Translation for sign in with GitHub button. */
|
|
153
153
|
signInWithGitHub?: string;
|
|
154
|
+
/** Translation for sign in with Yahoo button. */
|
|
155
|
+
signInWithYahoo?: string;
|
|
154
156
|
/** Translation for sign in with email link button. */
|
|
155
157
|
signInWithEmailLink?: string;
|
|
156
158
|
/** Translation for send sign-in link button. */
|
|
@@ -298,6 +300,8 @@ type Locale = "en-US" | `${string}-${string}` | string;
|
|
|
298
300
|
declare function registerLocale(locale: Locale, translations: Translations, fallback?: RegisteredLocale): RegisteredLocale;
|
|
299
301
|
/** Pre-registered English US locale with default translations. */
|
|
300
302
|
declare const enUs: RegisteredLocale;
|
|
303
|
+
/** Other pre-registerd locales */
|
|
304
|
+
declare const csCz: RegisteredLocale;
|
|
301
305
|
/** A registered locale with its translations and optional fallback. */
|
|
302
306
|
type RegisteredLocale = {
|
|
303
307
|
/** The locale identifier. */
|
|
@@ -308,4 +312,4 @@ type RegisteredLocale = {
|
|
|
308
312
|
fallback?: RegisteredLocale;
|
|
309
313
|
};
|
|
310
314
|
|
|
311
|
-
export { ERROR_CODE_MAP, type ErrorCode, type ErrorKey, type LabelKey, type Locale, type MessageKey, type PromptKey, type RegisteredLocale, type TranslationCategory, type TranslationKey, type TranslationSet, type Translations, type TranslationsConfig, enUs, getTranslation, registerLocale };
|
|
315
|
+
export { ERROR_CODE_MAP, type ErrorCode, type ErrorKey, type LabelKey, type Locale, type MessageKey, type PromptKey, type RegisteredLocale, type TranslationCategory, type TranslationKey, type TranslationSet, type Translations, type TranslationsConfig, csCz, enUs, getTranslation, registerLocale };
|
package/dist/index.d.ts
CHANGED
|
@@ -151,6 +151,8 @@ type Translations = {
|
|
|
151
151
|
signInWithMicrosoft?: string;
|
|
152
152
|
/** Translation for sign in with GitHub button. */
|
|
153
153
|
signInWithGitHub?: string;
|
|
154
|
+
/** Translation for sign in with Yahoo button. */
|
|
155
|
+
signInWithYahoo?: string;
|
|
154
156
|
/** Translation for sign in with email link button. */
|
|
155
157
|
signInWithEmailLink?: string;
|
|
156
158
|
/** Translation for send sign-in link button. */
|
|
@@ -298,6 +300,8 @@ type Locale = "en-US" | `${string}-${string}` | string;
|
|
|
298
300
|
declare function registerLocale(locale: Locale, translations: Translations, fallback?: RegisteredLocale): RegisteredLocale;
|
|
299
301
|
/** Pre-registered English US locale with default translations. */
|
|
300
302
|
declare const enUs: RegisteredLocale;
|
|
303
|
+
/** Other pre-registerd locales */
|
|
304
|
+
declare const csCz: RegisteredLocale;
|
|
301
305
|
/** A registered locale with its translations and optional fallback. */
|
|
302
306
|
type RegisteredLocale = {
|
|
303
307
|
/** The locale identifier. */
|
|
@@ -308,4 +312,4 @@ type RegisteredLocale = {
|
|
|
308
312
|
fallback?: RegisteredLocale;
|
|
309
313
|
};
|
|
310
314
|
|
|
311
|
-
export { ERROR_CODE_MAP, type ErrorCode, type ErrorKey, type LabelKey, type Locale, type MessageKey, type PromptKey, type RegisteredLocale, type TranslationCategory, type TranslationKey, type TranslationSet, type Translations, type TranslationsConfig, enUs, getTranslation, registerLocale };
|
|
315
|
+
export { ERROR_CODE_MAP, type ErrorCode, type ErrorKey, type LabelKey, type Locale, type MessageKey, type PromptKey, type RegisteredLocale, type TranslationCategory, type TranslationKey, type TranslationSet, type Translations, type TranslationsConfig, csCz, enUs, getTranslation, registerLocale };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var o={errors:{userNotFound:"No account found with this email address",wrongPassword:"Incorrect password",invalidEmail:"Please enter a valid email address",userDisabled:"This account has been disabled",networkRequestFailed:"Unable to connect to the server. Please check your internet connection",tooManyRequests:"Too many failed attempts. Please try again later",missingVerificationCode:"Please enter the verification code",emailAlreadyInUse:"An account already exists with this email",invalidCredential:"The provided credentials are invalid.",weakPassword:"Password should be at least 8 characters",unverifiedEmail:"Please verify your email address to continue.",operationNotAllowed:"This operation is not allowed. Please contact support.",invalidPhoneNumber:"The phone number is invalid",missingPhoneNumber:"Please provide a phone number",quotaExceeded:"SMS quota exceeded. Please try again later",codeExpired:"The verification code has expired",captchaCheckFailed:"reCAPTCHA verification failed. Please try again.",missingVerificationId:"Please complete the reCAPTCHA verification first.",missingEmail:"Please provide an email address",invalidActionCode:"The password reset link is invalid or has expired",credentialAlreadyInUse:"An account already exists with this email. Please sign in with that account.",requiresRecentLogin:"This operation requires a recent login. Please sign in again.",providerAlreadyLinked:"This phone number is already linked to another account",invalidVerificationCode:"Invalid verification code. Please try again",unknownError:"An unexpected error occurred",popupClosed:"The sign-in popup was closed. Please try again.",accountExistsWithDifferentCredential:"An account already exists with this email. Please sign in with the original provider.",displayNameRequired:"Please provide a display name",secondFactorAlreadyInUse:"This phone number is already enrolled with this account."},messages:{passwordResetEmailSent:"Password reset email sent successfully",signInLinkSent:"Sign-in link sent successfully",verificationCodeFirst:"Please request a verification code first",checkEmailForReset:"Check your email for password reset instructions",dividerOr:"or",termsAndPrivacy:"By continuing, you agree to our {tos} and {privacy}.",mfaSmsAssertionPrompt:"A verification code will be sent to {phoneNumber} to complete the authentication process."},labels:{emailAddress:"Email Address",password:"Password",displayName:"Display Name",forgotPassword:"Forgot Password?",signUp:"Sign Up",signIn:"Sign In",resetPassword:"Reset Password",createAccount:"Create Account",backToSignIn:"Back to Sign In",signInWithPhone:"Sign in with Phone",phoneNumber:"Phone Number",verificationCode:"Verification Code",sendCode:"Send Code",verifyCode:"Verify Code",signInWithGoogle:"Sign in with Google",signInWithFacebook:"Sign in with Facebook",signInWithApple:"Sign in with Apple",signInWithMicrosoft:"Sign in with Microsoft",signInWithGitHub:"Sign in with GitHub",signInWithTwitter:"Sign in with X",signInWithEmailLink:"Sign in with Email Link",sendSignInLink:"Send Sign-in Link",termsOfService:"Terms of Service",privacyPolicy:"Privacy Policy",resendCode:"Resend Code",sending:"Sending...",multiFactorEnrollment:"Multi-factor Enrollment",multiFactorAssertion:"Multi-factor Authentication",mfaTotpVerification:"TOTP Verification",mfaSmsVerification:"SMS Verification",generateQrCode:"Generate QR Code"},prompts:{noAccount:"Don't have an account?",haveAccount:"Already have an account?",enterEmailToReset:"Enter your email address to reset your password",signInToAccount:"Sign in to your account",smsVerificationPrompt:"Enter the verification code sent to your phone number",enterDetailsToCreate:"Enter your details to create a new account",enterPhoneNumber:"Enter your phone number",enterVerificationCode:"Enter the verification code",enterEmailForLink:"Enter your email to receive a sign-in link",mfaEnrollmentPrompt:"Select a new multi-factor enrollment method",mfaAssertionPrompt:"Please complete the multi-factor authentication process",mfaAssertionFactorPrompt:"Please choose a multi-factor authentication method",mfaTotpQrCodePrompt:"Scan this QR code with your authenticator app",mfaTotpEnrollmentVerificationPrompt:"Add the code generated by your authenticator app"}};var p={"auth/user-not-found":"userNotFound","auth/wrong-password":"wrongPassword","auth/invalid-email":"invalidEmail","auth/unverified-email":"unverifiedEmail","auth/user-disabled":"userDisabled","auth/missing-code":"missingVerificationCode","auth/invalid-credential":"invalidCredential","auth/network-request-failed":"networkRequestFailed","auth/too-many-requests":"tooManyRequests","auth/email-already-in-use":"emailAlreadyInUse","auth/weak-password":"weakPassword","auth/operation-not-allowed":"operationNotAllowed","auth/invalid-phone-number":"invalidPhoneNumber","auth/missing-phone-number":"missingPhoneNumber","auth/quota-exceeded":"quotaExceeded","auth/code-expired":"codeExpired","auth/captcha-check-failed":"captchaCheckFailed","auth/missing-verification-id":"missingVerificationId","auth/missing-email":"missingEmail","auth/invalid-action-code":"invalidActionCode","auth/credential-already-in-use":"credentialAlreadyInUse","auth/requires-recent-login":"requiresRecentLogin","auth/provider-already-linked":"providerAlreadyLinked","auth/invalid-verification-code":"invalidVerificationCode","auth/account-exists-with-different-credential":"accountExistsWithDifferentCredential","auth/display-name-required":"displayNameRequired","auth/second-factor-already-in-use":"secondFactorAlreadyInUse"};function d(i,t,n,r){let s=i.translations[t]?.[n],e;if(s)e=s;else if(i.fallback){let a=d(i.fallback,t,n);a&&(e=a);}else e=o[t][n];return r&&(e=e?.replace(/{(\w+)}/g,(a,l)=>r[l]||a)),e||""}function c(i,t,n){return {locale:i,translations:t,fallback:n}}var y=c("en-US",o);export{p as ERROR_CODE_MAP,y as enUs,d as getTranslation,c as registerLocale};//# sourceMappingURL=index.js.map
|
|
1
|
+
var l={errors:{userNotFound:"Nebyl nalezen \u017E\xE1dn\xFD \xFA\u010Det s touto e-mailovou adresou",wrongPassword:"Nespr\xE1vn\xE9 heslo",invalidEmail:"Zadejte pros\xEDm platnou e-mailovou adresu",userDisabled:"Tento \xFA\u010Det byl deaktivov\xE1n",networkRequestFailed:"Nelze se p\u0159ipojit k serveru. Zkontrolujte pros\xEDm sv\xE9 internetov\xE9 p\u0159ipojen\xED",tooManyRequests:"P\u0159\xEDli\u0161 mnoho ne\xFAsp\u011B\u0161n\xFDch pokus\u016F. Zkuste to pros\xEDm pozd\u011Bji",missingVerificationCode:"Zadejte pros\xEDm ov\u011B\u0159ovac\xED k\xF3d",emailAlreadyInUse:"\xDA\u010Det s touto e-mailovou adresou ji\u017E existuje",invalidCredential:"Zadan\xE9 p\u0159ihla\u0161ovac\xED \xFAdaje nejsou platn\xE9.",weakPassword:"Heslo mus\xED m\xEDt alespo\u0148 8 znak\u016F",unverifiedEmail:"Pro pokra\u010Dov\xE1n\xED pros\xEDm ov\u011B\u0159te svou e-mailovou adresu.",operationNotAllowed:"Tato operace nen\xED povolena. Kontaktujte pros\xEDm podporu.",invalidPhoneNumber:"Telefonn\xED \u010D\xEDslo nen\xED platn\xE9",missingPhoneNumber:"Zadejte pros\xEDm telefonn\xED \u010D\xEDslo",quotaExceeded:"Limit pro odes\xEDl\xE1n\xED SMS byl p\u0159ekro\u010Den. Zkuste to pros\xEDm pozd\u011Bji",codeExpired:"Ov\u011B\u0159ovac\xED k\xF3d vypr\u0161el",captchaCheckFailed:"Ov\u011B\u0159en\xED reCAPTCHA selhalo. Zkuste to pros\xEDm znovu.",missingVerificationId:"Nejprve pros\xEDm dokon\u010Dete ov\u011B\u0159en\xED reCAPTCHA.",missingEmail:"Zadejte pros\xEDm e-mailovou adresu",invalidActionCode:"Odkaz pro obnoven\xED hesla je neplatn\xFD nebo vypr\u0161el",credentialAlreadyInUse:"\xDA\u010Det s touto e-mailovou adresou ji\u017E existuje. P\u0159ihlaste se pros\xEDm k tomuto \xFA\u010Dtu.",requiresRecentLogin:"Tato operace vy\u017Eaduje ned\xE1vn\xE9 p\u0159ihl\xE1\u0161en\xED. P\u0159ihlaste se pros\xEDm znovu.",providerAlreadyLinked:"Toto telefonn\xED \u010D\xEDslo je ji\u017E propojeno s jin\xFDm \xFA\u010Dtem",invalidVerificationCode:"Neplatn\xFD ov\u011B\u0159ovac\xED k\xF3d. Zkuste to pros\xEDm znovu",unknownError:"Do\u0161lo k neo\u010Dek\xE1van\xE9 chyb\u011B",popupClosed:"P\u0159ihla\u0161ovac\xED okno bylo zav\u0159eno. Zkuste to pros\xEDm znovu.",accountExistsWithDifferentCredential:"\xDA\u010Det s touto e-mailovou adresou ji\u017E existuje. P\u0159ihlaste se pros\xEDm pomoc\xED p\u016Fvodn\xEDho poskytovatele.",displayNameRequired:"Zadejte pros\xEDm jm\xE9no",secondFactorAlreadyInUse:"Toto telefonn\xED \u010D\xEDslo je ji\u017E p\u0159id\xE1no k tomuto \xFA\u010Dtu."},messages:{passwordResetEmailSent:"E-mail pro obnoven\xED hesla byl \xFAsp\u011B\u0161n\u011B odesl\xE1n",signInLinkSent:"P\u0159ihla\u0161ovac\xED odkaz byl \xFAsp\u011B\u0161n\u011B odesl\xE1n",verificationCodeFirst:"Nejprve si pros\xEDm vy\u017E\xE1dejte ov\u011B\u0159ovac\xED k\xF3d",checkEmailForReset:"Zkontrolujte e-mail s instrukcemi pro obnoven\xED hesla",dividerOr:"nebo",termsAndPrivacy:"Pokra\u010Dov\xE1n\xEDm souhlas\xEDte s na\u0161imi {tos} a {privacy}.",mfaSmsAssertionPrompt:"Na \u010D\xEDslo {phoneNumber} bude odesl\xE1n ov\u011B\u0159ovac\xED k\xF3d pro dokon\u010Den\xED procesu ov\u011B\u0159en\xED."},labels:{emailAddress:"E-mailov\xE1 adresa",password:"Heslo",displayName:"Jm\xE9no",forgotPassword:"Zapomn\u011Bli jste heslo?",signUp:"Registrovat se",signIn:"P\u0159ihl\xE1sit se",resetPassword:"Obnovit heslo",createAccount:"Vytvo\u0159it \xFA\u010Det",backToSignIn:"Zp\u011Bt na p\u0159ihl\xE1\u0161en\xED",signInWithPhone:"P\u0159ihl\xE1sit se pomoc\xED telefonu",phoneNumber:"Telefonn\xED \u010D\xEDslo",verificationCode:"Ov\u011B\u0159ovac\xED k\xF3d",sendCode:"Odeslat k\xF3d",verifyCode:"Ov\u011B\u0159it k\xF3d",signInWithGoogle:"P\u0159ihl\xE1sit se pomoc\xED Google",signInWithFacebook:"P\u0159ihl\xE1sit se pomoc\xED Facebook",signInWithApple:"P\u0159ihl\xE1sit se pomoc\xED Apple",signInWithMicrosoft:"P\u0159ihl\xE1sit se pomoc\xED Microsoft",signInWithGitHub:"P\u0159ihl\xE1sit se pomoc\xED GitHub",signInWithTwitter:"P\u0159ihl\xE1sit se pomoc\xED X",signInWithEmailLink:"P\u0159ihl\xE1sit se pomoc\xED e-mailov\xE9ho odkazu",sendSignInLink:"Odeslat p\u0159ihla\u0161ovac\xED odkaz",termsOfService:"Podm\xEDnky pou\u017Eit\xED",privacyPolicy:"Z\xE1sady ochrany osobn\xEDch \xFAdaj\u016F",resendCode:"Znovu odeslat k\xF3d",sending:"Odes\xEDl\xE1n\xED...",multiFactorEnrollment:"Registrace v\xEDcefaktorov\xE9ho ov\u011B\u0159en\xED",multiFactorAssertion:"V\xEDcefaktorov\xE9 ov\u011B\u0159en\xED",mfaTotpVerification:"Ov\u011B\u0159en\xED TOTP",mfaSmsVerification:"Ov\u011B\u0159en\xED SMS",generateQrCode:"Vygenerovat QR k\xF3d"},prompts:{noAccount:"Nem\xE1te \xFA\u010Det?",haveAccount:"U\u017E m\xE1te \xFA\u010Det?",enterEmailToReset:"Zadejte svou e-mailovou adresu pro obnoven\xED hesla",signInToAccount:"P\u0159ihlaste se ke sv\xE9mu \xFA\u010Dtu",smsVerificationPrompt:"Zadejte ov\u011B\u0159ovac\xED k\xF3d zaslan\xFD na va\u0161e telefonn\xED \u010D\xEDslo",enterDetailsToCreate:"Zadejte sv\xE9 \xFAdaje pro vytvo\u0159en\xED nov\xE9ho \xFA\u010Dtu",enterPhoneNumber:"Zadejte sv\xE9 telefonn\xED \u010D\xEDslo",enterVerificationCode:"Zadejte ov\u011B\u0159ovac\xED k\xF3d",enterEmailForLink:"Zadejte sv\u016Fj e-mail pro zasl\xE1n\xED p\u0159ihla\u0161ovac\xEDho odkazu",mfaEnrollmentPrompt:"Vyberte nov\xFD zp\u016Fsob v\xEDcefaktorov\xE9ho ov\u011B\u0159en\xED",mfaAssertionPrompt:"Dokon\u010Dete pros\xEDm proces v\xEDcefaktorov\xE9ho ov\u011B\u0159en\xED",mfaAssertionFactorPrompt:"Vyberte pros\xEDm metodu v\xEDcefaktorov\xE9ho ov\u011B\u0159en\xED",mfaTotpQrCodePrompt:"Naskenujte tento QR k\xF3d pomoc\xED sv\xE9 autentiza\u010Dn\xED aplikace",mfaTotpEnrollmentVerificationPrompt:"Zadejte k\xF3d vygenerovan\xFD va\u0161\xED autentiza\u010Dn\xED aplikac\xED"}};var a={errors:{userNotFound:"No account found with this email address",wrongPassword:"Incorrect password",invalidEmail:"Please enter a valid email address",userDisabled:"This account has been disabled",networkRequestFailed:"Unable to connect to the server. Please check your internet connection",tooManyRequests:"Too many failed attempts. Please try again later",missingVerificationCode:"Please enter the verification code",emailAlreadyInUse:"An account already exists with this email",invalidCredential:"The provided credentials are invalid.",weakPassword:"Password should be at least 8 characters",unverifiedEmail:"Please verify your email address to continue.",operationNotAllowed:"This operation is not allowed. Please contact support.",invalidPhoneNumber:"The phone number is invalid",missingPhoneNumber:"Please provide a phone number",quotaExceeded:"SMS quota exceeded. Please try again later",codeExpired:"The verification code has expired",captchaCheckFailed:"reCAPTCHA verification failed. Please try again.",missingVerificationId:"Please complete the reCAPTCHA verification first.",missingEmail:"Please provide an email address",invalidActionCode:"The password reset link is invalid or has expired",credentialAlreadyInUse:"An account already exists with this email. Please sign in with that account.",requiresRecentLogin:"This operation requires a recent login. Please sign in again.",providerAlreadyLinked:"This phone number is already linked to another account",invalidVerificationCode:"Invalid verification code. Please try again",unknownError:"An unexpected error occurred",popupClosed:"The sign-in popup was closed. Please try again.",accountExistsWithDifferentCredential:"An account already exists with this email. Please sign in with the original provider.",displayNameRequired:"Please provide a display name",secondFactorAlreadyInUse:"This phone number is already enrolled with this account."},messages:{passwordResetEmailSent:"Password reset email sent successfully",signInLinkSent:"Sign-in link sent successfully",verificationCodeFirst:"Please request a verification code first",checkEmailForReset:"Check your email for password reset instructions",dividerOr:"or",termsAndPrivacy:"By continuing, you agree to our {tos} and {privacy}.",mfaSmsAssertionPrompt:"A verification code will be sent to {phoneNumber} to complete the authentication process."},labels:{emailAddress:"Email Address",password:"Password",displayName:"Display Name",forgotPassword:"Forgot Password?",signUp:"Sign Up",signIn:"Sign In",resetPassword:"Reset Password",createAccount:"Create Account",backToSignIn:"Back to Sign In",signInWithPhone:"Sign in with Phone",phoneNumber:"Phone Number",verificationCode:"Verification Code",sendCode:"Send Code",verifyCode:"Verify Code",signInWithGoogle:"Sign in with Google",signInWithFacebook:"Sign in with Facebook",signInWithApple:"Sign in with Apple",signInWithMicrosoft:"Sign in with Microsoft",signInWithGitHub:"Sign in with GitHub",signInWithYahoo:"Sign in with Yahoo",signInWithTwitter:"Sign in with X",signInWithEmailLink:"Sign in with Email Link",signInWithEmail:"Sign in with Email",sendSignInLink:"Send Sign-in Link",termsOfService:"Terms of Service",privacyPolicy:"Privacy Policy",resendCode:"Resend Code",sending:"Sending...",multiFactorEnrollment:"Multi-factor Enrollment",multiFactorAssertion:"Multi-factor Authentication",mfaTotpVerification:"TOTP Verification",mfaSmsVerification:"SMS Verification",generateQrCode:"Generate QR Code"},prompts:{noAccount:"Don't have an account?",haveAccount:"Already have an account?",enterEmailToReset:"Enter your email address to reset your password",signInToAccount:"Sign in to your account",smsVerificationPrompt:"Enter the verification code sent to your phone number",enterDetailsToCreate:"Enter your details to create a new account",enterPhoneNumber:"Enter your phone number",enterVerificationCode:"Enter the verification code",enterEmailForLink:"Enter your email to receive a sign-in link",mfaEnrollmentPrompt:"Select a new multi-factor enrollment method",mfaAssertionPrompt:"Please complete the multi-factor authentication process",mfaAssertionFactorPrompt:"Please choose a multi-factor authentication method",mfaTotpQrCodePrompt:"Scan this QR code with your authenticator app",mfaTotpEnrollmentVerificationPrompt:"Add the code generated by your authenticator app"}};var f={"auth/user-not-found":"userNotFound","auth/wrong-password":"wrongPassword","auth/invalid-email":"invalidEmail","auth/unverified-email":"unverifiedEmail","auth/user-disabled":"userDisabled","auth/missing-code":"missingVerificationCode","auth/invalid-credential":"invalidCredential","auth/network-request-failed":"networkRequestFailed","auth/too-many-requests":"tooManyRequests","auth/email-already-in-use":"emailAlreadyInUse","auth/weak-password":"weakPassword","auth/operation-not-allowed":"operationNotAllowed","auth/invalid-phone-number":"invalidPhoneNumber","auth/missing-phone-number":"missingPhoneNumber","auth/quota-exceeded":"quotaExceeded","auth/code-expired":"codeExpired","auth/captcha-check-failed":"captchaCheckFailed","auth/missing-verification-id":"missingVerificationId","auth/missing-email":"missingEmail","auth/invalid-action-code":"invalidActionCode","auth/credential-already-in-use":"credentialAlreadyInUse","auth/requires-recent-login":"requiresRecentLogin","auth/provider-already-linked":"providerAlreadyLinked","auth/invalid-verification-code":"invalidVerificationCode","auth/account-exists-with-different-credential":"accountExistsWithDifferentCredential","auth/display-name-required":"displayNameRequired","auth/second-factor-already-in-use":"secondFactorAlreadyInUse"};function u(o,i,n,s){let r=o.translations[i]?.[n],e;if(r)e=r;else if(o.fallback){let t=u(o.fallback,i,n);t&&(e=t);}else e=a[i][n];return s&&(e=e?.replace(/{(\w+)}/g,(t,c)=>s[c]||t)),e||""}function d(o,i,n){return {locale:o,translations:i,fallback:n}}var P=d("en-US",a),w=d("cs-CZ",l);export{f as ERROR_CODE_MAP,w as csCz,P as enUs,u as getTranslation,d as registerLocale};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/locales/en-us.ts","../src/mapping.ts","../src/index.ts"],"names":["enUS","ERROR_CODE_MAP","getTranslation","locale","category","key","replacements","translatedString","str","fallbackTranslation","match","p1","registerLocale","translations","fallback","enUs"],"mappings":"AAmBO,IAAMA,CAAAA,CAAO,CAClB,MAAA,CAAQ,CACN,aAAc,0CAAA,CACd,aAAA,CAAe,oBAAA,CACf,YAAA,CAAc,qCACd,YAAA,CAAc,gCAAA,CACd,oBAAA,CAAsB,wEAAA,CACtB,gBAAiB,kDAAA,CACjB,uBAAA,CAAyB,oCAAA,CACzB,iBAAA,CAAmB,4CACnB,iBAAA,CAAmB,uCAAA,CACnB,YAAA,CAAc,0CAAA,CACd,gBAAiB,+CAAA,CACjB,mBAAA,CAAqB,wD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A,CACdC,EACAC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACQ,CAER,IAAMC,CAAAA,CADqBJ,CAAAA,CAAO,YAAA,CAAaC,CAAQ,IACTC,CAAG,CAAA,CAE7CG,CAAAA,CAEJ,GAAID,EACFC,CAAAA,CAAMD,CAAAA,CAAAA,KAAAA,GACGJ,CAAAA,CAAO,QAAA,CAAU,CAC1B,IAAMM,CAAAA,CAAsBP,CAAAA,CAAeC,CAAAA,CAAO,SAAUC,CAAAA,CAAUC,CAAG,CAAA,CAErEI,CAAAA,GACFD,EAAMC,CAAAA,EAEV,CAAA,KAEED,CAAAA,CAD+BR,CAAAA,CAAKI,CAAQ,CAAA,CACfC,CAAG,CAAA,CAGlC,OAAIC,IACFE,CAAAA,CAAMA,CAAAA,EAAK,OAAA,CAAQ,UAAA,CAAY,CAACE,CAAAA,CAAOC,CAAAA,GAAOL,CAAAA,CAAaK,CAAE,GAAKD,CAAK,CAAA,CAAA,CAGlEF,CAAAA,EAAO,EAChB,CC9DO,SAASI,CAAAA,CACdT,CAAAA,CACAU,CAAAA,CACAC,EACkB,CAClB,OAAO,CACL,MAAA,CAAAX,EACA,YAAA,CAAAU,CAAAA,CACA,QAAA,CAAAC,CACF,CACF,CAGO,IAAMC,CAAAA,CAAOH,CAAAA,CAAe,QAASZ,CAAI","file":"index.js","sourcesContent":["/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { type Translations } from \"../types\";\n\n/** English US (en-US) translation set with all default translations. */\nexport const enUS = {\n errors: {\n userNotFound: \"No account found with this email address\",\n wrongPassword: \"Incorrect password\",\n invalidEmail: \"Please enter a valid email address\",\n userDisabled: \"This account has been disabled\",\n networkRequestFailed: \"Unable to connect to the server. Please check your internet connection\",\n tooManyRequests: \"Too many failed attempts. Please try again later\",\n missingVerificationCode: \"Please enter the verification code\",\n emailAlreadyInUse: \"An account already exists with this email\",\n invalidCredential: \"The provided credentials are invalid.\",\n weakPassword: \"Password should be at least 8 characters\",\n unverifiedEmail: \"Please verify your email address to continue.\",\n operationNotAllowed: \"This operation is not allowed. Please contact support.\",\n invalidPhoneNumber: \"The phone number is invalid\",\n missingPhoneNumber: \"Please provide a phone number\",\n quotaExceeded: \"SMS quota exceeded. Please try again later\",\n codeExpired: \"The verification code has expired\",\n captchaCheckFailed: \"reCAPTCHA verification failed. Please try again.\",\n missingVerificationId: \"Please complete the reCAPTCHA verification first.\",\n missingEmail: \"Please provide an email address\",\n invalidActionCode: \"The password reset link is invalid or has expired\",\n credentialAlreadyInUse: \"An account already exists with this email. Please sign in with that account.\",\n requiresRecentLogin: \"This operation requires a recent login. Please sign in again.\",\n providerAlreadyLinked: \"This phone number is already linked to another account\",\n invalidVerificationCode: \"Invalid verification code. Please try again\",\n unknownError: \"An unexpected error occurred\",\n popupClosed: \"The sign-in popup was closed. Please try again.\",\n accountExistsWithDifferentCredential:\n \"An account already exists with this email. Please sign in with the original provider.\",\n displayNameRequired: \"Please provide a display name\",\n secondFactorAlreadyInUse: \"This phone number is already enrolled with this account.\",\n },\n messages: {\n passwordResetEmailSent: \"Password reset email sent successfully\",\n signInLinkSent: \"Sign-in link sent successfully\",\n verificationCodeFirst: \"Please request a verification code first\",\n checkEmailForReset: \"Check your email for password reset instructions\",\n dividerOr: \"or\",\n termsAndPrivacy: \"By continuing, you agree to our {tos} and {privacy}.\",\n mfaSmsAssertionPrompt: \"A verification code will be sent to {phoneNumber} to complete the authentication process.\",\n },\n labels: {\n emailAddress: \"Email Address\",\n password: \"Password\",\n displayName: \"Display Name\",\n forgotPassword: \"Forgot Password?\",\n signUp: \"Sign Up\",\n signIn: \"Sign In\",\n resetPassword: \"Reset Password\",\n createAccount: \"Create Account\",\n backToSignIn: \"Back to Sign In\",\n signInWithPhone: \"Sign in with Phone\",\n phoneNumber: \"Phone Number\",\n verificationCode: \"Verification Code\",\n sendCode: \"Send Code\",\n verifyCode: \"Verify Code\",\n signInWithGoogle: \"Sign in with Google\",\n signInWithFacebook: \"Sign in with Facebook\",\n signInWithApple: \"Sign in with Apple\",\n signInWithMicrosoft: \"Sign in with Microsoft\",\n signInWithGitHub: \"Sign in with GitHub\",\n signInWithTwitter: \"Sign in with X\",\n signInWithEmailLink: \"Sign in with Email Link\",\n sendSignInLink: \"Send Sign-in Link\",\n termsOfService: \"Terms of Service\",\n privacyPolicy: \"Privacy Policy\",\n resendCode: \"Resend Code\",\n sending: \"Sending...\",\n multiFactorEnrollment: \"Multi-factor Enrollment\",\n multiFactorAssertion: \"Multi-factor Authentication\",\n mfaTotpVerification: \"TOTP Verification\",\n mfaSmsVerification: \"SMS Verification\",\n generateQrCode: \"Generate QR Code\",\n },\n prompts: {\n noAccount: \"Don't have an account?\",\n haveAccount: \"Already have an account?\",\n enterEmailToReset: \"Enter your email address to reset your password\",\n signInToAccount: \"Sign in to your account\",\n smsVerificationPrompt: \"Enter the verification code sent to your phone number\",\n enterDetailsToCreate: \"Enter your details to create a new account\",\n enterPhoneNumber: \"Enter your phone number\",\n enterVerificationCode: \"Enter the verification code\",\n enterEmailForLink: \"Enter your email to receive a sign-in link\",\n mfaEnrollmentPrompt: \"Select a new multi-factor enrollment method\",\n mfaAssertionPrompt: \"Please complete the multi-factor authentication process\",\n mfaAssertionFactorPrompt: \"Please choose a multi-factor authentication method\",\n mfaTotpQrCodePrompt: \"Scan this QR code with your authenticator app\",\n mfaTotpEnrollmentVerificationPrompt: \"Add the code generated by your authenticator app\",\n },\n} satisfies Translations;\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { enUS } from \"./locales/en-us\";\nimport { type RegisteredLocale } from \".\";\nimport type { ErrorKey, TranslationCategory, TranslationKey, TranslationSet } from \"./types\";\n\n/** Maps Firebase authentication error codes to translation keys. */\nexport const ERROR_CODE_MAP = {\n \"auth/user-not-found\": \"userNotFound\",\n \"auth/wrong-password\": \"wrongPassword\",\n \"auth/invalid-email\": \"invalidEmail\",\n \"auth/unverified-email\": \"unverifiedEmail\",\n \"auth/user-disabled\": \"userDisabled\",\n \"auth/missing-code\": \"missingVerificationCode\",\n \"auth/invalid-credential\": \"invalidCredential\",\n \"auth/network-request-failed\": \"networkRequestFailed\",\n \"auth/too-many-requests\": \"tooManyRequests\",\n \"auth/email-already-in-use\": \"emailAlreadyInUse\",\n \"auth/weak-password\": \"weakPassword\",\n \"auth/operation-not-allowed\": \"operationNotAllowed\",\n \"auth/invalid-phone-number\": \"invalidPhoneNumber\",\n \"auth/missing-phone-number\": \"missingPhoneNumber\",\n \"auth/quota-exceeded\": \"quotaExceeded\",\n \"auth/code-expired\": \"codeExpired\",\n \"auth/captcha-check-failed\": \"captchaCheckFailed\",\n \"auth/missing-verification-id\": \"missingVerificationId\",\n \"auth/missing-email\": \"missingEmail\",\n \"auth/invalid-action-code\": \"invalidActionCode\",\n \"auth/credential-already-in-use\": \"credentialAlreadyInUse\",\n \"auth/requires-recent-login\": \"requiresRecentLogin\",\n \"auth/provider-already-linked\": \"providerAlreadyLinked\",\n \"auth/invalid-verification-code\": \"invalidVerificationCode\",\n \"auth/account-exists-with-different-credential\": \"accountExistsWithDifferentCredential\",\n \"auth/display-name-required\": \"displayNameRequired\",\n \"auth/second-factor-already-in-use\": \"secondFactorAlreadyInUse\",\n} satisfies Record<string, ErrorKey>;\n\n/** Firebase authentication error code type. */\nexport type ErrorCode = keyof typeof ERROR_CODE_MAP;\n\n/**\n * Retrieves a translation string for a given locale, category, and key.\n *\n * Falls back to the locale's fallback locale or English US if the translation is not found.\n * Supports string replacements using {placeholder} syntax.\n *\n * @param locale - The registered locale to get the translation from.\n * @param category - The translation category (e.g., \"errors\", \"labels\").\n * @param key - The translation key within the category.\n * @param replacements - Optional object with replacement values for placeholders in the translation string.\n * @returns The translated string, or an empty string if not found.\n */\nexport function getTranslation<T extends TranslationCategory>(\n locale: RegisteredLocale,\n category: T,\n key: TranslationKey<T>,\n replacements?: Record<string, string>\n): string {\n const userTranslationSet = locale.translations[category] as TranslationSet<T> | undefined;\n const translatedString = userTranslationSet?.[key];\n\n let str: string | undefined;\n\n if (translatedString) {\n str = translatedString;\n } else if (locale.fallback) {\n const fallbackTranslation = getTranslation(locale.fallback, category, key);\n\n if (fallbackTranslation) {\n str = fallbackTranslation;\n }\n } else {\n const fallbackTranslationSet = enUS[category] as TranslationSet<T>;\n str = fallbackTranslationSet[key];\n }\n\n if (replacements) {\n str = str?.replace(/{(\\w+)}/g, (match, p1) => replacements[p1] || match);\n }\n\n return str || \"\";\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { enUS } from \"./locales/en-us\";\nimport { type Translations } from \"./types\";\n\nexport type * from \"./types\";\nexport * from \"./mapping\";\n\n/** Locale identifier string. Supports BCP 47 format (e.g., \"en-US\") or any string. */\nexport type Locale = \"en-US\" | `${string}-${string}` | string;\n\n/**\n * Registers a locale with its translations and optional fallback locale.\n *\n * @param locale - The locale identifier (e.g., \"en-US\", \"fr-FR\").\n * @param translations - The translation object for this locale.\n * @param fallback - Optional fallback locale to use when a translation is missing.\n * @returns A registered locale object.\n */\nexport function registerLocale(\n locale: Locale,\n translations: Translations,\n fallback?: RegisteredLocale\n): RegisteredLocale {\n return {\n locale,\n translations,\n fallback,\n };\n}\n\n/** Pre-registered English US locale with default translations. */\nexport const enUs = registerLocale(\"en-US\", enUS);\n\n/** A registered locale with its translations and optional fallback. */\nexport type RegisteredLocale = {\n /** The locale identifier. */\n locale: Locale;\n /** The translation object for this locale. */\n translations: Translations;\n /** Optional fallback locale to use when a translation is missing. */\n fallback?: RegisteredLocale;\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/locales/cs-cz.ts","../src/locales/en-us.ts","../src/mapping.ts","../src/index.ts"],"names":["csCZ","enUS","ERROR_CODE_MAP","getTranslation","locale","category","key","replacements","translatedString","str","fallbackTranslation","match","p1","registerLocale","translations","fallback","enUs","csCz"],"mappings":"AAGO,IAAMA,CAAAA,CAAO,CAClB,MAAA,CAAQ,CACN,YAAA,CAAc,wEAAA,CACd,aAAA,CAAe,uBAAA,CACf,YAAA,CAAc,6CAAA,CACd,YAAA,CAAc,uCAAA,CACd,oBAAA,CAAsB,kGAAA,CACtB,eAAA,CAAiB,qGAAA,CACjB,uBAAA,CAAyB,iDAAA,CACzB,iBAAA,CAAmB,2DAAA,CACnB,iBAAA,CAAmB,gEAAA,CACnB,YAAA,CAAc,gDAAA,CACd,eAAA,CAAiB,+EAAA,CACjB,mBAAA,CAAqB,+DAAA,CACrB,kBAAA,CAAoB,8CAAA,CACpB,kBAAA,CAAoB,8CAAA,CACpB,aAAA,CAAe,4FAAA,CACf,WAAA,CAAa,4CAAA,CACb,kBAAA,CAAoB,oEAAA,CACpB,qBAAA,CAAuB,kEAAA,CACvB,YAAA,CAAc,qCAAA,CACd,iBAAA,CAAmB,8DAAA,CACnB,sBAAA,CAAwB,+GAAA,C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AA,CAAAA,KAAAA,GACGJ,CAAAA,CAAO,QAAA,CAAU,CAC1B,IAAMM,CAAAA,CAAsBP,CAAAA,CAAeC,CAAAA,CAAO,QAAA,CAAUC,CAAAA,CAAUC,CAAG,CAAA,CAErEI,CAAAA,GACFD,CAAAA,CAAMC,CAAAA,EAEV,CAAA,KAEED,CAAAA,CAD+BR,CAAAA,CAAKI,CAAQ,CAAA,CACfC,CAAG,CAAA,CAGlC,OAAIC,CAAAA,GACFE,CAAAA,CAAMA,CAAAA,EAAK,OAAA,CAAQ,UAAA,CAAY,CAACE,CAAAA,CAAOC,CAAAA,GAAOL,CAAAA,CAAaK,CAAE,CAAA,EAAKD,CAAK,CAAA,CAAA,CAGlEF,CAAAA,EAAO,EAChB,CC7DO,SAASI,CAAAA,CACdT,CAAAA,CACAU,CAAAA,CACAC,CAAAA,CACkB,CAClB,OAAO,CACL,MAAA,CAAAX,CAAAA,CACA,YAAA,CAAAU,CAAAA,CACA,QAAA,CAAAC,CACF,CACF,CAGO,IAAMC,CAAAA,CAAOH,CAAAA,CAAe,OAAA,CAASZ,CAAI,CAAA,CAGnCgB,CAAAA,CAAOJ,CAAAA,CAAe,OAAA,CAASb,CAAI","file":"index.js","sourcesContent":["import { type Translations } from \"../types\";\n\n/** Czech CZ (cs-CZ) translation set. */\nexport const csCZ = {\n errors: {\n userNotFound: \"Nebyl nalezen žádný účet s touto e-mailovou adresou\",\n wrongPassword: \"Nesprávné heslo\",\n invalidEmail: \"Zadejte prosím platnou e-mailovou adresu\",\n userDisabled: \"Tento účet byl deaktivován\",\n networkRequestFailed: \"Nelze se připojit k serveru. Zkontrolujte prosím své internetové připojení\",\n tooManyRequests: \"Příliš mnoho neúspěšných pokusů. Zkuste to prosím později\",\n missingVerificationCode: \"Zadejte prosím ověřovací kód\",\n emailAlreadyInUse: \"Účet s touto e-mailovou adresou již existuje\",\n invalidCredential: \"Zadané přihlašovací údaje nejsou platné.\",\n weakPassword: \"Heslo musí mít alespoň 8 znaků\",\n unverifiedEmail: \"Pro pokračování prosím ověřte svou e-mailovou adresu.\",\n operationNotAllowed: \"Tato operace není povolena. Kontaktujte prosím podporu.\",\n invalidPhoneNumber: \"Telefonní číslo není platné\",\n missingPhoneNumber: \"Zadejte prosím telefonní číslo\",\n quotaExceeded: \"Limit pro odesílání SMS byl překročen. Zkuste to prosím později\",\n codeExpired: \"Ověřovací kód vypršel\",\n captchaCheckFailed: \"Ověření reCAPTCHA selhalo. Zkuste to prosím znovu.\",\n missingVerificationId: \"Nejprve prosím dokončete ověření reCAPTCHA.\",\n missingEmail: \"Zadejte prosím e-mailovou adresu\",\n invalidActionCode: \"Odkaz pro obnovení hesla je neplatný nebo vypršel\",\n credentialAlreadyInUse: \"Účet s touto e-mailovou adresou již existuje. Přihlaste se prosím k tomuto účtu.\",\n requiresRecentLogin: \"Tato operace vyžaduje nedávné přihlášení. Přihlaste se prosím znovu.\",\n providerAlreadyLinked: \"Toto telefonní číslo je již propojeno s jiným účtem\",\n invalidVerificationCode: \"Neplatný ověřovací kód. Zkuste to prosím znovu\",\n unknownError: \"Došlo k neočekávané chybě\",\n popupClosed: \"Přihlašovací okno bylo zavřeno. Zkuste to prosím znovu.\",\n accountExistsWithDifferentCredential:\n \"Účet s touto e-mailovou adresou již existuje. Přihlaste se prosím pomocí původního poskytovatele.\",\n displayNameRequired: \"Zadejte prosím jméno\",\n secondFactorAlreadyInUse: \"Toto telefonní číslo je již přidáno k tomuto účtu.\",\n },\n messages: {\n passwordResetEmailSent: \"E-mail pro obnovení hesla byl úspěšně odeslán\",\n signInLinkSent: \"Přihlašovací odkaz byl úspěšně odeslán\",\n verificationCodeFirst: \"Nejprve si prosím vyžádejte ověřovací kód\",\n checkEmailForReset: \"Zkontrolujte e-mail s instrukcemi pro obnovení hesla\",\n dividerOr: \"nebo\",\n termsAndPrivacy: \"Pokračováním souhlasíte s našimi {tos} a {privacy}.\",\n mfaSmsAssertionPrompt: \"Na číslo {phoneNumber} bude odeslán ověřovací kód pro dokončení procesu ověření.\",\n },\n labels: {\n emailAddress: \"E-mailová adresa\",\n password: \"Heslo\",\n displayName: \"Jméno\",\n forgotPassword: \"Zapomněli jste heslo?\",\n signUp: \"Registrovat se\",\n signIn: \"Přihlásit se\",\n resetPassword: \"Obnovit heslo\",\n createAccount: \"Vytvořit účet\",\n backToSignIn: \"Zpět na přihlášení\",\n signInWithPhone: \"Přihlásit se pomocí telefonu\",\n phoneNumber: \"Telefonní číslo\",\n verificationCode: \"Ověřovací kód\",\n sendCode: \"Odeslat kód\",\n verifyCode: \"Ověřit kód\",\n signInWithGoogle: \"Přihlásit se pomocí Google\",\n signInWithFacebook: \"Přihlásit se pomocí Facebook\",\n signInWithApple: \"Přihlásit se pomocí Apple\",\n signInWithMicrosoft: \"Přihlásit se pomocí Microsoft\",\n signInWithGitHub: \"Přihlásit se pomocí GitHub\",\n signInWithTwitter: \"Přihlásit se pomocí X\",\n signInWithEmailLink: \"Přihlásit se pomocí e-mailového odkazu\",\n sendSignInLink: \"Odeslat přihlašovací odkaz\",\n termsOfService: \"Podmínky použití\",\n privacyPolicy: \"Zásady ochrany osobních údajů\",\n resendCode: \"Znovu odeslat kód\",\n sending: \"Odesílání...\",\n multiFactorEnrollment: \"Registrace vícefaktorového ověření\",\n multiFactorAssertion: \"Vícefaktorové ověření\",\n mfaTotpVerification: \"Ověření TOTP\",\n mfaSmsVerification: \"Ověření SMS\",\n generateQrCode: \"Vygenerovat QR kód\",\n },\n prompts: {\n noAccount: \"Nemáte účet?\",\n haveAccount: \"Už máte účet?\",\n enterEmailToReset: \"Zadejte svou e-mailovou adresu pro obnovení hesla\",\n signInToAccount: \"Přihlaste se ke svému účtu\",\n smsVerificationPrompt: \"Zadejte ověřovací kód zaslaný na vaše telefonní číslo\",\n enterDetailsToCreate: \"Zadejte své údaje pro vytvoření nového účtu\",\n enterPhoneNumber: \"Zadejte své telefonní číslo\",\n enterVerificationCode: \"Zadejte ověřovací kód\",\n enterEmailForLink: \"Zadejte svůj e-mail pro zaslání přihlašovacího odkazu\",\n mfaEnrollmentPrompt: \"Vyberte nový způsob vícefaktorového ověření\",\n mfaAssertionPrompt: \"Dokončete prosím proces vícefaktorového ověření\",\n mfaAssertionFactorPrompt: \"Vyberte prosím metodu vícefaktorového ověření\",\n mfaTotpQrCodePrompt: \"Naskenujte tento QR kód pomocí své autentizační aplikace\",\n mfaTotpEnrollmentVerificationPrompt: \"Zadejte kód vygenerovaný vaší autentizační aplikací\",\n },\n} satisfies Translations;\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { type Translations } from \"../types\";\n\n/** English US (en-US) translation set with all default translations. */\nexport const enUS = {\n errors: {\n userNotFound: \"No account found with this email address\",\n wrongPassword: \"Incorrect password\",\n invalidEmail: \"Please enter a valid email address\",\n userDisabled: \"This account has been disabled\",\n networkRequestFailed: \"Unable to connect to the server. Please check your internet connection\",\n tooManyRequests: \"Too many failed attempts. Please try again later\",\n missingVerificationCode: \"Please enter the verification code\",\n emailAlreadyInUse: \"An account already exists with this email\",\n invalidCredential: \"The provided credentials are invalid.\",\n weakPassword: \"Password should be at least 8 characters\",\n unverifiedEmail: \"Please verify your email address to continue.\",\n operationNotAllowed: \"This operation is not allowed. Please contact support.\",\n invalidPhoneNumber: \"The phone number is invalid\",\n missingPhoneNumber: \"Please provide a phone number\",\n quotaExceeded: \"SMS quota exceeded. Please try again later\",\n codeExpired: \"The verification code has expired\",\n captchaCheckFailed: \"reCAPTCHA verification failed. Please try again.\",\n missingVerificationId: \"Please complete the reCAPTCHA verification first.\",\n missingEmail: \"Please provide an email address\",\n invalidActionCode: \"The password reset link is invalid or has expired\",\n credentialAlreadyInUse: \"An account already exists with this email. Please sign in with that account.\",\n requiresRecentLogin: \"This operation requires a recent login. Please sign in again.\",\n providerAlreadyLinked: \"This phone number is already linked to another account\",\n invalidVerificationCode: \"Invalid verification code. Please try again\",\n unknownError: \"An unexpected error occurred\",\n popupClosed: \"The sign-in popup was closed. Please try again.\",\n accountExistsWithDifferentCredential:\n \"An account already exists with this email. Please sign in with the original provider.\",\n displayNameRequired: \"Please provide a display name\",\n secondFactorAlreadyInUse: \"This phone number is already enrolled with this account.\",\n },\n messages: {\n passwordResetEmailSent: \"Password reset email sent successfully\",\n signInLinkSent: \"Sign-in link sent successfully\",\n verificationCodeFirst: \"Please request a verification code first\",\n checkEmailForReset: \"Check your email for password reset instructions\",\n dividerOr: \"or\",\n termsAndPrivacy: \"By continuing, you agree to our {tos} and {privacy}.\",\n mfaSmsAssertionPrompt: \"A verification code will be sent to {phoneNumber} to complete the authentication process.\",\n },\n labels: {\n emailAddress: \"Email Address\",\n password: \"Password\",\n displayName: \"Display Name\",\n forgotPassword: \"Forgot Password?\",\n signUp: \"Sign Up\",\n signIn: \"Sign In\",\n resetPassword: \"Reset Password\",\n createAccount: \"Create Account\",\n backToSignIn: \"Back to Sign In\",\n signInWithPhone: \"Sign in with Phone\",\n phoneNumber: \"Phone Number\",\n verificationCode: \"Verification Code\",\n sendCode: \"Send Code\",\n verifyCode: \"Verify Code\",\n signInWithGoogle: \"Sign in with Google\",\n signInWithFacebook: \"Sign in with Facebook\",\n signInWithApple: \"Sign in with Apple\",\n signInWithMicrosoft: \"Sign in with Microsoft\",\n signInWithGitHub: \"Sign in with GitHub\",\n signInWithYahoo: \"Sign in with Yahoo\",\n signInWithTwitter: \"Sign in with X\",\n signInWithEmailLink: \"Sign in with Email Link\",\n signInWithEmail: \"Sign in with Email\",\n sendSignInLink: \"Send Sign-in Link\",\n termsOfService: \"Terms of Service\",\n privacyPolicy: \"Privacy Policy\",\n resendCode: \"Resend Code\",\n sending: \"Sending...\",\n multiFactorEnrollment: \"Multi-factor Enrollment\",\n multiFactorAssertion: \"Multi-factor Authentication\",\n mfaTotpVerification: \"TOTP Verification\",\n mfaSmsVerification: \"SMS Verification\",\n generateQrCode: \"Generate QR Code\",\n },\n prompts: {\n noAccount: \"Don't have an account?\",\n haveAccount: \"Already have an account?\",\n enterEmailToReset: \"Enter your email address to reset your password\",\n signInToAccount: \"Sign in to your account\",\n smsVerificationPrompt: \"Enter the verification code sent to your phone number\",\n enterDetailsToCreate: \"Enter your details to create a new account\",\n enterPhoneNumber: \"Enter your phone number\",\n enterVerificationCode: \"Enter the verification code\",\n enterEmailForLink: \"Enter your email to receive a sign-in link\",\n mfaEnrollmentPrompt: \"Select a new multi-factor enrollment method\",\n mfaAssertionPrompt: \"Please complete the multi-factor authentication process\",\n mfaAssertionFactorPrompt: \"Please choose a multi-factor authentication method\",\n mfaTotpQrCodePrompt: \"Scan this QR code with your authenticator app\",\n mfaTotpEnrollmentVerificationPrompt: \"Add the code generated by your authenticator app\",\n },\n} satisfies Translations;\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { enUS } from \"./locales/en-us\";\nimport { type RegisteredLocale } from \".\";\nimport type { ErrorKey, TranslationCategory, TranslationKey, TranslationSet } from \"./types\";\n\n/** Maps Firebase authentication error codes to translation keys. */\nexport const ERROR_CODE_MAP = {\n \"auth/user-not-found\": \"userNotFound\",\n \"auth/wrong-password\": \"wrongPassword\",\n \"auth/invalid-email\": \"invalidEmail\",\n \"auth/unverified-email\": \"unverifiedEmail\",\n \"auth/user-disabled\": \"userDisabled\",\n \"auth/missing-code\": \"missingVerificationCode\",\n \"auth/invalid-credential\": \"invalidCredential\",\n \"auth/network-request-failed\": \"networkRequestFailed\",\n \"auth/too-many-requests\": \"tooManyRequests\",\n \"auth/email-already-in-use\": \"emailAlreadyInUse\",\n \"auth/weak-password\": \"weakPassword\",\n \"auth/operation-not-allowed\": \"operationNotAllowed\",\n \"auth/invalid-phone-number\": \"invalidPhoneNumber\",\n \"auth/missing-phone-number\": \"missingPhoneNumber\",\n \"auth/quota-exceeded\": \"quotaExceeded\",\n \"auth/code-expired\": \"codeExpired\",\n \"auth/captcha-check-failed\": \"captchaCheckFailed\",\n \"auth/missing-verification-id\": \"missingVerificationId\",\n \"auth/missing-email\": \"missingEmail\",\n \"auth/invalid-action-code\": \"invalidActionCode\",\n \"auth/credential-already-in-use\": \"credentialAlreadyInUse\",\n \"auth/requires-recent-login\": \"requiresRecentLogin\",\n \"auth/provider-already-linked\": \"providerAlreadyLinked\",\n \"auth/invalid-verification-code\": \"invalidVerificationCode\",\n \"auth/account-exists-with-different-credential\": \"accountExistsWithDifferentCredential\",\n \"auth/display-name-required\": \"displayNameRequired\",\n \"auth/second-factor-already-in-use\": \"secondFactorAlreadyInUse\",\n} satisfies Record<string, ErrorKey>;\n\n/** Firebase authentication error code type. */\nexport type ErrorCode = keyof typeof ERROR_CODE_MAP;\n\n/**\n * Retrieves a translation string for a given locale, category, and key.\n *\n * Falls back to the locale's fallback locale or English US if the translation is not found.\n * Supports string replacements using {placeholder} syntax.\n *\n * @param locale - The registered locale to get the translation from.\n * @param category - The translation category (e.g., \"errors\", \"labels\").\n * @param key - The translation key within the category.\n * @param replacements - Optional object with replacement values for placeholders in the translation string.\n * @returns The translated string, or an empty string if not found.\n */\nexport function getTranslation<T extends TranslationCategory>(\n locale: RegisteredLocale,\n category: T,\n key: TranslationKey<T>,\n replacements?: Record<string, string>\n): string {\n const userTranslationSet = locale.translations[category] as TranslationSet<T> | undefined;\n const translatedString = userTranslationSet?.[key];\n\n let str: string | undefined;\n\n if (translatedString) {\n str = translatedString;\n } else if (locale.fallback) {\n const fallbackTranslation = getTranslation(locale.fallback, category, key);\n\n if (fallbackTranslation) {\n str = fallbackTranslation;\n }\n } else {\n const fallbackTranslationSet = enUS[category] as TranslationSet<T>;\n str = fallbackTranslationSet[key];\n }\n\n if (replacements) {\n str = str?.replace(/{(\\w+)}/g, (match, p1) => replacements[p1] || match);\n }\n\n return str || \"\";\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { csCZ } from \"./locales/cs-cz\";\nimport { enUS } from \"./locales/en-us\";\nimport { type Translations } from \"./types\";\n\nexport type * from \"./types\";\nexport * from \"./mapping\";\n\n/** Locale identifier string. Supports BCP 47 format (e.g., \"en-US\") or any string. */\nexport type Locale = \"en-US\" | `${string}-${string}` | string;\n\n/**\n * Registers a locale with its translations and optional fallback locale.\n *\n * @param locale - The locale identifier (e.g., \"en-US\", \"fr-FR\").\n * @param translations - The translation object for this locale.\n * @param fallback - Optional fallback locale to use when a translation is missing.\n * @returns A registered locale object.\n */\nexport function registerLocale(\n locale: Locale,\n translations: Translations,\n fallback?: RegisteredLocale\n): RegisteredLocale {\n return {\n locale,\n translations,\n fallback,\n };\n}\n\n/** Pre-registered English US locale with default translations. */\nexport const enUs = registerLocale(\"en-US\", enUS);\n\n/** Other pre-registerd locales */\nexport const csCz = registerLocale(\"cs-CZ\", csCZ);\n\n/** A registered locale with its translations and optional fallback. */\nexport type RegisteredLocale = {\n /** The locale identifier. */\n locale: Locale;\n /** The translation object for this locale. */\n translations: Translations;\n /** Optional fallback locale to use when a translation is missing. */\n fallback?: RegisteredLocale;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase-oss/ui-translations",
|
|
3
|
-
"version": "0.0.2-exp.
|
|
3
|
+
"version": "0.0.2-exp.cfc61d6",
|
|
4
4
|
"description": "Translations for Firebase UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -16,8 +16,13 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"dist"
|
|
18
18
|
],
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"rimraf": "^6.0.1",
|
|
21
|
+
"vitest": "^3.2.4",
|
|
22
|
+
"tsup": "8.5.0",
|
|
23
|
+
"typescript": "^5.9.2"
|
|
24
|
+
},
|
|
19
25
|
"scripts": {
|
|
20
|
-
"prepare": "tsup",
|
|
21
26
|
"build": "tsup",
|
|
22
27
|
"build:local": "pnpm run build && pnpm pack",
|
|
23
28
|
"dev": "tsup --watch",
|
|
@@ -30,11 +35,5 @@
|
|
|
30
35
|
"publish:tags": "sh -c 'TAG=\"${npm_package_name}@${npm_package_version}\"; git tag --list \"$TAG\" | grep . || git tag \"$TAG\"; git push origin \"$TAG\"'",
|
|
31
36
|
"publish:npm": "../../publish.sh",
|
|
32
37
|
"release": "npm run build && pnpm pack --pack-destination ../../releases/"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"rimraf": "catalog:",
|
|
36
|
-
"vitest": "catalog:",
|
|
37
|
-
"tsup": "catalog:",
|
|
38
|
-
"typescript": "catalog:"
|
|
39
38
|
}
|
|
40
|
-
}
|
|
39
|
+
}
|