Add translations for notification navigation

This commit is contained in:
Andreas Nedbal 2022-07-07 01:15:43 +02:00 committed by Georg Gadinger
parent af327b3f08
commit b551b7acdb
2 changed files with 47 additions and 4 deletions

View File

@ -6,16 +6,16 @@
%i.fa.fa-bell-o %i.fa.fa-bell-o
- else - else
%i.fa.fa-bell %i.fa.fa-bell
%span.sr-only Notifications %span.sr-only= t('views.navigation.notifications')
%span.badge= notification_count %span.badge= notification_count
.dropdown-menu.dropdown-menu-right.notification-dropdown .dropdown-menu.dropdown-menu-right.notification-dropdown
- if notifications.count.zero? - if notifications.count.zero?
.dropdown-item.text-center.p-2 .dropdown-item.text-center.p-2
%i.fa.fa-bell-o.notification__bell-icon %i.fa.fa-bell-o.notification__bell-icon
%p No new notifications. %p= t(".none")
%a.dropdown-item.text-center{ href: notifications_path('all') } %a.dropdown-item.text-center{ href: notifications_path('all') }
%i.fa.fa-fw.fa-chevron-right %i.fa.fa-fw.fa-chevron-right
Show all notifications = t(".all")
- else - else
- notifications.each do |notification| - notifications.each do |notification|
.dropdown-item .dropdown-item
@ -23,4 +23,4 @@
%a.dropdown-item.text-center{ href: notifications_path } %a.dropdown-item.text-center{ href: notifications_path }
%i.fa.fa-fw.fa-chevron-right %i.fa.fa-fw.fa-chevron-right
Show all new notifications = t(".new")

View File

@ -102,6 +102,41 @@ en:
permanent: "Permanent" permanent: "Permanent"
until: "Until %{until}" until: "Until %{until}"
expired: "Expired at %{until}" expired: "Expired at %{until}"
navigation:
main:
notifications:
none: :notifications.index.none
all: "Show all notifications"
new: "Show all new notifications"
notifications:
index:
none_filtered: "No notifications."
none: "No new notifications."
type:
answer:
heading_html: "%{user} answered %{question} %{time} ago"
link_text: "your question"
comment:
heading: "%{user} commented on %{answer} %{time} ago"
active:
heading_html: :notifications.type.comment.heading
link_text: "your answer"
passive:
heading_html: :notifications.type.comment.heading
link_text: "their answer"
other:
heading_html: :notifications.type.comment.heading
link_text: "%{user}'s answer"
reaction:
heading: "%{user} smiled %{type} %{time} ago"
answer:
heading_html: :notifications.type.reaction.heading
link_text: "your answer"
comment:
heading_html: :notifications.type.reaction.heading
link_text: "your comment"
follow:
heading_html: "followed you %{time} ago"
services: services:
index: index:
title: "Service Settings" title: "Service Settings"
@ -350,6 +385,14 @@ en:
url: "URL:" url: "URL:"
confirm: "I understand the risk, proceed!" confirm: "I understand the risk, proceed!"
tabs: tabs:
notifications:
all: "All notifications"
new: "New notifications"
answer: "Answers"
smile: "Smiles"
comment: "Comments"
commentsmile: "Comment Smiles"
relationship: "Followers"
settings: settings:
account: "Account" account: "Account"
profile: "Profile" profile: "Profile"