finished home i18n

This commit is contained in:
wvengen 2013-02-04 00:46:22 +01:00
parent 22e7f6a9cf
commit 2b11549d33
9 changed files with 143 additions and 70 deletions

View file

@ -1,10 +1,8 @@
Deine aktueller Äpfelpunktestand: #{apple_bar.apples} = t '.points', points: apple_bar.apples
.progress .progress
%div{class: "bar bar-#{apple_bar.group_bar_state}", style: "width: #{apple_bar.group_bar_width}%"} %div{class: "bar bar-#{apple_bar.group_bar_state}", style: "width: #{apple_bar.group_bar_width}%"}
%span.description %span.description
Abgebildet ist das Verhältnis von erledigten Aufgaben zu dem Bestellvolumen Deiner Bestellgruppe im Vergleich zum Durchschnitt in der Foodcoop. = t '.desc', amount: number_to_currency(apple_bar.mean_order_amount_per_job, :precision=>0)
Konkret: Pro #{number_to_currency(apple_bar.mean_order_amount_per_job, :precision => 0 )} Bestellsumme solltest Du eine Aufgabe machen!
- if FoodsoftConfig[:stop_ordering_under].present? - if FoodsoftConfig[:stop_ordering_under].present?
%strong Achtung, %strong= t '.warning', threshold: FoodsoftConfig[:stop_ordering_under]
hast Du weniger als #{FoodsoftConfig[:stop_ordering_under]} Äpfel, darfst Du nicht mehr bestellen!

View file

@ -1,34 +1,34 @@
.well.well-small .well.well-small
%h3= t('home.start_nav.title') %h3= t '.title'
%ul.nav.nav-list %ul.nav.nav-list
%li.nav-header Foodcoop %li.nav-header= t '.foodcoop'
%li= link_to "Mitglieder", foodcoop_users_path %li= link_to t('.members'), foodcoop_users_path
%li= link_to "Meine Aufgaben", user_tasks_path %li= link_to t('.tasks'), user_tasks_path
%li= link_to "Nachricht schreiben", :controller => "messages", :action => "new" %li= link_to t('.write_message'), :controller => "messages", :action => "new"
- has_ordergroup = !@current_user.ordergroup.nil? - has_ordergroup = !@current_user.ordergroup.nil?
- has_orders_role = @current_user.role_orders? - has_orders_role = @current_user.role_orders?
- if has_ordergroup || has_orders_role - if has_ordergroup || has_orders_role
%li.nav-header Bestellungen %li.nav-header= t '.orders.title'
- if has_ordergroup - if has_ordergroup
%li= link_to "Bestellübersicht", group_orders_path %li= link_to t('.orders.overview'), group_orders_path
- if has_orders_role - if has_orders_role
%li= link_to "Bestellungen beenden", :controller => 'orders' %li= link_to t('.orders.end'), :controller => 'orders'
// Articles // Articles
- if @current_user.role_article_meta? || @current_user.role_suppliers? - if @current_user.role_article_meta? || @current_user.role_suppliers?
%li.nav-header Artikelverwaltung %li.nav-header= t '.products.title'
%li= link_to "Artikel aktualisieren", suppliers_path %li= link_to t('.products.edit'), suppliers_path
%li= link_to "Lagerverwaltung", :controller => 'stockit' %li= link_to t('.products.edit_stock'), :controller => 'stockit'
%li= link_to "Lieferanten verwalten", suppliers_path %li= link_to t('.products.edit_suppliers'), suppliers_path
// Finance // Finance
- if @current_user.role_finance? - if @current_user.role_finance?
%li.nav-header Finanzbereich %li.nav-header= t '.finances.title'
%li= link_to "Konten aktualisieren", finance_new_transaction_collection_path %li= link_to t('.finances.accounts'), finance_new_transaction_collection_path
%li= link_to "Bestellungen abrechnen", finance_root_path %li= link_to t('.finances.settle'), finance_root_path
// Administration // Administration
- if @current_user.role_admin? - if @current_user.role_admin?
%li.nav-header Administration %li.nav-header= t '.admin'
%li= link_to "Neue Bestellgruppe", new_admin_ordergroup_path %li= link_to t('.new_ordergroup'), new_admin_ordergroup_path
%li= link_to "Neues Mitglied", new_admin_user_path %li= link_to t('.new_user'), new_admin_user_path

