]> git.openstreetmap.org Git - rails.git/commitdiff
Guess translation scope from controller name if not provided
authorAnton Khorev <tony29@yandex.ru>
Tue, 10 Sep 2024 07:51:50 +0000 (10:51 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 10 Sep 2024 07:51:50 +0000 (10:51 +0300)
app/views/diary_comments/_page.html.erb
app/views/diary_entries/_page.html.erb
app/views/issues/_page.html.erb
app/views/shared/_pagination.html.erb
app/views/traces/_page.html.erb
app/views/user_blocks/_blocks.html.erb
app/views/users/_page.html.erb

index 20663a176e7f1512a86dc897fe0e8fa34d95727b..cc6019cff5f7ac7b8a57d4b2bdeef8b3936339f3 100644 (file)
@@ -19,7 +19,6 @@
   </table>
 
   <%= render "shared/pagination",
-             :translation_scope => "shared.pagination.diary_comments",
              :newer_id => @newer_comments_id,
              :older_id => @older_comments_id %>
 </turbo-frame>
index f0a99928fd326a13550526f42ccfbb398decfbce..c44a5417ea4538c8005322f9925c232a3ad1a4a6 100644 (file)
@@ -4,7 +4,6 @@
   <%= render @entries %>
 
   <%= render "shared/pagination",
-             :translation_scope => "shared.pagination.diary_entries",
              :newer_id => @newer_entries_id,
              :older_id => @older_entries_id %>
 </turbo-frame>
index 8cada7564e7872fb14b40b9a35a1b37d12d467e4..f625f0e0434ece3dcf3e8f244f65cfd50e6c30ab 100644 (file)
@@ -36,7 +36,6 @@
       </tbody>
     </table>
     <%= render "shared/pagination",
-               :translation_scope => "shared.pagination.issues",
                :newer_id => @newer_issues_id,
                :older_id => @older_issues_id %>
   <% end %>
index be701bc23bd571e54e1cca2a7938af99f70a9078..f10d0a9dc36648527306da667cdb764494c71d37 100644 (file)
@@ -1,3 +1,4 @@
+<% translation_scope ||= "shared.pagination.#{controller.controller_name}" %>
 <nav>
   <% link_class = "page-link icon-link text-center" %>
   <ul class="pagination">
index cb9716fc9fb2c932b4f4e90dbe0b089cf58568f4..422da553408cc73c4b2fcd5f21d09104f412fa2d 100644 (file)
@@ -1,6 +1,5 @@
 <turbo-frame id="pagination" target="_top" data-turbo="false">
   <%= render "shared/pagination",
-             :translation_scope => "shared.pagination.traces",
              :newer_id => @newer_traces_id,
              :older_id => @older_traces_id %>
 
@@ -11,7 +10,6 @@
   </table>
 
   <%= render "shared/pagination",
-             :translation_scope => "shared.pagination.traces",
              :newer_id => @newer_traces_id,
              :older_id => @older_traces_id %>
 </turbo-frame>
index b0b4fa13f3971988c3b812c492f18d0951192e87..8c8557f606e358b196d170209ecbb5779947ccd1 100644 (file)
@@ -19,7 +19,6 @@
   </table>
 
   <%= render "shared/pagination",
-             :translation_scope => "shared.pagination.user_blocks",
              :newer_id => @newer_user_blocks_id,
              :older_id => @older_user_blocks_id %>
 </turbo-frame>
index b09f99164074f96b0dc302c0b0932dcde35a08ff..e505474e1c1019e1cec411818ae82584fa8e680e 100644 (file)
@@ -3,7 +3,6 @@
     <div class="row">
       <div class="col">
         <%= render "shared/pagination",
-                   :translation_scope => "shared.pagination.users",
                    :newer_id => @newer_users_id,
                    :older_id => @older_users_id %>
       </div>
@@ -31,7 +30,6 @@
     <div class="row">
       <div class="col">
         <%= render "shared/pagination",
-                   :translation_scope => "shared.pagination.users",
                    :newer_id => @newer_users_id,
                    :older_id => @older_users_id %>
       </div>