From 7633657ecb93d45fef823f7707d91e1576c18a1f Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Tue, 10 Sep 2024 10:37:36 +0300 Subject: [PATCH] Pass translation scope instead of keys to shared pagination --- app/views/diary_comments/_page.html.erb | 3 +-- app/views/diary_entries/_page.html.erb | 3 +-- app/views/issues/_page.html.erb | 3 +-- app/views/shared/_pagination.html.erb | 4 ++-- app/views/traces/_page.html.erb | 6 ++--- app/views/user_blocks/_blocks.html.erb | 3 +-- app/views/users/_page.html.erb | 6 ++--- config/locales/en.yml | 32 +++++++++++++++---------- test/system/issues_test.rb | 4 ++-- 9 files changed, 31 insertions(+), 33 deletions(-) diff --git a/app/views/diary_comments/_page.html.erb b/app/views/diary_comments/_page.html.erb index 66e40cd80..20663a176 100644 --- a/app/views/diary_comments/_page.html.erb +++ b/app/views/diary_comments/_page.html.erb @@ -19,8 +19,7 @@ <%= render "shared/pagination", - :newer_key => "diary_comments.page.newer_comments", - :older_key => "diary_comments.page.older_comments", + :translation_scope => "shared.pagination.diary_comments", :newer_id => @newer_comments_id, :older_id => @older_comments_id %> diff --git a/app/views/diary_entries/_page.html.erb b/app/views/diary_entries/_page.html.erb index f07db9b6c..f0a99928f 100644 --- a/app/views/diary_entries/_page.html.erb +++ b/app/views/diary_entries/_page.html.erb @@ -4,8 +4,7 @@ <%= render @entries %> <%= render "shared/pagination", - :newer_key => "diary_entries.page.newer_entries", - :older_key => "diary_entries.page.older_entries", + :translation_scope => "shared.pagination.diary_entries", :newer_id => @newer_entries_id, :older_id => @older_entries_id %> diff --git a/app/views/issues/_page.html.erb b/app/views/issues/_page.html.erb index b46b1798c..8cada7564 100644 --- a/app/views/issues/_page.html.erb +++ b/app/views/issues/_page.html.erb @@ -36,8 +36,7 @@ <%= render "shared/pagination", - :newer_key => "issues.page.newer_issues", - :older_key => "issues.page.older_issues", + :translation_scope => "shared.pagination.issues", :newer_id => @newer_issues_id, :older_id => @older_issues_id %> <% end %> diff --git a/app/views/shared/_pagination.html.erb b/app/views/shared/_pagination.html.erb index c8eddcd37..be701bc23 100644 --- a/app/views/shared/_pagination.html.erb +++ b/app/views/shared/_pagination.html.erb @@ -3,7 +3,7 @@