Skip to content

Commit

Permalink
Downgrade gettext to fix compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
taneliang committed Aug 16, 2018
1 parent 0f0c342 commit 3053776
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 56 deletions.
107 changes: 53 additions & 54 deletions api/sync/lib/sync_web/coherence_messages.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,104 +21,103 @@ defmodule SyncWeb.Coherence.Messages do
##################
# Messages

def account_already_confirmed, do: Gettext.dgettext(@domain, "Account already confirmed.")
def account_is_not_locked, do: Gettext.dgettext(@domain, "Account is not locked.")
def account_updated_successfully, do: Gettext.dgettext(@domain, "Account updated successfully.")
def already_confirmed, do: Gettext.dgettext(@domain, "already confirmed")
def already_locked, do: Gettext.dgettext(@domain, "already locked")
def already_logged_in, do: Gettext.dgettext(@domain, "Already logged in.")
def cant_be_blank, do: Gettext.dgettext(@domain, "can't be blank")
def cant_find_that_token, do: Gettext.dgettext(@domain, "Can't find that token")
def confirmation_email_sent, do: Gettext.dgettext(@domain, "Confirmation email sent.")
def confirmation_token_expired, do: Gettext.dgettext(@domain, "Confirmation token expired.")
def account_already_confirmed, do: dgettext(@domain, "Account already confirmed.")
def account_is_not_locked, do: dgettext(@domain, "Account is not locked.")
def account_updated_successfully, do: dgettext(@domain, "Account updated successfully.")
def already_confirmed, do: dgettext(@domain, "already confirmed")
def already_locked, do: dgettext(@domain, "already locked")
def already_logged_in, do: dgettext(@domain, "Already logged in.")
def cant_be_blank, do: dgettext(@domain, "can't be blank")
def cant_find_that_token, do: dgettext(@domain, "Can't find that token")
def confirmation_email_sent, do: dgettext(@domain, "Confirmation email sent.")
def confirmation_token_expired, do: dgettext(@domain, "Confirmation token expired.")

def could_not_find_that_email_address,
do: Gettext.dgettext(@domain, "Could not find that email address")
do: dgettext(@domain, "Could not find that email address")

def forgot_your_password, do: Gettext.dgettext(@domain, "Forgot your password?")
def http_authentication_required, do: Gettext.dgettext(@domain, "HTTP Authentication Required")
def forgot_your_password, do: dgettext(@domain, "Forgot your password?")
def http_authentication_required, do: dgettext(@domain, "HTTP Authentication Required")

def incorrect_login_or_password(opts),
do: Gettext.dgettext(@domain, "Incorrect %{login_field} or password.", opts)
do: dgettext(@domain, "Incorrect %{login_field} or password.", opts)

def invalid_current_password, do: Gettext.dgettext(@domain, "invalid current password")
def invalid_current_password, do: dgettext(@domain, "invalid current password")

def invalid_invitation,
do: Gettext.dgettext(@domain, "Invalid Invitation. Please contact the site administrator.")

def invalid_request, do: Gettext.dgettext(@domain, "Invalid Request.")
def invalid_confirmation_token, do: Gettext.dgettext(@domain, "Invalid confirmation token.")
def invalid_email_or_password, do: Gettext.dgettext(@domain, "Invalid email or password.")
def invalid_invitation_token, do: Gettext.dgettext(@domain, "Invalid invitation token.")
def invalid_reset_token, do: Gettext.dgettext(@domain, "Invalid reset token.")
def invalid_unlock_token, do: Gettext.dgettext(@domain, "Invalid unlock token.")
def invitation_already_sent, do: Gettext.dgettext(@domain, "Invitation already sent.")
def invitation_sent, do: Gettext.dgettext(@domain, "Invitation sent.")
def invite_someone, do: Gettext.dgettext(@domain, "Invite Someone")
do: dgettext(@domain, "Invalid Invitation. Please contact the site administrator.")

def invalid_request, do: dgettext(@domain, "Invalid Request.")
def invalid_confirmation_token, do: dgettext(@domain, "Invalid confirmation token.")
def invalid_email_or_password, do: dgettext(@domain, "Invalid email or password.")
def invalid_invitation_token, do: dgettext(@domain, "Invalid invitation token.")
def invalid_reset_token, do: dgettext(@domain, "Invalid reset token.")
def invalid_unlock_token, do: dgettext(@domain, "Invalid unlock token.")
def invitation_already_sent, do: dgettext(@domain, "Invitation already sent.")
def invitation_sent, do: dgettext(@domain, "Invitation sent.")
def invite_someone, do: dgettext(@domain, "Invite Someone")

def maximum_login_attempts_exceeded,
do:
Gettext.dgettext(@domain, "Maximum Login attempts exceeded. Your account has been locked.")
do: dgettext(@domain, "Maximum Login attempts exceeded. Your account has been locked.")

def need_an_account, do: Gettext.dgettext(@domain, "Need An Account?")
def not_locked, do: Gettext.dgettext(@domain, "not locked")
def password_reset_token_expired, do: Gettext.dgettext(@domain, "Password reset token expired.")
def need_an_account, do: dgettext(@domain, "Need An Account?")
def not_locked, do: dgettext(@domain, "not locked")
def password_reset_token_expired, do: dgettext(@domain, "Password reset token expired.")

def password_updated_successfully,
do: Gettext.dgettext(@domain, "Password updated successfully.")
do: dgettext(@domain, "Password updated successfully.")

