From ec1ef0289bc2bb5a94847fc64d2f111cafc72f08 Mon Sep 17 00:00:00 2001 From: wvengen Date: Thu, 4 Apr 2013 00:42:46 +0200 Subject: [PATCH] finish i18n of article_categories + translation --- app/views/article_categories/_form.html.haml | 2 +- app/views/article_categories/edit.html.haml | 4 ++-- app/views/article_categories/index.html.haml | 12 ++++++------ app/views/article_categories/new.html.haml | 4 ++-- config/locales/de/de.article_categories.yml | 12 ++++++++++++ config/locales/de/de.simple_form.yml | 3 +++ config/locales/en/en.article_categories.yml | 12 ++++++++++++ 7 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 config/locales/de/de.article_categories.yml create mode 100644 config/locales/en/en.article_categories.yml diff --git a/app/views/article_categories/_form.html.haml b/app/views/article_categories/_form.html.haml index 630ad8af..917911c6 100644 --- a/app/views/article_categories/_form.html.haml +++ b/app/views/article_categories/_form.html.haml @@ -3,4 +3,4 @@ = f.input :description .form-actions = f.submit class: 'btn' - = link_to 'oder abbrechen', article_categories_path \ No newline at end of file + = link_to t('.or_cancel'), article_categories_path diff --git a/app/views/article_categories/edit.html.haml b/app/views/article_categories/edit.html.haml index 3e6ebc25..624324db 100644 --- a/app/views/article_categories/edit.html.haml +++ b/app/views/article_categories/edit.html.haml @@ -1,3 +1,3 @@ -- title "Kategorie ändern" +- title t('.title') -= render 'form' \ No newline at end of file += render 'form' diff --git a/app/views/article_categories/index.html.haml b/app/views/article_categories/index.html.haml index 581493f4..dc18f042 100644 --- a/app/views/article_categories/index.html.haml +++ b/app/views/article_categories/index.html.haml @@ -1,12 +1,12 @@ -- title "Artikelkategorien" +- title t('.title') -%p= link_to "Neue Kategorie anlegen", new_article_category_path, class: 'btn btn-primary' +%p= link_to t('.new'), new_article_category_path, class: 'btn btn-primary' %table.table.table-striped %thead %tr - %th Name - %th Beschreibung + %th= t('simple_form.labels.article_category.name') + %th= t('simple_form.labels.article_category.description') %th %tbody - @article_categories.each do |article_category| @@ -14,6 +14,6 @@ %td= article_category.name %td= article_category.description %td - = link_to "Bearbeiten", edit_article_category_path(article_category), class: 'btn btn-mini' - = link_to "Löschen", article_category, :method => :delete, :confirm => 'Are you sure?', + = link_to t('ui.edit'), edit_article_category_path(article_category), class: 'btn btn-mini' + = link_to t('ui.delete'), article_category, :method => :delete, :confirm => t('.confirm_delete'), class: 'btn btn-mini btn-danger' diff --git a/app/views/article_categories/new.html.haml b/app/views/article_categories/new.html.haml index 055d656c..624324db 100644 --- a/app/views/article_categories/new.html.haml +++ b/app/views/article_categories/new.html.haml @@ -1,3 +1,3 @@ -- title "Neue Kategorie anlegen" +- title t('.title') -= render 'form' \ No newline at end of file += render 'form' diff --git a/config/locales/de/de.article_categories.yml b/config/locales/de/de.article_categories.yml new file mode 100644 index 00000000..b823962e --- /dev/null +++ b/config/locales/de/de.article_categories.yml @@ -0,0 +1,12 @@ +de: + article_categories: + edit: + title: 'Kategorie ändern' + form: + or_cancel: 'oder abbrechen' + index: + title: 'Artikelkategorien' + new: 'Neue Kategorie anlegen' + confirm_delete: 'Bist Du sicher?' + new: + title: 'Neue Kategorie anlegen' diff --git a/config/locales/de/de.simple_form.yml b/config/locales/de/de.simple_form.yml index af1f5815..06ee8e8d 100644 --- a/config/locales/de/de.simple_form.yml +++ b/config/locales/de/de.simple_form.yml @@ -88,6 +88,9 @@ de: unit: 'Einheit' note: 'Notiz' article_category: 'Kategorie' + article_category: + name: 'Name' + description: 'Beschreibung' stock_article: supplier: 'Lieferant' delivery: diff --git a/config/locales/en/en.article_categories.yml b/config/locales/en/en.article_categories.yml new file mode 100644 index 00000000..c0871aea --- /dev/null +++ b/config/locales/en/en.article_categories.yml @@ -0,0 +1,12 @@ +en: + article_categories: + edit: + title: 'Edit category' + form: + or_cancel: 'or cancel' + index: + title: 'Article categories' + new: 'Add new category' + confirm_delete: 'Are you sure?' + new: + title: 'Add new category'