View file

@ -7,21 +7,21 @@
%section.row-fluid %section.row-fluid
- unless @next_tasks.empty? - unless @next_tasks.empty?
.span3.well .span3.well
%h4 Deine Aufgaben %h4= t '.your_tasks'
%dl %dl
- @next_tasks.each do |task| - @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) %dd= link_to task.name, task_path(task)
- unless @unaccepted_tasks.empty? - unless @unaccepted_tasks.empty?
.span3.well .span3.well
%h4 Aufgaben übernehmen %h4= t '.tasks_move.title'
Du bis für Aufgaben verantwortlich. = t '.tasks_move.desc'
= link_to "Aufgaben übernehmen/ablehnen", user_tasks_path = link_to t('.tasks_move.action'), user_tasks_path
- unless @unassigned_tasks.size == 0 - unless @unassigned_tasks.size == 0
.span3.well .span3.well
%h4 Offene Aufgaben %h4= t '.tasks_open.title'
Es gibt #{@unassigned_tasks.size} = t '.tasks_open.desc', size: @unassigned_tasks.size
= link_to 'offene Aufgabe(n)', tasks_path = link_to t('.tasks_open.action'), tasks_path
- if current_user.ordergroup - if current_user.ordergroup
= render :partial => 'shared/open_orders', :locals => {:ordergroup => current_user.ordergroup} = render :partial => 'shared/open_orders', :locals => {:ordergroup => current_user.ordergroup}
@ -29,31 +29,31 @@
// Stats // Stats
- if current_user.ordergroup - if current_user.ordergroup
%section %section
%h2 Engagement Deiner Bestellgruppe %h2= t '.ordergroup.title'
= render :partial => "apple_bar", :locals => {:apple_bar => AppleBar.new(current_user.ordergroup)} = render :partial => "apple_bar", :locals => {:apple_bar => AppleBar.new(current_user.ordergroup)}
- unless Message.public.empty? - unless Message.public.empty?
%section %section
%h2 Neuste Nachrichten %h2= t '.messages.title'
= render 'messages/messages', messages: Message.public.order('created_at DESC').limit(5), pagination: false = 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 - if current_user.ordergroup
// Ordergroup overview // Ordergroup overview
%section %section
%h2 Meine Bestellgruppe %h2= t '.my_ordergroup.title'
%p %p
%b= current_user.ordergroup.name %b= current_user.ordergroup.name
| Verfügbares Guthaben: = t '.my_ordergroup.funds'
= number_to_currency(current_user.ordergroup.get_available_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) %small= t '.my_ordergroup.last_update', when: distance_of_time_in_words(Time.now, current_user.ordergroup.account_updated)
%h3 Letzte Transaktionen %h3= t '.my_ordergroup.transactions.title'
%table.table.table-striped %table.table.table-striped
%tr %tr
%th Wann %th= t '.my_ordergroup.transactions.when'
%th Wer %th= t '.my_ordergroup.transactions.where'
%th Notiz %th= t '.my_ordergroup.transactions.note'
%th Betrag %th= t '.my_ordergroup.transactions.amount'
- for ft in current_user.ordergroup.financial_transactions.limit(5).order('created_on DESC') - for ft in current_user.ordergroup.financial_transactions.limit(5).order('created_on DESC')
%tr %tr
%td= format_time(ft.created_on) %td= format_time(ft.created_on)
@ -62,4 +62,4 @@
- color = ft.amount < 0 ? 'red' : 'black' - color = ft.amount < 0 ? 'red' : 'black'
%td{:style => "color:#{color}; width:5em", :class => "currency"}= number_to_currency(ft.amount) %td{:style => "color:#{color}; width:5em", :class => "currency"}= number_to_currency(ft.amount)
%br/ %br/
%p= link_to "Kontoauszug anzeigen", my_ordergroup_path %p= link_to t('.my_ordergroup.transactions.view'), my_ordergroup_path