def problem_confirming_user_account,
do:
Gettext.dgettext(
dgettext(
@domain,
"Problem confirming user account. Please contact the system administrator."
)

def registration_created_successfully,
do: Gettext.dgettext(@domain, "Registration created successfully.")
do: dgettext(@domain, "Registration created successfully.")

def required, do: Gettext.dgettext(@domain, "required")
def resend_confirmation_email, do: Gettext.dgettext(@domain, "Resend confirmation email")
def required, do: dgettext(@domain, "required")
def resend_confirmation_email, do: dgettext(@domain, "Resend confirmation email")

def reset_email_sent,
do: Gettext.dgettext(@domain, "Reset email sent. Check your email for a reset link.")
do: dgettext(@domain, "Reset email sent. Check your email for a reset link.")

def restricted_area, do: Gettext.dgettext(@domain, "Restricted Area")
def send_an_unlock_email, do: Gettext.dgettext(@domain, "Send an unlock email")
def sign_in, do: Gettext.dgettext(@domain, "Sign In")
def sign_out, do: Gettext.dgettext(@domain, "Sign Out")
def signed_in_successfully, do: Gettext.dgettext(@domain, "Signed in successfully.")
def restricted_area, do: dgettext(@domain, "Restricted Area")
def send_an_unlock_email, do: dgettext(@domain, "Send an unlock email")
def sign_in, do: dgettext(@domain, "Sign In")
def sign_out, do: dgettext(@domain, "Sign Out")
def signed_in_successfully, do: dgettext(@domain, "Signed in successfully.")

def too_many_failed_login_attempts,
do: Gettext.dgettext(@domain, "Too many failed login attempts. Account has been locked.")
do: dgettext(@domain, "Too many failed login attempts. Account has been locked.")

def unauthorized_ip_address, do: Gettext.dgettext(@domain, "Unauthorized IP Address")
def unlock_instructions_sent, do: Gettext.dgettext(@domain, "Unlock Instructions sent.")
def unauthorized_ip_address, do: dgettext(@domain, "Unauthorized IP Address")
def unlock_instructions_sent, do: dgettext(@domain, "Unlock Instructions sent.")

def user_account_confirmed_successfully,
do: Gettext.dgettext(@domain, "User account confirmed successfully.")
do: dgettext(@domain, "User account confirmed successfully.")

def user_already_has_an_account, do: Gettext.dgettext(@domain, "User already has an account!")
def user_already_has_an_account, do: dgettext(@domain, "User already has an account!")

def you_must_confirm_your_account,
do: Gettext.dgettext(@domain, "You must confirm your account before you can login.")
do: dgettext(@domain, "You must confirm your account before you can login.")

def your_account_has_been_unlocked,
do: Gettext.dgettext(@domain, "Your account has been unlocked")
do: dgettext(@domain, "Your account has been unlocked")

def your_account_is_not_locked, do: Gettext.dgettext(@domain, "Your account is not locked.")
def your_account_is_not_locked, do: dgettext(@domain, "Your account is not locked.")

def verify_user_token(opts),
do: Gettext.dgettext(@domain, "Invalid %{user_token} error: %{error}", opts)
do: dgettext(@domain, "Invalid %{user_token} error: %{error}", opts)

def you_are_using_an_invalid_security_token,
do:
Gettext.dgettext(
dgettext(
@domain,
"You are using an invalid security token for this site! This security\n" <>
"violation has been logged.\n"
)

def mailer_required, do: Gettext.dgettext(@domain, "Mailer configuration required!")
def account_is_inactive(), do: Gettext.dgettext(@domain, "Account is inactive!")
def mailer_required, do: dgettext(@domain, "Mailer configuration required!")
def account_is_inactive(), do: dgettext(@domain, "Account is inactive!")
end
2 changes: 1 addition & 1 deletion api/sync/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ defmodule Sync.Mixfile do
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 2.10"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:gettext, "~> 0.13.1"},
{:cowboy, "~> 1.0"},
{:coherence, "~> 0.5"}
]
Expand Down
2 changes: 1 addition & 1 deletion api/sync/mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"ecto": {:hex, :ecto, "2.2.10", "e7366dc82f48f8dd78fcbf3ab50985ceeb11cb3dc93435147c6e13f2cda0992e", [:mix], [{:db_connection, "~> 1.1", [hex: :db_connection, repo: "hexpm", optional: true]}, {:decimal, "~> 1.2", [hex: :decimal, repo: "hexpm", optional: false]}, {:mariaex, "~> 0.8.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.13.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: true]}], "hexpm"},
"elixir_make": {:hex, :elixir_make, "0.4.2", "332c649d08c18bc1ecc73b1befc68c647136de4f340b548844efc796405743bf", [:mix], [], "hexpm"},
"file_system": {:hex, :file_system, "0.2.6", "fd4dc3af89b9ab1dc8ccbcc214a0e60c41f34be251d9307920748a14bf41f1d3", [:mix], [], "hexpm"},
"gettext": {:hex, :gettext, "0.15.0", "40a2b8ce33a80ced7727e36768499fc9286881c43ebafccae6bab731e2b2b8ce", [:mix], [], "hexpm"},
"gettext": {:hex, :gettext, "0.13.1", "5e0daf4e7636d771c4c71ad5f3f53ba09a9ae5c250e1ab9c42ba9edccc476263", [:mix], [], "hexpm"},
"hackney": {:hex, :hackney, "1.13.0", "24edc8cd2b28e1c652593833862435c80661834f6c9344e84b6a2255e7aeef03", [:rebar3], [{:certifi, "2.3.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "5.1.2", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"},
"idna": {:hex, :idna, "5.1.2", "e21cb58a09f0228a9e0b95eaa1217f1bcfc31a1aaa6e1fdf2f53a33f7dbd9494", [:rebar3], [{:unicode_util_compat, "0.3.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"},
"jason": {:hex, :jason, "1.1.1", "d3ccb840dfb06f2f90a6d335b536dd074db748b3e7f5b11ab61d239506585eb2", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"},
Expand Down

0 comments on commit 3053776

Please sign in to comment.