From: Tomas Sedovic <tsedo...@redhat.com> This is the first step towards implementing true i18n support. Right now this just means we added a small dictionary of en locale that gets loaded for the main navigation menu.
No language switching or anything like that yet. --- src/app/views/layouts/_header.haml | 12 ++++++------ src/config/locales/en.yml | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 src/config/locales/en.yml diff --git a/src/app/views/layouts/_header.haml b/src/app/views/layouts/_header.haml index 013080b..0ea60bc 100644 --- a/src/app/views/layouts/_header.haml +++ b/src/app/views/layouts/_header.haml @@ -1,8 +1,8 @@ -- menu = [ { :text => "Dashboard", :controller => "dashboard" }, | - { :text => "Instances", :controller => "instance" }, | - { :text => "Templates", :controller => "image", :action => "show" }, | +- menu = [ { :text => t(:dashboard), :controller => "dashboard" }, | + { :text => t(:instances), :controller => "instance" }, | + { :text => t(:templates), :controller => "image", :action => "show" }, | ({ :text => "Users", :controller => "permissions", :action => "list" } if @current_user && has_view_perms?(BasePermissionObject.general_permission_scope)), | - { :text => "Settings", :controller => "settings" }, | + { :text => t(:settings), :controller => "settings" }, | ].find_all {|item| item != nil} | .header_logo %span Deltacloud Aggregator @@ -14,5 +14,5 @@ .header_info #hi-username = link_to @current_user.first_name + " " + @current_user.last_name, { :controller => "users", :action => "show"} unless @current_user.nil? - = link_to 'Log out', logout_url unless @current_user.nil? - = link_to 'Log in', login_url if @current_user.nil? + = link_to t(:logout), logout_url unless @current_user.nil? + = link_to t(:login), login_url if @current_user.nil? diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml new file mode 100644 index 0000000..46d0c46 --- /dev/null +++ b/src/config/locales/en.yml @@ -0,0 +1,7 @@ +en: + dashboard: Dashboard + instances: Instances + templates: Templates + settings: Settings + login: Log in + logout: Log out -- 1.7.2.2 _______________________________________________ deltacloud-devel mailing list deltacloud-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/deltacloud-devel