finished home i18n
This commit is contained in:
parent
22e7f6a9cf
commit
2b11549d33
9 changed files with 143 additions and 70 deletions
|
@ -1,10 +1,8 @@
|
|||
Deine aktueller Äpfelpunktestand: #{apple_bar.apples}
|
||||
= t '.points', points: apple_bar.apples
|
||||
.progress
|
||||
%div{class: "bar bar-#{apple_bar.group_bar_state}", style: "width: #{apple_bar.group_bar_width}%"}
|
||||
|
||||
%span.description
|
||||
Abgebildet ist das Verhältnis von erledigten Aufgaben zu dem Bestellvolumen Deiner Bestellgruppe im Vergleich zum Durchschnitt in der Foodcoop.
|
||||
Konkret: Pro #{number_to_currency(apple_bar.mean_order_amount_per_job, :precision => 0 )} Bestellsumme solltest Du eine Aufgabe machen!
|
||||
= t '.desc', amount: number_to_currency(apple_bar.mean_order_amount_per_job, :precision=>0)
|
||||
- if FoodsoftConfig[:stop_ordering_under].present?
|
||||
%strong Achtung,
|
||||
hast Du weniger als #{FoodsoftConfig[:stop_ordering_under]} Äpfel, darfst Du nicht mehr bestellen!
|
||||
%strong= t '.warning', threshold: FoodsoftConfig[:stop_ordering_under]
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
.well.well-small
|
||||
%h3= t('home.start_nav.title')
|
||||
%h3= t '.title'
|
||||
%ul.nav.nav-list
|
||||
%li.nav-header Foodcoop
|
||||
%li= link_to "Mitglieder", foodcoop_users_path
|
||||
%li= link_to "Meine Aufgaben", user_tasks_path
|
||||
%li= link_to "Nachricht schreiben", :controller => "messages", :action => "new"
|
||||
%li.nav-header= t '.foodcoop'
|
||||
%li= link_to t('.members'), foodcoop_users_path
|
||||
%li= link_to t('.tasks'), user_tasks_path
|
||||
%li= link_to t('.write_message'), :controller => "messages", :action => "new"
|
||||
|
||||
- has_ordergroup = !@current_user.ordergroup.nil?
|
||||
- has_orders_role = @current_user.role_orders?
|
||||
- if has_ordergroup || has_orders_role
|
||||
%li.nav-header Bestellungen
|
||||
%li.nav-header= t '.orders.title'
|
||||
- if has_ordergroup
|
||||
%li= link_to "Bestellübersicht", group_orders_path
|
||||
%li= link_to t('.orders.overview'), group_orders_path
|
||||
- if has_orders_role
|
||||
%li= link_to "Bestellungen beenden", :controller => 'orders'
|
||||
%li= link_to t('.orders.end'), :controller => 'orders'
|
||||
// Articles
|
||||
- if @current_user.role_article_meta? || @current_user.role_suppliers?
|
||||
%li.nav-header Artikelverwaltung
|
||||
%li= link_to "Artikel aktualisieren", suppliers_path
|
||||
%li= link_to "Lagerverwaltung", :controller => 'stockit'
|
||||
%li= link_to "Lieferanten verwalten", suppliers_path
|
||||
%li.nav-header= t '.products.title'
|
||||
%li= link_to t('.products.edit'), suppliers_path
|
||||
%li= link_to t('.products.edit_stock'), :controller => 'stockit'
|
||||
%li= link_to t('.products.edit_suppliers'), suppliers_path
|
||||
|
||||
// Finance
|
||||
- if @current_user.role_finance?
|
||||
%li.nav-header Finanzbereich
|
||||
%li= link_to "Konten aktualisieren", finance_new_transaction_collection_path
|
||||
%li= link_to "Bestellungen abrechnen", finance_root_path
|
||||
%li.nav-header= t '.finances.title'
|
||||
%li= link_to t('.finances.accounts'), finance_new_transaction_collection_path
|
||||
%li= link_to t('.finances.settle'), finance_root_path
|
||||
|
||||
// Administration
|
||||
- if @current_user.role_admin?
|
||||
%li.nav-header Administration
|
||||
%li= link_to "Neue Bestellgruppe", new_admin_ordergroup_path
|
||||
%li= link_to "Neues Mitglied", new_admin_user_path
|
||||
%li.nav-header= t '.admin'
|
||||
%li= link_to t('.new_ordergroup'), new_admin_ordergroup_path
|
||||
%li= link_to t('.new_user'), new_admin_user_path
|
||||
|
|
|
@ -7,21 +7,21 @@
|
|||
%section.row-fluid
|
||||
- unless @next_tasks.empty?
|
||||
.span3.well
|
||||
%h4 Deine Aufgaben
|
||||
%h4= t '.your_tasks'
|
||||
%dl
|
||||
- @next_tasks.each do |task|
|
||||
%dt= l task.due_date, format: "%A, %d. %b"
|
||||
%dt= l task.due_date, format: t('.due_date_format')
|
||||
%dd= link_to task.name, task_path(task)
|
||||
- unless @unaccepted_tasks.empty?
|
||||
.span3.well
|
||||
%h4 Aufgaben übernehmen
|
||||
Du bis für Aufgaben verantwortlich.
|
||||
= link_to "Aufgaben übernehmen/ablehnen", user_tasks_path
|
||||
%h4= t '.tasks_move.title'
|
||||
= t '.tasks_move.desc'
|
||||
= link_to t('.tasks_move.action'), user_tasks_path
|
||||
- unless @unassigned_tasks.size == 0
|
||||
.span3.well
|
||||
%h4 Offene Aufgaben
|
||||
Es gibt #{@unassigned_tasks.size}
|
||||
= link_to 'offene Aufgabe(n)', tasks_path
|
||||
%h4= t '.tasks_open.title'
|
||||
= t '.tasks_open.desc', size: @unassigned_tasks.size
|
||||
= link_to t('.tasks_open.action'), tasks_path
|
||||
|
||||
- if current_user.ordergroup
|
||||
= render :partial => 'shared/open_orders', :locals => {:ordergroup => current_user.ordergroup}
|
||||
|
@ -29,31 +29,31 @@
|
|||
// Stats
|
||||
- if current_user.ordergroup
|
||||
%section
|
||||
%h2 Engagement Deiner Bestellgruppe
|
||||
%h2= t '.ordergroup.title'
|
||||
= render :partial => "apple_bar", :locals => {:apple_bar => AppleBar.new(current_user.ordergroup)}
|
||||
|
||||
- unless Message.public.empty?
|
||||
%section
|
||||
%h2 Neuste Nachrichten
|
||||
%h2= t '.messages.title'
|
||||
= render 'messages/messages', messages: Message.public.order('created_at DESC').limit(5), pagination: false
|
||||
%p= link_to "Alle Nachrichten einsehen", messages_path
|
||||
%p= link_to t('.messages.view_all'), messages_path
|
||||
|
||||
- if current_user.ordergroup
|
||||
// Ordergroup overview
|
||||
%section
|
||||
%h2 Meine Bestellgruppe
|
||||
%h2= t '.my_ordergroup.title'
|
||||
%p
|
||||
%b= current_user.ordergroup.name
|
||||
| Verfügbares Guthaben:
|
||||
= t '.my_ordergroup.funds'
|
||||
= number_to_currency(current_user.ordergroup.get_available_funds)
|
||||
%small (Letzte Aktualisierung ist #{distance_of_time_in_words(Time.now, current_user.ordergroup.account_updated)} her)
|
||||
%h3 Letzte Transaktionen
|
||||
%small= t '.my_ordergroup.last_update', when: distance_of_time_in_words(Time.now, current_user.ordergroup.account_updated)
|
||||
%h3= t '.my_ordergroup.transactions.title'
|
||||
%table.table.table-striped
|
||||
%tr
|
||||
%th Wann
|
||||
%th Wer
|
||||
%th Notiz
|
||||
%th Betrag
|
||||
%th= t '.my_ordergroup.transactions.when'
|
||||
%th= t '.my_ordergroup.transactions.where'
|
||||
%th= t '.my_ordergroup.transactions.note'
|
||||
%th= t '.my_ordergroup.transactions.amount'
|
||||
- for ft in current_user.ordergroup.financial_transactions.limit(5).order('created_on DESC')
|
||||
%tr
|
||||
%td= format_time(ft.created_on)
|
||||
|
@ -62,4 +62,4 @@
|
|||
- color = ft.amount < 0 ? 'red' : 'black'
|
||||
%td{:style => "color:#{color}; width:5em", :class => "currency"}= number_to_currency(ft.amount)
|
||||
%br/
|
||||
%p= link_to "Kontoauszug anzeigen", my_ordergroup_path
|
||||
%p= link_to t('.my_ordergroup.transactions.view'), my_ordergroup_path
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
- title "Meine Bestellgruppe", false
|
||||
- title t('.title'), false
|
||||
|
||||
.row-fluid
|
||||
.span4
|
||||
%h2= @ordergroup.name
|
||||
.well
|
||||
%p
|
||||
%b Beschreibung:
|
||||
%b= t '.description'
|
||||
= @ordergroup.description
|
||||
%p
|
||||
%b Verfügbares Guthaben:
|
||||
%b= t '.funds'
|
||||
= number_to_currency(@ordergroup.get_available_funds())
|
||||
%h2 Personen
|
||||
%h2= t '.people'
|
||||
%ul
|
||||
- for membership in @ordergroup.memberships
|
||||
%li= membership.user.nick
|
||||
= link_to 'Neue Person einladen', new_invite_path(:id => @ordergroup), :remote => true, class: 'btn btn-primary'
|
||||
= link_to t('.invite'), new_invite_path(:id => @ordergroup), :remote => true, class: 'btn btn-primary'
|
||||
.span8
|
||||
%h2 Kontoauszug
|
||||
%h2= t('.account_summary')
|
||||
.well.well-small
|
||||
= form_tag my_ordergroup_path, :method => :get, :remote => true,
|
||||
'data-submit-onchange' => true, class: 'form-search' do
|
||||
= text_field_tag :query, params[:query], class: 'input-medium search-query',
|
||||
placeholder: 'Suchen ...'
|
||||
placeholder: t('.search')
|
||||
#transactions= render "finance/financial_transactions/transactions"
|
||||
|
||||
|
||||
|
|
|
@ -1,24 +1,23 @@
|
|||
- title "Mein Profil", false
|
||||
- title t('.title'), false
|
||||
|
||||
.row-fluid
|
||||
.span7
|
||||
%h3
|
||||
= h @current_user.nick
|
||||
%small
|
||||
(Mitglied seit: #{distance_of_time_in_words(Time.now, @current_user.created_on)})
|
||||
= h(t('.user.title', user: @current_user.nick))
|
||||
%small= t '.user.since', when: distance_of_time_in_words(Time.now, @current_user.created_on)
|
||||
= simple_form_for(@current_user, :url => { :action => 'update_profile'}) do |f|
|
||||
= render :partial => 'shared/user_form_fields', :locals => {:f => f}
|
||||
.form-actions
|
||||
= submit_tag 'Speichern', class: 'btn'
|
||||
= submit_tag t('.user.save'), class: 'btn'
|
||||
.span5
|
||||
%h2 Du bist Mitglied in folgenden Gruppen
|
||||
%h2= t '.groups.title'
|
||||
%table.table.table-striped
|
||||
- @current_user.memberships.each do |membership|
|
||||
%tr
|
||||
%td= membership.group.name
|
||||
%td= link_to "Neue Mitglieder einladen", new_invite_path(id: membership.group_id),
|
||||
%td= link_to t('.groups.invite'), new_invite_path(id: membership.group_id),
|
||||
remote: true, class: 'btn btn-success btn-small'
|
||||
- if membership.group.type != 'Ordergroup'
|
||||
%td= link_to "Mitgliedschaft beenden", cancel_membership_path(membership_id: membership),
|
||||
confirm: "Bist Du sicher, dass Du Deine Mitgliedschaft beenden willst?", method: :post,
|
||||
%td= link_to t('.groups.cancel'), cancel_membership_path(membership_id: membership),
|
||||
confirm: t('.groups.cancel_confirm'), method: :post,
|
||||
class: 'btn btn-danger btn-small'
|
||||
|
|
|
@ -5,10 +5,6 @@ de:
|
|||
finished: beendet
|
||||
closed: abgerechnet
|
||||
|
||||
home:
|
||||
index:
|
||||
title: Startseite
|
||||
|
||||
group_orders:
|
||||
messages:
|
||||
not_enough_apples:
|
||||
|
|
80
config/locales/de/de.home.yml
Normal file
80
config/locales/de/de.home.yml
Normal file
|
@ -0,0 +1,80 @@
|
|||
de:
|
||||
home:
|
||||
index:
|
||||
title: 'Startseite'
|
||||
your_tasks: 'Deine Aufgaben'
|
||||
due_date_format: '%A, %d. %b'
|
||||
tasks_move:
|
||||
title: 'Aufgaben übernehmen'
|
||||
desc: 'Du bis für Aufgaben verantwortlich.'
|
||||
action: 'Aufgaben übernehmen/ablehnen'
|
||||
tasks_open:
|
||||
title: 'Offene Aufgaben'
|
||||
desc: 'Es gibt %{size}'
|
||||
action: 'offene Aufgabe(n)'
|
||||
ordergroup:
|
||||
title: 'Engagement Deiner Bestellgruppe'
|
||||
messages:
|
||||
title: 'Neuste Nachrichten'
|
||||
view_all: 'Alle Nachrichten einsehen'
|
||||
my_ordergroup:
|
||||
title: 'Meine Bestellgruppe'
|
||||
funds: '| Verfügbares Guthaben:'
|
||||
last_update: 'Letzte Aktualisiering ist %{when} her'
|
||||
transactions:
|
||||
title: 'Letzte Transaktionen'
|
||||
when: 'Wann'
|
||||
where: 'Wer'
|
||||
note: 'Notiz'
|
||||
amount: 'Betrag'
|
||||
view: 'Kontoauszug anzeigen'
|
||||
|
||||
start_nav:
|
||||
title: 'Direkt zu ...'
|
||||
foodcoop: 'Foodcoop'
|
||||
members: 'Mitglieder'
|
||||
tasks: 'Meine Aufgaben'
|
||||
write_message: 'Nachricht schreiben'
|
||||
orders:
|
||||
title: 'Bestellungen'
|
||||
overview: 'Bestellübersicht'
|
||||
end: 'Bestellungen beenden'
|
||||
products:
|
||||
title: 'Artikelverwaltung'
|
||||
edit: 'Artikel aktualisieren'
|
||||
edit_stock: 'Lagerverwaltung'
|
||||
edit_suppliers: 'Lieferanten verwalten'
|
||||
finances:
|
||||
title: 'Finanzbereich'
|
||||
accounts: 'Konten aktualisieren'
|
||||
settle: 'Bestellungen abrechnen'
|
||||
admin: 'Administration'
|
||||
new_ordergroup: 'Neue Bestellgruppe'
|
||||
new_user: 'Neues Mitglied'
|
||||
|
||||
apple_bar:
|
||||
points: 'Deine aktueller Äpfelpunktestand: %{points}'
|
||||
desc: 'Abgebildet ist das Verhältnis von erledigten Aufgaben zu dem Bestellvolumen Deiner Bestellgruppe im Vergleich zum Durchschnitt in der Foodcoop. Konkret: Pro %{amount} Bestellsumme solltest Du eine Aufgabe machen!'
|
||||
warning: 'Achtung, hast Du weniger als %{threshold} Äpfel, darfst Du nicht mehr bestellen!'
|
||||
|
||||
ordergroup:
|
||||
title: 'Meine Bestellgruppe'
|
||||
description: 'Beschreibung'
|
||||
funds: 'Verfügbares Guthaben:'
|
||||
people: 'Personen'
|
||||
invite: 'Neue Person einladen'
|
||||
account_summary: 'Kontoauszug'
|
||||
search: Suchen ...
|
||||
|
||||
profile:
|
||||
title: 'Mein Profil'
|
||||
user:
|
||||
title: '%{user}'
|
||||
since: '(Mitglied seit: %{when})'
|
||||
save: 'Speichern'
|
||||
groups:
|
||||
title: 'Du bist Mitglied in folgenden Gruppen'
|
||||
invite: 'Neue Mitglieder einladen'
|
||||
cancel: 'Mitgliedschaft beenden'
|
||||
cancel_confirm: 'Bist Du sicher, dass Du Deine Mitgliedschaft beenden willst?'
|
||||
|
|
@ -5,12 +5,6 @@ en:
|
|||
finished: finished
|
||||
closed: closed
|
||||
|
||||
home:
|
||||
index:
|
||||
title: Homepage
|
||||
start_nav:
|
||||
title: Directly to ...
|
||||
|
||||
group_orders:
|
||||
messages:
|
||||
not_enough_apples:
|
||||
|
|
6
config/locales/en/en.home.yml
Normal file
6
config/locales/en/en.home.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
en:
|
||||
home:
|
||||
index:
|
||||
title: Homepage
|
||||
start_nav:
|
||||
title: Directly to ...
|
Loading…
Reference in a new issue