micoo 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bebc66e37df81808e0e723e937ef19f342cadd794ed572dbd47caa02c579047f
4
- data.tar.gz: baa4e661ed749be3a09d4fc58b76e50c3a7529ac62aa8e0ba9d1c10004b521cb
3
+ metadata.gz: 6c82aee71a8f615ee75b99c1b14d640b0b09886a73460482efe9e5bba96da02b
4
+ data.tar.gz: 19de10e0ac48e27806b38c7ba723089e4492c5b8981107334525fb75157cb61d
5
5
  SHA512:
6
- metadata.gz: 64f119463459b058cd4e25b51f1433c764610a5ed8d0f59ea4449a203fed4cafac602ffd813cbcd54a92ff74a96e9b4c3d31a47cfe5ae023387e94f3d482ae15
7
- data.tar.gz: d62a5839834444290c1bae2da4ca8b9c8003b89b8ee8adeff2fc3cd87274e5ba48d4833fcda8f7477006e26cbf81613634d860d2c1f4c485f2bd9cb0d9575089
6
+ metadata.gz: 96fba69bce87544895ed7b292c953e7295053a180e2ad8b93ecf6c03dc8a970c6639caa4bf59f336a41d0131a0e776ad6105167b55d04dec5d5982b460782967
7
+ data.tar.gz: 94a73329dc3ceced61c709b9056b818c1ee7732771505ba1ac5e30daebd76c67b21f21fd6f85e05a0134d1e7725c7d2d194820d57138564f93ca4ba8dc9f55ff
data/README.md CHANGED
@@ -34,7 +34,7 @@ add additional text and links for further description.
34
34
  ### _url_
35
35
 
36
36
  Redirection to _url_ will be triggered by clicking *Accept* or *Reject*.
37
- Defult is "/".
37
+ Default is "/".
38
38
 
39
39
  ## Usage
40
40
 
@@ -51,6 +51,21 @@ Defult is "/".
51
51
  ...
52
52
  ```
53
53
 
54
+ ## I18n
55
+ You may provide an "internationalized" text via the _text_ parameter.
56
+
57
+ _Micoo_ buttons uses the I18n.translate method for the legend.
58
+ A configuration file (a sample) may be:
59
+
60
+ ```ruby
61
+ # config/locales/en.yml
62
+ en:
63
+ micoo:
64
+ button:
65
+ accept: Accept
66
+ reject: Reject
67
+ ```
68
+
54
69
  ## Installation
55
70
  As usual:
56
71
 
@@ -48,6 +48,8 @@ class CookiesComponent < ViewComponent::Base
48
48
  }
49
49
 
50
50
  #cookies
51
+ - accept_text = t("micoo.button.accept", default: "Accept")
52
+ - reject_text = t("micoo.button.reject", default: "Reject")
51
53
  - @url ||= "/"
52
54
  - [@text].flatten.each do |line|
53
55
  p = line.html_safe
@@ -55,8 +57,8 @@ class CookiesComponent < ViewComponent::Base
55
57
  p = line.html_safe
56
58
  .buttons
57
59
  button
58
- a href=helpers.cookies_path(cookiesOK: :x, url: @url) Accept
60
+ a href=helpers.cookies_path(cookiesOK: :x, url: @url) = accept_text
59
61
  button
60
- a href=helpers.cookies_path(url: @url) Reject
62
+ a href=helpers.cookies_path(url: @url) = reject_text
61
63
  HEREDOC
62
64
  end
data/lib/micoo/version.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  module Micoo
2
- VERSION = "0.1.3" # 2024-05-06
2
+ VERSION = "0.2.0" # 2024-05-19
3
+ # VERSION = "0.1.3" # 2024-05-06
3
4
  end
@@ -1,5 +1,3 @@
1
1
  module Micoo
2
2
  VERSION = "0.1.3" # 2024-05-06
3
- # VERSION = "0.1.2" # 2024-05-02
4
- # VERSION = "0.1.1" # 2024-05-01
5
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: micoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dittmar Krall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-06 00:00:00.000000000 Z
11
+ date: 2024-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: combustion