/**
 * Copyright 2016 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the
 * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Strings for the FirebaseUI widget.
{namespace firebaseui.auth.soy2.strings autoescape="strict"}


/** Progress dialog message to show while verifying a phone number. */
{template .dialogVerifyingPhoneNumber kind="text"}
  {msg desc="Progress dialog message to show while verifying a phone number."}
    Verifying...
  {/msg}
{/template}


/** Progress dialog message to show while verifying a phone number. */
{template .dialogEmailLinkProcessing kind="text"}
  {msg desc="Progress dialog message to show while verifying a phone number."}
    Signing in...
  {/msg}
{/template}


/**
 * Progress dialog message to show that the phone authentication code was verified and the sign in
 * attempt is about to complete.
 */
{template .dialogEmailLinkVerified kind="text"}
  {msg desc="Progress dialog message to show that the phone authentication code was verified and the
      sign in attempt is about to complete."}
    Signed in!
  {/msg}
{/template}


/** Progress dialog message to show after an SMS verification code is sent. */
{template .dialogCodeSent kind="text"}
  {msg desc="Progress dialog message to show during a phone authentication request after the
      SMS verification code is sent."}
    Code sent!
  {/msg}
{/template}


/**
 * Progress dialog message to show that the phone authentication code was verified and the sign in
 * attempt is about to complete.
 */
{template .dialogCodeVerified kind="text"}
  {msg desc="Progress dialog message to show that the phone authentication code was verified and the
      sign in attempt is about to complete."}
    Verified!
  {/msg}
{/template}


/** Error message for no web storage support. */
{template .errorNoWebStorage kind="text"}
  {msg desc="Error message to be displayed when the browser does not support web storage
      (localStorage and sessionStorage)."}
    The browser you are using does not support Web Storage. Please try again in a different browser.
  {/msg}
{/template}


/** Error message for invalid email. */
{template .errorInvalidEmail kind="text"}
  {msg desc="Error message when the entered email is not a valid email address."}
    That email address isn't correct
  {/msg}
{/template}


/** Error message for invalid phone number. */
{template .errorInvalidPhoneNumber kind="text"}
  {msg desc="Error message to be displayed when trying to authenticate with a phone number and the
      recipient phone number is missing or invalid."}
    Enter a valid phone number
  {/msg}
{/template}


/** Error message for invalid phone verification code. */
{template .errorInvalidConfirmationCode kind="text"}
  {msg desc="Error message to be displayed when trying to verify a phone number with an SMS code and
      the code has invalid length and/or characters."}
    Wrong code. Try again.
  {/msg}
{/template}


/** Error message for missing reCAPTCHA response. */
{template .errorMissingRecaptchaResponse kind="text"}
  {msg desc="Error message to be displayed if the user did not complete the reCAPTCHA before trying
      to send an SMS confirmation code."}
    Solve the reCAPTCHA
  {/msg}
{/template}


/** Error message for missing email. */
{template .errorMissingEmail kind="text"}
  {msg desc="Error message when the user didn't enter an email."}
    Enter your email address to continue
  {/msg}
{/template}


/** Error message for missing name. */
{template .errorMissingName kind="text"}
  {msg desc="Error message when the user didn't enter a name."}
    Enter your account name
  {/msg}
{/template}


/** Error message for missing password. */
{template .errorMissingPassword kind="text"}
  {msg desc="Error message when the user didn't enter a password."}
    Enter your password
  {/msg}
{/template}


/** Error message for too many account creation. */
{template .errorTooManyRequestsCreateAccount kind="text"}
  {msg desc="Error message when too many accounts have been created from the same IP address."}
    Too many account requests are coming from your IP address. Try again in a few minutes.
  {/msg}
{/template}


/** Error message for too many SMS codes being sent. */
{template .errorTooManyRequestsPhoneNumber kind="text"}
  {msg desc="Error message when the user is attempting to send too many SMS messages."}
    This phone number has been used too many times
  {/msg}
{/template}


/** Error message for password reset code not sent. */
{template .errorSendPasswordReset kind="text"}
  {msg desc="Error message to be displayed when the password reset code is not sent to user's
      email."}
    Unable to send password reset code to specified email
  {/msg}
{/template}


/** Error message for unknown error from backend. */
{template .internalError kind="text"}
  {msg desc="Generic error message to be displayed when the error returned from the backend is
      unknown or does not contain any information."}
    Something went wrong. Please try again.
  {/msg}
{/template}


/** Error message for expired credential. */
{template .errorExpiredCredential kind="text"}
  {msg desc="Error message when the user takes too long to complete the sign in process. The
      Google or Facebook credential used to sign in would have expired."}
    Your sign-in session has expired. Please try again.
  {/msg}
{/template}


/** Error message for anonymous account with email blocking sign-in with non-anonymous account. */
{template .errorAnonymousEmailBlockingSignIn kind="text"}
  {msg desc="Error message when the user tries to sign in but the email is used by an anonymous
      account. The user must reset their password to recover."}
    This email already exists without any means of sign-in. Please reset the password to recover.
  {/msg}
{/template}


/** Error message for an unsupported credential. */
{template .errorUnsupportedCredential kind="text"}
  {msg desc="Error message when the user tries to sign in with a credential for a identity provider
      that is unsupported."}
    The selected credential for the authentication provider is not supported!
  {/msg}
{/template}


/** Error message for an unsupported country code. */
{template .errorUnsupportedCountryCode kind="text"}
  {msg desc="Error message when the user enters an unsupported country code."}
    The country code provided is not supported.
  {/msg}
{/template}


/** Error message for an email that does not match the current sign-in session. */
{template .errorMismatchingEmail kind="text"}
  {msg desc="Error message when the user enters an email that does not match the current session."}
    The email provided does not match the current sign-in session.
  {/msg}
{/template}


/** Translates an error code from Firebase Auth to a user-displayable string. */
{template .error kind="text"}
  {@param? code: string} /** The error code. */
  {switch $code}
    {case 'auth/email-already-in-use'}
      {msg desc="Error message for when the user is trying to sign up with an email already existing
          in the database."}
        The email address is already used by another account
      {/msg}
    {case 'auth/requires-recent-login'}
      {call .errorLoginAgain_ /}
    {case 'auth/too-many-requests'}
      {msg desc="Error message for too many failed login attempts in a short period of time.
          Recommend that the user wait a few minutes before trying again."}
        You have entered an incorrect password too many times. Please try again in a few minutes.
      {/msg}
    {case 'auth/user-cancelled'}
      {msg desc="Error message for when the user refuses to grant permission to the scopes required
          to sign in through the identity provider such as Google, Facebook, etc."}
        Please authorize the required permissions to sign in to the application
      {/msg}
    {case 'auth/user-not-found'}
      {msg desc="Error message for the user tries to sign in to a nonexistent account or if the user
          requests a password reset for a nonexistent account."}
        That email address doesn't match an existing account
      {/msg}
    {case 'auth/user-token-expired'}
      {call .errorLoginAgain_ /}
    {case 'auth/weak-password'}
      {msg desc="Error message for when the user tries to sign in or sign up with a password that is
          too short."}
        Strong passwords have at least 6 characters and a mix of letters and numbers
      {/msg}
    {case 'auth/wrong-password'}
      {msg desc="Error message for incorrect password."}
        The email and password you entered don't match
      {/msg}
    {case 'auth/network-request-failed'}
      {msg desc="Error message when a request fails due to a network error (such as timeout,
          interrupted connection or unreachable host)."}
        A network error has occurred
      {/msg}
    {case 'auth/invalid-phone-number'}
      {call .errorInvalidPhoneNumber /}
    {case 'auth/invalid-verification-code'}
      {call .errorInvalidConfirmationCode /}
    {case 'auth/code-expired'}
      {msg desc="Error message when the SMS code sent to confirm a phone number has expired, and the
          user must request a new code."}
        This code is no longer valid
      {/msg}
    {case 'auth/expired-action-code'}
      {msg desc="Error message when an email code for password reset, sign-in, email verification,
          etc. has expired, and the user must request a new code."}
        This code has expired.
      {/msg}
    {case 'auth/invalid-action-code'}
      {msg desc="Error message when an email code for password reset, sign-in, email verification,
          etc. is invalid."}
        The action code is invalid. This can happen if the code is malformed, expired, or has
        already been used.
      {/msg}
    {default}
  {/switch}
{/template}


/** Translates an FirebaseUI Auth error code to a user-displayable string. */
{template .errorAuthUI kind="text"}
  {@param code: string} /** The error code. */
  {switch $code}
    {case 'firebaseui/merge-conflict'}
      {msg desc="Error message when an existing anonymous user is unable to upgrade to a
          non-anonymous account (Google, Password, etc.) because the associated credential for
          the non-anonymous account already exists."}
        The current anonymous user failed to upgrade. The non-anonymous credential is already
        associated with a different user account.
      {/msg}
    {default}
      {call .internalError /}
  {/switch}
{/template}


/** Translates an error code from CIAP to a user-displayable string. */
{template .errorCIAP kind="text"}
  {@param? code: string} /** The error code. */
  {switch $code}
    {case 'invalid-argument'}
      {msg desc="Error message for the invalid argument error."}
        Client specified an invalid argument.
      {/msg}
    {case 'invalid-configuration'}
      {msg desc="Error message for the invalid configuration error."}
        Client specified an invalid project configuration.
      {/msg}
    {case 'failed-precondition'}
      {msg desc="Error message for the failed precondition error."}
        Request can not be executed in the current system state.
      {/msg}
    {case 'out-of-range'}
      {msg desc="Error message for the out of range error."}
        Client specified an invalid range.
      {/msg}
    {case 'unauthenticated'}
      {msg desc="Error message for the unauthenticated request error."}
        Request not authenticated due to missing, invalid, or expired OAuth token.
      {/msg}
    {case 'permission-denied'}
      {msg desc="Error message for the permission denied error."}
        Client does not have sufficient permission.
      {/msg}
    {case 'not-found'}
      {msg desc="Error message for the resource not found error."}
        Specified resource is not found.
      {/msg}
    {case 'aborted'}
      {msg desc="Error message for the concurrency conflict error."}
        Concurrency conflict, such as read-modify-write conflict.
      {/msg}
    {case 'already-exists'}
      {msg desc="Error message for the resource already exists error."}
        The resource that a client tried to create already exists.
      {/msg}
    {case 'resource-exhausted'}
      {msg desc="Error message for the resource exhausted error."}
        Either out of resource quota or reaching rate limiting.
      {/msg}
    {case 'cancelled'}
      {msg desc="Error message for the request cancelled error."}
        Request cancelled by the client.
      {/msg}
    {case 'data-loss'}
      {msg desc="Error message the data loss error."}
        Unrecoverable data loss or data corruption.
      {/msg}
    {case 'unknown'}
      {msg desc="Error message for the unknown server error."}
        Unknown server error.
      {/msg}
    {case 'internal'}
      {msg desc="Error message for the internal server error."}
        Internal server error.
      {/msg}
    {case 'not-implemented'}
      {msg desc="Error message for the not implemented server API error."}
        API method not implemented by the server.
      {/msg}
    {case 'unavailable'}
      {msg desc="Error message for the unavailable service error."}
        Service unavailable.
      {/msg}
    {case 'deadline-exceeded'}
      {msg desc="Error message for the deadline exceeded error."}
        Request deadline exceeded.
      {/msg}
    {case 'auth/user-disabled'}
      {msg desc="Error message for the user disabled error."}
        The user account has been disabled by an administrator.
      {/msg}
    {case 'auth/timeout'}
      {msg desc="Error message for the timeout error."}
        The operation has timed out.
      {/msg}
    {case 'auth/too-many-requests'}
      {msg desc="Error message for too many failed login attempts in a short period of time."}
        We have blocked all requests from this device due to unusual activity. Try again later.
      {/msg}
    {case 'auth/quota-exceeded'}
      {msg desc="Error message for the quota exceeded error."}
        The quota for this operation has been exceeded. Try again later.
      {/msg}
    {case 'auth/network-request-failed'}
      {msg desc="Error message for the network request failed error."}
        A network error has occurred. Try again later.
      {/msg}
    {case 'restart-process'}
      {msg desc="Instructions for the user to restart the authentication process."}
        An issue was encountered when authenticating your request. Please visit the URL that
        redirected you to this page again to restart the authentication process.
      {/msg}
    {case 'no-matching-tenant-for-email'}
      {msg desc="Instructions for the user to enter a different email when there is no matching
          method of sign-in found for the given email."}
        No sign-in provider is available for the given email, please try with a different email.
      {/msg}
  {/switch}
{/template}


/** Resend countdown. */
{template .resendCountdown kind="text"}
  {@param timeRemaining:string} /** The time remaining. */
  {msg desc="The time remaining before a phone confirmation code can be sent again, eg
      'Resend code in 0:15'."}
    Resend code in {$timeRemaining}
  {/msg}
{/template}


/** Error message for when user has to log in again. */
{template .errorLoginAgain_ kind="text"}
  {msg desc="Error message for when the user has to login again to perform a specific operation
      like updating password."}
    Please login again to perform this operation
  {/msg}
{/template}
