finish navigation i18n
This commit is contained in:
parent
8043fd2164
commit
922a6f3a2a
2 changed files with 65 additions and 28 deletions
36
config/locales/de/de.navigation.yml
Normal file
36
config/locales/de/de.navigation.yml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
de:
|
||||||
|
# for config/navigation.rb
|
||||||
|
navigation:
|
||||||
|
dashboard: 'Dashboard'
|
||||||
|
foodcoop: 'Foodcoop'
|
||||||
|
members: 'Mitglieder'
|
||||||
|
workgroups: 'Arbeitsgruppen'
|
||||||
|
ordergroups: 'Bestellgruppen'
|
||||||
|
messages: 'Nachrichten'
|
||||||
|
tasks: 'Aufgaben'
|
||||||
|
wiki:
|
||||||
|
title: 'Wiki'
|
||||||
|
home: 'Startseite'
|
||||||
|
all_pages: 'Alle Seiten'
|
||||||
|
orders:
|
||||||
|
title: 'Bestellungen'
|
||||||
|
ordering: 'Bestellen!'
|
||||||
|
archive: 'Meine Bestellungen'
|
||||||
|
manage: 'Bestellverwaltung'
|
||||||
|
articles:
|
||||||
|
title: 'Artikel'
|
||||||
|
suppliers: 'Lieferanten/Artikel'
|
||||||
|
stock: 'Lager'
|
||||||
|
categories: 'Kategorien'
|
||||||
|
finances:
|
||||||
|
title: 'Finanzen'
|
||||||
|
home: 'Übersicht'
|
||||||
|
accounts: 'Konten verwalten'
|
||||||
|
balancing: 'Bestellungen abrechnen'
|
||||||
|
invoices: 'Rechnungen'
|
||||||
|
admin:
|
||||||
|
title: 'Administration'
|
||||||
|
home: 'Übersicht'
|
||||||
|
users: 'Benutzerinnen'
|
||||||
|
ordergroups: 'Bestellgruppen'
|
||||||
|
workgroups: 'Arbeitsgruppen'
|
|
@ -1,50 +1,51 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Configures your navigation
|
# Configures your navigation
|
||||||
|
|
||||||
SimpleNavigation::Configuration.run do |navigation|
|
SimpleNavigation::Configuration.run do |navigation|
|
||||||
|
|
||||||
navigation.items do |primary|
|
navigation.items do |primary|
|
||||||
primary.dom_class = 'nav'
|
primary.dom_class = 'nav'
|
||||||
|
|
||||||
primary.item :dashboard_nav_item, 'Dashboard', root_path(anchor: '')
|
primary.item :dashboard_nav_item, I18n.t('navigation.dashboard'), root_path(anchor: '')
|
||||||
|
|
||||||
primary.item :foodcoop, 'Foodcoop', '#', id: nil do |subnav|
|
primary.item :foodcoop, I18n.t('navigation.foodcoop'), '#', id: nil do |subnav|
|
||||||
subnav.item :members, 'Mitglieder', foodcoop_users_path, id: nil
|
subnav.item :members, I18n.t('navigation.members'), foodcoop_users_path, id: nil
|
||||||
subnav.item :workgroups, 'Arbeitsgruppen', foodcoop_workgroups_path, id: nil
|
subnav.item :workgroups, I18n.t('navigation.workgroups'), foodcoop_workgroups_path, id: nil
|
||||||
subnav.item :ordergroups, 'Bestellgruppen', foodcoop_ordergroups_path, id: nil
|
subnav.item :ordergroups, I18n.t('navigation.ordergroups'), foodcoop_ordergroups_path, id: nil
|
||||||
subnav.item :messages, 'Nachrichten', messages_path, id: nil
|
subnav.item :messages, I18n.t('navigation.messages'), messages_path, id: nil
|
||||||
subnav.item :tasks, 'Aufgaben', tasks_path, id: nil
|
subnav.item :tasks, I18n.t('navigation.tasks'), tasks_path, id: nil
|
||||||
end
|
end
|
||||||
|
|
||||||
primary.item :wiki, 'Wiki', '#', id: nil do |subnav|
|
primary.item :wiki, I18n.t('navigation.wiki.title'), '#', id: nil do |subnav|
|
||||||
subnav.item :wiki_home, 'Startseite', wiki_path, id: nil
|
subnav.item :wiki_home, I18n.t('navigation.wiki.home'), wiki_path, id: nil
|
||||||
subnav.item :all_pages, 'Alle Seiten', all_pages_path, id: nil
|
subnav.item :all_pages, I18n.t('navigation.wiki.all_pages'), all_pages_path, id: nil
|
||||||
end
|
end
|
||||||
|
|
||||||
primary.item :orders, 'Bestellungen', '#', id: nil do |subnav|
|
primary.item :orders, I18n.t('navigation.orders.title'), '#', id: nil do |subnav|
|
||||||
subnav.item :ordering, 'Bestellen!', group_orders_path, id: nil
|
subnav.item :ordering, I18n.t('navigation.orders.ordering'), group_orders_path, id: nil
|
||||||
subnav.item :ordering_archive, 'Meine Bestellungen', archive_group_orders_path, id: nil
|
subnav.item :ordering_archive, I18n.t('navigation.orders.archive'), archive_group_orders_path, id: nil
|
||||||
subnav.item :orders, 'Bestellverwaltung', orders_path, if: Proc.new { current_user.role_orders? }, id: nil
|
subnav.item :orders, I18n.t('navigation.orders.manage'), orders_path, if: Proc.new { current_user.role_orders? }, id: nil
|
||||||
end
|
end
|
||||||
|
|
||||||
primary.item :articles, 'Artikel', '#', id: nil,
|
primary.item :articles, I18n.t('navigation.articles.title'), '#', id: nil,
|
||||||
if: Proc.new { current_user.role_article_meta? or current_user.role_suppliers? } do |subnav|
|
if: Proc.new { current_user.role_article_meta? or current_user.role_suppliers? } do |subnav|
|
||||||
subnav.item :suppliers, 'Lieferanten/Artikel', suppliers_path, id: nil
|
subnav.item :suppliers, I18n.t('navigation.articles.suppliers'), suppliers_path, id: nil
|
||||||
subnav.item :stockit, 'Lager', stock_articles_path, id: nil
|
subnav.item :stockit, I18n.t('navigation.articles.stock'), stock_articles_path, id: nil
|
||||||
subnav.item :categories, 'Kategorien', article_categories_path, id: nil
|
subnav.item :categories, I18n.t('navigation.articles.categories'), article_categories_path, id: nil
|
||||||
end
|
end
|
||||||
|
|
||||||
primary.item :finance, 'Finanzen', '#', id: nil, if: Proc.new { current_user.role_finance? } do |subnav|
|
primary.item :finance, I18n.t('navigation.finances.title'), '#', id: nil, if: Proc.new { current_user.role_finance? } do |subnav|
|
||||||
subnav.item :finance_home, 'Übersicht', finance_root_path
|
subnav.item :finance_home, I18n.t('navigation.finances.home'), finance_root_path
|
||||||
subnav.item :accounts, 'Konten verwalten', finance_ordergroups_path, id: nil
|
subnav.item :accounts, I18n.t('navigation.finances.accounts'), finance_ordergroups_path, id: nil
|
||||||
subnav.item :balancing, 'Bestellungen abrechnen', finance_order_index_path, id: nil
|
subnav.item :balancing, I18n.t('navigation.finances.balancing'), finance_order_index_path, id: nil
|
||||||
subnav.item :invoices, 'Rechnungen', finance_invoices_path, id: nil
|
subnav.item :invoices, I18n.t('navigation.finances.invoices'), finance_invoices_path, id: nil
|
||||||
end
|
end
|
||||||
|
|
||||||
primary.item :admin, 'Administration', '#', id: nil, if: Proc.new { current_user.role_admin? } do |subnav|
|
primary.item :admin, I18n.t('navigation.admin.title'), '#', id: nil, if: Proc.new { current_user.role_admin? } do |subnav|
|
||||||
subnav.item :admin_home, 'Übersicht', admin_root_path
|
subnav.item :admin_home, I18n.t('navigation.admin.home'), admin_root_path
|
||||||
subnav.item :users, 'Benutzerinnen', admin_users_path, id: nil
|
subnav.item :users, I18n.t('navigation.admin.users'), admin_users_path, id: nil
|
||||||
subnav.item :ordergroups, 'Bestellgruppen', admin_ordergroups_path, id: nil
|
subnav.item :ordergroups, I18n.t('navigation.admin.ordergroups'), admin_ordergroups_path, id: nil
|
||||||
subnav.item :workgroups, 'Arbeitsgruppen', admin_workgroups_path, id: nil
|
subnav.item :workgroups, I18n.t('navigation.admin.workgroups'), admin_workgroups_path, id: nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue