From afda8443802e2a5792f7d65e18e8f5b75608a120 Mon Sep 17 00:00:00 2001 From: wvengen Date: Thu, 31 Jan 2013 11:03:32 +0100 Subject: [PATCH 001/182] initial English locale translation --- config/locales/en.yml | 402 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 398 insertions(+), 4 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index f265c068..0b5fd992 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,5 +1,399 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - en: - hello: "Hello world" \ No newline at end of file + orders: + state: + open: open + finished: finished + closed: closed + + home: + index: + title: Homepage + + group_orders: + messages: + not_enough_apples: + You need at least %{stop_ordering_under} apples to order. + Currently your order group has only %{apples} apples. + views: + pagination: + first: "«" + last: "»" + previous: "‹" + next: "›" + truncate: "..." + + controller: + article_categories: + destroy: + error: 'Category could not be deleted: %{message}' + date: + abbr_day_names: + - Su + - Mo + - Tu + - We + - Th + - Fr + - Sa + abbr_month_names: + - + - Jan + - Feb + - Mar + - Apr + - May + - Jun + - Jul + - Aug + - Sep + - Okt + - Nov + - Dec + day_names: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + formats: + default: ! '%d/%m/%Y' + long: ! '%e %B %Y' + short: ! '%e %b' + month_names: + - + - January + - February + - March + - April + - May + - June + - July + - August + - September + - Oktober + - November + - December + order: + - :day + - :month + - :year + datetime: + distance_in_words: + about_x_hours: + one: about one hour + other: about %{count} hours + about_x_months: + one: about one month + other: about %{count} months + about_x_years: + one: about one year + other: about %{count} years + almost_x_years: + one: almost one year + other: almost %{count} years + half_a_minute: half a minute + less_than_x_minutes: + one: less than one minute + other: less then %{count} minutes + less_than_x_seconds: + one: less than a second + other: less than %{count} seconds + over_x_years: + one: more then a year + other: more than %{count} year + x_days: + one: one day + other: ! '%{count} days' + x_minutes: + one: one minute + other: ! '%{count} minutes' + x_months: + one: one month + other: ! '%{count} months' + x_seconds: + one: eine Sekunde + other: ! '%{count} seconds' + prompts: + day: day + hour: hours + minute: minutes + month: months + second: seconds + year: years + errors: &errors + format: ! '%{attribute} %{message}' + messages: + accepted: has to be accepted + blank: has to be filled + confirmation: does not match the confirmation + empty: has to be entered + equal_to: has to be exactly %{count} + even: has to be an even number + exclusion: is not available + greater_than: has to be greater than %{count} + greater_than_or_equal_to: has to be greater than or equal to %{count} + inclusion: is not a valid value + invalid: is invalid + less_than: has to be less than %{count} + less_than_or_equal_to: has to be less than or equal to %{count} + not_a_number: is not a number + not_an_integer: must be a whole number + odd: must be odd + record_invalid: ! 'validation failed: %{errors}' + taken: is already taken + too_long: is too long (no more than %{count} characters) + too_short: is too short (use more than %{count} characters) + wrong_length: is the wrong length (has to have exactly %{count} characters) + template: + body: ! 'Please check the following fields:' + header: + one: ! 'Could not save %{model}: an error.' + other: ! 'could not save %{model}: %{count} errors.' + number: + currency: + format: + delimiter: . + format: ! '%n %u' + precision: 2 + separator: ! '.' + significant: false + strip_insignificant_zeros: false + unit: € + format: + delimiter: . + precision: 2 + separator: ! ',' + significant: false + strip_insignificant_zeros: false + human: + decimal_units: + format: ! '%n %u' + units: + billion: + one: billion + other: billions + million: million + quadrillion: + one: quadrillion + other: quadrillions + thousand: thousand + trillion: trillion + unit: '' + format: + delimiter: '' + precision: 1 + significant: true + strip_insignificant_zeros: true + storage_units: + format: ! '%n %u' + units: + byte: + one: byte + other: bytes + gb: GB + kb: KB + mb: MB + tb: TB + percentage: + format: + delimiter: '' + precision: + format: + delimiter: '' + support: + array: + last_word_connector: ! ' and ' + two_words_connector: ! ' and ' + words_connector: ! ', ' + time: + am: morning + formats: + default: ! '%A, %d %B %Y, %H:%M' + long: ! '%A, %d %B %Y, %H:%M' + short: ! '%d %B, %H:%M' + pm: afternoon + # remove these aliases after 'activemodel' and 'activerecord' namespaces are removed from Rails repository + activemodel: + errors: + <<: *errors + activerecord: + errors: + <<: *errors + has_many_left: 'is still associated with a %{collection}!' + models: + article: Article + supplier: Supplier + user: User + workgroup: Workgroup + ordergroup: Ordergroup + task: Task + message: Message + article_category: Article category + stock_article: Stock article + delivery: Delivery + stock_taking: Stock taking + financial_transaction: Financial transaction + order: Order + order_comment: Order comment + order_article: Order article + invoice: Invoice + attributes: + article: + price: price + gross_price: gross price + unit: unit + unit_quantity: unit quantity + tax: VAT + deposit: deposit + article_category: article category + stock_article: + price: Price + user: + password: Password + first_name: First name + financial_transaction: + amount: amount + note: note + + helpers: + select: + prompt: please select + submit: + create: "save %{model}" + update: "save changes" + message: + create: 'send message' + invite: + create: send invitation + + # Simple form i18n is used to build the forms + simple_form: + "yes": 'yes' + "no": 'no' + required: + text: 'required' + mark: '*' + error_notification: + default_message: "Errors were found, please review the form." + labels: + defaults: + password: 'password' + password_confirmation: 'password confirmation' + description: 'description' + title: 'title' + email: 'email' + note: 'note' + date: 'date' + ordergroup: 'order group' + amount: 'amount' + phone: "phone" + user_tokens: 'members' + price: 'price (netto)' + unit_quantity: 'unit quantity' + order_number: 'order number' + tax: 'VAT' + deposit: 'deposit' + user: + nick: "nickname" + first_name: "first name" + last_name: "last name" + workgroup: + weekly_task: 'define weekly task?' + weekday: 'day of the week' + task_name: 'name of task' + task_required_users: 'required users' + task_duration: 'task duration in hours' + task_description: 'task description' + next_weekly_tasks_number: "How many weeks in advance should tasks be created?" + role_admin: "Administration" + role_finance: "Finance" + role_suppliers: "Suppliers" + role_article_meta: "Product catalogue" + role_orders: "Order management" + ordergroup: + contact_person: "Contact person" + contact_phone: "Phone" + contact_address: "Address" + ignore_apple_restriction: "Ignore order blocking when there are too little apples" + task: + duration: 'Duration' + user_list: 'Responsible persons' + required_users: 'number' + due_date: 'Due date' + workgroup: 'Workgroup' + done: Done? + message: + sent_to_all: 'Send to all members' + recipient_tokens: 'recipients' + group_id: 'Group' + subject: 'Subject' + body: 'Body' + private: Private + page: + body: 'Body' + parent_id: Top + supplier: + address: 'Address' + phone: 'Phone' + phone2: 'Phone 2' + fax: 'Fax' + url: 'Homepage' + contact_person: 'Contact person' + customer_number: 'Customer number' + delivery_days: 'Delivery days' + order_howto: 'How to order' + note: 'Note' + min_order_quantity: 'Minimum order quantity' + article: + availability: 'Article is available?' + origin: 'Origin' + manufacturer: 'Producer' + unit: 'Unit' + note: 'Note' + article_category: 'Article category' + stock_article: + supplier: 'Supplier' + delivery: + delivered_on: 'date of delivery' + user: + nick: "username" + last_name: "last name" + order_comment: + text: comment on this order ... + order: + starts: "starts from" + ends: "ends at" + order_article: + article_id: select items from the catalogue + group_order_article: + ordergroup_id: Ordergroup + result: quantity + invoice: + supplier: supplier + number: number + date: invoice date + paid_on: paid on + deposit: deposit calculated + deposit_credit: deposit credited + order_article: + units_to_order: quantity + update_current_price: global price update + + hints: + tax: 'as percentage, standard for food is 7.0' + task: + duration: 'how long does the task take, 1-3 hours' + required_users: 'how many users in total are needed?' + supplier: + min_order_quantity: 'the minimum order quantity is displayed during the order and must be explanatory' + article: + unit: 'e.g. kg or 1L or 500g' + stock_article: + supplier: '' + message: + private: Message does not appear in the Foodsoft inbox + order_article: + units_to_order: number of delivered packages + update_current_price: also change the price for current orders From e0b781fca66a74acc4326741148a8127073857dc Mon Sep 17 00:00:00 2001 From: wvengen Date: Fri, 1 Feb 2013 17:56:34 +0100 Subject: [PATCH 002/182] split locales into directory, and load from there --- app/views/home/_start_nav.haml | 4 ++-- config/application.rb | 4 ++-- config/locales/{de.yml => de/de.defaults.yml} | 0 config/locales/{en.yml => en/en.defaults.yml} | 2 ++ config/locales/{ => en}/simple_form.en.yml | 0 5 files changed, 6 insertions(+), 4 deletions(-) rename config/locales/{de.yml => de/de.defaults.yml} (100%) rename config/locales/{en.yml => en/en.defaults.yml} (99%) rename config/locales/{ => en}/simple_form.en.yml (100%) diff --git a/app/views/home/_start_nav.haml b/app/views/home/_start_nav.haml index 2b246a51..99b15aae 100644 --- a/app/views/home/_start_nav.haml +++ b/app/views/home/_start_nav.haml @@ -1,5 +1,5 @@ .well.well-small - %h3 Direkt zu ... + %h3= t('home.start_nav.title') %ul.nav.nav-list %li.nav-header Foodcoop %li= link_to "Mitglieder", foodcoop_users_path @@ -31,4 +31,4 @@ - 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 \ No newline at end of file + %li= link_to "Neues Mitglied", new_admin_user_path diff --git a/config/application.rb b/config/application.rb index dc78763e..fcabac5d 100644 --- a/config/application.rb +++ b/config/application.rb @@ -29,8 +29,8 @@ module Foodsoft # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # config.time_zone = 'Central Time (US & Canada)' - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] + # The default locale is :en and all translations from config/locales//*.rb.yml are auto loaded. + config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')] config.i18n.default_locale = :de # Configure the default encoding used in templates for Ruby 1.9. diff --git a/config/locales/de.yml b/config/locales/de/de.defaults.yml similarity index 100% rename from config/locales/de.yml rename to config/locales/de/de.defaults.yml diff --git a/config/locales/en.yml b/config/locales/en/en.defaults.yml similarity index 99% rename from config/locales/en.yml rename to config/locales/en/en.defaults.yml index 0b5fd992..f9f830ef 100644 --- a/config/locales/en.yml +++ b/config/locales/en/en.defaults.yml @@ -8,6 +8,8 @@ en: home: index: title: Homepage + start_nav: + title: Directly to ... group_orders: messages: diff --git a/config/locales/simple_form.en.yml b/config/locales/en/simple_form.en.yml similarity index 100% rename from config/locales/simple_form.en.yml rename to config/locales/en/simple_form.en.yml From 42c97520a132bfd7d8572fc06f354b9dd5f7a3ce Mon Sep 17 00:00:00 2001 From: Manuel Wiedenmann Date: Sun, 3 Feb 2013 23:16:42 +0700 Subject: [PATCH 003/182] started with admin views --- app/views/admin/base/index.html.haml | 32 ++++++++++++++-------------- config/locales/de/de.admin.yml | 20 +++++++++++++++++ 2 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 config/locales/de/de.admin.yml diff --git a/app/views/admin/base/index.html.haml b/app/views/admin/base/index.html.haml index f41dcc3e..fbe63c09 100644 --- a/app/views/admin/base/index.html.haml +++ b/app/views/admin/base/index.html.haml @@ -1,43 +1,43 @@ -- title "Administration" +- title t '.title' %p - %i Hier kannst Du die Gruppen und Benutzerinnen der Foodsoft verwalten. + %i= t '.first_paragraph' .row-fluid .span6 %section - %h2 Neuste Benutzerinnen + %h2= t '.newest_users' %table.table.table-striped %thead %tr - %th Benutzername - %th Name - %th Erstellt am + %th= t '.username' + %th= t '.name' + %th= t '.created_at' - for user in @users %tr{:class => cycle('even','odd', :name => 'users')} %td= link_to user.nick, [:admin, user] %td=h user.name %td= format_date(user.created_on) - = link_to 'Alle Benutzerinnen', admin_users_path + = link_to t('.all_users'), admin_users_path | - = link_to "Neue Benutzerin", new_admin_user_path, class: 'btn btn-primary btn-small' + = link_to t('.new_user'), new_admin_user_path, class: 'btn btn-primary btn-small' .span6 %section - %h2 Neuste Gruppen + %h2= t '.newest_groups' %table.table.table-striped %thead %tr - %th Gruppenname - %th Typ - %th Mitglieder + %th= t '.groupname' + %th= t '.type' + %th= t '.members' - for group in @groups %tr{:class => cycle('even','odd', :name => 'groups')} %td= link_to group.name, [:admin, group] %td= group.class.model_name.human %td= group.users.size - = link_to 'Alle Bestellgruppen', admin_ordergroups_path + = link_to t('.all_ordergroups'), admin_ordergroups_path | - = link_to "Neue Bestellgruppe", new_admin_ordergroup_path, class: 'btn btn-primary btn-small' + = link_to t('.new_ordergroup'), new_admin_ordergroup_path, class: 'btn btn-primary btn-small' | - = link_to 'Alle Arbeitsgruppen', admin_workgroups_path + = link_to t('.all_workgroups'), admin_workgroups_path | - = link_to "Neue Arbeitsgruppe", new_admin_workgroup_path, class: 'btn btn-primary btn-small' + = link_to t('.new_workgroup'), new_admin_workgroup_path, class: 'btn btn-primary btn-small' diff --git a/config/locales/de/de.admin.yml b/config/locales/de/de.admin.yml new file mode 100644 index 00000000..e6b473d9 --- /dev/null +++ b/config/locales/de/de.admin.yml @@ -0,0 +1,20 @@ +de: + admin: + base: + index: + title: 'Administration' + first_paragraph: 'Hier kannst Du die Gruppen und Benutzerinnen der Foodsoft verwalten.' + newest_users: 'Neuste Benutzerinnen' + username: 'Benutzername' + name: 'Name' + created_at: 'Erstellt am' + all_users: 'Alle Benutzerinnen' + new_user: 'Neue Benutzerin' + newest_groups: 'Neuste Gruppen' + groupname: 'Gruppenname' + type: 'Typ' + members: 'Mitglieder' + all_ordergroups: 'Alle Bestellgruppen' + new_ordergroup: 'Neue Bestellgruppe' + all_workgroups: 'Alle Arbeitsgruppen' + new_workgroup: 'Neue Arbeitsgruppe' \ No newline at end of file From e949257912a24c0f48499cdff1573fd4cd2f15ec Mon Sep 17 00:00:00 2001 From: Manuel Wiedenmann Date: Mon, 4 Feb 2013 00:10:11 +0700 Subject: [PATCH 004/182] finished admin/ordergroups i18n --- app/views/admin/ordergroups/_form.html.haml | 7 +- .../admin/ordergroups/_ordergroups.html.haml | 14 +- app/views/admin/ordergroups/edit.html.haml | 4 +- app/views/admin/ordergroups/index.html.haml | 20 +-- app/views/admin/ordergroups/new.html.haml | 2 +- app/views/admin/ordergroups/show.html.haml | 8 +- config/locales/de/de.admin.yml | 34 ++++- config/locales/de/de.defaults.yml | 132 +----------------- config/locales/de/de.simple_form.yml | 130 +++++++++++++++++ 9 files changed, 185 insertions(+), 166 deletions(-) create mode 100644 config/locales/de/de.simple_form.yml diff --git a/app/views/admin/ordergroups/_form.html.haml b/app/views/admin/ordergroups/_form.html.haml index 9d0ca635..b292c728 100644 --- a/app/views/admin/ordergroups/_form.html.haml +++ b/app/views/admin/ordergroups/_form.html.haml @@ -1,8 +1,5 @@ - unless @ordergroup.new_record? - %p - Neue Mitglieder kannst du - = link_to "hier", new_invite_path(id: @ordergroup.id), remote: true - einladen. + %p= t('.first_paragraph', url: link_to(t('.here'), new_invite_path(id: @ordergroup.id), remote: true)).html_safe = simple_form_for [:admin, @ordergroup] do |f| = render :layout => 'shared/group_form_fields', :locals => {:f => f} do = f.input :contact_person @@ -11,4 +8,4 @@ = f.input :ignore_apple_restriction .form-actions = f.button :submit - = link_to "oder abbrechen", :back + = link_to t('.or_cancel'), :back diff --git a/app/views/admin/ordergroups/_ordergroups.html.haml b/app/views/admin/ordergroups/_ordergroups.html.haml index 696e0f92..bcc23329 100644 --- a/app/views/admin/ordergroups/_ordergroups.html.haml +++ b/app/views/admin/ordergroups/_ordergroups.html.haml @@ -4,11 +4,11 @@ %table.table.table-striped %thead %tr - %th Name - %th Kontakt - %th Adresse - %th Mitglieder - %th Aktionen + %th= t '.name' + %th= t '.contact' + %th= t '.address' + %th= t '.members' + %th= t '.actions' %tbody - for ordergroup in @ordergroups %tr{:class => cycle('even','odd', :name => 'groups')} @@ -17,6 +17,6 @@ %td= link_to_gmaps ordergroup.contact_address %td= ordergroup.users.size %td - = link_to "Bearbeiten", edit_admin_ordergroup_path(ordergroup), class: 'btn btn-mini' - = link_to "Löschen", [:admin, ordergroup], :confirm => "Willst du #{ordergroup.name} wirklich löschen?", + = link_to t('.edit'), edit_admin_ordergroup_path(ordergroup), class: 'btn btn-mini' + = link_to t('.delete'), [:admin, ordergroup], :confirm => t('.confirm', name: ordergroup.name), :method => :delete, class: 'btn btn-mini btn-danger' \ No newline at end of file diff --git a/app/views/admin/ordergroups/edit.html.haml b/app/views/admin/ordergroups/edit.html.haml index 339f43a2..438cf78d 100644 --- a/app/views/admin/ordergroups/edit.html.haml +++ b/app/views/admin/ordergroups/edit.html.haml @@ -1,3 +1,3 @@ -- title "Bestellgruppe bearbeiten" +- title t '.title' -= render :partial => 'form' \ No newline at end of file += render 'form' \ No newline at end of file diff --git a/app/views/admin/ordergroups/index.html.haml b/app/views/admin/ordergroups/index.html.haml index 4b37102c..11ca7cc3 100644 --- a/app/views/admin/ordergroups/index.html.haml +++ b/app/views/admin/ordergroups/index.html.haml @@ -1,25 +1,15 @@ -- title "Bestellgruppen" +- title t('.title') - content_for :actionbar do - = link_to "Neue Bestellgruppe anlegen", new_admin_ordergroup_path, class: 'btn btn-primary' + = link_to t('.new_ordergroup'), new_admin_ordergroup_path, class: 'btn btn-primary' - content_for :sidebar do - %p - Hier kannst du - = link_to 'neue Bestellgruppen', new_admin_ordergroup_path - anlegen, Gruppen bearbeiten und löschen. - %p - Beachte dabei den Unterschied zwischen Gruppe und Bestellgruppe: - Eine Bestellgruppe hat ein Konto und kann Essen bestellen. In einer - %em= link_to 'Arbeitsgruppe', admin_workgroups_path - (z.b. 'Soritiergruppe') - koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten. - Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören. - + %p= t('.first_paragraph', url: link_to(t('.new_ordergroups'), new_admin_ordergroup_path)).html_safe + %p= t('.second_paragraph', url: link_to(t('.workgroup'), admin_workgroups_path)).html_safe .well.well-small = form_tag admin_ordergroups_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: 'Name ...' + placeholder: t('.search_placeholder') #ordergroups = render "ordergroups" \ No newline at end of file diff --git a/app/views/admin/ordergroups/new.html.haml b/app/views/admin/ordergroups/new.html.haml index 1ee8679b..438cf78d 100644 --- a/app/views/admin/ordergroups/new.html.haml +++ b/app/views/admin/ordergroups/new.html.haml @@ -1,3 +1,3 @@ -- title "Bestellgruppe anlegen" +- title t '.title' = render 'form' \ No newline at end of file diff --git a/app/views/admin/ordergroups/show.html.haml b/app/views/admin/ordergroups/show.html.haml index 3d6dfa26..b6b96b84 100644 --- a/app/views/admin/ordergroups/show.html.haml +++ b/app/views/admin/ordergroups/show.html.haml @@ -1,6 +1,6 @@ -- title "Bestellgruppe #{@ordergroup.name}" +- title t '.title', name: @ordergroup.name %section= render 'shared/group', group: @ordergroup -= link_to 'Gruppe/Mitglieder bearbeiten', edit_admin_ordergroup_path(@ordergroup), class: 'btn' -= link_to 'Löschen', [:admin, @ordergroup], :confirm => 'Bist Du sicher?', :method => :delete, class: 'btn btn-danger' -= link_to 'Nachricht senden', new_message_path(:message => {:group_id => @ordergroup.id}), class: 'btn' += link_to t('.edit'), edit_admin_ordergroup_path(@ordergroup), class: 'btn' += link_to t('.delete'), [:admin, @ordergroup], :confirm => t('.confirm'), :method => :delete, class: 'btn btn-danger' += link_to t('.send_message'), new_message_path(:message => {:group_id => @ordergroup.id}), class: 'btn' diff --git a/config/locales/de/de.admin.yml b/config/locales/de/de.admin.yml index e6b473d9..55c3033c 100644 --- a/config/locales/de/de.admin.yml +++ b/config/locales/de/de.admin.yml @@ -17,4 +17,36 @@ de: all_ordergroups: 'Alle Bestellgruppen' new_ordergroup: 'Neue Bestellgruppe' all_workgroups: 'Alle Arbeitsgruppen' - new_workgroup: 'Neue Arbeitsgruppe' \ No newline at end of file + new_workgroup: 'Neue Arbeitsgruppe' + ordergroups: + index: + title: 'Bestellgruppen' + new_ordergroup: 'Neue Bestellgruppe anlegen' + first_paragraph: 'Hier kannst du %{url} anlegen, Gruppen bearbeiten und löschen.' + new_ordergroups: 'neue Bestellgruppen' + second_paragraph: "Beachte dabei den Unterschied zwischen Gruppe und Bestellgruppe: Eine Bestellgruppe hat ein Konto und kann Essen bestellen. In einer %{url} (z.b. 'Soritiergruppe') koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten. Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören." + workgroup: 'Arbeitsgruppe' + search_placeholder: 'Name ...' + edit: + title: 'Bestellgruppe bearbeiten' + new: + title: 'Bestellgruppe anlegen' + form: + first_paragraph: 'Neue Mitglieder kannst du %{url} einladen.' + here: 'hier' + or_cancel: 'oder abbrechen' + show: + title: 'Bestellgruppe %{name}' + edit: 'Gruppe/Mitglieder bearbeiten' + delete: 'Löschen' + confirm: 'Bist Du sicher?' + send_message: 'Nachricht senden' + ordergroups: + name: 'Name' + contact: 'Kontakt' + address: 'Adresse' + members: 'Mitglieder' + actions: 'Aktionen' + edit: 'Bearbeiten' + delete: 'Löschen' + confirm: 'Willst du %{name} wirklich löschen?' \ No newline at end of file diff --git a/config/locales/de/de.defaults.yml b/config/locales/de/de.defaults.yml index 213c3c97..02114109 100644 --- a/config/locales/de/de.defaults.yml +++ b/config/locales/de/de.defaults.yml @@ -266,134 +266,4 @@ de: message: create: 'Nachricht verschicken' invite: - create: Einladung verschicken - - # Simple form i18n is used to build the forms - simple_form: - "yes": 'Ja' - "no": 'Nein' - required: - text: 'benötigt' - mark: '*' - error_notification: - default_message: "Fehler wurden gefunden. Bitte das Formular überprüfen." - labels: - defaults: - password: 'Passwort' - password_confirmation: 'Passwort wiederholen' - description: 'Beschreibung' - title: 'Titel' - email: 'E-Mail' - note: 'Notiz' - date: 'Datum' - ordergroup: 'Bestellgruppe' - amount: 'Betrag' - phone: "Telefon" - user_tokens: 'Mitglieder' - price: 'Preis (netto)' - unit_quantity: 'Gebindegröße' - order_number: 'Bestellnummer' - tax: 'MwSt' - deposit: 'Pfand' - user: - nick: "Benutzerinnenname" - first_name: "Vorname" - last_name: "Nachname" - workgroup: - weekly_task: 'Monatlichen Job definieren?' - weekday: 'Wochentag' - task_name: 'Name für Job' - task_required_users: 'Benötige Verantwortliche' - task_duration: 'Vor. Dauer in Stunden' - task_description: 'Beschreibung' - next_weekly_tasks_number: "Für wieviel Wochen im Voraus sollen Aufgaben erstellt werden?" - role_admin: "Administration" - role_finance: "Fianzen" - role_suppliers: "Lieferanten" - role_article_meta: "Artikeldatenbank" - role_orders: "Bestellverwaltung" - ordergroup: - contact_person: "Kontaktperson" - contact_phone: "Telefon" - contact_address: "Adresse" - ignore_apple_restriction: "Bestellstop bei zu wenig Äpfeln ignorieren" - task: - duration: 'Dauer' - user_list: 'Verantwortliche' - required_users: 'Anzahl' - due_date: 'Wann erledigen?' - workgroup: 'Arbeitsgruppe' - done: Erledigt? - message: - sent_to_all: 'An alle Mitglieder schicken' - recipient_tokens: 'Empfänger_innen' - group_id: 'Gruppe' - subject: 'Betreff' - body: 'Inhalt' - private: Privat - page: - body: 'Inhalt' - parent_id: Oberseite - supplier: - address: 'Adresse' - phone: 'Telefon' - phone2: 'Telefon 2' - fax: 'FAX' - url: 'Homepage' - contact_person: 'Ansprechparter_in' - customer_number: 'Kundennummer' - delivery_days: 'Liefertage' - order_howto: 'Howto Bestellen' - note: 'Notiz' - min_order_quantity: 'Mindestbestellmenge' - article: - availability: 'Artikel ist verfügbar?' - origin: 'Herkunft' - manufacturer: 'Produzent' - unit: 'Einheit' - note: 'Notiz' - article_category: 'Kategorie' - stock_article: - supplier: 'Lieferant' - delivery: - delivered_on: 'Lieferdatum' - user: - nick: "Benutzername" - last_name: "Nachname" - order_comment: - text: Kommentiere diese Bestellung ... - order: - starts: "Läuft vom" - ends: "Endet am" - order_article: - article_id: Artikel aus dem Katalog wählen - group_order_article: - ordergroup_id: Bestellgruppe - result: Menge - invoice: - supplier: Lieferant - number: Nummer - date: Rechnungsdatum - paid_on: Bezahlt am - deposit: Pfand berechnet - deposit_credit: Pfand gutgeschrieben - order_article: - units_to_order: Menge - update_current_price: Globalen Preis aktualisieren - - hints: - tax: 'In Prozent, Standard sind 7,0' - task: - duration: 'Wie lange dauert die Aufgabe, 1-3 Stunden' - required_users: 'Wieviel Benutzerinnen werden insgesamt benötigt?' - supplier: - min_order_quantity: 'Die Mindestbestellmenge wird während der Bestellung angezeigt und soll motivieren' - article: - unit: 'z.B. KG oder 1L oder 500g' - stock_article: - supplier: '' - message: - private: Nachricht erscheint nicht im Foodsoft Posteingang - order_article: - units_to_order: Anzahl gelieferter Gebinde - update_current_price: Ändert auch den Preis für aktuelle Bestellungen + create: Einladung verschicken \ No newline at end of file diff --git a/config/locales/de/de.simple_form.yml b/config/locales/de/de.simple_form.yml new file mode 100644 index 00000000..5ef3150c --- /dev/null +++ b/config/locales/de/de.simple_form.yml @@ -0,0 +1,130 @@ +de: + # Simple form i18n is used to build the forms + simple_form: + "yes": 'Ja' + "no": 'Nein' + required: + text: 'benötigt' + mark: '*' + error_notification: + default_message: "Fehler wurden gefunden. Bitte das Formular überprüfen." + labels: + defaults: + password: 'Passwort' + password_confirmation: 'Passwort wiederholen' + description: 'Beschreibung' + title: 'Titel' + email: 'E-Mail' + note: 'Notiz' + date: 'Datum' + ordergroup: 'Bestellgruppe' + amount: 'Betrag' + phone: "Telefon" + user_tokens: 'Mitglieder' + price: 'Preis (netto)' + unit_quantity: 'Gebindegröße' + order_number: 'Bestellnummer' + tax: 'MwSt' + deposit: 'Pfand' + user: + nick: "Benutzerinnenname" + first_name: "Vorname" + last_name: "Nachname" + workgroup: + weekly_task: 'Monatlichen Job definieren?' + weekday: 'Wochentag' + task_name: 'Name für Job' + task_required_users: 'Benötige Verantwortliche' + task_duration: 'Vor. Dauer in Stunden' + task_description: 'Beschreibung' + next_weekly_tasks_number: "Für wieviel Wochen im Voraus sollen Aufgaben erstellt werden?" + role_admin: "Administration" + role_finance: "Fianzen" + role_suppliers: "Lieferanten" + role_article_meta: "Artikeldatenbank" + role_orders: "Bestellverwaltung" + ordergroup: + contact_person: "Kontaktperson" + contact_phone: "Telefon" + contact_address: "Adresse" + ignore_apple_restriction: "Bestellstop bei zu wenig Äpfeln ignorieren" + task: + duration: 'Dauer' + user_list: 'Verantwortliche' + required_users: 'Anzahl' + due_date: 'Wann erledigen?' + workgroup: 'Arbeitsgruppe' + done: Erledigt? + message: + sent_to_all: 'An alle Mitglieder schicken' + recipient_tokens: 'Empfänger_innen' + group_id: 'Gruppe' + subject: 'Betreff' + body: 'Inhalt' + private: Privat + page: + body: 'Inhalt' + parent_id: Oberseite + supplier: + address: 'Adresse' + phone: 'Telefon' + phone2: 'Telefon 2' + fax: 'FAX' + url: 'Homepage' + contact_person: 'Ansprechparter_in' + customer_number: 'Kundennummer' + delivery_days: 'Liefertage' + order_howto: 'Howto Bestellen' + note: 'Notiz' + min_order_quantity: 'Mindestbestellmenge' + article: + availability: 'Artikel ist verfügbar?' + origin: 'Herkunft' + manufacturer: 'Produzent' + unit: 'Einheit' + note: 'Notiz' + article_category: 'Kategorie' + stock_article: + supplier: 'Lieferant' + delivery: + delivered_on: 'Lieferdatum' + user: + nick: "Benutzername" + last_name: "Nachname" + order_comment: + text: Kommentiere diese Bestellung ... + order: + starts: "Läuft vom" + ends: "Endet am" + order_article: + article_id: Artikel aus dem Katalog wählen + group_order_article: + ordergroup_id: Bestellgruppe + result: Menge + invoice: + supplier: Lieferant + number: Nummer + date: Rechnungsdatum + paid_on: Bezahlt am + deposit: Pfand berechnet + deposit_credit: Pfand gutgeschrieben + order_article: + units_to_order: Menge + update_current_price: Globalen Preis aktualisieren + + hints: + tax: 'In Prozent, Standard sind 7,0' + task: + duration: 'Wie lange dauert die Aufgabe, 1-3 Stunden' + required_users: 'Wieviel Benutzerinnen werden insgesamt benötigt?' + supplier: + min_order_quantity: 'Die Mindestbestellmenge wird während der Bestellung angezeigt und soll motivieren' + article: + unit: 'z.B. KG oder 1L oder 500g' + stock_article: + supplier: '' + message: + private: Nachricht erscheint nicht im Foodsoft Posteingang + order_article: + units_to_order: Anzahl gelieferter Gebinde + update_current_price: Ändert auch den Preis für aktuelle Bestellungen From 75c9338fd97ebd962d67ef2d5f1219729b73ddf8 Mon Sep 17 00:00:00 2001 From: Manuel Wiedenmann Date: Mon, 4 Feb 2013 00:36:03 +0700 Subject: [PATCH 005/182] finished admin/workgroups i18n --- app/views/admin/workgroups/_form.html.haml | 7 ++--- .../admin/workgroups/_workgroups.html.haml | 12 ++++---- app/views/admin/workgroups/edit.html.haml | 2 +- app/views/admin/workgroups/index.html.haml | 19 ++++-------- app/views/admin/workgroups/new.html.haml | 2 +- app/views/admin/workgroups/show.html.haml | 8 ++--- config/locales/de/de.admin.yml | 30 +++++++++++++++++++ 7 files changed, 49 insertions(+), 31 deletions(-) diff --git a/app/views/admin/workgroups/_form.html.haml b/app/views/admin/workgroups/_form.html.haml index 12329a3b..2925136a 100644 --- a/app/views/admin/workgroups/_form.html.haml +++ b/app/views/admin/workgroups/_form.html.haml @@ -1,7 +1,4 @@ -%p - Neue Mitglieder kannst du - = link_to "hier", new_invite_path(id: @workgroup.id) - einladen. +%p= t('.first_paragraph', url: link_to(t('.here'), new_invite_path(id: @workgroup.id), remote: true)).html_safe = simple_form_for [:admin, @workgroup] do |f| = render :layout => 'shared/group_form_fields', :locals => {:f => f} do %h4 Zugriff auf @@ -12,4 +9,4 @@ = f.input :role_orders .form-actions = f.button :submit - = link_to "oder abbrechen", :back + = link_to t('.or_cancel'), :back diff --git a/app/views/admin/workgroups/_workgroups.html.haml b/app/views/admin/workgroups/_workgroups.html.haml index 1e04d49c..f5dadfc4 100644 --- a/app/views/admin/workgroups/_workgroups.html.haml +++ b/app/views/admin/workgroups/_workgroups.html.haml @@ -4,10 +4,10 @@ %table.table.table-striped %thead %tr - %th Name - %th Mitglieder - %th Zugriff auf - %th Aktionen + %th= t '.name' + %th= t '.members' + %th= t '.access_to' + %th= t '.actions' %tbody - for workgroup in @workgroups %tr @@ -15,6 +15,6 @@ %td= workgroup.users.size %td= format_roles(workgroup) %td - = link_to "Bearbeiten", edit_admin_workgroup_path(workgroup), class: 'btn btn-mini' - = link_to "Löschen", [:admin, workgroup], :confirm => 'Willst du ' + workgroup.name + ' wirklich löschen?', + = link_to t('.edit'), edit_admin_workgroup_path(workgroup), class: 'btn btn-mini' + = link_to t('.delete'), [:admin, workgroup], :confirm => t('.confirm', name: workgroup.name), :method => :delete, class: 'btn btn-mini btn-danger' diff --git a/app/views/admin/workgroups/edit.html.haml b/app/views/admin/workgroups/edit.html.haml index d6632674..438cf78d 100644 --- a/app/views/admin/workgroups/edit.html.haml +++ b/app/views/admin/workgroups/edit.html.haml @@ -1,3 +1,3 @@ -- title "Arbeitsgruppe bearbeiten" +- title t '.title' = render 'form' \ No newline at end of file diff --git a/app/views/admin/workgroups/index.html.haml b/app/views/admin/workgroups/index.html.haml index ba634654..68abbf4e 100644 --- a/app/views/admin/workgroups/index.html.haml +++ b/app/views/admin/workgroups/index.html.haml @@ -1,24 +1,15 @@ -- title "Arbeitsgruppen" +- title t '.title' - content_for :actionbar do - = link_to "Neue Arbeitsgruppe anlegen", new_admin_workgroup_path, class: 'btn btn-primary' + = link_to t('.new_workgroup'), new_admin_workgroup_path, class: 'btn btn-primary' - content_for :sidebar do - %p - Hier kannst du - = link_to 'neue Arbeitsgruppen', new_admin_workgroup_path - anlegen, Gruppen bearbeiten und löschen. - %p - Beachte dabei den Unterschied zwischen Gruppe und Bestellgruppe: - Eine #{link_to 'Bestellgruppe', '/admin/ordergroups'} - hat ein Konto und kann Essen bestellen. In einer Arbeitsgruppe (z.b. 'Soritiergruppe') - koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten. - Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören. - + %p= t('.first_paragraph', url: link_to(t('.new_workgroups'), new_admin_workgroup_path)).html_safe + %p= t('.second_paragraph', url: link_to(t('.ordergroup'), admin_ordergroups_path)).html_safe .well.well-small = form_tag admin_workgroups_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: 'Name ...' + placeholder: t('.search_placeholder') #workgroups = render "workgroups" \ No newline at end of file diff --git a/app/views/admin/workgroups/new.html.haml b/app/views/admin/workgroups/new.html.haml index bf11697d..438cf78d 100644 --- a/app/views/admin/workgroups/new.html.haml +++ b/app/views/admin/workgroups/new.html.haml @@ -1,3 +1,3 @@ -- title "Arbeitsgruppe anlegen" +- title t '.title' = render 'form' \ No newline at end of file diff --git a/app/views/admin/workgroups/show.html.haml b/app/views/admin/workgroups/show.html.haml index b739ca27..88085d5d 100644 --- a/app/views/admin/workgroups/show.html.haml +++ b/app/views/admin/workgroups/show.html.haml @@ -1,6 +1,6 @@ -- title "Arbeitsgruppe #{@workgroup.name}" +- title t '.title', name: @workgroup.name -%section= render :partial => 'shared/group', :locals => { :group => @workgroup } -= link_to 'Gruppe/Mitglieder bearbeiten', edit_admin_workgroup_path(@workgroup), class: 'btn' -= link_to 'Löschen', [:admin, @workgroup], :confirm => 'Bist Du sicher?', :method => :delete, class: 'btn btn-danger' +%section= render 'shared/group', group: @workgroup += link_to t('.edit'), edit_admin_workgroup_path(@workgroup), class: 'btn' += link_to t('.delete'), [:admin, @workgroup], :confirm => t('.confirm'), :method => :delete, class: 'btn btn-danger' = link_to_new_message(message_params: {group_id: @workgroup.id}) \ No newline at end of file diff --git a/config/locales/de/de.admin.yml b/config/locales/de/de.admin.yml index 55c3033c..cfca6a56 100644 --- a/config/locales/de/de.admin.yml +++ b/config/locales/de/de.admin.yml @@ -49,4 +49,34 @@ de: actions: 'Aktionen' edit: 'Bearbeiten' delete: 'Löschen' + confirm: 'Willst du %{name} wirklich löschen?' + workgroups: + index: + title: 'Arbeitsgruppen' + new_workgroup: 'Neue Arbeitsgruppe anlegen' + first_paragraph: 'Hier kannst du %{url} anlegen, Gruppen bearbeiten und löschen.' + new_workgroups: 'neue Arbeitsgruppen' + second_paragraph: "Beachte dabei den Unterschied zwischen Gruppe und Bestellgruppe: Eine %{url} hat ein Konto und kann Essen bestellen. In einer Arbeitsgruppe (z.b. 'Soritiergruppe') koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten. Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören." + ordergroup: 'Bestellgruppe' + search_placeholder: 'Name ...' + edit: + title: 'Arbeitsgruppe bearbeiten' + new: + title: 'Arbeitsgruppe anlegen' + form: + first_paragraph: 'Neue Mitglieder kannst du %{url} einladen.' + here: 'hier' + or_cancel: 'oder abbrechen' + show: + title: 'Arbeitsgruppe %{name}' + edit: 'Gruppe/Mitglieder bearbeiten' + delete: 'Löschen' + confirm: 'Bist Du sicher?' + workgroups: + name: 'Name' + members: 'Mitglieder' + access_to: 'Zugriff auf' + actions: 'Aktionen' + edit: 'Bearbeiten' + delete: 'Löschen' confirm: 'Willst du %{name} wirklich löschen?' \ No newline at end of file From 64b3d7e17db1680264ec149f6e9931eb0c5bb54c Mon Sep 17 00:00:00 2001 From: Manuel Wiedenmann Date: Mon, 4 Feb 2013 01:38:18 +0700 Subject: [PATCH 006/182] finished admin/users i18n + dry the admin i18n --- app/views/admin/ordergroups/_form.html.haml | 2 +- .../admin/ordergroups/_ordergroups.html.haml | 6 +-- app/views/admin/ordergroups/index.html.haml | 2 +- app/views/admin/users/_form.html.haml | 4 +- app/views/admin/users/_users.html.haml | 16 +++--- app/views/admin/users/edit.html.haml | 2 +- app/views/admin/users/index.html.haml | 10 ++-- app/views/admin/users/new.html.haml | 2 +- app/views/admin/users/show.html.haml | 26 +++++----- app/views/admin/workgroups/_form.html.haml | 4 +- .../admin/workgroups/_workgroups.html.haml | 8 +-- app/views/admin/workgroups/index.html.haml | 2 +- config/locales/de/de.admin.yml | 50 ++++++++++++++----- 13 files changed, 78 insertions(+), 56 deletions(-) diff --git a/app/views/admin/ordergroups/_form.html.haml b/app/views/admin/ordergroups/_form.html.haml index b292c728..a7037d72 100644 --- a/app/views/admin/ordergroups/_form.html.haml +++ b/app/views/admin/ordergroups/_form.html.haml @@ -8,4 +8,4 @@ = f.input :ignore_apple_restriction .form-actions = f.button :submit - = link_to t('.or_cancel'), :back + = link_to t('admin.or_cancel'), :back diff --git a/app/views/admin/ordergroups/_ordergroups.html.haml b/app/views/admin/ordergroups/_ordergroups.html.haml index bcc23329..82b72ab4 100644 --- a/app/views/admin/ordergroups/_ordergroups.html.haml +++ b/app/views/admin/ordergroups/_ordergroups.html.haml @@ -8,7 +8,7 @@ %th= t '.contact' %th= t '.address' %th= t '.members' - %th= t '.actions' + %th= t 'admin.actions' %tbody - for ordergroup in @ordergroups %tr{:class => cycle('even','odd', :name => 'groups')} @@ -17,6 +17,6 @@ %td= link_to_gmaps ordergroup.contact_address %td= ordergroup.users.size %td - = link_to t('.edit'), edit_admin_ordergroup_path(ordergroup), class: 'btn btn-mini' - = link_to t('.delete'), [:admin, ordergroup], :confirm => t('.confirm', name: ordergroup.name), + = link_to t('admin.edit'), edit_admin_ordergroup_path(ordergroup), class: 'btn btn-mini' + = link_to t('admin.delete'), [:admin, ordergroup], :confirm => t('admin.confirm', name: ordergroup.name), :method => :delete, class: 'btn btn-mini btn-danger' \ No newline at end of file diff --git a/app/views/admin/ordergroups/index.html.haml b/app/views/admin/ordergroups/index.html.haml index 11ca7cc3..f3c2133d 100644 --- a/app/views/admin/ordergroups/index.html.haml +++ b/app/views/admin/ordergroups/index.html.haml @@ -10,6 +10,6 @@ = form_tag admin_ordergroups_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: t('.search_placeholder') + placeholder: t('admin.search_placeholder') #ordergroups = render "ordergroups" \ No newline at end of file diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 1b8ed55c..c9c28f43 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -1,5 +1,5 @@ = simple_form_for([:admin, @user]) do |f| - = render :partial => 'shared/user_form_fields', :locals => {:f => f} + = render 'shared/user_form_fields', f: f .form-actions = f.submit - = link_to 'oder abbrechen', :back + = link_to t('admin.or_cancel'), :back diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml index 6e3a63c1..578423ac 100644 --- a/app/views/admin/users/_users.html.haml +++ b/app/views/admin/users/_users.html.haml @@ -4,12 +4,12 @@ %table.table.table-striped %thead %tr - %th Login - %th Name - %th Email - %th Zugriff auf - %th Letzter login - %th(colspan="2") Aktionen + %th= t '.login' + %th= t '.name' + %th= t '.email' + %th= t 'admin.access_to' + %th= t '.last_login' + %th(colspan="2")= t 'admin.actions' %tbody - for user in @users %tr @@ -18,6 +18,6 @@ %td= user.email %td= format_roles(user) %td= format_time(user.last_login) - %td= link_to 'Bearbeiten', edit_admin_user_path(user), class: 'btn btn-mini' - %td= link_to 'Löschen', [:admin, user], :confirm => "Willst du #{user.name} wirklich löschen?", + %td= link_to t('admin.edit'), edit_admin_user_path(user), class: 'btn btn-mini' + %td= link_to t('admin.delete'), [:admin, user], :confirm => t('admin.confirm', name: user.name), :method => :delete, class: 'btn btn-danger btn-mini' diff --git a/app/views/admin/users/edit.html.haml b/app/views/admin/users/edit.html.haml index 1a16569a..7724f1b7 100644 --- a/app/views/admin/users/edit.html.haml +++ b/app/views/admin/users/edit.html.haml @@ -1,3 +1,3 @@ -- title "Benutzerin bearbeiten" +- title t '.title' = render 'form' diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 207c5de6..d9a6805e 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -1,18 +1,16 @@ -- title "Admin/Benutzerinnen" +- title t '.title' - content_for :actionbar do - = link_to 'Neue Benutzerin anlegen', new_admin_user_path, class: 'btn btn-primary' + = link_to t('.new_user'), new_admin_user_path, class: 'btn btn-primary' - content_for :sidebar do - %p - Hier kannst du Benutzer_innen #{link_to 'neu Anlegen', new_admin_user_path}, - bearbeiten und natürlich auch löschen. + %p= t('.first_paragraph', url: link_to(t('.new_users'), new_admin_user_path)).html_safe .well.well-small = form_tag admin_users_path, :method => :get, :remote => true, 'data-submit-onchange' => true, class: 'form-search' do = text_field_tag :user_name, params[:user_name], class: 'input-medium search-query', - placeholder: 'Name ...' + placeholder: t('admin.search_placeholder') #users = render "users" \ No newline at end of file diff --git a/app/views/admin/users/new.html.haml b/app/views/admin/users/new.html.haml index 9a83b451..438cf78d 100644 --- a/app/views/admin/users/new.html.haml +++ b/app/views/admin/users/new.html.haml @@ -1,3 +1,3 @@ -- title "Neue Benutzerin anlegen" +- title t '.title' = render 'form' \ No newline at end of file diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 0e1ee9c4..0992f338 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -3,37 +3,37 @@ .row-fluid .span3 .well - %h4 Person - %p Mitglied seit #{distance_of_time_in_words(Time.now, @user.created_on)} + %h4= t '.person' + %p= t '.member_since', time: distance_of_time_in_words(Time.now, @user.created_on) %dl - %dt Nick + %dt= t '.nick' %dd= @user.nick - %dt Name + %dt= t '.name' %dd= h @user.name - %dt Email + %dt= t '.email' %dd= @user.email - %dt Telefon + %dt= t '.phone' %dd= @user.phone - %dt Zugriff auf + %dt= t 'admin.access_to' %dd= format_roles(@user) .span5 .well - %h4 Einstellungen + %h4= t '.preference' %table.table - for setting in User::setting_keys.keys %tr %td= User::setting_keys[setting] - %td= @user.settings[setting] == '1' ? 'ja' : 'nein' + %td= @user.settings[setting] == '1' ? t('simple_form.yes') : t('simple_form.no') .span3 .well - %h4 Gruppenabos + %h4= t '.groupabos' %ul.unstyled - for membership in Membership.find_all_by_user_id(@user.id) %li= link_to(membership.group.name, [:admin, membership.group]) %hr/ %p - = link_to 'Bearbeiten', edit_admin_user_path(@user), class: 'btn' - = link_to 'Löschen', [:admin, @user], :confirm => "Willst du #{@user.first_name} wirklich rausschmeißen?", + = link_to t('admin.edit'), edit_admin_user_path(@user), class: 'btn' + = link_to t('admin.delete'), [:admin, @user], :confirm => t('.confirm', user: @user.first_name), :method => :delete, class: 'btn btn-danger' - = link_to "Nachricht senden", new_message_path(:message => {:mail_to => @user.id}), class: 'btn' + = link_to t('.send_message'), new_message_path(:message => {:mail_to => @user.id}), class: 'btn' diff --git a/app/views/admin/workgroups/_form.html.haml b/app/views/admin/workgroups/_form.html.haml index 2925136a..fcfea69a 100644 --- a/app/views/admin/workgroups/_form.html.haml +++ b/app/views/admin/workgroups/_form.html.haml @@ -1,7 +1,7 @@ %p= t('.first_paragraph', url: link_to(t('.here'), new_invite_path(id: @workgroup.id), remote: true)).html_safe = simple_form_for [:admin, @workgroup] do |f| = render :layout => 'shared/group_form_fields', :locals => {:f => f} do - %h4 Zugriff auf + %h4= t 'admin.access_to' = f.input :role_admin = f.input :role_finance = f.input :role_suppliers @@ -9,4 +9,4 @@ = f.input :role_orders .form-actions = f.button :submit - = link_to t('.or_cancel'), :back + = link_to t('admin.or_cancel'), :back diff --git a/app/views/admin/workgroups/_workgroups.html.haml b/app/views/admin/workgroups/_workgroups.html.haml index f5dadfc4..2aa42a5e 100644 --- a/app/views/admin/workgroups/_workgroups.html.haml +++ b/app/views/admin/workgroups/_workgroups.html.haml @@ -6,8 +6,8 @@ %tr %th= t '.name' %th= t '.members' - %th= t '.access_to' - %th= t '.actions' + %th= t 'admin.access_to' + %th= t 'admin.actions' %tbody - for workgroup in @workgroups %tr @@ -15,6 +15,6 @@ %td= workgroup.users.size %td= format_roles(workgroup) %td - = link_to t('.edit'), edit_admin_workgroup_path(workgroup), class: 'btn btn-mini' - = link_to t('.delete'), [:admin, workgroup], :confirm => t('.confirm', name: workgroup.name), + = link_to t('admin.edit'), edit_admin_workgroup_path(workgroup), class: 'btn btn-mini' + = link_to t('admin.delete'), [:admin, workgroup], :confirm => t('admin.confirm', name: workgroup.name), :method => :delete, class: 'btn btn-mini btn-danger' diff --git a/app/views/admin/workgroups/index.html.haml b/app/views/admin/workgroups/index.html.haml index 68abbf4e..80a27d6c 100644 --- a/app/views/admin/workgroups/index.html.haml +++ b/app/views/admin/workgroups/index.html.haml @@ -10,6 +10,6 @@ = form_tag admin_workgroups_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: t('.search_placeholder') + placeholder: t('admin.search_placeholder') #workgroups = render "workgroups" \ No newline at end of file diff --git a/config/locales/de/de.admin.yml b/config/locales/de/de.admin.yml index cfca6a56..22519841 100644 --- a/config/locales/de/de.admin.yml +++ b/config/locales/de/de.admin.yml @@ -1,5 +1,12 @@ de: admin: + edit: 'Bearbeiten' + delete: 'Löschen' + confirm: 'Willst du %{name} wirklich löschen?' + actions: 'Aktionen' + access_to: 'Zugriff auf' + or_cancel: 'oder abbrechen' + search_placeholder: 'Name ...' base: index: title: 'Administration' @@ -26,7 +33,6 @@ de: new_ordergroups: 'neue Bestellgruppen' second_paragraph: "Beachte dabei den Unterschied zwischen Gruppe und Bestellgruppe: Eine Bestellgruppe hat ein Konto und kann Essen bestellen. In einer %{url} (z.b. 'Soritiergruppe') koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten. Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören." workgroup: 'Arbeitsgruppe' - search_placeholder: 'Name ...' edit: title: 'Bestellgruppe bearbeiten' new: @@ -34,7 +40,6 @@ de: form: first_paragraph: 'Neue Mitglieder kannst du %{url} einladen.' here: 'hier' - or_cancel: 'oder abbrechen' show: title: 'Bestellgruppe %{name}' edit: 'Gruppe/Mitglieder bearbeiten' @@ -46,10 +51,6 @@ de: contact: 'Kontakt' address: 'Adresse' members: 'Mitglieder' - actions: 'Aktionen' - edit: 'Bearbeiten' - delete: 'Löschen' - confirm: 'Willst du %{name} wirklich löschen?' workgroups: index: title: 'Arbeitsgruppen' @@ -58,7 +59,6 @@ de: new_workgroups: 'neue Arbeitsgruppen' second_paragraph: "Beachte dabei den Unterschied zwischen Gruppe und Bestellgruppe: Eine %{url} hat ein Konto und kann Essen bestellen. In einer Arbeitsgruppe (z.b. 'Soritiergruppe') koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten. Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören." ordergroup: 'Bestellgruppe' - search_placeholder: 'Name ...' edit: title: 'Arbeitsgruppe bearbeiten' new: @@ -66,7 +66,6 @@ de: form: first_paragraph: 'Neue Mitglieder kannst du %{url} einladen.' here: 'hier' - or_cancel: 'oder abbrechen' show: title: 'Arbeitsgruppe %{name}' edit: 'Gruppe/Mitglieder bearbeiten' @@ -75,8 +74,33 @@ de: workgroups: name: 'Name' members: 'Mitglieder' - access_to: 'Zugriff auf' - actions: 'Aktionen' - edit: 'Bearbeiten' - delete: 'Löschen' - confirm: 'Willst du %{name} wirklich löschen?' \ No newline at end of file + users: + index: + title: 'Admin/Benutzerinnen' + new_user: 'Neue Benutzerin anlegen' + first_paragraph: 'Hier kannst du Benutzer_innen %{url}, bearbeiten und natürlich auch löschen.' + new_users: 'neu anlegen' + edit: + title: 'Benutzerin bearbeiten' + new: + title: 'Neue Benutzerin anlegen' + form: + first_paragraph: 'Neue Mitglieder kannst du %{url} einladen.' + here: 'hier' + or_cancel: 'oder abbrechen' + show: + person: 'Person' + member_since: 'Mitglied seit %{time}' + nick: 'Nick' + name: 'Name' + email: 'Email' + phone: 'Telefon' + preference: 'Einstellungen' + groupabos: 'Gruppenabos' + confirm: 'Willst du %{user} wirklich rausschmeißen?' + send_message: 'Nachricht senden' + users: + login: 'Login' + name: 'Name' + email: 'Email' + last_login: 'Letzter login' \ No newline at end of file From 3c70f5e702c1a8df491b0b500bdc054f5ac5d373 Mon Sep 17 00:00:00 2001 From: Manuel Wiedenmann Date: Mon, 4 Feb 2013 01:42:01 +0700 Subject: [PATCH 007/182] de.admin.yml cleanup --- config/locales/de/de.admin.yml | 58 ++++++++++++++++------------------ 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/config/locales/de/de.admin.yml b/config/locales/de/de.admin.yml index 22519841..8708b01f 100644 --- a/config/locales/de/de.admin.yml +++ b/config/locales/de/de.admin.yml @@ -51,6 +51,32 @@ de: contact: 'Kontakt' address: 'Adresse' members: 'Mitglieder' + users: + index: + title: 'Admin/Benutzerinnen' + new_user: 'Neue Benutzerin anlegen' + first_paragraph: 'Hier kannst du Benutzer_innen %{url}, bearbeiten und natürlich auch löschen.' + new_users: 'neu anlegen' + edit: + title: 'Benutzerin bearbeiten' + new: + title: 'Neue Benutzerin anlegen' + show: + person: 'Person' + member_since: 'Mitglied seit %{time}' + nick: 'Nick' + name: 'Name' + email: 'Email' + phone: 'Telefon' + preference: 'Einstellungen' + groupabos: 'Gruppenabos' + confirm: 'Willst du %{user} wirklich rausschmeißen?' + send_message: 'Nachricht senden' + users: + login: 'Login' + name: 'Name' + email: 'Email' + last_login: 'Letzter login' workgroups: index: title: 'Arbeitsgruppen' @@ -73,34 +99,4 @@ de: confirm: 'Bist Du sicher?' workgroups: name: 'Name' - members: 'Mitglieder' - users: - index: - title: 'Admin/Benutzerinnen' - new_user: 'Neue Benutzerin anlegen' - first_paragraph: 'Hier kannst du Benutzer_innen %{url}, bearbeiten und natürlich auch löschen.' - new_users: 'neu anlegen' - edit: - title: 'Benutzerin bearbeiten' - new: - title: 'Neue Benutzerin anlegen' - form: - first_paragraph: 'Neue Mitglieder kannst du %{url} einladen.' - here: 'hier' - or_cancel: 'oder abbrechen' - show: - person: 'Person' - member_since: 'Mitglied seit %{time}' - nick: 'Nick' - name: 'Name' - email: 'Email' - phone: 'Telefon' - preference: 'Einstellungen' - groupabos: 'Gruppenabos' - confirm: 'Willst du %{user} wirklich rausschmeißen?' - send_message: 'Nachricht senden' - users: - login: 'Login' - name: 'Name' - email: 'Email' - last_login: 'Letzter login' \ No newline at end of file + members: 'Mitglieder' \ No newline at end of file From 22e7f6a9cf9c156df06f8a93c6b16c60bd796567 Mon Sep 17 00:00:00 2001 From: wvengen Date: Mon, 4 Feb 2013 00:45:31 +0100 Subject: [PATCH 008/182] update comment --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index fcabac5d..32ea295b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -29,7 +29,7 @@ module Foodsoft # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # config.time_zone = 'Central Time (US & Canada)' - # The default locale is :en and all translations from config/locales//*.rb.yml are auto loaded. + # Internationalization. config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')] config.i18n.default_locale = :de From 2b11549d33b1085b61497d8022274919fa8d058a Mon Sep 17 00:00:00 2001 From: wvengen Date: Mon, 4 Feb 2013 00:46:22 +0100 Subject: [PATCH 009/182] finished home i18n --- app/views/home/_apple_bar.html.haml | 8 ++- app/views/home/_start_nav.haml | 36 ++++++------- app/views/home/index.html.haml | 40 +++++++-------- app/views/home/ordergroup.html.haml | 16 +++--- app/views/home/profile.html.haml | 17 +++--- config/locales/de/de.defaults.yml | 4 -- config/locales/de/de.home.yml | 80 +++++++++++++++++++++++++++++ config/locales/en/en.defaults.yml | 6 --- config/locales/en/en.home.yml | 6 +++ 9 files changed, 143 insertions(+), 70 deletions(-) create mode 100644 config/locales/de/de.home.yml create mode 100644 config/locales/en/en.home.yml diff --git a/app/views/home/_apple_bar.html.haml b/app/views/home/_apple_bar.html.haml index 6cbdd875..d177b3e1 100644 --- a/app/views/home/_apple_bar.html.haml +++ b/app/views/home/_apple_bar.html.haml @@ -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! \ No newline at end of file + %strong= t '.warning', threshold: FoodsoftConfig[:stop_ordering_under] diff --git a/app/views/home/_start_nav.haml b/app/views/home/_start_nav.haml index 99b15aae..4f7f1b5c 100644 --- a/app/views/home/_start_nav.haml +++ b/app/views/home/_start_nav.haml @@ -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 diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index eab20826..3e70be75 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -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 \ No newline at end of file + %p= link_to t('.my_ordergroup.transactions.view'), my_ordergroup_path diff --git a/app/views/home/ordergroup.html.haml b/app/views/home/ordergroup.html.haml index 73f0271e..d28921a4 100644 --- a/app/views/home/ordergroup.html.haml +++ b/app/views/home/ordergroup.html.haml @@ -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" - \ No newline at end of file + diff --git a/app/views/home/profile.html.haml b/app/views/home/profile.html.haml index f4bc9991..471a325a 100644 --- a/app/views/home/profile.html.haml +++ b/app/views/home/profile.html.haml @@ -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' diff --git a/config/locales/de/de.defaults.yml b/config/locales/de/de.defaults.yml index 02114109..754a37cb 100644 --- a/config/locales/de/de.defaults.yml +++ b/config/locales/de/de.defaults.yml @@ -5,10 +5,6 @@ de: finished: beendet closed: abgerechnet - home: - index: - title: Startseite - group_orders: messages: not_enough_apples: diff --git a/config/locales/de/de.home.yml b/config/locales/de/de.home.yml new file mode 100644 index 00000000..bd393b3f --- /dev/null +++ b/config/locales/de/de.home.yml @@ -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?' + diff --git a/config/locales/en/en.defaults.yml b/config/locales/en/en.defaults.yml index f9f830ef..683009c1 100644 --- a/config/locales/en/en.defaults.yml +++ b/config/locales/en/en.defaults.yml @@ -5,12 +5,6 @@ en: finished: finished closed: closed - home: - index: - title: Homepage - start_nav: - title: Directly to ... - group_orders: messages: not_enough_apples: diff --git a/config/locales/en/en.home.yml b/config/locales/en/en.home.yml new file mode 100644 index 00000000..fd1de8dd --- /dev/null +++ b/config/locales/en/en.home.yml @@ -0,0 +1,6 @@ +en: + home: + index: + title: Homepage + start_nav: + title: Directly to ... From 0c09696b2ca76eb400e687896f166e0bb35208e8 Mon Sep 17 00:00:00 2001 From: wvengen Date: Mon, 4 Feb 2013 01:46:07 +0100 Subject: [PATCH 010/182] finish sessions i18n --- app/views/sessions/new.html.haml | 14 ++++++-------- config/locales/de/de.sessions.yml | 10 ++++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 config/locales/de/de.sessions.yml diff --git a/app/views/sessions/new.html.haml b/app/views/sessions/new.html.haml index 13413eaa..f06db3ef 100644 --- a/app/views/sessions/new.html.haml +++ b/app/views/sessions/new.html.haml @@ -4,26 +4,24 @@ $('#nick').focus(); }); -- title "FoodSoft login" +- title t('.title') %noscript .alert.alert-error - Achtung, Cookies und Javascript müssen aktiviert sein! - = link_to "NoScript", "http://noscript.net/" - bitte abschalten. + != t '.nojs', link: link_to(t('.noscript'), "http://noscript.net/") = form_tag sessions_path, class: 'form-horizontal' do .control-group - %label(for='nick' class='control-label') Benutzerin + %label(for='nick' class='control-label')= t '.user' .controls = text_field_tag 'nick' .control-group - %label(for='password' class='control-label') Passwort + %label(for='password' class='control-label')= t '.password' .controls = password_field_tag 'password' .control-group .controls - = submit_tag "Anmelden", class: 'btn' - = link_to "Passwort vergessen?", :controller => 'login', :action => 'forgot_password' \ No newline at end of file + = submit_tag t('.login'), class: 'btn' + = link_to t('.forgot_password'), :controller => 'login', :action => 'forgot_password' diff --git a/config/locales/de/de.sessions.yml b/config/locales/de/de.sessions.yml new file mode 100644 index 00000000..1b0b1d6c --- /dev/null +++ b/config/locales/de/de.sessions.yml @@ -0,0 +1,10 @@ +de: + sessions: + new: + title: 'Foodsoft login' + nojs: 'Achtung, Cookies und Javascript müssen aktiviert sein! %{link} bitte abschalten.' + noscript: 'NoScript' + user: 'Benutzerin' + password: 'Passwort' + login: 'Anmelden' + forgot_password: 'Passwort vergessen?' From 1860e1c4cc64335f7112addb5e026d34e63d12e0 Mon Sep 17 00:00:00 2001 From: wvengen Date: Mon, 4 Feb 2013 02:00:27 +0100 Subject: [PATCH 011/182] also internationalize sessions controller --- app/controllers/sessions_controller.rb | 6 +++--- config/locales/de/de.sessions.yml | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index d602a206..72078d8d 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -17,15 +17,15 @@ class SessionsController < ApplicationController else redirect_to_url = root_url end - redirect_to redirect_to_url, :notice => "Logged in!" + redirect_to redirect_to_url, :notice => I18n.t('sessions.logged_in') else - flash.now.alert = "Invalid email or password" + flash.now.alert = I18n.t('sessions.login_invalid') render "new" end end def destroy session[:user_id] = nil - redirect_to login_url, :notice => "Logged out!" + redirect_to login_url, :notice => I18n.t('session.logged_out') end end diff --git a/config/locales/de/de.sessions.yml b/config/locales/de/de.sessions.yml index 1b0b1d6c..cf621abe 100644 --- a/config/locales/de/de.sessions.yml +++ b/config/locales/de/de.sessions.yml @@ -8,3 +8,7 @@ de: password: 'Passwort' login: 'Anmelden' forgot_password: 'Passwort vergessen?' + # used in controller + logged_in: 'Logged in!' + logged_out: 'Logged out!' + login_invalid: 'Invalid email or password' From 9138f0da03c441977599e344fcf5435bc293b79c Mon Sep 17 00:00:00 2001 From: wvengen Date: Mon, 4 Feb 2013 02:12:24 +0100 Subject: [PATCH 012/182] also internationalize home controller --- app/controllers/home_controller.rb | 8 ++++---- config/locales/de/de.defaults.yml | 3 ++- config/locales/de/de.home.yml | 5 +++++ config/locales/en/en.defaults.yml | 1 + 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 358e4d31..55afb7b2 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -16,7 +16,7 @@ class HomeController < ApplicationController def update_profile if @current_user.update_attributes(params[:user]) - redirect_to my_profile_url, notice: 'Änderungen wurden gespeichert.' + redirect_to my_profile_url, notice: I18n.t('home.changes_saved') else render :profile end @@ -45,7 +45,7 @@ class HomeController < ApplicationController @financial_transactions = @financial_transactions.where("note LIKE ?", "%#{params[:query]}%") if params[:query].present? else - redirect_to root_path, :alert => "Leider bist Du kein Mitglied einer Bestellgruppe" + redirect_to root_path, :alert => I18n.t('home.no_ordergroups') end end @@ -54,9 +54,9 @@ class HomeController < ApplicationController membership = Membership.find(params[:membership_id]) if membership.user == current_user membership.destroy - flash[:notice] = "Du bist jetzt kein Mitglied der Gruppe #{membership.group.name} mehr." + flash[:notice] = I18n.t('home.ordergroup_cancelled', :group => membership.group.name) else - flash[:error] = "Ein Problem ist aufgetreten." + flash[:error] = I18n.t('errors.general') end redirect_to my_profile_path end diff --git a/config/locales/de/de.defaults.yml b/config/locales/de/de.defaults.yml index 754a37cb..7778bda6 100644 --- a/config/locales/de/de.defaults.yml +++ b/config/locales/de/de.defaults.yml @@ -119,6 +119,7 @@ de: second: Sekunden year: Jahr errors: &errors + general: 'Ein Problem ist aufgetreten.' format: ! '%{attribute} %{message}' messages: accepted: muss akzeptiert werden @@ -262,4 +263,4 @@ de: message: create: 'Nachricht verschicken' invite: - create: Einladung verschicken \ No newline at end of file + create: Einladung verschicken diff --git a/config/locales/de/de.home.yml b/config/locales/de/de.home.yml index bd393b3f..b059d8fa 100644 --- a/config/locales/de/de.home.yml +++ b/config/locales/de/de.home.yml @@ -78,3 +78,8 @@ de: cancel: 'Mitgliedschaft beenden' cancel_confirm: 'Bist Du sicher, dass Du Deine Mitgliedschaft beenden willst?' + # used by controller + changes_saved: 'Änderungen wurden gespeichert.' + no_ordergroups: 'Leider bist Du kein Mitglied einer Bestellgruppe' + ordergroup_cancelled: 'Du bist jetzt kein Mitglied der Gruppe %{group} mehr.' + diff --git a/config/locales/en/en.defaults.yml b/config/locales/en/en.defaults.yml index 683009c1..5a1dd331 100644 --- a/config/locales/en/en.defaults.yml +++ b/config/locales/en/en.defaults.yml @@ -119,6 +119,7 @@ en: second: seconds year: years errors: &errors + general: 'A problem has occured.' format: ! '%{attribute} %{message}' messages: accepted: has to be accepted From 034f6a8f5c079bc00e9f155ff1672fbf0b42a970 Mon Sep 17 00:00:00 2001 From: wvengen Date: Mon, 4 Feb 2013 12:59:04 +0100 Subject: [PATCH 013/182] finish invites i18n --- app/views/invites/_modal_form.html.haml | 13 ++++--------- app/views/invites/new.html.haml | 9 +++------ config/locales/de/de.defaults.yml | 7 +++++++ config/locales/de/de.invites.yml | 11 +++++++++++ 4 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 config/locales/de/de.invites.yml diff --git a/app/views/invites/_modal_form.html.haml b/app/views/invites/_modal_form.html.haml index 5be1b0a4..1a704af9 100644 --- a/app/views/invites/_modal_form.html.haml +++ b/app/views/invites/_modal_form.html.haml @@ -1,17 +1,12 @@ = simple_form_for @invite, remote: true do |form| .modal-header - = button_tag "x", class: 'close', data: {dismiss: 'modal'} - %h3 Person einladen + = button_tag t('ui.marks.close'), class: 'close', data: {dismiss: 'modal'} + %h3= t '.title' .modal-body - %p - Hier kannst du eine Person in die Gruppe - %b=h @invite.group.name - einladen, die noch nicht Mitglied der Foodcoop ist. - %br/ - Die Person ist dann nach erstmaliger Anmeldung automatisch Mitglied dieser Gruppe. + = t('.body', group: @invite.group.name).html_safe = form.hidden_field :user_id = form.hidden_field :group_id = form.input :email .modal-footer - = button_tag "Schließen", class: 'btn', data: {dismiss: 'modal'} + = button_tag t('ui.close'), class: 'btn', data: {dismiss: 'modal'} = form.submit class: 'btn btn-primary' diff --git a/app/views/invites/new.html.haml b/app/views/invites/new.html.haml index 3e567b86..523238fa 100644 --- a/app/views/invites/new.html.haml +++ b/app/views/invites/new.html.haml @@ -1,10 +1,7 @@ -%p - Hier kannst du eine Person in die Gruppe - %b=h @invite.group.name - einladen, die noch nicht Mitglied der Foodcoop ist. +%p= t('.body', group: @invite.group.name).html_safe = simple_form_for @invite do |form| = form.hidden_field :user_id = form.hidden_field :group_id = form.input :email - = form.submit "Einladung abschicken" - = link_to "oder zurück", :back + = form.submit t('.action') + = link_to t('.back'), :back diff --git a/config/locales/de/de.defaults.yml b/config/locales/de/de.defaults.yml index 7778bda6..8471a46d 100644 --- a/config/locales/de/de.defaults.yml +++ b/config/locales/de/de.defaults.yml @@ -264,3 +264,10 @@ de: create: 'Nachricht verschicken' invite: create: Einladung verschicken + + # general user-interface + ui: + close: 'Schließen' + marks: + close: 'x' + diff --git a/config/locales/de/de.invites.yml b/config/locales/de/de.invites.yml new file mode 100644 index 00000000..c12db2fc --- /dev/null +++ b/config/locales/de/de.invites.yml @@ -0,0 +1,11 @@ +de: + invites: + new: + body:

Hier kannst du eine Person in die Gruppe %{group} einladen, die noch nicht Mitglied der Foodcoop ist.

+ action: 'Einlading abschicken' + back: 'oder zurück' + modal_form: + title: 'Person einladen' + body: +

Hier kannst du eine Person in die Gruppe %{group} einladen, die noch nicht Mitglied der Foodcoop ist.

+

Die Person ist dann nach erstmaliger Anmeldung automatisch Mitglied dieser Gruppe.

From ecce8041a1ab7fb9bf97a282f7a2aca82fdd528e Mon Sep 17 00:00:00 2001 From: wvengen Date: Mon, 4 Feb 2013 13:00:34 +0100 Subject: [PATCH 014/182] invites controller i18n --- app/controllers/invites_controller.rb | 4 ++-- config/locales/de/de.invites.yml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/invites_controller.rb b/app/controllers/invites_controller.rb index 368248e0..f301156a 100644 --- a/app/controllers/invites_controller.rb +++ b/app/controllers/invites_controller.rb @@ -1,7 +1,7 @@ class InvitesController < ApplicationController before_filter :authenticate_membership_or_admin, :only => [:new] - #TODO: auhtorize also for create action. + #TODO: authorize also for create action. def new @invite = Invite.new(:user => @current_user, :group => @group) @@ -14,7 +14,7 @@ class InvitesController < ApplicationController respond_to do |format| format.html do - redirect_to back_or_default_path, notice: "Benutzerin wurde erfolgreich eingeladen." + redirect_to back_or_default_path, notice: I18n.t('invites.success') end format.js { render layout: false } end diff --git a/config/locales/de/de.invites.yml b/config/locales/de/de.invites.yml index c12db2fc..357ff99f 100644 --- a/config/locales/de/de.invites.yml +++ b/config/locales/de/de.invites.yml @@ -9,3 +9,6 @@ de: body:

Hier kannst du eine Person in die Gruppe %{group} einladen, die noch nicht Mitglied der Foodcoop ist.

Die Person ist dann nach erstmaliger Anmeldung automatisch Mitglied dieser Gruppe.

+ + # used by controller + success: 'Benutzerin wurde erfolgreich eingeladen.' From 5b53749fe6046ba3d84a9d02589deff2ad14614d Mon Sep 17 00:00:00 2001 From: wvengen Date: Mon, 4 Feb 2013 13:13:04 +0100 Subject: [PATCH 015/182] fix small format bug in template --- app/views/invites/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/invites/new.html.haml b/app/views/invites/new.html.haml index 523238fa..eb9081cb 100644 --- a/app/views/invites/new.html.haml +++ b/app/views/invites/new.html.haml @@ -1,4 +1,4 @@ -%p= t('.body', group: @invite.group.name).html_safe += t('.body', group: @invite.group.name).html_safe = simple_form_for @invite do |form| = form.hidden_field :user_id = form.hidden_field :group_id From 39812bef99437582e43c1749b5449e89b4eab8f4 Mon Sep 17 00:00:00 2001 From: wvengen Date: Tue, 5 Feb 2013 12:11:29 +0100 Subject: [PATCH 016/182] finish layouts i18n, use help url from config, use html language from locale --- app/views/layouts/_header.html.haml | 6 +++--- app/views/layouts/application.html.haml | 15 +++++++-------- app/views/layouts/application1.html.haml | 4 ++-- app/views/layouts/email.text.haml | 5 +---- app/views/layouts/login.html.haml | 3 +-- config/app_config.yml.SAMPLE | 4 ++-- config/locales/de/de.layouts.yml | 22 ++++++++++++++++++++++ 7 files changed, 38 insertions(+), 21 deletions(-) create mode 100644 config/locales/de/de.layouts.yml diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index ee0d989c..c3c16327 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -1,10 +1,10 @@ !!! 5 -%html(lang="en") +%html(lang='#{I18n.locale}') %head %meta(charset="utf-8") %meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1") %meta(name="viewport" content="width=device-width, initial-scale=1.0") - %title= ["Foodsoft", yield(:title)].join(" - ") + %title= [t('layouts.foodsoft'), yield(:title)].join(" - ") = csrf_meta_tags = stylesheet_link_tag "application", :media => "all" %link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144") @@ -23,4 +23,4 @@ \================================================== / Placed at the end of the document so the pages load faster = javascript_include_tag "application" - = yield(:javascript) \ No newline at end of file + = yield(:javascript) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 3cbe62a8..2feb4fa3 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,19 +1,19 @@ = render layout: 'layouts/header' do .logo - foodsoft + = t('layouts.logo').html_safe %ul.nav.nav-pills.pull-right %li.dropdown %a.dropdown-toggle(data-toggle="dropdown" href="#") = current_user.nick %b.caret %ul.dropdown-menu - %li= link_to "Profil bearbeiten", my_profile_path - %li= link_to "Meine Bestellgruppe", my_ordergroup_path - %li= link_to "Abmelden", logout_path + %li= link_to t('.profile'), my_profile_path + %li= link_to t('.ordergroup'), my_ordergroup_path + %li= link_to t('.logout'), logout_path %li{class: ('disabled' if FoodsoftConfig.config[:homepage].blank?)} = link_to FoodsoftConfig.config[:name], FoodsoftConfig.config[:homepage] - %li= link_to "Hilfe", 'https://github.com/bennibu/foodsoft/wiki/Doku' - %li= link_to "Feedback", new_feedback_path, title: "Fehler gefunden? Vorschlag? Idee? Kritik?" + %li= link_to t('.help'), FoodsoftConfig.config[:help_url] + %li= link_to t('.feedback.title'), new_feedback_path, title: t('.feedback.desc') .clearfix .navbar @@ -49,6 +49,5 @@ = yield %footer - %p - Foodsoft, open source software to manage a non-profit food coop. + %p= t '.footer' #modalContainer.modal.hide.fade(tabindex="-1" role="dialog") diff --git a/app/views/layouts/application1.html.haml b/app/views/layouts/application1.html.haml index baf531e8..c52e8003 100644 --- a/app/views/layouts/application1.html.haml +++ b/app/views/layouts/application1.html.haml @@ -2,7 +2,7 @@ %html %head %meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"} - %title= "FoodSoft - " + (yield(:title) or controller.controller_name) + %title= t '.title', title: (yield(:title) or controller.controller_name) = stylesheet_link_tag 'application' = stylesheet_link_tag "print", :media => "print"