qr-bills 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a85d84e79fe4fa53efb5f4d4821e16c81b284a130c846080899832a96bd4411f
4
- data.tar.gz: 1259e4936f1c13236e8db5f3a030e915c3cf4187cfe5cbae860932b1cc8862f3
3
+ metadata.gz: 673b6c6cd7948ecf8121a1cff9462c6d60a7c8b1022078fae2eb463919885dc7
4
+ data.tar.gz: 765e8d32630c70b9b8441e0cc8613821ba8e683bd9324293adc3ebdea4ec785d
5
5
  SHA512:
6
- metadata.gz: 18740e8deb4d743597acdee385ee27e2f05b79ea912d64d4c57e83d6a4e9ab6b8681e2db92634fec366e9124fe4639a689ce334d6bddc2278b81b6ba2615193c
7
- data.tar.gz: f6a0c34c01b2c61484dde00ca5965feb08c059eba293f7977a91ca9f0eca476205280453ff333b135f876e4edfd06b681593a584acea6544adf8d8f7d043eb34
6
+ metadata.gz: bcb1a9f90fae5d55d14d2452212a47a29fa6049e9f1f86cc9ed682824424614a5909095b69aa0adc4f2b8d1f092fcc9fd56316b8742c559ba571acaaaba7a282
7
+ data.tar.gz: 58723203eeb46a9948ed5d37fcb35603c2e6abb7a294d351c30c7f3e26629fc0a4eecfd493aa947cef794a25fdc56c6a73432f57be3a373ce5c9fe2146c1b28d
@@ -0,0 +1,17 @@
1
+ de:
2
+ qrbills:
3
+ payment_part: Zahlteil
4
+ account: Konto
5
+ payable_to: Zahlbar an
6
+ reference: Referenz
7
+ additional_information: zusätzliche Informationen
8
+ further_information: weitere Informationen
9
+ currency: Währung
10
+ amount: Betrag
11
+ receipt: Empfangsschein
12
+ acceptance_point: Annahmestelle
13
+ separate_before_paying_in: Vor der Einzahlung abzutrennen
14
+ payable_by: Zahlbar durch
15
+ payable_by_name_addr: Zahlbar durch (Name/Adresse)
16
+ in_favour_of: Zugunsten
17
+ name: Name
@@ -0,0 +1,17 @@
1
+ en:
2
+ qrbills:
3
+ payment_part: payment part
4
+ account: account
5
+ payable_to: payable to
6
+ reference: reference
7
+ additional_information: additional information
8
+ further_information: further information
9
+ currency: currency
10
+ amount: amount
11
+ receipt: receipt
12
+ acceptance_point: acceptance point
13
+ separate_before_paying_in: separate before paying in
14
+ payable_by: payable by
15
+ payable_by_name_addr: payable by (name/address)
16
+ in_favour_of: in favour of
17
+ name: nom
@@ -0,0 +1,17 @@
1
+ fr:
2
+ qrbills:
3
+ payment_part: section paiement
4
+ account: compte
5
+ payable_to: payable à
6
+ reference: référence
7
+ additional_information: informations additionnelles
8
+ further_information: informations supplémentaires
9
+ currency: monnaie
10
+ amount: montant
11
+ receipt: récépissé
12
+ acceptance_point: èpomt de dépôt
13
+ separate_before_paying_in: à détacher avant le versement
14
+ payable_by: payable par
15
+ payable_by_name_addr: payable par (nom/adresse)
16
+ in_favour_of: en faveur de
17
+ name: name
@@ -0,0 +1,17 @@
1
+ it:
2
+ qrbills:
3
+ payment_part: "sezione pagamento"
4
+ account: conto
5
+ payable_to: "pagabile a"
6
+ reference: riferimento
7
+ additional_information: "informazioni aggiuntive"
8
+ further_information: "informazioni supplementari"
9
+ currency: valuta
10
+ amount: importo
11
+ receipt: ricevuta
12
+ acceptance_point: "punto di accettazione"
13
+ separate_before_paying_in: "da staccare prima del versamento"
14
+ payable_by: pagabile da
15
+ payable_by_name_addr: pagabile da (nome/indirizzo)
16
+ in_favour_of: a favore di
17
+ name: nome
@@ -23,10 +23,10 @@ class QRBills
23
23
  end
24
24
 
25
25
  # init translator sets
