Guess translation scope from controller name if not provided

This commit is contained in:
Anton Khorev 2024-09-10 10:51:50 +03:00
parent 38085fed82
commit cb65cd9adc
7 changed files with 1 additions and 8 deletions

View 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>

View 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>

View 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 %>

View file

@ -1,3 +1,4 @@
<% translation_scope ||= "shared.pagination.#{controller.controller_name}" %>
<nav>
<% link_class = "page-link icon-link text-center" %>
<ul class="pagination">

View 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>

View 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>

View 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>