View file

@ -1,26 +1,26 @@
- title "Meine Bestellgruppe", false - title t('.title'), false
.row-fluid .row-fluid
.span4 .span4
%h2= @ordergroup.name %h2= @ordergroup.name
.well .well
%p %p
%b Beschreibung: %b= t '.description'
= @ordergroup.description = @ordergroup.description
%p %p
%b Verfügbares Guthaben: %b= t '.funds'
= number_to_currency(@ordergroup.get_available_funds()) = number_to_currency(@ordergroup.get_available_funds())
%h2 Personen %h2= t '.people'
%ul %ul
- for membership in @ordergroup.memberships - for membership in @ordergroup.memberships
%li= membership.user.nick %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 .span8
%h2 Kontoauszug %h2= t('.account_summary')
.well.well-small .well.well-small
= form_tag my_ordergroup_path, :method => :get, :remote => true, = form_tag my_ordergroup_path, :method => :get, :remote => true,
'data-submit-onchange' => true, class: 'form-search' do 'data-submit-onchange' => true, class: 'form-search' do
= text_field_tag :query, params[:query], class: 'input-medium search-query', = text_field_tag :query, params[:query], class: 'input-medium search-query',
placeholder: 'Suchen ...' placeholder: t('.search')
#transactions= render "finance/financial_transactions/transactions" #transactions= render "finance/financial_transactions/transactions"

View file

@ -1,24 +1,23 @@
- title "Mein Profil", false - title t('.title'), false
.row-fluid .row-fluid
.span7 .span7
%h3 %h3
= h @current_user.nick = h(t('.user.title', user: @current_user.nick))
%small %small= t '.user.since', when: distance_of_time_in_words(Time.now, @current_user.created_on)
(Mitglied seit: #{distance_of_time_in_words(Time.now, @current_user.created_on)})
= simple_form_for(@current_user, :url => { :action => 'update_profile'}) do |f| = simple_form_for(@current_user, :url => { :action => 'update_profile'}) do |f|
= render :partial => 'shared/user_form_fields', :locals => {:f => f} = render :partial => 'shared/user_form_fields', :locals => {:f => f}
.form-actions .form-actions
= submit_tag 'Speichern', class: 'btn' = submit_tag t('.user.save'), class: 'btn'
.span5 .span5
%h2 Du bist Mitglied in folgenden Gruppen %h2= t '.groups.title'
%table.table.table-striped %table.table.table-striped
- @current_user.memberships.each do |membership| - @current_user.memberships.each do |membership|
%tr %tr
%td= membership.group.name %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' remote: true, class: 'btn btn-success btn-small'
- if membership.group.type != 'Ordergroup' - if membership.group.type != 'Ordergroup'
%td= link_to "Mitgliedschaft beenden", cancel_membership_path(membership_id: membership), %td= link_to t('.groups.cancel'), cancel_membership_path(membership_id: membership),
confirm: "Bist Du sicher, dass Du Deine Mitgliedschaft beenden willst?", method: :post, confirm: t('.groups.cancel_confirm'), method: :post,
class: 'btn btn-danger btn-small' class: 'btn btn-danger btn-small'

View file

@ -5,10 +5,6 @@ de:
finished: beendet finished: beendet
closed: abgerechnet closed: abgerechnet
home:
index:
title: Startseite
group_orders: group_orders:
messages: messages:
not_enough_apples: not_enough_apples:

View 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?'

View file

@ -5,12 +5,6 @@ en:
finished: finished finished: finished
closed: closed closed: closed
home:
index:
title: Homepage
start_nav:
title: Directly to ...
group_orders: group_orders:
messages: messages:
not_enough_apples: not_enough_apples:

View file

@ -0,0 +1,6 @@
en:
home:
index:
title: Homepage
start_nav:
title: Directly to ...