diff options
author | Philip Arndt <parndt@gmail.com> | 2011-07-01 09:12:27 +1200 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2011-07-01 09:12:27 +1200 |
commit | 47a71b309f4fb364449167ddc6ed978b6969e047 (patch) | |
tree | 842ef03d0fbec90a14666cdeaf6285d54d6feed0 /app/views/admin/blog | |
parent | 46021c66f476747a21ee62bf7acbcd9cb169bd25 (diff) | |
download | refinerycms-blog-47a71b309f4fb364449167ddc6ed978b6969e047.tar.gz refinerycms-blog-47a71b309f4fb364449167ddc6ed978b6969e047.tar.bz2 refinerycms-blog-47a71b309f4fb364449167ddc6ed978b6969e047.zip |
Making use of translation scopes.
Diffstat (limited to 'app/views/admin/blog')
-rw-r--r-- | app/views/admin/blog/categories/_category.html.erb | 2 | ||||
-rw-r--r-- | app/views/admin/blog/categories/_form.html.erb | 2 | ||||
-rw-r--r-- | app/views/admin/blog/categories/index.html.erb | 6 | ||||
-rw-r--r-- | app/views/admin/blog/comments/index.html.erb | 6 | ||||
-rw-r--r-- | app/views/admin/blog/posts/_form.html.erb | 8 | ||||
-rw-r--r-- | app/views/admin/blog/posts/_post.html.erb | 7 | ||||
-rw-r--r-- | app/views/admin/blog/posts/_teaser_part.html.erb | 4 | ||||
-rw-r--r-- | app/views/admin/blog/posts/index.html.erb | 6 | ||||
-rw-r--r-- | app/views/admin/blog/posts/uncategorized.html.erb | 6 |
9 files changed, 25 insertions, 22 deletions
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) %> </span> </li> 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' %> <div id='records'> <% if searching? %> - <h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2> + <h2><%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %></h2> <% if @blog_categories.any? %> <%= render :partial => "blog_categories", :collection => @blog_categories %> <% else %> - <p><%= t('admin.search_no_results') %></p> + <p><%= t('search_no_results', :scope => 'admin') %></p> <% end %> <% else %> <% if @blog_categories.any? %> @@ -18,7 +18,7 @@ <% else %> <p> <strong> - <%= t('.no_items_yet', :create => t('admin.blog.submenu.categories.new')) %> + <%= t('.no_items_yet', :create => t('new', :scope => 'admin.blog.submenu.categories')) %> </strong> </p> <% 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' %> <div id='records'> <% if searching? %> - <h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2> + <h2><%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %></h2> <% if @blog_comments.any? %> <%=# will_paginate @blog_comments %> @@ -14,7 +14,7 @@ <%=# will_paginate @blog_comments %> <% else %> - <p><%= t('admin.search_no_results') %></p> + <p><%= t('search_no_results', :scope => 'admin') %></p> <% end %> <% else %> <% if @blog_comments.any? %> @@ -28,7 +28,7 @@ <% else %> <h3> <%= 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) %> </h3> <% 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 @@ <div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'> <ul id='page_parts'> <li class='ui-state-default ui-state-active'> - <%= link_to t('activerecord.attributes.blog_post.body'), "#page_part_body" %> + <%= link_to t('body', :scope => 'activerecord.attributes.blog_post'), "#page_part_body" %> </li> <li class='ui-state-default'> - <%= link_to t('activerecord.attributes.blog_post.teaser'), "#page_part_teaser" %> + <%= link_to t('teaser', :scope => 'activerecord.attributes.blog_post'), "#page_part_teaser" %> </li> <% Refinery::Blog.tabs.each_with_index do |tab, tab_index| %> <li class='ui-state-default' id="custom_<%= tab.name %>_tab"> @@ -66,7 +66,7 @@ </div> <div id='more_options' style="display:none;"> <div class="hemisquare"> - <h3><%= t('admin.blog.submenu.categories.title') %></h3> + <h3><%= t('title', :scope => 'admin.blog.submenu.categories') %></h3> <ul class='blog_categories'> <% @blog_categories.each do |category| %> <li> @@ -99,7 +99,7 @@ :locals => { :f => f, :continue_editing => true, - :delete_title => t('admin.blog.posts.post.delete') + :delete_title => t('delete', :scope => 'admin.blog.posts.post') } %> <% end -%> diff --git a/app/views/admin/blog/posts/_post.html.erb b/app/views/admin/blog/posts/_post.html.erb index 1226082..a7f09e0 100644 --- a/app/views/admin/blog/posts/_post.html.erb +++ b/app/views/admin/blog/posts/_post.html.erb @@ -1,7 +1,10 @@ <li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(post) -%>"> <span class='title'> <%= post.title %> - <span class="preview"><%= post.published_at.try(:strftime, '%b %d, %Y') || 'draft' %><%= " by #{post.author.username}" if post.author.present? %></span> + <span class="preview"> + <%= post.published_at.try(:strftime, '%b %d, %Y') || 'draft' %> + <%= " by #{post.author.username}" if post.author.present? %> + </span> </span> <span class='actions'> <%= link_to refinery_icon_tag("application_go.png"), blog_post_url(post), @@ -13,6 +16,6 @@ :class => "cancel confirm-delete", :title => t('.delete'), :method => :delete, - :confirm => t('shared.admin.delete.message', :title => post.title) %> + :confirm => t('message', :scope => 'shared.admin.delete', :title => post.title) %> </span> </li> diff --git a/app/views/admin/blog/posts/_teaser_part.html.erb b/app/views/admin/blog/posts/_teaser_part.html.erb index d615812..71d7d01 100644 --- a/app/views/admin/blog/posts/_teaser_part.html.erb +++ b/app/views/admin/blog/posts/_teaser_part.html.erb @@ -2,9 +2,9 @@ <%= f.text_area :custom_teaser, :rows => 20, :class => 'wymeditor widest' -%> <p> <span class='clearfix label_inline_with_link'> - <%= link_to t('admin.blog.posts.form.copy_body'), "#", + <%= link_to t('copy_body', :scope => 'admin.blog.posts.form'), "#", :id => 'copy_body_link', - :title => t('admin.blog.posts.form.copy_body_help') %> + :title => t('copy_body_help', :scope => 'admin.blog.posts.form') %> </span> </p> </div> diff --git a/app/views/admin/blog/posts/index.html.erb b/app/views/admin/blog/posts/index.html.erb index f9baaac..90a6a6e 100644 --- a/app/views/admin/blog/posts/index.html.erb +++ b/app/views/admin/blog/posts/index.html.erb @@ -1,14 +1,14 @@ <%= render :partial => '/admin/blog/submenu' %> <div id='records'> <% if searching? %> - <h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2> + <h2><%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %></h2> <% if @blog_posts.any? %> <ul> <%= render :partial => "post", :collection => @blog_posts %> </ul> <% else %> - <p><%= t('shared.admin.search.no_results') %></p> + <p><%= t('no_results', :scope => 'shared.admin.search') %></p> <% end %> <% else %> <% if @blog_posts.any? %> @@ -20,7 +20,7 @@ <% else %> <p> <strong> - <%= t('.no_items_yet', :create => t('admin.blog.submenu.posts.new')) %> + <%= t('.no_items_yet', :create => t('new', :scope => 'admin.blog.submenu.posts')) %> </strong> </p> <% end %> diff --git a/app/views/admin/blog/posts/uncategorized.html.erb b/app/views/admin/blog/posts/uncategorized.html.erb index 888daab..19d9e20 100644 --- a/app/views/admin/blog/posts/uncategorized.html.erb +++ b/app/views/admin/blog/posts/uncategorized.html.erb @@ -1,12 +1,12 @@ <%= render :partial => '/admin/blog/submenu' %> <div id='records'> <% if searching? %> - <h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2> + <h2><%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %></h2> <% if @blog_posts.any? %> <%= render :partial => "blog_posts", :collection => @blog_posts %> <% else %> - <p><%= t('admin.search_no_results') %></p> + <p><%= t('search_no_results', :scope => 'admin') %></p> <% end %> <% else %> <% if @blog_posts.any? %> @@ -18,7 +18,7 @@ <% else %> <p> <strong> - <%= t('.no_items_yet', :create => t('admin.blog.submenu.posts.new')) %> + <%= t('.no_items_yet', :create => t('new', :scope => 'admin.blog.submenu.posts')) %> </strong> </p> <% end %> |