From 89630dc2c9c0ad26246323bd0529c5476c8b52d5 Mon Sep 17 00:00:00 2001 From: metalunk Date: Tue, 9 Feb 2016 15:01:24 +0900 Subject: [PATCH 1/2] Add ja locale --- config/locales/ja.yml | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 config/locales/ja.yml diff --git a/config/locales/ja.yml b/config/locales/ja.yml new file mode 100644 index 000000000..941ceac29 --- /dev/null +++ b/config/locales/ja.yml @@ -0,0 +1,47 @@ +ja: + devise_token_auth: + sessions: + not_confirmed: "'%{email}' に確認用のメールを送信しました。メール内の説明を読み、アカウントの有効化をしてください。" + bad_credentials: "ログイン用の認証情報が正しくありません。再度お試しください。" + not_supported: "/sign_in に GET はサポートされていません。POST をお使いください。" + user_not_found: "ユーザーが見つからないか、ログインしていません。" + token_validations: + invalid: "ログイン用の認証情報が正しくありません。" + registrations: + missing_confirm_success_url: "'confirm_success_url' パラメータが与えられていません。" + redirect_url_not_allowed: "'%{redirect_url}' へのリダイレクトは許可されていません。" + email_already_exists: "'%{email}' のアカウントはすでに存在しています。" + account_with_uid_destroyed: "'%{uid}' のアカウントは削除されました。" + account_to_destroy_not_found: "削除するアカウントが見つかりません。" + user_not_found: "ユーザーが見つかりません。" + passwords: + missing_email: "メールアドレスが与えられていません。" + missing_redirect_url: "リダイレクト URL が与えられていません。" + not_allowed_redirect_url: "'%{redirect_url}' へのリダイレクトは許可されていません。" + sended: "'%{email}' にパスワードリセットの案内が送信されました。" + user_not_found: "メールアドレス '%{email}' のユーザーが見つかりません。" + password_not_required: "このアカウントはパスワードを要求していません。'%{provider}' を利用してログインしてください。" + missing_passwords: "'Password', 'Password confirmation' パラメータが与えられていません。" + successfully_updated: "パスワードの更新に成功しました。" + errors: + messages: + already_in_use: "すでに利用されています。" + validate_sign_up_params: "リクエストボディに適切なアカウント新規登録データを送信してください。" + validate_account_update_params: "リクエストボディに適切なアカウント更新のデータを送信してください。" + not_email: "はメールアドレスではありません" + devise: + mailer: + confirmation_instructions: + confirm_link_msg: "下記のリンクからアカウントを有効化できます:" + confirm_account_link: "アカウントを有効化する" + reset_password_instructions: + request_reset_link_msg: "パスワード変更のリクエストが送信されました。下記のリンクからパスワードの変更をできます。" + password_change_link: "パスワードを変更する" + ignore_mail_msg: "もしこの内容に覚えがない場合は、このメールを無視してください。" + no_changes_msg: "上記のリンクにアクセスして新しいパスワードを作成するまで、現在のパスワードは変更されません。" + unlock_instructions: + account_lock_msg: "連続してログインに失敗したため、あなたのアカウントはロックされました。" + unlock_link_msg: "下記のリンクをクリックしてアカウントを有効化してください:" + unlock_link: "アカウントを有効化する" + hello: "こんにちは" + welcome: "ようこそ" From a6448c792d40f4745e22b270169de5b3b720febd Mon Sep 17 00:00:00 2001 From: metalunk Date: Tue, 9 Feb 2016 15:22:38 +0900 Subject: [PATCH 2/2] Fix typos --- README.md | 2 +- lib/generators/devise_token_auth/USAGE | 2 +- .../custom/custom_omniauth_callbacks_controller_test.rb | 2 +- test/controllers/demo_user_controller_test.rb | 2 +- .../devise_token_auth/omniauth_callbacks_controller_test.rb | 2 +- test/controllers/overrides/passwords_controller_test.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0f64e710c..3a44db779 100644 --- a/README.md +++ b/README.md @@ -844,7 +844,7 @@ These measures are taken by default when using this gem. ## About batch requests -By default, the API should update the auth token for each request ([read more](#about-token-management)). But sometimes it's neccessary to make several concurrent requests to the API, for example: +By default, the API should update the auth token for each request ([read more](#about-token-management)). But sometimes it's necessary to make several concurrent requests to the API, for example: #####Batch request example ~~~javascript diff --git a/lib/generators/devise_token_auth/USAGE b/lib/generators/devise_token_auth/USAGE index 453620202..eb59d728f 100644 --- a/lib/generators/devise_token_auth/USAGE +++ b/lib/generators/devise_token_auth/USAGE @@ -1,6 +1,6 @@ Description: This generator will install all the necessary configuration and migration - files for the devies_token_auth gem. See + files for the devise_token_auth gem. See https://github.com/lynndylanhurley/devise_token_auth for more information. Arguments: diff --git a/test/controllers/custom/custom_omniauth_callbacks_controller_test.rb b/test/controllers/custom/custom_omniauth_callbacks_controller_test.rb index 950bc7820..a5b8fea95 100644 --- a/test/controllers/custom/custom_omniauth_callbacks_controller_test.rb +++ b/test/controllers/custom/custom_omniauth_callbacks_controller_test.rb @@ -16,7 +16,7 @@ class Custom::OmniauthCallbacksControllerTest < ActionDispatch::IntegrationTest }) end - test "yield resource to block on omniauth_sucess success" do + test "yield resource to block on omniauth_success success" do @redirect_url = "http://ng-token-auth.dev/" get_via_redirect '/nice_user_auth/facebook', { auth_origin_url: @redirect_url, diff --git a/test/controllers/demo_user_controller_test.rb b/test/controllers/demo_user_controller_test.rb index cfa6c206f..b18b7eabd 100644 --- a/test/controllers/demo_user_controller_test.rb +++ b/test/controllers/demo_user_controller_test.rb @@ -315,7 +315,7 @@ class DemoUserControllerTest < ActionDispatch::IntegrationTest assert 200, response.status end - describe 'another device should not be abble to login' do + describe 'another device should not be able to login' do it 'should return forbidden status' do get '/demo/members_only', {}, @old_auth_headers diff --git a/test/controllers/devise_token_auth/omniauth_callbacks_controller_test.rb b/test/controllers/devise_token_auth/omniauth_callbacks_controller_test.rb index ea8f9988d..f81acb6f1 100644 --- a/test/controllers/devise_token_auth/omniauth_callbacks_controller_test.rb +++ b/test/controllers/devise_token_auth/omniauth_callbacks_controller_test.rb @@ -263,7 +263,7 @@ def get_success(params = {}) assert_equal({"error"=>"invalid_credentials", "message"=>"authFailure"}, data) end - test 'renders somethign with no auth_origin_url' do + test 'renders something with no auth_origin_url' do get_via_redirect '/auth/facebook' assert_equal 200, response.status assert_select "body", "invalid_credentials" diff --git a/test/controllers/overrides/passwords_controller_test.rb b/test/controllers/overrides/passwords_controller_test.rb index 6a32c8f0e..e2dce5034 100644 --- a/test/controllers/overrides/passwords_controller_test.rb +++ b/test/controllers/overrides/passwords_controller_test.rb @@ -42,7 +42,7 @@ class Overrides::PasswordsControllerTest < ActionDispatch::IntegrationTest @override_proof = @qs["override_proof"] end - test 'respones should have success redirect status' do + test 'response should have success redirect status' do assert_equal 302, response.status end