Skip to content

Commit

Permalink
bad test, and adjusting translations a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg committed Mar 15, 2012
1 parent 8caa8f4 commit 0a4f422
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
1 change: 1 addition & 0 deletions config/locales/en.yml
Expand Up @@ -13,6 +13,7 @@ en:
cms/layout: Layout
cms/page: Page
cms/snippet: Snippet
cms/file: File
attributes:
cms/site:
identifier: Identifier
Expand Down
9 changes: 9 additions & 0 deletions config/locales/es.yml
Expand Up @@ -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
Expand All @@ -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:
Expand Down
11 changes: 10 additions & 1 deletion config/locales/ja.yml
Expand Up @@ -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: 親レイアウト
Expand All @@ -30,6 +34,11 @@ ja:
slug: スラッグ
target_page_id: ページにリダイレクト
is_published: パブリッシュ済み
cms/file:
file: File
description: Description
cms/snippet:
identifier: Identifier

# -- Controllers ----------------------------------------------------------
cms:
Expand Down Expand Up @@ -222,4 +231,4 @@ ja:
insert: 画像を挿入
link:
create: リンクを作成


1 change: 1 addition & 0 deletions config/locales/pt-BR.yml
Expand Up @@ -13,6 +13,7 @@ pt-BR:
cms/layout: Leiaute
cms/page: Página
cms/snippet: Fragmento
cms/file: File
attributes:
cms/site:
identifier: Identificador
Expand Down
10 changes: 7 additions & 3 deletions config/locales/zh-CN.yml
Expand Up @@ -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:
Expand Down Expand Up @@ -225,5 +230,4 @@ zh-CN:
image:
insert: 插入图片
link:
create: 创建链接

create: 创建链接
6 changes: 5 additions & 1 deletion lib/comfortable_mexican_sofa/form_builder.rb
Expand Up @@ -66,7 +66,7 @@ def default_tag_field(tag, index, options = {})
'datetime'
when ComfortableMexicanSofa::Tag::PageText, ComfortableMexicanSofa::Tag::FieldText
'code'
when ComfortableMexicanSofa::Tag::PageRichText
when ComfortableMexicanSofa::Tag::PageRichText, ComfortableMexicanSofa::Tag::FieldRichText
'rich_text'
end

Expand Down Expand Up @@ -102,6 +102,10 @@ def field_text(tag, index)
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
Expand Down
4 changes: 2 additions & 2 deletions test/functional/cms_admin/pages_controller_test.rb
Expand Up @@ -78,7 +78,7 @@ def test_get_new_with_field_text
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
Expand Down Expand Up @@ -146,7 +146,7 @@ def test_get_new_with_collection
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
Expand Down

0 comments on commit 0a4f422

Please sign in to comment.