]> git.openstreetmap.org Git - rails.git/commitdiff
Move show/hide changeset comment locale strings out of javascripts
authorAnton Khorev <tony29@yandex.ru>
Tue, 4 Jun 2024 13:07:25 +0000 (16:07 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 4 Jun 2024 13:07:25 +0000 (16:07 +0300)
app/views/changesets/show.html.erb
config/locales/en.yml

index b9589f9ca0d6ccd7874866ffb43c3f20923f3a24..5d2ca6ff67b903d3239f580fe47c082bd961086a 100644 (file)
@@ -37,7 +37,7 @@
                   :user => link_to(comment.author.display_name, comment.author) %>
             <% if current_user&.moderator? %>
               —
-              <%= tag.button t("javascripts.changesets.show.#{comment.visible ? 'hide' : 'unhide'}_comment"),
+              <%= tag.button t(".#{comment.visible ? 'hide' : 'unhide'}_comment"),
                              :class => "btn btn-sm small btn-link link-secondary p-0 align-baseline",
                              :data => { :method => "POST",
                                         :url => comment.visible ? changeset_comment_hide_url(comment) : changeset_comment_unhide_url(comment) } %>
index 7b463421036030b059fb757657dbc1631d27100f..0b7027f80fe970ec7cbe6c20f8105110a76b8066 100644 (file)
@@ -474,6 +474,8 @@ en:
       still_open: "Changeset still open - discussion will open once the changeset is closed."
       comment_by_html: "Comment from %{user} %{time_ago}"
       hidden_comment_by_html: "Hidden comment from %{user} %{time_ago}"
+      hide_comment: "hide"
+      unhide_comment: "unhide"
       changesetxml: "Changeset XML"
       osmchangexml: "osmChange XML"
     paging_nav:
@@ -3174,8 +3176,6 @@ en:
         comment: "Comment"
         subscribe: "Subscribe"
         unsubscribe: "Unsubscribe"
-        hide_comment: "hide"
-        unhide_comment: "unhide"
     edit_help: Move the map and zoom in on a location you want to edit, then click here.
     directions:
       ascend: "Ascend"