Update translation keys

This commit is contained in:
Priit Tark 2015-04-30 12:47:11 +03:00
parent d9ca931c97
commit acab58b71c
49 changed files with 240 additions and 240 deletions

View file

@ -13,10 +13,10 @@ class Admin::InvoicesController < AdminController
def cancel
if @invoice.cancel
flash[:notice] = t('record_updated')
flash[:notice] = t(:record_updated)
redirect_to([:admin, @invoice])
else
flash.now[:alert] = t('failed_to_update_record')
flash.now[:alert] = t(:failed_to_update_record)
render :show
end
end

View file

@ -7,7 +7,7 @@ class Epp::ErrorsController < EppController
end
def not_found
epp_errors << { code: 2400, msg: t('could_not_determine_object_type_check_xml_format_and_namespaces') }
epp_errors << { code: 2400, msg: t(:could_not_determine_object_type_check_xml_format_and_namespaces) }
render_epp_response '/epp/error'
end
end

View file

@ -10,10 +10,10 @@ class Registrar::DepositsController < RegistrarController
@invoice = @deposit.issue_prepayment_invoice
if @invoice.persisted?
flash[:notice] = t('please_pay_the_following_invoice')
flash[:notice] = t(:please_pay_the_following_invoice)
redirect_to [:registrar, @invoice]
else
flash[:alert] = t('failed_to_create_record')
flash[:alert] = t(:failed_to_create_record)
render 'new'
end
end

View file

@ -23,7 +23,7 @@ class Registrar::DomainsController < Registrar::DeppController # EPP controller
if response_ok?
render 'info'
else
flash[:alert] = t('domain_not_found')
flash[:alert] = t(:domain_not_found)
redirect_to registrar_domains_url and return
end
end

View file

@ -13,13 +13,13 @@ class Registrar::NameserversController < RegistrarController
)
if prc == 'replaced_none'
flash.now[:alert] = t('no_hostnames_replaced')
flash.now[:alert] = t(:no_hostnames_replaced)
elsif prc == 'replaced_all'
params[:q][:hostname_end] = params[:hostname_end_replacement]
params[:hostname_end_replacement] = nil
flash.now[:notice] = t('all_hostnames_replaced')
flash.now[:notice] = t(:all_hostnames_replaced)
else
flash.now[:warning] = t('hostnames_partially_replaced')
flash.now[:warning] = t(:hostnames_partially_replaced)
end
end

View file

@ -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