From 6e954219432fdf1906556e00ed662fe136b9ccc4 Mon Sep 17 00:00:00 2001 From: Oleg Valter Date: Sat, 22 Aug 2026 15:23:37 +0300 Subject: [PATCH 1/2] linting fixes for the users/show view --- app/views/users/show.html.erb | 30 +++++++++++++++++------------ config/locales/strings/en.users.yml | 7 +++++++ 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index b8e649bec..6e3aab3c0 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -63,7 +63,7 @@
<% if user_signed_in? %> <%= link_to new_subscription_path(type: 'user', qualifier: @user.id, return_to: request.path), - class: "button is-outlined is-small" do %> + class: 'button is-outlined is-small' do %> Subscribe to user <% end %> <% end %> @@ -78,7 +78,7 @@ <% if @posts.size > 0 %> <%= link_to user_posts_path(@user), - class: "button is-muted", + class: 'button is-muted', 'aria-label': "View all posts by #{rtl_safe_username(@user)}" do %> See all <%= @total_post_count %> » <% end %> @@ -93,7 +93,7 @@ <% end %>
<%= link_to user_posts_path(@user), - class: "button is-muted", + class: 'button is-muted', 'aria-label': "View all posts by #{rtl_safe_username(@user)}" do %> See all <%= @total_post_count %> » <% end %> @@ -135,7 +135,8 @@ <%= link_to search_path(search: "user:#{@user.id} post_type:2"), - 'aria-label': is_me ? 'View your answers' : "View answers from #{rtl_safe_username(@user)}" do %> + 'aria-label': is_me ? t('users.labels.view_answers_self') + : "View answers from #{rtl_safe_username(@user)}" do %> Answers <% end %> @@ -144,8 +145,8 @@ <%= link_to is_me ? my_vote_summary_path : vote_summary_path, - 'aria-label': - is_me ? 'View your received votes' : "View received votes for #{rtl_safe_username(@user)}" do %> + 'aria-label': is_me ? t('users.labels.view_votes_self') + : "View received votes for #{rtl_safe_username(@user)}" do %> Received votes <% end %>
@@ -180,8 +181,9 @@ <% end %> @@ -199,7 +201,8 @@ <%= link_to user_posts_path, - 'aria-label': is_me ? 'View your posts' : "View posts for #{rtl_safe_username(@user)}" do %> + 'aria-label': is_me ? t('users.labels.view_posts_self') + : "View posts for #{rtl_safe_username(@user)}" do %> Total <% end %> @@ -210,7 +213,8 @@ <%= link_to search_path(search: "user:#{@user.id} post_type:1"), - 'aria-label': is_me ? 'View your questions' : "View questions from #{rtl_safe_username(@user)}" do %> + 'aria-label': is_me ? t('users.labels.view_questions_self') + : "View questions from #{rtl_safe_username(@user)}" do %> Questions <% end %> @@ -221,7 +225,8 @@ <%= link_to search_path(search: "user:#{@user.id} post_type:2"), - 'aria-label': is_me ? 'View your answers' : "View answers from #{rtl_safe_username(@user)}" do %> + 'aria-label': is_me ? t('users.labels.view_answers_self') + : "View answers from #{rtl_safe_username(@user)}" do %> Answers <% end %> @@ -232,7 +237,8 @@ <%= link_to search_path(search: "user:#{@user.id} post_type:5"), - 'aria-label': is_me ? 'View your articles' : "View articles from #{rtl_safe_username(@user)}" do %> + 'aria-label': is_me ? t('users.labels.view_articles_self') + : "View articles from #{rtl_safe_username(@user)}" do %> Articles <% end %> diff --git a/config/locales/strings/en.users.yml b/config/locales/strings/en.users.yml index bf2863bca..5eccc0deb 100644 --- a/config/locales/strings/en.users.yml +++ b/config/locales/strings/en.users.yml @@ -9,3 +9,10 @@ en: Accounts using 2FA cannot be self-deleted. Disable 2FA first. self_delete_wrong_username: > The username you entered was incorrect. + labels: + view_abilities_self: View your abilities + view_answers_self: View your answers + view_articles_self: View your articles + view_posts_self: View your posts + view_questions_self: View your questions + view_votes_self: View your received votes From e0b711df4eafebb0190320eaabd0a26c3494929f Mon Sep 17 00:00:00 2001 From: Oleg Valter Date: Sat, 22 Aug 2026 15:31:24 +0300 Subject: [PATCH 2/2] linting fixes for the user_mod_sidebar shared partial --- app/views/shared/_user_mod_sidebar.html.erb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/shared/_user_mod_sidebar.html.erb b/app/views/shared/_user_mod_sidebar.html.erb index 11c62c4ef..6064ce6cf 100644 --- a/app/views/shared/_user_mod_sidebar.html.erb +++ b/app/views/shared/_user_mod_sidebar.html.erb @@ -17,37 +17,37 @@