diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1fadd347..e2480d85 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -53,7 +53,7 @@ class ApplicationController < ActionController::Base locale = params[:locale] # specifying a locale in the request takes precedence locale = locale || prefs.locale unless current_user.nil? # otherwise, the locale of the currently logged in user takes over locale = locale || request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first if request.env['HTTP_ACCEPT_LANGUAGE'] - I18n.locale = I18n::available_locales.include?(locale.to_sym) ? locale : I18n.default_locale + I18n.locale = locale.nil? ? I18n.default_locale : (I18n::available_locales.include?(locale.to_sym) ? locale : I18n.default_locale) logger.debug("Selected '#{I18n.locale}' as locale") end diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index a7766cce..d217abfe 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -813,7 +813,7 @@ class TodosController < ApplicationController end def with_parent_resource_scope(&block) - @feed_title = t('todos.feed_title') + @feed_title = t('common.actions') if (params[:context_id]) @context = current_user.contexts.find_by_params(params) @feed_title = @feed_title + t('todos.feed_title_in_context', :context => @context.name) diff --git a/config/locales/en.yml b/config/locales/en.yml index 570c69ff..a724358e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,3 +1,4 @@ +en: activerecord: errors: models: @@ -473,7 +474,6 @@ due_date: "with a due date {{due_date}} or earlier" completed: "in the last {{count}} days" feed_title_in_context: "in context '{{context}}'" - feed_title: "Actions" feed_title_in_project: "in project '{{project}}'" list_incomplete_next_actions_with_limit: "Lists the last {{count}} incomplete next actions" list_incomplete_next_actions: "Lists incomplete next actions"