From 516edc5038c5618217ef597e10613dcf7bfdcfed Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Tue, 15 Nov 2016 17:11:32 +0100 Subject: [PATCH] i18n of controllers/stories_controllers --- app/controllers/stories_controller.rb | 6 +++--- config/locales/en.yml | 3 +++ config/locales/fr.yml | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/controllers/stories_controller.rb b/app/controllers/stories_controller.rb index 3075012..578da69 100644 --- a/app/controllers/stories_controller.rb +++ b/app/controllers/stories_controller.rb @@ -9,7 +9,7 @@ class StoriesController < ApplicationController before_filter :find_story!, :only => [ :suggest, :submit_suggestions ] def create - @title = "Submit Story" + @title = I18n.t 'controllers.home_controller.submitstorytitle' @cur_url = "/stories/new" @story = Story.new(story_params) @@ -51,7 +51,7 @@ class StoriesController < ApplicationController return redirect_to "/" end - @title = "Edit Story" + @title = I18n.t 'controllers.home_controller.submitstorytitle' if @story.merged_into_story @story.merge_story_short_id = @story.merged_into_story.short_id @@ -67,7 +67,7 @@ class StoriesController < ApplicationController end def new - @title = "Submit Story" + @title = I18n.t 'controllers.home_controller.submitstorytitle' @cur_url = "/stories/new" @story = Story.new diff --git a/config/locales/en.yml b/config/locales/en.yml index 40da6a0..65a1814 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -326,3 +326,6 @@ en: rssforstoriestitle: "RSS 2.0" rssforcommentstitle: "Comments - RSS 2.0" neweststoriestitle: "Newest Stories" + stories_controller: + submitstorytitle: "Submit Story" + editstorytitle: "Edit Story" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 0663eac..b226637 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -338,6 +338,9 @@ fr: rssforstoriestitle: "RSS 2.0" rssforcommentstitle: "Commentaires - RSS 2.0" neweststoriestitle: "Dernières infos" + stories_controller: + submitstorytitle: "Soumettre une info" + editstorytitle: "Éditer une info" date: abbr_day_names: - dim