From 9a0f813909ca37379465cbe6c114b303fc36917e Mon Sep 17 00:00:00 2001 From: Florian Lentsch Date: Wed, 3 Jan 2024 13:20:41 +0100 Subject: [PATCH] On #23: Added some translations --- app/views/articles/_edit_all_table.html.haml | 2 +- app/views/articles/_sync_table.html.haml | 2 +- .../shared/_article_fields_units.html.haml | 15 ++++++------ app/views/shared/_article_unit_ratio.haml | 4 ++-- app/views/stockit/_form.html.haml | 2 +- config/locales/de.yml | 23 ++++++++++++++++++ config/locales/en.yml | 24 +++++++++++++++++++ 7 files changed, 59 insertions(+), 13 deletions(-) diff --git a/app/views/articles/_edit_all_table.html.haml b/app/views/articles/_edit_all_table.html.haml index c01b1165..aa9c752f 100644 --- a/app/views/articles/_edit_all_table.html.haml +++ b/app/views/articles/_edit_all_table.html.haml @@ -35,7 +35,7 @@ %td .d-flex.gap-1.align-items-center = form.hidden_field :unit, id: 'article_unit_hidden', value: '' - = form.input :supplier_order_unit, as: :select, collection: @article_units, label: false, value: article.supplier_order_unit, include_blank: t('custom_unit'), input_html: {class: 'input-medium'} + = form.input :supplier_order_unit, as: :select, collection: @article_units, label: false, value: article.supplier_order_unit, include_blank: t('.custom_unit'), input_html: {class: 'input-medium'} = form.input :unit, input_html: {class: 'input-mini ml-1'}, label: false %div.btn-link.toggle-extra-units.text-decoration-none.default-values %i.icon-cog diff --git a/app/views/articles/_sync_table.html.haml b/app/views/articles/_sync_table.html.haml index 35014ec8..4d667569 100644 --- a/app/views/articles/_sync_table.html.haml +++ b/app/views/articles/_sync_table.html.haml @@ -44,7 +44,7 @@ %td{:style => highlight_new(attrs, :origin)}= form.text_field 'origin', class: 'input-mini' %td{:style => highlight_new(attrs, :supplier_order_unit)} .d-flex.gap-1.align-items-center - = form.input :supplier_order_unit, as: :select, collection: @article_units, label: false, value: changed_article.supplier_order_unit, include_blank: t('custom_unit'), input_html: {class: 'input-medium'} + = form.input :supplier_order_unit, as: :select, collection: @article_units, label: false, value: changed_article.supplier_order_unit, include_blank: t('.custom_unit'), input_html: {class: 'input-medium'} = form.input :unit, input_html: {class: 'input-mini ml-1'}, label: false %div.btn-link.toggle-extra-units.text-decoration-none.default-values %i.icon-cog{:style => highlight_new(attrs, [:article_unit_ratio_attributes, :minimum_order_quantity, :billing_unit, :group_order_unit, :group_order_granularity])} diff --git a/app/views/shared/_article_fields_units.html.haml b/app/views/shared/_article_fields_units.html.haml index 7e22ca48..67885336 100644 --- a/app/views/shared/_article_fields_units.html.haml +++ b/app/views/shared/_article_fields_units.html.haml @@ -6,14 +6,14 @@ -# title: unit in which article can be ordered from supplier - supplier_order_unit_override = article.supplier_order_unit - supplier_order_unit_override = 'XPP' if supplier_order_unit_override.nil? && article.unit.nil? - = f.input :supplier_order_unit, as: :select, collection: @article_units, selected: supplier_order_unit_override, include_blank: t('custom_unit'), input_html: {class: 'input-medium'} + = f.input :supplier_order_unit, as: :select, collection: @article_units, selected: supplier_order_unit_override, include_blank: t('.custom_unit'), input_html: {class: 'input-medium'} -# title: free text unit - = f.input :unit, input_html: {class: 'input-mini ml-1', placeholder: t('custom_unit')}, label: false + = f.input :unit, input_html: {class: 'input-mini ml-1', placeholder: t('.unit')}, label: false %i.icon-warning-sign{title: t('warn_about_needless_custom_unit')} .fold-line .control-group - %label.control-label{for: 'unit_ratios'} - = "Unit ratios" + %label.control-label + = t('.unit_ratios') %table#fc_base_price{:class => "controls"} %tbody - ratios = article.article_unit_ratios @@ -22,13 +22,12 @@ %td{:colspan => 6} = link_to t('.add_ratio'), '#', 'data-add-ratio' => true, class: 'btn', title: "add ratio" .fold-line - = f.input :minimum_order_quantity, label: "Mininum order quantity" do + = f.input :minimum_order_quantity do .input-append - = f.input_field :minimum_order_quantity, class: 'input-mini', title: "total minimum order quantity for this article" - / TODO: replace 'pck' with unit offered by supplier + = f.input_field :minimum_order_quantity, class: 'input-mini' %span.add-on .fold-line = f.input :billing_unit, as: :select, collection: [], input_html: {'data-initial-value': article.billing_unit, class: 'input-medium'}, include_blank: false .fold-line - = f.input :group_order_granularity, label: "Allow orders per", input_html: {class: 'input-mini', title: "steps in which ordergroups can order this article"} + = f.input :group_order_granularity, input_html: {class: 'input-mini'} = f.input :group_order_unit, as: :select, collection: [], input_html: {'data-initial-value': article.group_order_unit, class: 'input-medium'}, label: '×'.html_safe, include_blank: false diff --git a/app/views/shared/_article_unit_ratio.haml b/app/views/shared/_article_unit_ratio.haml index d93433cb..a4532933 100644 --- a/app/views/shared/_article_unit_ratio.haml +++ b/app/views/shared/_article_unit_ratio.haml @@ -11,9 +11,9 @@ = sub_form.input :quantity, {input_html: {class: 'input-mini'}, label: false} %td= '×'.html_safe %td= sub_form.input :unit, as: :select, include_blank: true, collection: @article_units, label: false, input_html: {class: 'input-medium'} - %td.ml-1= t 'per' + %td.ml-1= t('.per') %td %span.unit_multiplier.mr-1 %td.actions{style: 'width:1em'} - = link_to t('.remove'), method: :delete, 'data-remove-ratio' => true, title: 'remove', class: 'btn btn-danger btn-mini' do + = link_to t('.remove'), method: :delete, 'data-remove-ratio' => true, title: t('.remove'), class: 'btn btn-danger btn-mini' do = glyph :remove diff --git a/app/views/stockit/_form.html.haml b/app/views/stockit/_form.html.haml index ec22b198..7250eba4 100644 --- a/app/views/stockit/_form.html.haml +++ b/app/views/stockit/_form.html.haml @@ -15,7 +15,7 @@ .fold-line.d-flex = f.hidden_field :unit, id: 'article_unit_hidden', value: '' -# title: unit in which article can be ordered from supplier - = f.input :supplier_order_unit, as: :select, collection: @article_units, value: stock_article.supplier_order_unit, include_blank: t('custom_unit'), input_html: {class: 'input-medium'} + = f.input :supplier_order_unit, as: :select, collection: @article_units, value: stock_article.supplier_order_unit, include_blank: t('.custom_unit'), input_html: {class: 'input-medium'} -# title: free text unit = f.input :unit, input_html: {class: 'input-mini ml-1'}, label: false .fold-line diff --git a/config/locales/de.yml b/config/locales/de.yml index 8522aa8c..f5770aff 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -38,6 +38,20 @@ de: price: Nettopreis tax: MwSt unit_quantity: Gebindegröße + + availability: Artikel ist verfügbar? + name: Name + note: Notiz + origin: Herkunft + manufacturer: Produzent + order_number: Bestellnummer + article_category: Kategorie + + supplier_order_unit: Liefereinheit + group_order_granularity: bestellbar per + billing_unit: Abrechnungseinheit + price_unit: Preiseinheit + minimum_order_quantity: Mindestbestellmenge bank_account: balance: Kontostand bank_gateway: Bankgateway @@ -254,6 +268,7 @@ de: exclusion: erledigte Aufgaben können nicht wöchentlich wiederholt werden models: article: Artikel + article_version: Artikel article_category: Kategorie bank_account: Bankkonto bank_gateway: Bankgateway @@ -1586,6 +1601,14 @@ de: ordered_desc: Anzahl der Artikel die durch das Mitglied bestellt wurden (Menge + Toleranz) received: Bekommen received_desc: Anzahl der Artikel die ein Mitglied erhält + article_fields_units: + custom_unit: Benutzerdefiniert + unit: Einheit + unit_ratios: Einheiten-Umrechnung + add_ratio: Umrechnung hinzufügen + article_unit_ratio: + remove: Umrechnung entfernen + per: pro articles_by: price: Gesamtpreis price_sum: Summe diff --git a/config/locales/en.yml b/config/locales/en.yml index 8457f160..f18afd74 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -39,6 +39,21 @@ en: price: Price (net) tax: VAT unit_quantity: Unit quantity + + + availability: Is article available? + name: Name + note: Note + origin: Origin + manufacturer: Manufacturer + order_number: Order number + article_category: Category + + supplier_order_unit: Delivery unit + group_order_granularity: can be ordered per + billing_unit: Billing unit + price_unit: Price unit + minimum_order_quantity: Minimum order quantity bank_account: balance: Balance bank_gateway: Bank gateway @@ -144,6 +159,7 @@ en: updated_by: Last edited by order_article: article: Article + article_version: Article missing_units: Missing units missing_units_short: Missing quantity: Desired amount @@ -1599,6 +1615,14 @@ en: ordered_desc: Number of articles as ordered by member (amount + tolerance) received: Received received_desc: Number of articles that (will be) received by member + article_fields_units: + custom_unit: Custom + unit: Unit + unit_ratios: Unit ratios + add_ratio: Add ratio + article_unit_ratio: + remove: Remove ratio + per: per articles_by: price: Total price price_sum: Sum