From 51b6ce9dfbdd6017278704c14420dff657d2eb7b Mon Sep 17 00:00:00 2001
From: Ariel Zavala <arielo.zavala@gmail.com>
Date: Thu, 16 Sep 2010 15:11:58 -0400
Subject: [PATCH] Added localization to layouts and shared  views

---
 app/views/layouts/application.html.haml | 4 ++--
 app/views/shared/_aspect_nav.haml       | 4 ++--
 app/views/shared/_publisher.haml        | 2 +-
 app/views/shared/_sub_header.haml       | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 4a3ec2dbb2..7a48d7ed70 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -50,8 +50,8 @@
                 = text_field_tag 'q'
 
             %li= link_to current_user.real_name, current_user.person
-            %li= link_to "edit profile", edit_user_path(current_user)
-            %li= link_to "logout", destroy_user_session_path
+            %li= link_to t('.edit_profile'), edit_user_path(current_user)
+            %li= link_to t('.logout.'), destroy_user_session_path
 
         = render "shared/aspect_nav"
       = render "shared/sub_header"
diff --git a/app/views/shared/_aspect_nav.haml b/app/views/shared/_aspect_nav.haml
index b61def9f51..9ba5a5ee4b 100644
--- a/app/views/shared/_aspect_nav.haml
+++ b/app/views/shared/_aspect_nav.haml
@@ -11,10 +11,10 @@
 
   %ul{ :style => "position:absolute;right:0;bottom:0.01em;"}
     %li{:class => ("selected" if @aspect == :all)}
-      = link_to "All Aspects", root_url
+      = link_to t('.all_aspects'), root_url
 
     %li{ :style => "margin-right:0;", :class => ("selected" if @aspect == :manage)}
-      = link_to ( (@request_count == 0)? "manage" : "manage (#{@request_count})"), {:controller => :aspects, :action => :manage}, :class => "edit_aspect_button", :class => new_request(@request_count), :title => "Manage your Aspects"
+      = link_to ( (@request_count == 0)? t('.manage') : "#{t('.manage')} (#{@request_count})"), {:controller => :aspects, :action => :manage}, :class => "edit_aspect_button", :class => new_request(@request_count), :title => t('.manage_your_aspects')
 
   .yo{ :style => "display:none;"}
     #add_aspect_pane
diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml
index 4645ec65c6..9dadf49052 100644
--- a/app/views/shared/_publisher.haml
+++ b/app/views/shared/_publisher.haml
@@ -19,4 +19,4 @@
           = check_box_tag("aspect_ids[]", aspect.id, @aspect == :all || current_aspect?(aspect) )
           = aspect.name
       
-    = f.submit "Share"
+    = f.submit t('.share')
diff --git a/app/views/shared/_sub_header.haml b/app/views/shared/_sub_header.haml
index badf8783d7..d8ad6c603e 100644
--- a/app/views/shared/_sub_header.haml
+++ b/app/views/shared/_sub_header.haml
@@ -7,9 +7,9 @@
       - else
         %h1
           - if @aspect == :all
-            = link_to "All Aspects", root_path
+            = link_to t('.all_aspects'), root_path
           - elsif @aspect == :manage
-            = link_to "Manage Aspects", root_path
+            = link_to t('.manage_aspects'), root_path
           - else
             = link_to @aspect.name, @aspect
 
-- 
GitLab