diff --git a/app/controllers/stories_controller.rb b/app/controllers/stories_controller.rb index 1cc72d2..3011ac7 100644 --- a/app/controllers/stories_controller.rb +++ b/app/controllers/stories_controller.rb @@ -173,7 +173,7 @@ class StoriesController < ApplicationController def suggest if !@story.can_have_suggestions_from_user?(@user) - flash[:error] = "You are not allowed to offer suggestions on that story." + flash[:error] = I18n.t 'controllers.stories_controller.flashnotallowedsuggestion' return redirect_to @story.comments_path end @@ -187,7 +187,7 @@ class StoriesController < ApplicationController def submit_suggestions if !@story.can_have_suggestions_from_user?(@user) - flash[:error] = "You are not allowed to offer suggestions on that story." + flash[:error] = I18n.t 'controllers.stories_controller.flashnotallowedsuggestion' return redirect_to @story.comments_path end @@ -209,7 +209,7 @@ class StoriesController < ApplicationController if dsug ostory = @story.reload - flash[:success] = "Your suggested changes have been noted." + flash[:success] = I18n.t 'controllers.stories_controller.flashallowedsuggestion' end redirect_to ostory.comments_path else diff --git a/app/views/stories/suggest.html.erb b/app/views/stories/suggest.html.erb index 36c6d9c..506ae0a 100644 --- a/app/views/stories/suggest.html.erb +++ b/app/views/stories/suggest.html.erb @@ -1,6 +1,6 @@
- Suggest Story Changes + <%= t :suggeststorychanges %>
<%= form_for @story, :url => story_suggest_path(@story.short_id), @@ -12,8 +12,8 @@
- <%= submit_tag "Suggest Changes" %> -  or cancel + <%= submit_tag t :suggestchangesbutton %> +  <%= t :suggestor %> <%= t :suggestcancel %>
<% end %> diff --git a/config/application.rb b/config/application.rb index e0b69f0..ef8a19c 100644 --- a/config/application.rb +++ b/config/application.rb @@ -21,7 +21,7 @@ module Lobsters # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - config.i18n.default_locale = :fr + #config.i18n.default_locale = :fr # Raise an exception when using mass assignment with unpermitted attributes config.action_controller.action_on_unpermitted_parameters = :raise diff --git a/config/locales/en.yml b/config/locales/en.yml index 3243959..591272d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -263,7 +263,7 @@ en: authoredby: "authored by" via: "via" justnow: "just now" - edit: "éditer" + edit: "edit" delete: "delete" confirmundelete: "Are you sure you want to undelete this story?" undelete: "undelete" @@ -357,4 +357,10 @@ en: stories_controller: submitstorytitle: "Submit Story" editstorytitle: "Edit Story" - + flashnotallowedsuggestion: "You are not allowed to offer suggestions on that story." + flashallowedsuggestion: "Your suggested changes have been noted." + # views.stories.suggest scop, unable to get it, I don't know why + suggeststorychanges: "Suggest Story Changes" + suggestchangesbutton: "Suggest Changes" + suggestor: "or" + suggestcancel: "Cancel" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 1e7ce06..fd35300 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -370,6 +370,13 @@ fr: stories_controller: submitstorytitle: "Soumettre une info" editstorytitle: "Éditer une info" + flashnotallowedsuggestion: "Vous n'êtes pas autorisé à offrir des suggestions pour cette info." + flashallowedsuggestion: "Les changements que vous avez suggérés ont été notés." + # suggest.stories scope, unable to get it so global, I don't know why + suggeststorychanges: "Suggérer des changements à l'info" + suggestchangesbutton: "Suggérer des changements" + suggestor: "ou" + suggestcancel: "Annuler" date: abbr_day_names: - dim