From 3e3ef423f2508ff670a731b8f078af736a10e5d6 Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Wed, 9 Nov 2016 16:10:40 +0100 Subject: [PATCH] i18n of comments/_commentbox --- app/views/comments/_commentbox.html.erb | 12 ++++++------ config/locales/en.yml | 9 +++++++++ config/locales/fr.yml | 9 +++++++++ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/app/views/comments/_commentbox.html.erb b/app/views/comments/_commentbox.html.erb index d48a242..65614ab 100644 --- a/app/views/comments/_commentbox.html.erb +++ b/app/views/comments/_commentbox.html.erb @@ -16,7 +16,7 @@ data-shortid="<%= comment.short_id if comment.persisted? %>">
<%= text_area_tag "comment", comment.comment, :rows => 5, :style => "width: 100%;", :autocomplete => "off", :disabled => !@user, - :placeholder => (@user ? "" : "You must be logged in to leave a comment.") + :placeholder => (@user ? "" : t('.mustbelogged')) %>

@@ -24,7 +24,7 @@ data-shortid="<%= comment.short_id if comment.persisted? %>">
<% if @user %>
- Markdown formatting available + <%= t('.markdown') %>
<% end %> - <%= button_tag "#{comment.new_record?? "Post" : "Update"}", + <%= button_tag "#{comment.new_record?? t('.post') : t('.update')}", :class => "comment-post", :type => "button", :disabled => !@user %>   - <%= button_tag "Preview", :class => "comment-preview", + <%= button_tag t('.preview'), :class => "comment-preview", :type => "button", :disabled => !@user %> <% if comment.persisted? || comment.parent_comment_id %>   - <%= button_tag "Cancel", :class => "comment-cancel", + <%= button_tag t('.cancel'), :class => "comment-cancel", :type => "button" %> <% end %> <% if @user && @user.hats.any? %>
- Put on hat: + <%= t('.putonhat') %> <%= select_tag "hat_id", options_from_collection_for_select(@user.hats, "id", "hat", comment.hat_id), :include_blank => true %> diff --git a/config/locales/en.yml b/config/locales/en.yml index e9a2c96..191adea 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -47,6 +47,15 @@ en: filtereddesc: "Description" filteredstories: "Stories" filteredsave: "Save Filters" + comments: + commentbox: + mustbelogged: "You must be logged in to leave a comment." + markdown: "Markdown formatting available" + post: "Post" + update: "Update" + preview: "Preview" + cancel: "Cancel" + putonhat: "Put on hat:" home: index: homerecentsdesc: "The newest stories with a random sampling of recently submitted stories that have not yet reached the front page." diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 20ded3d..c4a4fa9 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -49,6 +49,15 @@ fr: hatrequestlink: "Porter le chapeau" privacylink: "Confidentialité" aboutlink: "À propos" + comments: + commentbox: + mustbelogged: "Vous devez être connecté pour laisser un commentaire." + markdown: "Utilisation du Markdown possible" + post: "Poster" + update: "Mettre à jour" + preview: "Aperçu" + cancel: "Annuler" + putonhat: "Mettre son chapeau : " home: index: homerecentsdesc: "Les plus récentes infos avec un panaché aléatoire des infos récentes soumises qui n'ont pas encore atteint la page principale."