Move duplicate strings into vocabulary

This commit is contained in:
Karina Kwiatek 2023-01-08 22:33:56 +01:00
parent f6029a7fbf
commit 86d37af5ff
6 changed files with 7 additions and 9 deletions

View file

@ -7,7 +7,7 @@
.flex-grow-1 .flex-grow-1
%h6.text-muted.answerbox__question-user %h6.text-muted.answerbox__question-user
- if a.question.author_is_anonymous - if a.question.author_is_anonymous
%i.fas.fa-user-secret{ title: t(".anon_hint") } %i.fas.fa-user-secret{ title: t("voc.anon_hint") }
= t(".asked_html", user: user_screen_name(a.question.user, context_user: a.user, author_identifier: a.question.author_is_anonymous ? a.question.author_identifier: nil), time: time_tooltip(a.question)) = t(".asked_html", user: user_screen_name(a.question.user, context_user: a.user, author_identifier: a.question.author_is_anonymous ? a.question.author_identifier: nil), time: time_tooltip(a.question))
- if !a.question.author_is_anonymous && !a.question.direct - if !a.question.author_is_anonymous && !a.question.direct
· ·

View file

@ -8,7 +8,7 @@
.flex-grow-1 .flex-grow-1
%h6.text-muted.answerbox__question-user %h6.text-muted.answerbox__question-user
- if i.question.author_is_anonymous - if i.question.author_is_anonymous
%i.fas.fa-user-secret{ title: t('.anon_hint') } %i.fas.fa-user-secret{ title: t('voc.anon_hint') }
= t(".asked_html", user: user_screen_name(i.question.user, context_user: i.user, author_identifier: i.question.author_is_anonymous ? i.question.author_identifier : nil), time: time_tooltip(i.question)) = t(".asked_html", user: user_screen_name(i.question.user, context_user: i.user, author_identifier: i.question.author_is_anonymous ? i.question.author_identifier : nil), time: time_tooltip(i.question))
- if !i.question.author_is_anonymous && i.question.answer_count.positive? - if !i.question.author_is_anonymous && i.question.answer_count.positive?
· ·

View file

@ -12,10 +12,10 @@
= nav_entry t("navigation.discover"), discover_path, icon: 'compass' = nav_entry t("navigation.discover"), discover_path, icon: 'compass'
%ul.nav.navbar-nav %ul.nav.navbar-nav
- if @user.present? && @user != current_user - if @user.present? && @user != current_user
%li.nav-item.d-none.d-sm-block{ data: { bs_toggle: 'tooltip', bs_placement: 'bottom' }, title: t(".list") } %li.nav-item.d-none.d-sm-block{ data: { bs_toggle: 'tooltip', bs_placement: 'bottom' }, title: t("voc.list") }
%a.nav-link{ href: '#', data: { bs_target: '#modal-list-memberships', bs_toggle: :modal } } %a.nav-link{ href: '#', data: { bs_target: '#modal-list-memberships', bs_toggle: :modal } }
%i.fa.fa-list.hidden-xs %i.fa.fa-list.hidden-xs
%span.d-none.d-sm-inline.d-md-none= t(".list") %span.d-none.d-sm-inline.d-md-none= t("voc.list")
= nav_entry t("navigation.notifications"), notifications_path, badge: notification_count, class: 'd-block d-sm-none' = nav_entry t("navigation.notifications"), notifications_path, badge: notification_count, class: 'd-block d-sm-none'
%li.nav-item.dropdown.d-none.d-sm-block %li.nav-item.dropdown.d-none.d-sm-block
%a.nav-link.dropdown-toggle{ href: '#', data: { bs_toggle: :dropdown } } %a.nav-link.dropdown-toggle{ href: '#', data: { bs_toggle: :dropdown } }

View file

@ -18,7 +18,7 @@
.dropdown-menu .dropdown-menu
%a.dropdown-item.d-block.d-sm-none{ href: '#', data: { bs_target: '#modal-list-memberships', bs_toggle: :modal } } %a.dropdown-item.d-block.d-sm-none{ href: '#', data: { bs_target: '#modal-list-memberships', bs_toggle: :modal } }
%i.fa.fa-list.fa-fw %i.fa.fa-list.fa-fw
= t(".list") = t("voc.list")
- if current_user.blocking?(user) - if current_user.blocking?(user)
%a.dropdown-item{ href: '#', data: { action: :unblock, target: user.screen_name } } %a.dropdown-item{ href: '#', data: { action: :unblock, target: user.screen_name } }
%i.fa.fa-minus-circle.fa-fw %i.fa.fa-minus-circle.fa-fw

View file

@ -103,7 +103,6 @@ en:
dead: "Dead" dead: "Dead"
answerbox: answerbox:
header: header:
anon_hint: :inbox.entry.anon_hint
answers: answers:
zero: "0 answers" zero: "0 answers"
one: "1 answer" one: "1 answer"
@ -203,7 +202,6 @@ en:
inbox: inbox:
entry: entry:
asked_html: "%{user} asked %{time} ago" asked_html: "%{user} asked %{time} ago"
anon_hint: "This question was asked anonymously."
answers: answers:
one: "1 answer" one: "1 answer"
other: "%{count} answers" other: "%{count} answers"
@ -320,7 +318,6 @@ en:
features: "Feature Requests" features: "Feature Requests"
desktop: desktop:
ask_question: "Ask a question" ask_question: "Ask a question"
list: :user.actions.list
notifications: notifications:
index: index:
title: "Notifications" title: "Notifications"
@ -637,7 +634,6 @@ en:
privilege: "Check %{user}'s privileges" privilege: "Check %{user}'s privileges"
ban: "Ban Control" ban: "Ban Control"
title: "Actions" title: "Actions"
list: "Manage list memberships"
profile: profile:
badge: badge:
admin: "Admin" admin: "Admin"

View file

@ -1,6 +1,7 @@
en: en:
voc: voc:
add: "Add" add: "Add"
anon_hint: "This question was asked anonymously."
answer: "Answer" answer: "Answer"
block: "Block" block: "Block"
block_site_wide: "Block user site-wide" block_site_wide: "Block user site-wide"
@ -10,6 +11,7 @@ en:
delete: "Delete" delete: "Delete"
edit: "Edit" edit: "Edit"
follow: "Follow" follow: "Follow"
list: "Manage list memberships"
load: "Load more" load: "Load more"
login: "Sign in" login: "Sign in"
logout: "Sign out" logout: "Sign out"