finish articles i18n
This commit is contained in:
parent
7af796c09c
commit
aabeb1a332
7 changed files with 147 additions and 85 deletions
|
@ -2,18 +2,19 @@
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th
|
%th
|
||||||
%acronym{:title => "verfügbar"} verf.
|
%acronym{:title => t('.available_desc')}= t '.available_short'
|
||||||
%th Name
|
%th= t 'simple_form.labels.article.name'
|
||||||
%th Einheit
|
%th= t 'simple_form.labels.article.unit'
|
||||||
%th
|
%th
|
||||||
%acronym{:title => "Netto!"} Preis
|
%acronym{:title => t('.price_desc')}= t '.price_short'
|
||||||
%th
|
%th
|
||||||
%acronym{:title => "Gebindegröße"} GebGr
|
%acronym{:title => t('.unit_quantity_desc')}= t '.unit_quantity_short'
|
||||||
%th Best.Nr.
|
%th
|
||||||
%th Notiz
|
%acronym{:title => t('.order_number_desc')}= t '.order_number_short'
|
||||||
%th Kategorie
|
%th= t 'simple_form.labels.article.note'
|
||||||
%th MwSt.
|
%th= t 'simple_form.labels.article.article_category'
|
||||||
%th Pfand
|
%th= t 'simple_form.labels.defaults.tax'
|
||||||
|
%th= t 'simple_form.labels.defaults.deposit'
|
||||||
%tbody
|
%tbody
|
||||||
- @articles.each_with_index do |article, index|
|
- @articles.each_with_index do |article, index|
|
||||||
= fields_for "articles[#{article.id || index}]", article do |form|
|
= fields_for "articles[#{article.id || index}]", article do |form|
|
||||||
|
@ -31,4 +32,4 @@
|
||||||
%td= form.text_field 'deposit', class: 'input-mini'
|
%td= form.text_field 'deposit', class: 'input-mini'
|
||||||
- unless article.errors.empty?
|
- unless article.errors.empty?
|
||||||
%tr.alert
|
%tr.alert
|
||||||
%td(colspan="10")= article.errors.full_messages.join(", ")
|
%td(colspan="10")= article.errors.full_messages.join(", ")
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
- if @articles.empty?
|
- if @articles.empty?
|
||||||
%p Keine Artikel gefunden
|
%p= t '.not_found'
|
||||||
- else
|
- else
|
||||||
= pagination_links_remote @articles, :params => {:search => search_params}
|
= pagination_links_remote @articles, :params => {:search => search_params}
|
||||||
%table.table.table-striped
|
%table.table.table-striped
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th Name
|
%th= t 'simple_form.labels.article.name'
|
||||||
%th Herkunft
|
%th= t 'simple_form.labels.article.origin'
|
||||||
%th Hersteller
|
%th= t 'simple_form.labels.article.manufacturer'
|
||||||
%th Notiz
|
%th= t 'simple_form.labels.article.note'
|
||||||
%th{:style => "width:4em"} Preis
|
%th{:style => "width:4em"}= t 'simple_form.labels.defaults.price'
|
||||||
%th Einheit
|
%th= t 'simple_form.labels.article.unit'
|
||||||
%th GebGröße
|
%th= t 'simple_form.labels.defaults.unit_quantity'
|
||||||
%th
|
%th
|
||||||
%tbody
|
%tbody
|
||||||
- for article in @articles
|
- for article in @articles
|
||||||
|
@ -26,8 +26,7 @@
|
||||||
%td
|
%td
|
||||||
- logger.debug "[debug] #{article.attributes.inspect}"
|
- logger.debug "[debug] #{article.attributes.inspect}"
|
||||||
- if @supplier.articles.undeleted.where(order_number: article.number).exists?
|
- if @supplier.articles.undeleted.where(order_number: article.number).exists?
|
||||||
%i.icon-ok
|
%i.icon-ok= t '.already_imported'
|
||||||
schon importiert
|
|
||||||
- else
|
- else
|
||||||
= link_to 'importieren', import_supplier_articles_path(@supplier, :shared_article_id => article.id),
|
= link_to t('.action_import'), import_supplier_articles_path(@supplier, :shared_article_id => article.id),
|
||||||
:remote => true, class: 'btn btn-small btn-success'
|
:remote => true, class: 'btn btn-small btn-success'
|
||||||
|
|
|
@ -1,31 +1,31 @@
|
||||||
- title "Artikel von #{@supplier.name} (#{@supplier.articles.undeleted.count})"
|
- title t('.title', supplier: @supplier.name, count: @supplier.articles.undeleted.count)
|
||||||
|
|
||||||
.well.well-small
|
.well.well-small
|
||||||
.btn-toolbar
|
.btn-toolbar
|
||||||
= form_tag supplier_articles_path(@supplier), method: :get, remote: true, class: 'form-search pull-right',
|
= form_tag supplier_articles_path(@supplier), method: :get, remote: true, class: 'form-search pull-right',
|
||||||
'data-submit-onchange' => true do
|
'data-submit-onchange' => true do
|
||||||
= text_field_tag :query, params[:query], class: 'input-medium search-query',
|
= text_field_tag :query, params[:query], class: 'input-medium search-query',
|
||||||
placeholder: 'Name ...'
|
placeholder: t('.search_placeholder')
|
||||||
|
|
||||||
.btn-group
|
.btn-group
|
||||||
= link_to "Neuer Artikel", new_supplier_article_path(@supplier), remote: true, class: 'btn btn-primary'
|
= link_to t('.new'), new_supplier_article_path(@supplier), remote: true, class: 'btn btn-primary'
|
||||||
= link_to "Alle bearbeiten", edit_all_supplier_articles_path(@supplier), class: 'btn'
|
= link_to t('.edit_all'), edit_all_supplier_articles_path(@supplier), class: 'btn'
|
||||||
= link_to "Artikel hochladen", upload_supplier_articles_path(@supplier), class: 'btn'
|
= link_to t('.upload'), upload_supplier_articles_path(@supplier), class: 'btn'
|
||||||
- if current_user.role_orders?
|
- if current_user.role_orders?
|
||||||
= link_to "Bestellung anlegen", new_order_path(supplier_id: @supplier), class: 'btn'
|
= link_to t('.new_order'), new_order_path(supplier_id: @supplier), class: 'btn'
|
||||||
|
|
||||||
- unless @supplier.shared_supplier.nil?
|
- unless @supplier.shared_supplier.nil?
|
||||||
.btn-group
|
.btn-group
|
||||||
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn btn-success dropdown-toggle' do
|
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn btn-success dropdown-toggle' do
|
||||||
Externe Datenbank
|
= t '.ext_db.title'
|
||||||
%span.caret
|
%span.caret
|
||||||
%ul.dropdown-menu
|
%ul.dropdown-menu
|
||||||
%li= link_to "Suchen/Importieren", "#import", 'data-toggle-this' => '#import'
|
%li= link_to t('.ext_db.import'), "#import", 'data-toggle-this' => '#import'
|
||||||
%li= link_to "Synchronisieren", sync_supplier_articles_path(@supplier), method: :post
|
%li= link_to t('.ext_db.sync'), sync_supplier_articles_path(@supplier), method: :post
|
||||||
|
|
||||||
.btn-group
|
.btn-group
|
||||||
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do
|
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do
|
||||||
Lieferant wechseln ..
|
= t '.change_supplier'
|
||||||
%span.caret
|
%span.caret
|
||||||
%ul.dropdown-menu
|
%ul.dropdown-menu
|
||||||
- Supplier.undeleted.where('id != ?', @supplier.id).order('suppliers.name ASC').each do |supplier|
|
- Supplier.undeleted.where('id != ?', @supplier.id).order('suppliers.name ASC').each do |supplier|
|
||||||
|
@ -35,13 +35,14 @@
|
||||||
#import.well.well-small(style="display:none;")
|
#import.well.well-small(style="display:none;")
|
||||||
= form_tag shared_supplier_articles_path(@supplier), method: :get, remote: true, class: 'form-search',
|
= form_tag shared_supplier_articles_path(@supplier), method: :get, remote: true, class: 'form-search',
|
||||||
'data-submit-onchange' => true do
|
'data-submit-onchange' => true do
|
||||||
%h3 Artikel importieren
|
%h3= t '.import.title'
|
||||||
= text_field_tag "search[name_contains_all]", "", class: 'input-medium search-query', placeholder: 'Name ...'
|
= text_field_tag "search[name_contains_all]", "", class: 'input-medium search-query',
|
||||||
|
placeholder: t('.import.placeholder')
|
||||||
%label.checkbox
|
%label.checkbox
|
||||||
= check_box_tag "search[origin_equals]", "REG", false
|
= check_box_tag "search[origin_equals]", "REG", false
|
||||||
Nur aus der Region
|
= t '.import.restrict_region'
|
||||||
#search_results.clearfix
|
#search_results.clearfix
|
||||||
= link_to "Schließen", "#import", 'data-toggle-this' => '#import'
|
= link_to t('ui.close'), "#import", 'data-toggle-this' => '#import'
|
||||||
|
|
||||||
= form_tag update_selected_supplier_articles_path(@supplier), id: "articlesInListForm",
|
= form_tag update_selected_supplier_articles_path(@supplier), id: "articlesInListForm",
|
||||||
'data-submit-onchange' => true do
|
'data-submit-onchange' => true do
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
- title "#{@supplier.name} / Artikel hochladen"
|
- title t('.title', supplier: @supplier.name)
|
||||||
%p
|
%p= t('.body').html_safe
|
||||||
%i
|
|
||||||
Bitte überprüfe die eingelesenen Artikel.
|
|
||||||
%br/
|
|
||||||
Achtung, momentan gibt es keine Überprüfung auf doppelte Artikel.
|
|
||||||
|
|
||||||
= form_tag(create_from_upload_supplier_articles_path(@supplier)) do
|
= form_tag(create_from_upload_supplier_articles_path(@supplier)) do
|
||||||
= render 'edit_all_table'
|
= render 'edit_all_table'
|
||||||
.form-actions
|
.form-actions
|
||||||
= submit_tag "Speichere neue Artikel für #{@supplier.name}", class: 'btn btn-primary'
|
= submit_tag t('.submit', supplier: @supplier.name), class: 'btn btn-primary'
|
||||||
= link_to "order abbrechen", upload_supplier_articles_path(@supplier)
|
= link_to t('.or_cancel'), upload_supplier_articles_path(@supplier)
|
||||||
|
|
||||||
|
|
|
@ -1,43 +1,37 @@
|
||||||
- title 'Artikel mit externer Datenbank synchronisieren'
|
- title 'Artikel mit externer Datenbank synchronisieren'
|
||||||
|
|
||||||
= form_tag update_all_supplier_articles_path(@supplier, :sync => "1") do
|
= form_tag update_all_supplier_articles_path(@supplier, :sync => "1") do
|
||||||
%h2 Auslisten ...
|
%h2= t '.outlist.title'
|
||||||
%p
|
%p
|
||||||
- unless @outlisted_articles.empty?
|
- unless @outlisted_articles.empty?
|
||||||
Folgende Artikel wurden ausgelistet und werden
|
= t('.outlist.body').html_safe
|
||||||
%b gelöscht:
|
|
||||||
%ul
|
%ul
|
||||||
- for article in @outlisted_articles
|
- for article in @outlisted_articles
|
||||||
%li
|
%li
|
||||||
= hidden_field_tag "outlisted_articles[#{article.id}]", '1'
|
= hidden_field_tag "outlisted_articles[#{article.id}]", '1'
|
||||||
= article.name
|
= article.name
|
||||||
- else
|
- else
|
||||||
%i Es müssen keine Artikel gelöscht werden.
|
%i= t '.outlist.body_skip'
|
||||||
%hr/
|
%hr/
|
||||||
%h2 Aktualisieren ...
|
%h2= t '.update.title'
|
||||||
%p
|
%p
|
||||||
%i
|
%i
|
||||||
%b= @updated_articles.size
|
%b= @updated_articles.size
|
||||||
Artikel müssen aktualisiert werden:
|
= t '.update.update_msg'
|
||||||
%p
|
= t('.update.body').html_safe
|
||||||
%i
|
|
||||||
Jeder Artikel wird doppelt angezeigt. Die alten Werte sind grau und die Textfelder sind mit den aktuellen
|
|
||||||
Werten vorausgefüllt.
|
|
||||||
%br/
|
|
||||||
Abweichungen zu den alten Artikeln sind gelb markiert.
|
|
||||||
%table.table
|
%table.table
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th Name
|
%th= t 'simple_form.labels.article.name'
|
||||||
%th Notiz
|
%th= t 'simple_form.labels.article.note'
|
||||||
%th Hersteller
|
%th= t 'simple_form.labels.article.manufacturer'
|
||||||
%th Herkunft
|
%th= t 'simple_form.labels.article.origin'
|
||||||
%th Einheit
|
%th= t 'simple_form.labels.article.unit'
|
||||||
%th GebGr
|
%th= t '.unit_quantity_short'
|
||||||
%th Preis
|
%th= t '.price_short'
|
||||||
%th MwSt.
|
%th= t 'simple_form.labels.defaults.tax'
|
||||||
%th Pfand
|
%th= t 'simple_form.labels.defaults.deposit'
|
||||||
%th Kategorie
|
%th= t 'simple_form.labels.article.article_category'
|
||||||
%tbody
|
%tbody
|
||||||
- @updated_articles.each do |updated_article, attrs|
|
- @updated_articles.each do |updated_article, attrs|
|
||||||
- article = Article.find(updated_article.id)
|
- article = Article.find(updated_article.id)
|
||||||
|
@ -69,5 +63,5 @@
|
||||||
{include_blank: true}, class: 'input-small'
|
{include_blank: true}, class: 'input-small'
|
||||||
%hr/
|
%hr/
|
||||||
= hidden_field 'supplier', 'id'
|
= hidden_field 'supplier', 'id'
|
||||||
= submit_tag 'Alle löschen/aktualisieren', class: 'btn btn-primary'
|
= submit_tag t('.submit'), class: 'btn btn-primary'
|
||||||
= link_to 'oder abbrechen', supplier_articles_path(@supplier)
|
= link_to t('.or_cancel'), supplier_articles_path(@supplier)
|
||||||
|
|
|
@ -1,21 +1,24 @@
|
||||||
- title "#{@supplier.name} / Artikel hochladen"
|
- title t('.title', supplier: @supplier.name)
|
||||||
%p
|
= t('.body').html_safe
|
||||||
Die Datei muss eine Textdatei mit der Endung '.csv' sein. Die erste Zeile
|
%pre
|
||||||
wird beim Einlesen ignoriert.
|
= [t('.fields.status'),
|
||||||
%br/
|
t('simple_form.labels.defaults.order_number'),
|
||||||
Die Felder müssen mit einem Semikolon (';') getrennt und der Text mit doppelten
|
t('simple_form.labels.article.name'),
|
||||||
Anführungszeichen ("Text...") umklammert werden.
|
t('simple_form.labels.article.note'),
|
||||||
%br/
|
t('simple_form.labels.article.manufacturer'),
|
||||||
Als Zeichensatz wird UTF-8 erwartet. Korrekte Reihenfolge der Spalten:
|
t('simple_form.labels.article.origin'),
|
||||||
%pre
|
t('simple_form.labels.article.unit'),
|
||||||
= ["Status (x=ausgelistet)", "Bestellnummer", "Name", "Notiz", "Hersteller", "Herkunft",
|
t('simple_form.labels.defaults.price'),
|
||||||
"Einheit", "Preis(netto)", "MwSt", "Pfand", "Gebindegröße",
|
t('simple_form.labels.defaults.tax'),
|
||||||
"Staffelmenge", "Staffelpreis", "Kategorie"].join(" | ")
|
t('simple_form.labels.defaults.deposit'),
|
||||||
|
t('simple_form.labels.defaults.unit_quantity'),
|
||||||
|
t('.fields.season_amount'),
|
||||||
|
t('.fields.season_price'),
|
||||||
|
t('simple_form.labels.article.article_category')].join(" | ")
|
||||||
|
|
||||||
= form_for :articles, :url => parse_upload_supplier_articles_path(@supplier),
|
= form_for :articles, :url => parse_upload_supplier_articles_path(@supplier),
|
||||||
:html => { :multipart => true } do |f|
|
:html => { :multipart => true } do |f|
|
||||||
%label(for="articles_file")
|
%label(for="articles_file")= t '.file_label'
|
||||||
Bitte wähle eine kompatible Datei aus
|
|
||||||
= f.file_field "file"
|
= f.file_field "file"
|
||||||
.form-actions
|
.form-actions
|
||||||
= submit_tag "Datei hochladen", class: 'btn'
|
= submit_tag t('.submit'), class: 'btn'
|
||||||
|
|
|
@ -22,5 +22,73 @@ de:
|
||||||
warning: 'Achtung, alle Artikel werden aktualisiert!'
|
warning: 'Achtung, alle Artikel werden aktualisiert!'
|
||||||
submit: 'Alle Artikel aktualisieren'
|
submit: 'Alle Artikel aktualisieren'
|
||||||
or_cancel: 'oder abbrechen'
|
or_cancel: 'oder abbrechen'
|
||||||
|
edit_all_table:
|
||||||
|
available_short: 'verf.'
|
||||||
|
available_desc: 'verfügbar'
|
||||||
|
price_short: 'Preis'
|
||||||
|
price_desc: 'Netto!'
|
||||||
|
unit_quantity_short: 'GebGr'
|
||||||
|
unit_quantity_desc: 'Gebindegröße'
|
||||||
|
order_number_short: 'Best.Nr.'
|
||||||
|
order_number_desc: 'Bestellnummer'
|
||||||
form:
|
form:
|
||||||
title: 'Neuen Artikel einfügen'
|
title: 'Neuen Artikel einfügen'
|
||||||
|
index:
|
||||||
|
title: 'Artikel von %{supplier} (%{count})'
|
||||||
|
search_placeholder: Name ...
|
||||||
|
new: 'Neuer Artikel'
|
||||||
|
edit_all: 'Alle bearbeiten'
|
||||||
|
upload: 'Artikel hochladen'
|
||||||
|
new_order: 'Bestellung anlegen'
|
||||||
|
ext_db:
|
||||||
|
title: 'Externe Datenbank'
|
||||||
|
import: 'Suchen/Importieren'
|
||||||
|
sync: 'Synchronisieren'
|
||||||
|
change_supplier: 'Lieferant wechseln ...'
|
||||||
|
import:
|
||||||
|
title: 'Artikel importieren'
|
||||||
|
placeholder: Name ...
|
||||||
|
restrict_region: 'Nur aus der Region'
|
||||||
|
import_search_results:
|
||||||
|
not_found: 'Keine Artikel gefunden'
|
||||||
|
already_imported: 'schon importiert'
|
||||||
|
action_import: 'importieren'
|
||||||
|
sync:
|
||||||
|
title: 'Artikel mit externer Datenbank synchronisieren'
|
||||||
|
outlist:
|
||||||
|
title: 'Auslisten ...'
|
||||||
|
body: 'Folgende Artikel wurden ausgelistet und werden <b>gelöscht</b>:'
|
||||||
|
body_skip: 'Es müssen keine Artikel gelöscht werden.'
|
||||||
|
update:
|
||||||
|
title: 'Aktualisieren ...'
|
||||||
|
update_msg: 'Artikel müssen aktualisiert werden:'
|
||||||
|
body:
|
||||||
|
<p><i>Jeder Artikel wird doppelt angezeigt. Die alten Werte sind grau und die
|
||||||
|
Textfelder sind mit den aktuellen Werten vorausgefüllt.</i></p>
|
||||||
|
<p><i>Abweichungen zu den alten Artikeln sind gelb markiert.</i></p>
|
||||||
|
unit_quantity_short: 'GebGr'
|
||||||
|
price_short: 'Price'
|
||||||
|
submit: 'Alle löschen/aktualisieren'
|
||||||
|
or_cancel: 'oder abbrechen'
|
||||||
|
upload:
|
||||||
|
title: '%{supplier} / Artikel hochladen'
|
||||||
|
body:
|
||||||
|
<p>Die Datei muss eine Textdatei mit der Endung '.csv' sein. Die erste Zeile
|
||||||
|
wird beim Einlesen ignoriert.</p>
|
||||||
|
<p>Die Felder müssen mit einem Semikolon (';') getrennt und der Text mit doppelten
|
||||||
|
Anführungszeichen ("Text...") umklammert werden.</p>
|
||||||
|
<p>Als Zeichensatz wird UTF-8 erwartet. Korrekte Reihenfolge der Spalten:</p>
|
||||||
|
fields:
|
||||||
|
status: 'Status (x=ausgelistet)'
|
||||||
|
season_amount: 'Staffelmenge'
|
||||||
|
season_price: 'Staffelpreis'
|
||||||
|
file_label: 'Bitte wähle eine kompatible Datei aus'
|
||||||
|
submit: 'Datei hochladen'
|
||||||
|
parse_upload:
|
||||||
|
title: '%{supplier} / Artikel hochladen'
|
||||||
|
body:
|
||||||
|
<p><i>Bitte überprufe die engelesenen Artikel.</i></p>
|
||||||
|
<p><i>Achtung, momentan gibt es keine Überprüfung auf doppelte Artikel.</i></p>
|
||||||
|
submit: 'Speichere neue Artikel für %{supplier}'
|
||||||
|
or_cancel: 'oder abbrechen'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue