@firebase-oss/ui-translations 0.0.2-exp.b4669f7 → 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/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
@@ -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,CA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AAA,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.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,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,CACxB,mBAAA,CAAqB,yGAAA,CACrB,qBAAA,CAAuB,gFAAA,CACvB,uBAAA,CAAyB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AAsBP,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.cjs","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/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"],"m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,eAAA,CACvB,mBAAA,CAAqB,aAAA,CACrB,4BAA6B,oBAAA,CAC7B,8BAAA,CAAgC,uBAAA,CAChC,oBAAA,CAAsB,eACtB,0BAAA,CAA4B,mBAAA,CAC5B,gCAAA,CAAkC,wBAAA,CAClC,6BAA8B,qBAAA,CAC9B,8BAAA,CAAgC,uBAAA,CAChC,gCAAA,CAAkC,0BAClC,+CAAA,CAAiD,sCAAA,CACjD,4BAAA,CAA8B,qBAAA,CAC9B,oCAAqC,0BACvC,EAiBO,SAASC,CAAAA,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,gE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AAkC,yBAAA,CAClC,+CAAA,CAAiD,sCAAA,CACjD,4BAAA,CAA8B,qBAAA,CAC9B,mCAAA,CAAqC,0BACvC,EAiBO,SAASC,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACQ,CAER,IAAMC,CAAAA,CADqBJ,CAAAA,CAAO,YAAA,CAAaC,CAAQ,CAAA,GACTC,CAAG,CAAA,CAE7CG,CAAAA,CAEJ,GAAID,CAAAA,CACFC,CAAAA,CAAMD,CAAAA,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.b4669f7",
3
+ "version": "0.0.2-exp.cfc61d6",
4
4
  "description": "Translations for Firebase UI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",