Skip to content

Commit

Permalink
message localization
Browse files Browse the repository at this point in the history
  • Loading branch information
suer committed Jan 26, 2015
1 parent 1af76d6 commit 044fcac
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
8 changes: 4 additions & 4 deletions app/controllers/oauth_clients_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def new
def create
@client_application = @user.client_applications.build(params[:client_application])
if @client_application.save
flash[:notice] = "Registered the information successfully"
flash[:notice] = l("Registered the information successfully")
redirect_to :action => "show", :id => @client_application.id
else
render :action => "new"
Expand All @@ -31,7 +31,7 @@ def edit

def update
if @client_application.update_attributes(params[:client_application])
flash[:notice] = "Updated the client information successfully"
flash[:notice] = l("Updated the client information successfully")
redirect_to :action => "show", :id => @client_application.id
else
render :action => "edit"
Expand All @@ -40,7 +40,7 @@ def update

def destroy
@client_application.destroy
flash[:notice] = "Destroyed the client application registration"
flash[:notice] = l("Destroyed the client application registration")
redirect_to :action => "index"
end

Expand All @@ -62,7 +62,7 @@ def get_user

def get_client_application
unless @client_application = @user.client_applications.find(params[:id])
flash.now[:error] = "Wrong application id"
flash.now[:error] = l("Wrong application id")
raise ActiveRecord::RecordNotFound
end
end
Expand Down
7 changes: 7 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# English strings go here for Rails i18n
en:
field_support_url: Support URL
field_callback_url: Callback URL
oauth_allow: "Allow"
oauth_deny: "Deny"
oauth_authorize_tilte: Authorize access to your account
Expand All @@ -17,3 +19,8 @@ en:
oauth_request_token_url: Request Token URL
oauth_access_token_url: Access Token URL
oauth_authorize_url: Authorize URL

"Registered the information successfully": "Registered the information successfully"
"Updated the client information successfully": "Updated the client information successfully"
"Destroyed the client application registration": "Destroyed the client application registration"
"Wrong application id": "Wrong application id"
11 changes: 9 additions & 2 deletions config/locales/ja.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
ja:
field_support_url: サポート URL
field_callback_url: コールバック URL
oauth_allow: 許可
oauth_deny: 許可しない
oauth_authorize_tilte: 認証
oauth_authorize_tilte: 認証
oauth_authorize_comment: 以下のアプリケーションへのアクセスを許可しますか?
oauth_deny_message: リクエストは許可されませんでした
oauth_client_applications: OAuth クライアントアプリケーション
oauth_client_applications: OAuth クライアントアプリケーション
oauth_main_application_url: メインアプリケーション URL
oauth_callback_url: コールバック URL
oauth_support_url: サポート URL
Expand All @@ -16,3 +18,8 @@ ja:
oauth_request_token_url: Request Token URL
oauth_access_token_url: Access Token URL
oauth_authorize_url: Authorize URL

"Registered the information successfully": 登録に成功しました
"Updated the client information successfully": 更新に成功しました
"Destroyed the client application registration": クライアントアプリケーションを削除しました
"Wrong application id": アプリケーション ID が誤っています

0 comments on commit 044fcac

Please sign in to comment.