26
- I18n.load_path << File.join(qr_params[:locales][:path], "it.yml")
27
- I18n.load_path << File.join(qr_params[:locales][:path], "en.yml")
28
- I18n.load_path << File.join(qr_params[:locales][:path], "de.yml")
29
- I18n.load_path << File.join(qr_params[:locales][:path], "fr.yml")
26
+ I18n.load_path << File.join(qr_params[:locales][:path], "qrbills.it.yml")
27
+ I18n.load_path << File.join(qr_params[:locales][:path], "qrbills.en.yml")
28
+ I18n.load_path << File.join(qr_params[:locales][:path], "qrbills.de.yml")
29
+ I18n.load_path << File.join(qr_params[:locales][:path], "qrbills.fr.yml")
30
30
  I18n.default_locale = :it
31
31
 
32
32
  bill = {
@@ -10,8 +10,8 @@ class QRHTMLLayout
10
10
  def self.html_layout(params)
11
11
  layout = "<div class=\"bill_container\">\n"
12
12
  layout += " <div class=\"receipt_section\">\n"
13
- layout += " <div class=\"title\">#{I18n.t(:receipt).capitalize}</div>\n"
14
- layout += " <div class=\"subtitle payable_to\">#{I18n.t(:account).capitalize} / #{I18n.t(:payable_to).capitalize}</div>\n"
13
+ layout += " <div class=\"title\">#{I18n.t("qrbills.receipt").capitalize}</div>\n"
14
+ layout += " <div class=\"subtitle payable_to\">#{I18n.t("qrbills.account").capitalize} / #{I18n.t("qrbills.payable_to").capitalize}</div>\n"
15
15
  layout += " <div class=\"qrcontent\">\n"
16
16
  layout += " #{params[:bill_params][:creditor][:iban]}<br/>\n"
17
17
  layout += " #{params[:bill_params][:creditor][:address][:name]}<br/>\n"
@@ -21,14 +21,14 @@ class QRHTMLLayout
21
21
  layout += " <div><br/></div>\n"
22
22
 
23
23
  if !params[:bill_params][:reference].nil? && !params[:bill_params][:reference].empty?
24
- layout += " <div class=\"subtitle reference\">#{I18n.t(:reference).capitalize}</div>\n"
24
+ layout += " <div class=\"subtitle reference\">#{I18n.t("qrbills.reference").capitalize}</div>\n"
25
25
  layout += " <div class=\"reference\">\n"
26
26
  layout += " #{params[:bill_params][:reference]}<br/>\n"
27
27
  layout += " </div>\n"
28
28
  layout += " <div><br/></div>\n"
29
29
  end
30
30
 
31
- layout += " <div class=\"subtitle payable_by\">#{I18n.t(:payable_by).capitalize}</div>\n"
31
+ layout += " <div class=\"subtitle payable_by\">#{I18n.t("qrbills.payable_by").capitalize}</div>\n"
32
32
  layout += " <div class=\"payable_by\">\n"
33
33
  layout += " #{params[:bill_params][:debtor][:address][:name]}<br/>\n"
34
34
  layout += " #{params[:bill_params][:debtor][:address][:line1]} #{params[:bill_params][:debtor][:address][:line2]}<br/>\n"
@@ -37,33 +37,33 @@ class QRHTMLLayout
37
37
 
38
38
  layout += " <div class=\"amount\">\n"
39
39
  layout += " <div class=\"currency\">\n"
40
- layout += " <span class=\"amount_header subtitle\">#{I18n.t(:currency).capitalize}</span><br/>\n"
40
+ layout += " <span class=\"amount_header subtitle\">#{I18n.t("qrbills.currency").capitalize}</span><br/>\n"
41
41
  layout += " #{params[:bill_params][:currency]}<br/>\n"
42
42
  layout += " </div>\n"
43
43
 
44
44
  layout += " <div class=\"amount_value\">\n"
45
- layout += " <span class=\"amount_header subtitle\">#{I18n.t(:amount).capitalize}</span><br/>\n"
45
+ layout += " <span class=\"amount_header subtitle\">#{I18n.t("qrbills.amount").capitalize}</span><br/>\n"
46
46
  layout += " #{params[:bill_params][:amount]}<br/>\n"
47
47
  layout += " </div>\n"
48
48
  layout += " </div>\n"
49
49
 
50
50
  layout += " <div class=\"acceptance_point\">\n"
51
- layout += " #{I18n.t(:acceptance_point).capitalize}<br/>\n"
51
+ layout += " #{I18n.t("qrbills.acceptance_point").capitalize}<br/>\n"
52
52
  layout += " </div>\n"
53
53
 
54
54
  layout += " </div>\n"
55
55
  layout += " <div class=\"payment_section\">\n"
56
56
  layout += " <div class=\"left_column\">\n"
57
- layout += " <div class=\"title\">#{I18n.t(:payment_part).capitalize}</div>\n"
57
+ layout += " <div class=\"title\">#{I18n.t("qrbills.payment_part").capitalize}</div>\n"
58
58
  layout += " <div class=\"qr_code\"><img src=\"#{params[:qrcode_filepath]}\" /></div>\n"
59
59
  layout += " <div class=\"amount\">\n"
60
60
  layout += " <div class=\"currency\">\n"
61
- layout += " <span class=\"amount_header subtitle\">#{I18n.t(:currency).capitalize}</span><br/>\n"
61
+ layout += " <span class=\"amount_header subtitle\">#{I18n.t("qrbills.currency").capitalize}</span><br/>\n"
62
62
  layout += " #{params[:bill_params][:currency]}<br/>\n"
63
63
  layout += " </div>\n"
64
64
 
65
65
  layout += " <div class=\"amount_value\">\n"
66
- layout += " <span class=\"amount_header subtitle\">#{I18n.t(:amount).capitalize}</span><br/>\n"
66
+ layout += " <span class=\"amount_header subtitle\">#{I18n.t("qrbills.amount").capitalize}</span><br/>\n"
67
67
  layout += " #{params[:bill_params][:amount]}<br/>\n"
68
68
  layout += " </div>\n"
69
69
  layout += " </div>\n"
@@ -71,17 +71,17 @@ class QRHTMLLayout
71
71
  layout += " <div class=\"further_information\">\n"
72
72
 
73
73
  if !params[:bill_params][:bill_information_coded].nil? && !params[:bill_params][:bill_information_coded].empty?
74
- layout += " <span class=\"finfo_header\">Name AV1:</span> #{params[:bill_params][:bill_information_coded]}\n"
74
+ layout += " <span class=\"finfo_header\">#{I18n.t("qrbills.name").capitalize} AV1:</span> #{params[:bill_params][:bill_information_coded]}\n"
75
75
  end
76
76
 
77
77
  if !params[:bill_params][:alternative_scheme_paramters].nil? && !params[:bill_params][:alternative_scheme_paramters].empty?
78
- layout += " <span class=\"finfo_header\">Name AV2:</span> #{params[:bill_params][:alternative_scheme_paramters]}\n"
78
+ layout += " <span class=\"finfo_header\">#{I18n.t("qrbills.name").capitalize} AV2:</span> #{params[:bill_params][:alternative_scheme_paramters]}\n"
79
79
  end
80
80
 
81
81
  layout += " </div>\n"
82
82
  layout += " </div>\n"
83
83
  layout += " <div class=\"right_column\">\n"
84
- layout += " <div class=\"subtitle payable_to\">#{I18n.t(:account).capitalize} / #{I18n.t(:payable_to).capitalize}</div>\n"
84
+ layout += " <div class=\"subtitle payable_to\">#{I18n.t("qrbills.account").capitalize} / #{I18n.t("qrbills.payable_to").capitalize}</div>\n"
85
85
  layout += " <div class=\"qrcontent\">\n"
86
86
  layout += " #{params[:bill_params][:creditor][:iban]}<br/>\n"
87
87
  layout += " #{params[:bill_params][:creditor][:address][:name]}<br/>\n"
@@ -91,7 +91,7 @@ class QRHTMLLayout
91
91
  layout += " <div><br/></div>\n"
92
92
 
93
93
  if !params[:bill_params][:reference].nil? && !params[:bill_params][:reference].empty?
94
- layout += " <div class=\"subtitle reference\">#{I18n.t(:reference).capitalize}</div>\n"
94
+ layout += " <div class=\"subtitle reference\">#{I18n.t("qrbills.reference").capitalize}</div>\n"
95
95
  layout += " <div class=\"reference\">\n"
96
96
  layout += " #{params[:bill_params][:reference]}<br/>\n"
97
97
  layout += " </div>\n"
@@ -99,14 +99,14 @@ class QRHTMLLayout
99
99
  end
100
100
 
101
101
  if !params[:bill_params][:additionally_information].nil? && !params[:bill_params][:additionally_information].empty?
102
- layout += " <div class=\"subtitle additional_information\">#{I18n.t(:additional_information).capitalize}</div>\n"
102
+ layout += " <div class=\"subtitle additional_information\">#{I18n.t("qrbills.additional_information").capitalize}</div>\n"
103
103
  layout += " <div class=\"additional_information\">\n"
104
104
  layout += " #{params[:bill_params][:additionally_information]}<br/>\n"
105
105
  layout += " </div>\n"
106
106
  layout += " <div><br/></div>\n"
107
107
  end
108
108
 
109
- layout += " <div class=\"subtitle payable_by\">#{I18n.t(:payable_by).capitalize}</div>\n"
109
+ layout += " <div class=\"subtitle payable_by\">#{I18n.t("qrbills.payable_by").capitalize}</div>\n"
110
110
  layout += " <div class=\"payable_by\">\n"
111
111
  layout += " #{params[:bill_params][:debtor][:address][:name]}<br/>\n"
112
112
  layout += " #{params[:bill_params][:debtor][:address][:line1]} #{params[:bill_params][:debtor][:address][:line2]}<br/>\n"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qr-bills
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damiano Radice
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-05 00:00:00.000000000 Z
11
+ date: 2020-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -105,10 +105,10 @@ executables: []
105
105
  extensions: []
106
106
  extra_rdoc_files: []
107
107
  files:
108
- - config/locales/de.yml
109
- - config/locales/en.yml
110
- - config/locales/fr.yml
111
- - config/locales/it.yml
108
+ - config/locales/qrbills.de.yml
109
+ - config/locales/qrbills.en.yml
110
+ - config/locales/qrbills.fr.yml
111
+ - config/locales/qrbills.it.yml
112
112
  - lib/qr-bills.rb
113
113
  - lib/qr-bills/qr-creditor-reference.rb
114
114
  - lib/qr-bills/qr-exceptions.rb
@@ -1,15 +0,0 @@
1
- de:
2
- payment_part: Zahlteil
3
- account: Konto
4
- payable_to: Zahlbar an
5
- reference: Referenz
6
- additional_information: zusätzliche Informationen
7
- further_information: weitere Informationen
8
- currency: Währung
9
- amount: Betrag
10
- receipt: Empfangsschein
11
- acceptance_point: Annahmestelle
12
- separate_before_paying_in: Vor der Einzahlung abzutrennen
13
- payable_by: Zahlbar durch
14
- payable_by_name_addr: Zahlbar durch (Name/Adresse)
15
- in_favour_of: Zugunsten
@@ -1,15 +0,0 @@
1
- en:
2
- payment_part: payment part
3
- account: account
4
- payable_to: payable to
5
- reference: reference
6
- additional_information: additional information
7
- further_information: further information
8
- currency: currency
9
- amount: amount
10
- receipt: receipt
11
- acceptance_point: acceptance point
12
- separate_before_paying_in: separate before paying in
13
- payable_by: payable by
14
- payable_by_name_addr: payable by (name/address)
15
- in_favour_of: in favour of
@@ -1,15 +0,0 @@
1
- fr:
2
- payment_part: section paiement
3
- account: compte
4
- payable_to: payable à
5
- reference: référence
6
- additional_information: informations additionnelles
7
- further_information: informations supplémentaires
8
- currency: monnaie
9
- amount: montant
10
- receipt: récépissé
11
- acceptance_point: èpomt de dépôt
12
- separate_before_paying_in: à détacher avant le versement
13
- payable_by: payable par
14
- payable_by_name_addr: payable par (nom/adresse)
15
- in_favour_of: en faveur de
@@ -1,15 +0,0 @@
1
- it:
2
- payment_part: "sezione pagamento"
3
- account: conto
4
- payable_to: "pagabile a"
5
- reference: riferimento
6
- additional_information: "informazioni aggiuntive"
7
- further_information: "informazioni supplementari"
8
- currency: valuta
9
- amount: importo
10
- receipt: ricevuta
11
- acceptance_point: "punto di accettazione"
12
- separate_before_paying_in: "da staccare prima del versamento"
13
- payable_by: pagabile da
14
- payable_by_name_addr: pagabile da (nome/indirizzo)
15
- in_favour_of: a favore di