Add new translations for navigation
This commit is contained in:
parent
bf2c97184a
commit
77685d4229
|
@ -3,24 +3,24 @@
|
|||
%a.navbar-brand{ href: '/' }
|
||||
= APP_CONFIG['site_name']
|
||||
%ul.nav.navbar-nav.mr-auto
|
||||
= nav_entry t('views.navigation.timeline'), root_path, icon: 'home'
|
||||
= nav_entry t('views.navigation.inbox'), '/inbox', icon: 'inbox', badge: inbox_count
|
||||
= nav_entry t("navigation.timeline"), root_path, icon: 'home'
|
||||
= nav_entry t("navigation.inbox"), '/inbox', icon: 'inbox', badge: inbox_count
|
||||
- if APP_CONFIG.dig(:features, :discover, :enabled) || current_user.mod?
|
||||
= nav_entry t('views.navigation.discover'), discover_path, icon: 'compass'
|
||||
= nav_entry t("navigation.discover"), discover_path, icon: 'compass'
|
||||
%ul.nav.navbar-nav
|
||||
- if @user.present? && @user != current_user
|
||||
%li.nav-item.d-none.d-sm-block{ data: { toggle: 'tooltip', placement: 'bottom' }, title: t(".list") }
|
||||
%a.nav-link{ href: '#', data: { target: '#modal-list-memberships', toggle: :modal } }
|
||||
%i.fa.fa-list.hidden-xs
|
||||
%span.d-none.d-sm-inline.d-md-none= t(".list")
|
||||
= nav_entry t('views.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
|
||||
%a.nav-link.dropdown-toggle{ href: '#', data: { toggle: :dropdown } }
|
||||
- if notification_count.nil?
|
||||
%i.fa.fa-bell-o
|
||||
- else
|
||||
%i.fa.fa-bell
|
||||
%span.sr-only= t('views.navigation.notifications')
|
||||
%span.sr-only= t("navigation.notifications")
|
||||
%span.badge= notification_count
|
||||
= render 'navigation/dropdown/notifications', notifications: notifications, size: "desktop"
|
||||
%li.nav-item.d-none.d-sm-block{ data: { toggle: 'tooltip', placement: 'bottom' }, title: t('.ask_question') }
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
.container{ class: ios_web_app? ? 'ios-web-app' : '' }
|
||||
%a.navbar-brand{ href: '/' }= APP_CONFIG['site_name']
|
||||
%button.navbar-toggler{ data: { target: '#j2-main-navbar-collapse', toggle: :collapse }, type: :button }
|
||||
%span.sr-only Toggle navigation
|
||||
%span.sr-only= t("navigation.toggle")
|
||||
%span.navbar-toggler-icon
|
||||
.collapse.navbar-collapse#j2-main-navbar-collapse
|
||||
%ul.nav.navbar-nav.ml-auto
|
||||
= nav_entry t('views.sessions.create'), new_user_session_path
|
||||
= nav_entry t('views.sessions.new'), new_user_registration_path
|
||||
= nav_entry t("voc.login"), new_user_session_path
|
||||
= nav_entry t("voc.register"), new_user_registration_path
|
||||
|
|
|
@ -4,16 +4,16 @@
|
|||
%nav.navbar.navbar-themed.bg-primary.fixed-bottom.d-lg-none.d-block.d-print-none#rs-mobile-nav{ role: :navigation }
|
||||
.container{ class: ios_web_app? ? 'ios-web-app' : '' }
|
||||
%ul.nav.navbar-nav.navbar-icon-row
|
||||
= nav_entry t('views.navigation.timeline'), root_path, icon: 'home', icon_only: true
|
||||
= nav_entry t('views.navigation.inbox'), '/inbox',
|
||||
= nav_entry t("navigation.timeline"), root_path, icon: 'home', icon_only: true
|
||||
= nav_entry t("navigation.inbox"), '/inbox',
|
||||
badge: inbox_count, badge_color: 'primary', badge_pill: true,
|
||||
icon: 'inbox', icon_only: true
|
||||
- if APP_CONFIG.dig(:features, :discover, :enabled) || current_user.mod?
|
||||
= nav_entry t('views.navigation.discover'), discover_path, icon: 'compass', icon_only: true
|
||||
= nav_entry t("navigation.discover"), discover_path, icon: 'compass', icon_only: true
|
||||
%li.nav-item
|
||||
%a.nav-link{ href: '#', data: { toggle: 'dropdown', target: '#rs-mobile-nav-notifications' }, aria: { controls: 'rs-mobile-nav-notifications', expanded: 'false' } }
|
||||
%i.fa{ class: "fa-#{notifications_icon}" }
|
||||
%span.sr-only= t('views.navigation.notifications')
|
||||
%span.sr-only= t("navigation.notifications")
|
||||
%span.badge.badge-pill.badge-primary= notification_count
|
||||
%li.nav-item.profile--image-dropdown
|
||||
%a.nav-link{ href: '#', data: { toggle: 'dropdown', target: '#rs-mobile-nav-profile' }, aria: { controls: 'rs-mobile-nav-profile', expanded: 'false' } }
|
||||
|
|
|
@ -2,47 +2,48 @@
|
|||
%h6.dropdown-header.d-none.d-sm-block= current_user.screen_name
|
||||
%a.dropdown-item{ href: user_path(current_user) }
|
||||
%i.fa.fa-fw.fa-user
|
||||
= t("views.navigation.show")
|
||||
= t(".profile")
|
||||
%a.dropdown-item{ href: edit_user_registration_path }
|
||||
%i.fa.fa-fw.fa-cog
|
||||
= t("views.navigation.settings")
|
||||
= t(".settings")
|
||||
.dropdown-divider
|
||||
- if current_user.has_role?(:administrator)
|
||||
%a.dropdown-item{ href: rails_admin_path }
|
||||
%i.fa.fa-fw.fa-cogs
|
||||
= t("views.navigation.admin")
|
||||
= t(".admin")
|
||||
%a.dropdown-item{ href: sidekiq_web_path }
|
||||
%i.fa.fa-fw.fa-bar-chart
|
||||
= t("views.navigation.sidekiq")
|
||||
= t(".sidekiq")
|
||||
%a.dropdown-item{ href: pghero_path }
|
||||
%i.fa.fa-fw.fa-database
|
||||
Database Monitor
|
||||
= t(".pghero")
|
||||
%a.dropdown-item{ href: announcement_index_path }
|
||||
%i.fa.fa-fw.fa-info
|
||||
Announcements
|
||||
= t(".announcements")
|
||||
.dropdown-divider
|
||||
- if current_user.mod?
|
||||
- if moderation_view?
|
||||
= link_to moderation_toggle_unmask_path, method: :post, class: "dropdown-item" do
|
||||
%i.fa.fa-toggle-on
|
||||
Disable Moderation View
|
||||
= t(".unmask.disable")
|
||||
- else
|
||||
= link_to moderation_toggle_unmask_path, method: :post, class: "dropdown-item" do
|
||||
%i.fa.fa-toggle-off
|
||||
Enable Moderation View
|
||||
= t(".unmask.enable")
|
||||
%a.dropdown-item{ href: moderation_path }
|
||||
%i.fa.fa-fw.fa-gavel
|
||||
= t("views.navigation.moderation")
|
||||
= t(".moderation")
|
||||
.dropdown-divider
|
||||
- if APP_CONFIG["canny"]
|
||||
%h6.dropdown-header.d-none.d-sm-block Feedback
|
||||
%h6.dropdown-header.d-none.d-sm-block
|
||||
= t(".feedback.heading")
|
||||
%a.dropdown-item{ href: feedback_bugs_path }
|
||||
%i.fa.fa-fw.fa-bug
|
||||
Bugs
|
||||
= t(".feedback.bugs")
|
||||
%a.dropdown-item{ href: feedback_features_path }
|
||||
%i.fa.fa-fw.fa-flask
|
||||
Feature Requests
|
||||
= t(".feedback.features")
|
||||
.dropdown-divider
|
||||
= button_to destroy_user_session_path, method: "delete", class: "dropdown-item" do
|
||||
%i.fa.fa-fw.fa-sign-out
|
||||
= t("views.sessions.destroy")
|
||||
= t("voc.logout")
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
en:
|
||||
language: "English (US)"
|
||||
about:
|
||||
index:
|
||||
subtitle: "Ask questions, give answers and learn more about your friends."
|
||||
|
@ -279,11 +280,31 @@ en:
|
|||
until: "Until %{until}"
|
||||
expired: "Expired at %{until}"
|
||||
navigation:
|
||||
toggle: "Toggle navigation"
|
||||
timeline: "Timeline"
|
||||
inbox: "Inbox"
|
||||
discover: "Discover"
|
||||
notifications: "Notifications"
|
||||
dropdown:
|
||||
notifications:
|
||||
none: :notifications.index.none
|
||||
all: "Show all notifications"
|
||||
new: "Show all new notifications"
|
||||
profile:
|
||||
profile: "Show profile"
|
||||
settings: "Settings"
|
||||
admin: "Rails Admin"
|
||||
sidekiq: "Sidekiq"
|
||||
pghero: "Database Monitor"
|
||||
announcements: "Announcements"
|
||||
unmask:
|
||||
enable: "Enable Moderation View"
|
||||
disable: "Disable Moderation View"
|
||||
moderation: "Moderation Panel"
|
||||
feedback:
|
||||
heading: "Feedback"
|
||||
bugs: "Bugs"
|
||||
features: "Feature Requests"
|
||||
desktop:
|
||||
ask_question: "Ask a question"
|
||||
list: :user.actions.list
|
||||
|
|
|
@ -10,6 +10,7 @@ en:
|
|||
follow: "Follow"
|
||||
load: "Load more"
|
||||
login: "Sign in"
|
||||
logout: "Logout"
|
||||
save: "Save changes"
|
||||
register: "Sign up"
|
||||
report: "Report"
|
||||
|
|
Loading…
Reference in New Issue