Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added translations for revisions#show view. #167

Merged
merged 3 commits into from

2 participants

@mateusg

No description provided.

@GBH
Owner

Thanks. But can you isolate the actual commit? There are bunch of merges in this pull request. Also if you're adding a line in the locale, can you also add it to all the other languages. Just so the structure is the same in those files.

@mateusg

Done! :)
Sorry for the inconvenience.

@GBH GBH merged commit 2332f02 into comfy:master
@GBH
Owner
GBH commented

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
6 app/views/cms_admin/revisions/show.html.erb
@@ -13,16 +13,16 @@
<%= comfy_form_for @revision, :url => {:action => :revert} do |form| %>
<%= form.simple_field do %>
<div class='current'>
- <div class='title'>Current</div>
+ <div class='title'><%= t('.current') %></div>
</div>
<div class='versioned'>
- <div class='title'><%= @revision.created_at %></div>
+ <div class='title'><%= l(@revision.created_at) %></div>
</div>
<% end %>
<% @current_content.each do |label, content| %>
- <%= form.simple_field label do %>
+ <%= form.simple_field Cms::Layout.human_attribute_name(label) do %>
<div class='current'>
<div class='content'><%= content %></div>
</div>
View
1  config/locales/en.yml
@@ -190,6 +190,7 @@ en:
full_path: Full Path
slug: Slug
update: Update to this Revision
+ current: Current
files:
index:
View
1  config/locales/es.yml
@@ -190,6 +190,7 @@ es:
full_path: Ruta completa
slug: Identificador
update: Actualizar a esta versión
+ current: Corriente
files:
index:
View
1  config/locales/ja.yml
@@ -190,6 +190,7 @@ ja:
full_path: フルパス
slug: スラッグ
update: このリビジョンに更新
+ current: Current
files:
index:
View
1  config/locales/pt-BR.yml
@@ -190,6 +190,7 @@ pt-BR:
full_path: Caminho completo
slug: Identificador
update: Atualizar para esta revisão
+ current: Atual
files:
index:
View
1  config/locales/zh-CN.yml
@@ -190,6 +190,7 @@ zh-CN:
full_path: 全路径
slug: 嵌条
update: 更新到该修订版本
+ current: Current
files:
index:
View
2  lib/comfortable_mexican_sofa/form_builder.rb
@@ -43,7 +43,7 @@ def simple_field(label = nil, content = nil, options = {}, &block)
end
def label_for(field, options={})
- label = options.delete(:label) || object.class.human_attribute_name(field).capitalize
+ label = options.delete(:label) || object.class.human_attribute_name(field)
for_value = options[:id] || "#{object_name}_#{field}"
%Q{<label for="#{for_value}">#{label}</label>}.html_safe
end
View
3  test/test_helper.rb
@@ -32,7 +32,8 @@ def reset_config
'en' => 'English',
'es' => 'Español',
'pt-BR' => 'Português Brasileiro',
- 'zh-CN' => '简体中文'
+ 'zh-CN' => '简体中文',
+ 'ja' => '日本語'
}
config.admin_locale = nil
config.upload_file_options = { :url => '/system/:class/:id/:attachment/:style/:filename' }
View
3  test/unit/configuration_test.rb
@@ -20,7 +20,8 @@ def test_configuration_presense
'en' => 'English',
'es' => 'Español',
'pt-BR' => 'Português Brasileiro',
- 'zh-CN' => '简体中文'
+ 'zh-CN' => '简体中文',
+ 'ja' => '日本語'
}), config.locales
assert_equal nil, config.admin_locale
assert_equal nil, config.database_config
Something went wrong with that request. Please try again.