Skip to content

Commit

Permalink
On #23: Added some translations
Browse files Browse the repository at this point in the history
  • Loading branch information
lentschi committed Jan 3, 2024
1 parent 21740ad commit 9a0f813
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/views/articles/_edit_all_table.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/views/articles/_sync_table.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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])}
Expand Down
15 changes: 7 additions & 8 deletions app/views/shared/_article_fields_units.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions app/views/shared/_article_unit_ratio.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion app/views/stockit/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9a0f813

Please sign in to comment.