mirror of
https://github.com/internetee/registry.git
synced 2025-07-05 10:43:32 +02:00
Update translation keys
This commit is contained in:
parent
d9ca931c97
commit
acab58b71c
49 changed files with 240 additions and 240 deletions
|
@ -39,9 +39,9 @@ class Registrar::SessionsController < ::SessionsController
|
|||
if @user.persisted?
|
||||
session[:user_id_code] = response.user_id_code
|
||||
session[:mid_session_code] = client.session_code
|
||||
render json: { message: t('check_your_phone_for_confirmation_code') }, status: :ok
|
||||
render json: { message: t(:check_your_phone_for_confirmation_code) }, status: :ok
|
||||
else
|
||||
render json: { message: t('no_such_user') }, status: :unauthorized
|
||||
render json: { message: t(:no_such_user) }, status: :unauthorized
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -55,31 +55,31 @@ class Registrar::SessionsController < ::SessionsController
|
|||
|
||||
case auth_status.status
|
||||
when 'OUTSTANDING_TRANSACTION'
|
||||
render json: { message: t('check_your_phone_for_confirmation_code') }, status: :ok
|
||||
render json: { message: t(:check_your_phone_for_confirmation_code) }, status: :ok
|
||||
when 'USER_AUTHENTICATED'
|
||||
@user = find_user_by_idc(session[:user_id_code])
|
||||
sign_in @user
|
||||
flash[:notice] = t('welcome')
|
||||
flash[:notice] = t(:welcome)
|
||||
flash.keep(:notice)
|
||||
render js: "window.location = '#{registrar_root_path}'"
|
||||
when 'NOT_VALID'
|
||||
render json: { message: t('user_signature_is_invalid') }, status: :bad_request
|
||||
render json: { message: t(:user_signature_is_invalid) }, status: :bad_request
|
||||
when 'EXPIRED_TRANSACTION'
|
||||
render json: { message: t('session_timeout') }, status: :bad_request
|
||||
render json: { message: t(:session_timeout) }, status: :bad_request
|
||||
when 'USER_CANCEL'
|
||||
render json: { message: t('user_cancelled') }, status: :bad_request
|
||||
render json: { message: t(:user_cancelled) }, status: :bad_request
|
||||
when 'MID_NOT_READY'
|
||||
render json: { message: t('mid_not_ready') }, status: :bad_request
|
||||
render json: { message: t(:mid_not_ready) }, status: :bad_request
|
||||
when 'PHONE_ABSENT'
|
||||
render json: { message: t('phone_absent') }, status: :bad_request
|
||||
render json: { message: t(:phone_absent) }, status: :bad_request
|
||||
when 'SENDING_ERROR'
|
||||
render json: { message: t('sending_error') }, status: :bad_request
|
||||
render json: { message: t(:sending_error) }, status: :bad_request
|
||||
when 'SIM_ERROR'
|
||||
render json: { message: t('sim_error') }, status: :bad_request
|
||||
render json: { message: t(:sim_error) }, status: :bad_request
|
||||
when 'INTERNAL_ERROR'
|
||||
render json: { message: t('internal_error') }, status: :bad_request
|
||||
render json: { message: t(:internal_error) }, status: :bad_request
|
||||
else
|
||||
render json: { message: t('internal_error') }, status: :bad_request
|
||||
render json: { message: t(:internal_error) }, status: :bad_request
|
||||
end
|
||||
end
|
||||
# rubocop: enable Metrics/PerceivedComplexity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue