From 75c9338fd97ebd962d67ef2d5f1219729b73ddf8 Mon Sep 17 00:00:00 2001 From: Manuel Wiedenmann Date: Mon, 4 Feb 2013 00:36:03 +0700 Subject: [PATCH] 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