system_settings 0.9.1 → 0.9.2

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: 213bb372d94ea27ce951f424559b1e19812248cca9df0f66136d4776d9848fb8
4
- data.tar.gz: 0530b07ab886e8e2515d957c839b37c1eb7817d90deb2e1e2996d10457c08efa
3
+ metadata.gz: d5c97af4888389d99d26caaed6a9816a77eff42311ff77bafec0602ec3937828
4
+ data.tar.gz: 74d29ce78b5e1198b8a0457ec43175c2cc95bab08aeba54a1646e3d7a4afd766
5
5
  SHA512:
6
- metadata.gz: 5d4ea1661ba9b875628ae3ac32e26cb593607ce8e470bc651287d105e23889b6794a1db594dff754dc1fcf89f0118995b4dc544c1d4d9a8fbfc3391d20e532a6
7
- data.tar.gz: 397e5ade494169a4ff92c6bab9abada406c4d5ae9b2e3725a1ac282ec2d7cb7a066f8f7c69a724826d1e20bd3dc97f4decf48a80c08c61c54ad8a80193bdfcea
6
+ metadata.gz: 496aaa24ade23507f00b0f435635cc99f140f7bb4ea2e63e7bfac1386cfa2fef5bcc3283dc40a31511becf229eb113c0cd19013763a04a0f84643e0d30480524
7
+ data.tar.gz: 22b45e507dba3428b8ef88013c47df36e80acff2389ac28aaf59f4b629e32076a0219cc407630bdb448218ffe46f9cc6cc9bd993157ec7f7116b755e2b43f3e8
@@ -2,5 +2,12 @@
2
2
 
3
3
  module SystemSettings::Errors
4
4
  class NotFoundError < SystemSettings::Errors::Error
5
+ if ActiveSupport.const_defined?("ActionableError")
6
+ include ActiveSupport::ActionableError
7
+
8
+ action "Load all settings" do
9
+ SystemSettings.load
10
+ end
11
+ end
5
12
  end
6
13
  end
@@ -2,14 +2,14 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <title>System Settings - <%= SystemSettings::VERSION %></title>
5
+ <title><%= SystemSettings::Setting.model_name.human(count: 2) %> - <%= SystemSettings::VERSION %></title>
6
6
  <%= csrf_meta_tags %>
7
7
  <%= stylesheet_link_tag 'system_settings/application', media: 'all' %>
8
8
  </head>
9
9
  <body>
10
10
  <header>
11
11
  <div class="container">
12
- <%= link_to "System Settings", root_path, class: "app-name" %>
12
+ <%= link_to SystemSettings::Setting.model_name.human(count: 2), root_path, class: "app-name" %>
13
13
  </div>
14
14
  </header>
15
15
  <main>
@@ -0,0 +1,65 @@
1
+ lv:
2
+ activerecord:
3
+ models:
4
+ system_settings/setting:
5
+ one: "Sistēmas iestatījums"
6
+ other: "Sistēmas iestatījumi"
7
+ system_settings/integer_list_setting:
8
+ one: "Sistēmas iestatījums (Veselu skaitļu virkne)"
9
+ other: "Sistēmas iestatījumi (Veselu skaitļu virkne)"
10
+ system_settings/integer_setting:
11
+ one: "Sistēmas iestatījums (Vesels skaitlis)"
12
+ other: "Sistēmas iestatījumi (Veseli skaitļi)"
13
+ system_settings/string_list_setting:
14
+ one: "Sistēmas iestatījums (Vārdu virkne)"
15
+ other: "Sistēmas iestatījumi (Vārdu virkne)"
16
+ system_settings/string_setting:
17
+ one: "Sistēmas iestatījums (Vārds)"
18
+ other: "Sistēmas iestatījumi (Vārds)"
19
+ system_settings/decimal_setting:
20
+ one: "Sistēmas iestatījums (Decimālskaitlis)"
21
+ other: "Sistēmas iestatījumi (Decimālskaitļi)"
22
+ system_settings/decimal_list_setting:
23
+ one: "Sistēmas iestatījums (Decimālskaitļu virkne)"
24
+ other: "Sistēmas iestatījumi (Decimālskaitļu virkne)"
25
+ system_settings/boolean_setting:
26
+ one: "Sistēmas iestatījums (Patiesumvērtība)"
27
+ other: "Sistēmas iestatījumi (Patiesumvērtības)"
28
+ attributes:
29
+ system_settings/setting:
30
+ id: "ID"
31
+ name: "Nosaukums"
32
+ type: "Tips"
33
+ value: "Vērtība"
34
+ description: "Apraksts"
35
+ created_at: "Izveides datums"
36
+ uploaded_at: "Atjaunošanas datums"
37
+ errors:
38
+ models:
39
+ system_settings/setting:
40
+ attributes:
41
+ value:
42
+ blank: "vērtībai ir jābūt aizpildītai"
43
+ not_a_number: "vērtība nav skaitlis"
44
+ not_a_list_of_integers: "vērtība nav virkne ar veseliem skaitļiem"
45
+ not_a_list_of_strings: "vērtība nav virke ar vārdiem"
46
+ not_a_list_of_decimals: "vērtība nav virkne ar decimālskaitļiem"
47
+ system_settings/boolean_setting:
48
+ attributes:
49
+ value:
50
+ inclusion: "ir jābūt aizpildītam"
51
+ system_settings:
52
+ settings:
53
+ index:
54
+ no_settings: "Nav ierakstu"
55
+ add_new: "Jaunus ierakstus iespējams pievienot: <code>%{path}</code>"
56
+ show:
57
+ edit: Labot
58
+ back: Atpakaļ
59
+ form:
60
+ save: Saglabāt
61
+ back: Atpakaļ
62
+ hints_by_type:
63
+ "SystemSettings::StringListSetting": "Vairākas vērtības atdala ar <code>;</code> simbolu."
64
+ "SystemSettings::IntegerListSetting": "Vairākas vērtības atdala ar <code>;</code> simbolu."
65
+ "SystemSettings::DecimalListSetting": "Decimālskaitļu veselo skaitli no decimāldaļas atdala ar <code>.</code> simbolu. Vairākas vērtības atdala ar <code>;</code> simbolu."
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SystemSettings
4
- VERSION = "0.9.1"
4
+ VERSION = "0.9.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: system_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krists Ozols
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-29 00:00:00.000000000 Z
11
+ date: 2021-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -67,6 +67,7 @@ files:
67
67
  - app/views/system_settings/settings/index.html.erb
68
68
  - app/views/system_settings/settings/show.html.erb
69
69
  - config/locales/system_settings.en.yml
70
+ - config/locales/system_settings.lv.yml
70
71
  - config/routes.rb
71
72
  - db/migrate/20181007125347_create_system_settings_settings.rb
72
73
  - lib/system_settings.rb
@@ -85,14 +86,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
86
  requirements:
86
87
  - - ">="
87
88
  - !ruby/object:Gem::Version
88
- version: 2.4.0
89
+ version: 2.6.0
89
90
  required_rubygems_version: !ruby/object:Gem::Requirement
90
91
  requirements:
91
92
  - - ">="
92
93
  - !ruby/object:Gem::Version
93
94
  version: '0'
94
95
  requirements: []
95
- rubygems_version: 3.1.4
96
+ rubygems_version: 3.2.32
96
97
  signing_key:
97
98
  specification_version: 4
98
99
  summary: Settings for your Rails application