bad test, and adjusting translations a bit

Oleg committed Mar 15, 2012
commit 0a4f4224b9901e193e89e57439f4c2c219c3be0a
Showing 7 changed files with 35 additions and 7 deletions
config/locales/en.yml +1 -0
@@ @@ -13,6 +13,7 @@ en:
cms/layout: Layout
cms/page: Page
cms/snippet: Snippet
+ cms/file: File
attributes:
cms/site:
identifier: Identifier
config/locales/es.yml +9 -0
@@ @@ -6,19 +6,23 @@ es:
slug: Identificador
parent_id: Padre
content: Contenido
+ identifier: Identifier
activerecord:
models:
cms/site: Sitio
cms/layout: Plantilla
cms/page: Página
cms/snippet: Fragmento
+ cms/file: File
attributes:
cms/site:
+ identifier: Identifier
hostname: Dirección
path: Ruta
locale: Lengua
is_mirrored: Espejo
cms/layout:
+ identifier: Identifier
label: Nombre de Plantilla
app_layout: Plantilla Base
parent_id: Plantilla Padre
@@ @@ -30,6 +34,11 @@ es:
slug: Ruta
target_page_id: Redirigir a
is_published: Publicada
+ cms/file:
+ file: File
+ description: Description
+ cms/snippet:
+ identifier: Identifier
# -- Controllers ----------------------------------------------------------
cms:
config/locales/ja.yml +10 -1
@@ @@ -6,19 +6,23 @@ ja:
slug: スラッグ
parent_id: 親
content: コンテンツ
+ identifier: Identifier
activerecord:
models:
cms/site: サイト
cms/layout: レイアウト
cms/page: ページ
cms/snippet: スニペット
+ cms/file: File
attributes:
cms/site:
+ identifier: Identifier
hostname: ホスト名
path: パス
locale: 言語
is_mirrored: ミラーリング済み
cms/layout:
+ identifier: Identifier
label: レイアウト名
app_layout: アプリケーションレイアウト
parent_id: 親レイアウト
@@ @@ -30,6 +34,11 @@ ja:
slug: スラッグ
target_page_id: ページにリダイレクト
is_published: パブリッシュ済み
+ cms/file:
+ file: File
+ description: Description
+ cms/snippet:
+ identifier: Identifier
# -- Controllers ----------------------------------------------------------
cms:
@@ @@ -222,4 +231,4 @@ ja:
insert: 画像を挿入
link:
create: リンクを作成
-
+
\ No newline at end of file
config/locales/pt-BR.yml +1 -0
@@ @@ -13,6 +13,7 @@ pt-BR:
cms/layout: Leiaute
cms/page: Página
cms/snippet: Fragmento
+ cms/file: File
attributes:
cms/site:
identifier: Identificador
config/locales/zh-CN.yml +7 -3
@@ @@ -16,25 +16,30 @@ zh-CN:
cms/file: 文件
attributes:
cms/site:
+ identifier: 标识符
hostname: 主机名
path: 路径
locale: 语言
is_mirrored: 镜像
cms/layout:
+ identifier: 标识符
label: 布局名称
app_layout: 应用布局
parent_id: 上级布局
css: 样式
js: Javascript
cms/page:
+ label: 布局名称
layout_id: 布局
+ slug: Slug
target_page_id: 跳转至
is_published: 发布
cms/file:
file: 文件
description: 描述
+ cms/snippet:
+ identifier: 标识符
-
# -- Controllers ----------------------------------------------------------
cms:
base:
@@ @@ -225,5 +230,4 @@ zh-CN:
image:
insert: 插入图片
link:
- create: 创建链接
-
+ create: 创建链接
\ No newline at end of file
comfortable_mexican_sofa/form_builder.rb b/lib/comfortable_mexican_sofa/form_builder.rb +5 -1
@@ @@ -66,7 +66,7 @@ class ComfortableMexicanSofa::FormBuilder < ActionView::Helpers::FormBuilder
'datetime'
when ComfortableMexicanSofa::Tag::PageText, ComfortableMexicanSofa::Tag::FieldText
'code'
- when ComfortableMexicanSofa::Tag::PageRichText
+ when ComfortableMexicanSofa::Tag::PageRichText, ComfortableMexicanSofa::Tag::FieldRichText
'rich_text'
end
@@ @@ -102,6 +102,10 @@ class ComfortableMexicanSofa::FormBuilder < ActionView::Helpers::FormBuilder
default_tag_field(tag, index, :method => :text_area_tag)
end
+ def field_rich_text(tag, index)
+ default_tag_field(tag, index, :method => :text_area_tag)
+ end
+
def page_date_time(tag, index)
default_tag_field(tag, index)
end
test/functional/cms_admin/pages_controller_test.rb +2 -2
@@ @@ -78,7 +78,7 @@ class CmsAdmin::PagesControllerTest < ActionController::TestCase
assert_select "input[type='hidden'][name='page[blocks_attributes][0][identifier]'][value='test_label']"
end
- def test_get_new_with_rich_page_text
+ def test_get_new_with_field_rich_text
cms_layouts(:default).update_attribute(:content, '{{cms:field:test_label:rich_text}}')
get :new, :site_id => cms_sites(:default)
assert_response :success
@@ @@ -146,7 +146,7 @@ class CmsAdmin::PagesControllerTest < ActionController::TestCase
assert_select "input[type='hidden'][name='page[blocks_attributes][0][identifier]'][value='snippet']"
end
- def test_get_new_with_rich_page_text
+ def test_get_new_with_page_rich_text
cms_layouts(:default).update_attribute(:content, '{{cms:page:test_label:rich_text}}')
get :new, :site_id => cms_sites(:default)
assert_response :success