Permalink
Browse files

* add missing translation.

  • Loading branch information...
1 parent 947fcab commit 904c59c90d4bec7b37fee4c585dd7b4141ac9a69 @kou committed Mar 19, 2009
Showing with 29 additions and 5 deletions.
  1. +2 −2 app/controllers/pages_controller.rb
  2. +5 −3 config/locales/ja.yml
  3. +22 −0 test/integration/page_admin_test.rb
@@ -45,7 +45,7 @@ def create
respond_to do |format|
if @page.save
- flash[:notice] = 'Page was successfully created.'
+ flash[:notice] = t('Page was successfully created.')
format.html { redirect_to(@page) }
format.xml { render :xml => @page, :status => :created, :location => @page }
else
@@ -62,7 +62,7 @@ def update
respond_to do |format|
if @page.update_attributes(params[:page])
- flash[:notice] = 'Page was successfully updated.'
+ flash[:notice] = t('Page was successfully updated.')
format.html { redirect_to(@page) }
format.xml { head :ok }
else
@@ -46,9 +46,11 @@ ja:
"(example: ftp.example.com)": "(例: ftp.example.com)"
"(example: /my-site)": "(例: /my-site)"
- "Site was successfully updated.": "サイトの更新に成功しました。"
- "Content was successfully updated.": "コンテンツの更新に成功しました。"
- "Image was successfully uploaded.": "画像のアップロードに成功しました。"
+ "Page was successfully created.": "ページを作成しました。"
+ "Page was successfully updated.": "ページを更新しました。"
+ "Site was successfully updated.": "サイトを更新しました。"
+ "Content was successfully updated.": "コンテンツを成功しました。"
+ "Image was successfully uploaded.": "画像をアップロードしました。"
"Image list": "画像一覧"
"Image file": "画像ファイル"
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+
+require 'test_helper'
+
+class PageAdminTest < ActionController::IntegrationTest
+ fixtures :all
+
+ def test_create
+ visit("/")
+ fill_in("名前", :with => "new-page")
+ click_button("作成")
+ assert_contain("ページを作成しました。")
+ end
+
+ def test_update
+ visit("/")
+ click_link("編集")
+ fill_in("名前", :with => "new-page")
+ click_button("更新")
+ assert_contain("ページを更新しました。")
+ end
+end

0 comments on commit 904c59c

Please sign in to comment.