From 47a71b309f4fb364449167ddc6ed978b6969e047 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Fri, 1 Jul 2011 09:12:27 +1200 Subject: Making use of translation scopes. --- app/views/admin/blog/categories/_category.html.erb | 2 +- app/views/admin/blog/categories/_form.html.erb | 2 +- app/views/admin/blog/categories/index.html.erb | 6 +++--- app/views/admin/blog/comments/index.html.erb | 6 +++--- app/views/admin/blog/posts/_form.html.erb | 8 ++++---- app/views/admin/blog/posts/_post.html.erb | 7 +++++-- app/views/admin/blog/posts/_teaser_part.html.erb | 4 ++-- app/views/admin/blog/posts/index.html.erb | 6 +++--- app/views/admin/blog/posts/uncategorized.html.erb | 6 +++--- 9 files changed, 25 insertions(+), 22 deletions(-) (limited to 'app/views/admin') diff --git a/app/views/admin/blog/categories/_category.html.erb b/app/views/admin/blog/categories/_category.html.erb index d8c8a61..191f649 100644 --- a/app/views/admin/blog/categories/_category.html.erb +++ b/app/views/admin/blog/categories/_category.html.erb @@ -11,6 +11,6 @@ :class => "cancel confirm-delete", :title => t('.delete'), :method => :delete, - :confirm => t('shared.admin.delete.message', :title => category.title) %> + :confirm => t('message', :scope => 'shared.admin.delete', :title => category.title) %> diff --git a/app/views/admin/blog/categories/_form.html.erb b/app/views/admin/blog/categories/_form.html.erb index f55992a..bfcbc7b 100644 --- a/app/views/admin/blog/categories/_form.html.erb +++ b/app/views/admin/blog/categories/_form.html.erb @@ -14,6 +14,6 @@ :locals => { :f => f, :continue_editing => false, - :delete_title => t('admin.blog.categories.category.delete') + :delete_title => t('delete', :scope => 'admin.blog.categories.category') } %> <% end %> diff --git a/app/views/admin/blog/categories/index.html.erb b/app/views/admin/blog/categories/index.html.erb index 60ade7a..5d17d42 100644 --- a/app/views/admin/blog/categories/index.html.erb +++ b/app/views/admin/blog/categories/index.html.erb @@ -1,12 +1,12 @@ <%= render :partial => '/admin/blog/submenu' %>
<% if searching? %> -

<%= t('shared.admin.search.results_for', :query => params[:search]) %>

+

<%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %>

<% if @blog_categories.any? %> <%= render :partial => "blog_categories", :collection => @blog_categories %> <% else %> -

<%= t('admin.search_no_results') %>

+

<%= t('search_no_results', :scope => 'admin') %>

<% end %> <% else %> <% if @blog_categories.any? %> @@ -18,7 +18,7 @@ <% else %>

- <%= t('.no_items_yet', :create => t('admin.blog.submenu.categories.new')) %> + <%= t('.no_items_yet', :create => t('new', :scope => 'admin.blog.submenu.categories')) %>

<% end %> diff --git a/app/views/admin/blog/comments/index.html.erb b/app/views/admin/blog/comments/index.html.erb index fbf268d..aaec4ae 100644 --- a/app/views/admin/blog/comments/index.html.erb +++ b/app/views/admin/blog/comments/index.html.erb @@ -1,7 +1,7 @@ <%= render :partial => '/admin/blog/submenu' %>
<% if searching? %> -

<%= t('shared.admin.search.results_for', :query => params[:search]) %>

+

<%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %>

<% if @blog_comments.any? %> <%=# will_paginate @blog_comments %> @@ -14,7 +14,7 @@ <%=# will_paginate @blog_comments %> <% else %> -

<%= t('admin.search_no_results') %>

+

<%= t('search_no_results', :scope => 'admin') %>

<% end %> <% else %> <% if @blog_comments.any? %> @@ -28,7 +28,7 @@ <% else %>

<%= t('.no_items_yet', - :type => t("admin.blog.submenu.comments.#{action_name.gsub('index', 'new')}").downcase) %> + :type => t(action_name.gsub('index', 'new'), :scope => 'admin.blog.submenu.comments').downcase) %>

<% end %> <% end %> diff --git a/app/views/admin/blog/posts/_form.html.erb b/app/views/admin/blog/posts/_form.html.erb index 13dbcf3..c891b63 100644 --- a/app/views/admin/blog/posts/_form.html.erb +++ b/app/views/admin/blog/posts/_form.html.erb @@ -14,10 +14,10 @@
  • - <%= link_to t('activerecord.attributes.blog_post.body'), "#page_part_body" %> + <%= link_to t('body', :scope => 'activerecord.attributes.blog_post'), "#page_part_body" %>
  • - <%= link_to t('activerecord.attributes.blog_post.teaser'), "#page_part_teaser" %> + <%= link_to t('teaser', :scope => 'activerecord.attributes.blog_post'), "#page_part_teaser" %>
  • <% Refinery::Blog.tabs.each_with_index do |tab, tab_index| %>
  • @@ -66,7 +66,7 @@