rails_i18n_manager 1.0.2 → 1.1.0

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: 1582e51311f1da753a0240ed429a9b7dbec17704410f633ffc6a5efa15a5da38
4
- data.tar.gz: 2e72a24e32dd28d8a3b7a738fe182f09ba8451ca44a67db8577da02a3fd4a4e9
3
+ metadata.gz: f728ba9cda5d596101c9da0d9e5336ca468d9db8b9c7c15d1bd621db9e065fc9
4
+ data.tar.gz: 800e36c720bf9a2a2c18b9f2e286507b463cda8dbecdb3a7b67237c2faea20a7
5
5
  SHA512:
6
- metadata.gz: 4be1f55dade0acd9bc08c0f411d3ef294e8d94575a8d1add5af734901bb5112f520282936582133cdf766f12519e555e016ea04e699de8cd8266d45a3f7c8c20
7
- data.tar.gz: 92908f9f5c2778c0cfacb737f0f33690b322dcaf91674a4c82ec100b7ba9c249625cd292dca478e8ff5efb308f9a4d5d10019466ec9020f80d2ecefcb0d317b7
6
+ metadata.gz: 9c5fa427b474d3e313adc680decffb40f9b403e6a1cd9fa362d6c698b17170842b57d44650d0a0c19fd6f41d179f232880a16911d01f56c0e98f61ad7543daf2
7
+ data.tar.gz: 3cd51e42ac3cec4465cf10b3a7de4c52cca60268bccc70485a8b9ae7a1087f764e3dfe13abfdade0cbe758a12a5b7ea0cad6edcc90a48348e37e11cd512afda9
@@ -17,11 +17,6 @@ module RailsI18nManager
17
17
  fields_for(*args, options, &block)
18
18
  end
19
19
 
20
- ASSET_VERSION = `git show -s --format=%ci`.parameterize.freeze
21
- def custom_asset_path(path)
22
- "#{path}?v=#{Rails.env.development? ? Time.now.to_i : ASSET_VERSION}"
23
- end
24
-
25
20
  def breadcrumb_item(title, url=nil)
26
21
  if url.nil?
27
22
  %Q(<span class="breadcrumb-item">#{title}</span>).html_safe
@@ -4,7 +4,7 @@ module RailsI18nManager
4
4
 
5
5
  include ActiveSortOrder
6
6
 
7
- scope :multi_search, ->(full_str){
7
+ scope :multi_search, ->(full_str){
8
8
  if full_str.present?
9
9
  rel = self
10
10
 
@@ -139,7 +139,7 @@ module RailsI18nManager
139
139
  return nil
140
140
  end
141
141
 
142
- zip_file = Zip::File.open(temp_file, create: !File.exist?(temp_file)) do |zipfile|
142
+ zip_file = Zip::File.open(temp_file, create: true) do |zipfile|
143
143
  files_to_write.each do |file|
144
144
  zipfile.add(file.sub(base_folder_path, "translations/"), file)
145
145
  end
@@ -0,0 +1,69 @@
1
+ <style>
2
+ h1, h2, h3, h4, h5{
3
+ color: #424242;
4
+ }
5
+
6
+ body{
7
+ background-color: #F5F6F6;
8
+ padding-top: 80px;
9
+ padding-bottom: 20px;
10
+ }
11
+
12
+ label{
13
+ margin-right: 10px;
14
+ }
15
+
16
+ footer{
17
+ position: fixed;
18
+ text-align: center;
19
+ bottom: 10px;
20
+ right: 0;
21
+ left: 0;
22
+ }
23
+
24
+ .btn-default{
25
+ border-color: gray;
26
+ background-color: gray;
27
+ background-image: none;
28
+ }
29
+
30
+ .breadcrumb-item:before{
31
+ content: "/":
32
+ }
33
+
34
+ .form-group{
35
+ margin-bottom: 15px !important;
36
+ }
37
+
38
+ select{
39
+ min-width: 300px;
40
+ }
41
+
42
+ form label{
43
+ margin-bottom: 5px;
44
+ font-weight: bold;
45
+ }
46
+
47
+ .nav-link.active{
48
+ font-weight: bold;
49
+ }
50
+
51
+ .navbar-nav .nav-item{
52
+ margin-left: 10px;
53
+ }
54
+
55
+ .navbar-brand{
56
+ font-weight: bold;
57
+ text-decoration: underline;
58
+ }
59
+
60
+ .ss-main{
61
+ // for slimselect.js
62
+ background-image: none !important;
63
+ height: 38px;
64
+ }
65
+
66
+ .ss-option{
67
+ min-height: 32px !important;
68
+ }
69
+ </style>
@@ -0,0 +1,39 @@
1
+ <script type="text/javascript">
2
+ window.init = function(){
3
+ $("form").attr("autocomplete", "off");
4
+
5
+ $('.field_with_errors').addClass('is-invalid');
6
+
7
+ var alerts = $(".alert:not(.permanent)")
8
+ setTimeout(function(){
9
+ alerts.fadeOut();
10
+ }, 8000);
11
+
12
+ autosize($('textarea'));
13
+
14
+ $("select").each(function(){
15
+ $(this).removeClass("form-select");
16
+
17
+ new SlimSelect({
18
+ select: this,
19
+ settings: {
20
+ //contentLocation: document.body,
21
+ contentLocation: this.parentElement,
22
+ closeOnSelect: !this.hasAttribute("multiple"),
23
+ openPosition: 'down', // options: auto, up, down
24
+ //placeholderText: "Select Value",
25
+ placeholderText: "Select...",
26
+ //searchPlaceholder: 'Search',
27
+ //searchText: 'No Results',
28
+ //searchingText: 'Searching...',
29
+ maxValuesShown: 999, // defaults to 20, max selected items show in multi-selects
30
+ //maxValuesShown: 20,
31
+ }
32
+ })
33
+ });
34
+ }
35
+
36
+ $(function(){
37
+ window.init();
38
+ });
39
+ </script>
@@ -0,0 +1,20 @@
1
+ script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" referrerpolicy="no-referrer"
2
+
3
+ link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous"
4
+ script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous"
5
+
6
+ = render "layouts/rails_i18n_manager/utility_css"
7
+ = render "layouts/rails_i18n_manager/app_css"
8
+
9
+ script src="https://cdn.jsdelivr.net/npm/@rails/ujs@7.0.4-3/lib/assets/compiled/rails-ujs.min.js"
10
+
11
+ link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slim-select/2.4.5/slimselect.min.css" integrity="sha512-GvqWM4KWH8mbgWIyvwdH8HgjUbyZTXrCq0sjGij9fDNiXz3vJoy3jCcAaWNekH2rJe4hXVWCJKN+bEW8V7AAEQ==" crossorigin="anonymous" referrerpolicy="no-referrer"
12
+ script src="https://cdnjs.cloudflare.com/ajax/libs/slim-select/2.4.5/slimselect.global.min.js" integrity="sha512-r2ujllVbPV4gVNZyqAB6LS3cnpEenEl18yFYoowmutUX5zVXQi5mp13lMWv3FQpsn96eFJTcd5VqBkZuatGtWQ==" crossorigin="anonymous" referrerpolicy="no-referrer"
13
+
14
+ script src="https://cdnjs.cloudflare.com/ajax/libs/autosize.js/3.0.20/autosize.min.js" integrity="sha512-EAEoidLzhKrfVg7qX8xZFEAebhmBMsXrIcI0h7VPx2CyAyFHuDvOAUs9CEATB2Ou2/kuWEDtluEVrQcjXBy9yw==" crossorigin="anonymous" referrerpolicy="no-referrer"
15
+
16
+ link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.1/css/font-awesome.min.css" integrity="sha512-IJ+BZHGlT4K43sqBGUzJ90pcxfkREDVZPZxeexRigVL8rzdw/gyJIflDahMdNzBww4k0WxpyaWpC2PLQUWmMUQ==" crossorigin="anonymous" referrerpolicy="no-referrer"
17
+
18
+ link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha512-SfTiTlX6kk+qitfevl/7LibUOeJWlt9rbyDn92a1DqWOw9vWG2MFoays0sgObmWazO5BQPiFucnnEAjpAB+/Sw==" crossorigin="anonymous" referrerpolicy="no-referrer"
19
+
20
+ = render "layouts/rails_i18n_manager/app_javascript"
@@ -0,0 +1,62 @@
1
+ <style>
2
+ .space-left{
3
+ margin-left:5px !important;
4
+ }
5
+ .space-left2{
6
+ margin-left:10px !important;
7
+ }
8
+ .space-left3{
9
+ margin-left:15px !important;
10
+ }
11
+ .space-left4{
12
+ margin-left:20px !important;
13
+ }
14
+ .space-left5{
15
+ margin-left:30px !important;
16
+ }
17
+ .space-right{
18
+ margin-right:5px !important;
19
+ }
20
+ .space-right2{
21
+ margin-right:10px !important;
22
+ }
23
+ .space-right3{
24
+ margin-right:15px !important;
25
+ }
26
+ .space-right4{
27
+ margin-right:20px !important;
28
+ }
29
+ .space-right5{
30
+ margin-right:30px !important;
31
+ }
32
+ .space-above{
33
+ margin-top:5px !important;
34
+ }
35
+ .space-above2{
36
+ margin-top:10px !important;
37
+ }
38
+ .space-above3{
39
+ margin-top:20px !important;
40
+ }
41
+ .space-above4{
42
+ margin-top:30px !important;
43
+ }
44
+ .space-above5{
45
+ margin-top:40px !important;
46
+ }
47
+ .space-below{
48
+ margin-bottom:5px !important;
49
+ }
50
+ .space-below2{
51
+ margin-bottom:10px !important;
52
+ }
53
+ .space-below3{
54
+ margin-bottom:15px !important;
55
+ }
56
+ .space-below4{
57
+ margin-bottom:20px !important;
58
+ }
59
+ .space-below5{
60
+ margin-bottom:30px !important;
61
+ }
62
+ </style>
@@ -8,35 +8,11 @@ html
8
8
  = csrf_meta_tags
9
9
  meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0"
10
10
 
11
- link rel="icon" type="image/x-icon" href=custom_asset_path("/rails_i18n_manager/favicon.ico")
12
-
13
- link rel="stylesheet" href=custom_asset_path("/rails_i18n_manager/utility.css")
14
-
15
- script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" referrerpolicy="no-referrer"
16
-
17
- link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous"
18
- script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous"
19
-
20
- link rel="stylesheet" href=custom_asset_path("/rails_i18n_manager/application.css")
21
-
22
- script src="https://cdn.jsdelivr.net/npm/@rails/ujs@7.0.4-3/lib/assets/compiled/rails-ujs.min.js"
23
-
24
- link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slim-select/2.4.5/slimselect.min.css" integrity="sha512-GvqWM4KWH8mbgWIyvwdH8HgjUbyZTXrCq0sjGij9fDNiXz3vJoy3jCcAaWNekH2rJe4hXVWCJKN+bEW8V7AAEQ==" crossorigin="anonymous" referrerpolicy="no-referrer"
25
- script src="https://cdnjs.cloudflare.com/ajax/libs/slim-select/2.4.5/slimselect.global.min.js" integrity="sha512-r2ujllVbPV4gVNZyqAB6LS3cnpEenEl18yFYoowmutUX5zVXQi5mp13lMWv3FQpsn96eFJTcd5VqBkZuatGtWQ==" crossorigin="anonymous" referrerpolicy="no-referrer"
26
-
27
- script src="https://cdnjs.cloudflare.com/ajax/libs/autosize.js/3.0.20/autosize.min.js" integrity="sha512-EAEoidLzhKrfVg7qX8xZFEAebhmBMsXrIcI0h7VPx2CyAyFHuDvOAUs9CEATB2Ou2/kuWEDtluEVrQcjXBy9yw==" crossorigin="anonymous" referrerpolicy="no-referrer"
28
-
29
- script src=custom_asset_path("/rails_i18n_manager/application.js")
30
-
31
- link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.1/css/font-awesome.min.css" integrity="sha512-IJ+BZHGlT4K43sqBGUzJ90pcxfkREDVZPZxeexRigVL8rzdw/gyJIflDahMdNzBww4k0WxpyaWpC2PLQUWmMUQ==" crossorigin="anonymous" referrerpolicy="no-referrer"
32
-
33
- link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha512-SfTiTlX6kk+qitfevl/7LibUOeJWlt9rbyDn92a1DqWOw9vWG2MFoays0sgObmWazO5BQPiFucnnEAjpAB+/Sw==" crossorigin="anonymous" referrerpolicy="no-referrer"
11
+ = render "layouts/rails_i18n_manager/assets"
34
12
 
35
13
  body
36
14
  nav.navbar.navbar-expand-lg.navbar-light.bg-success.fixed-top
37
15
  .container-fluid
38
- h1.hidden = @title
39
-
40
16
  a.navbar-brand = "#{@title}"
41
17
 
42
18
  button.navbar-toggler type="button" data-bs-toggle="collapse" data-bs-target="#navbar-list" aria-controls="navbar-list" aria-expanded="false" aria-label="Toggle navigation"
@@ -16,28 +16,5 @@ module RailsI18nManager
16
16
  ### Expose static assets
17
17
  app.middleware.use ::ActionDispatch::Static, "#{root}/public"
18
18
  end
19
-
20
- ### Were not using sprockets were just storing everything in public
21
- ### Sprockets Config below
22
- # initializer "rails_i18n_manager.assets.precompile" do |app|
23
- # app.config.assets.precompile << "rails_i18n_manager_manifest.js" ### manifest file required
24
- # app.config.assets.precompile << "rails_i18n_manager/favicon.ico"
25
-
26
- # ### Automatically precompile assets in specified folders
27
- # ["app/assets/images/"].each do |folder|
28
- # dir = app.root.join(folder)
29
-
30
- # if Dir.exist?(dir)
31
- # Dir.glob(File.join(dir, "**/*")).each do |f|
32
- # asset_name = f.to_s
33
- # .split(folder).last # Remove fullpath
34
- # .sub(/^\/*/, '') ### Remove leading '/'
35
-
36
- # app.config.assets.precompile << asset_name
37
- # end
38
- # end
39
- # end
40
- # end
41
-
42
19
  end
43
20
  end
@@ -1,3 +1,3 @@
1
1
  module RailsI18nManager
2
- VERSION = "1.0.2".freeze
2
+ VERSION = "1.1.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_i18n_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Weston Ganger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-07 00:00:00.000000000 Z
11
+ date: 2025-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -234,6 +234,10 @@ files:
234
234
  - app/models/rails_i18n_manager/translation_app.rb
235
235
  - app/models/rails_i18n_manager/translation_key.rb
236
236
  - app/models/rails_i18n_manager/translation_value.rb
237
+ - app/views/layouts/rails_i18n_manager/_app_css.html.erb
238
+ - app/views/layouts/rails_i18n_manager/_app_javascript.html.erb
239
+ - app/views/layouts/rails_i18n_manager/_assets.html.slim
240
+ - app/views/layouts/rails_i18n_manager/_utility_css.html.erb
237
241
  - app/views/layouts/rails_i18n_manager/application.html.slim
238
242
  - app/views/layouts/rails_i18n_manager/application.js.erb
239
243
  - app/views/rails_i18n_manager/form_builder/_basic_field.html.erb
@@ -265,10 +269,6 @@ files:
265
269
  - lib/rails_i18n_manager/config.rb
266
270
  - lib/rails_i18n_manager/engine.rb
267
271
  - lib/rails_i18n_manager/version.rb
268
- - public/rails_i18n_manager/application.css
269
- - public/rails_i18n_manager/application.js
270
- - public/rails_i18n_manager/favicon.ico
271
- - public/rails_i18n_manager/utility.css
272
272
  homepage: https://github.com/westonganger/rails_i18n_manager
273
273
  licenses:
274
274
  - MIT
@@ -1,67 +0,0 @@
1
- h1, h2, h3, h4, h5{
2
- color: #424242;
3
- }
4
-
5
- body{
6
- background-color: #F5F6F6;
7
- padding-top: 80px;
8
- padding-bottom: 20px;
9
- }
10
-
11
- label{
12
- margin-right: 10px;
13
- }
14
-
15
- footer{
16
- position: fixed;
17
- text-align: center;
18
- bottom: 10px;
19
- right: 0;
20
- left: 0;
21
- }
22
-
23
- .btn-default{
24
- border-color: gray;
25
- background-color: gray;
26
- background-image: none;
27
- }
28
-
29
- .breadcrumb-item:before{
30
- content: "/":
31
- }
32
-
33
- .form-group{
34
- margin-bottom: 15px !important;
35
- }
36
-
37
- select{
38
- min-width: 300px;
39
- }
40
-
41
- form label{
42
- margin-bottom: 5px;
43
- font-weight: bold;
44
- }
45
-
46
- .nav-link.active{
47
- font-weight: bold;
48
- }
49
-
50
- .navbar-nav .nav-item{
51
- margin-left: 10px;
52
- }
53
-
54
- .navbar-brand{
55
- font-weight: bold;
56
- text-decoration: underline;
57
- }
58
-
59
- .ss-main{
60
- // for slimselect.js
61
- background-image: none !important;
62
- height: 38px;
63
- }
64
-
65
- .ss-option{
66
- min-height: 32px !important;
67
- }
@@ -1,37 +0,0 @@
1
- window.init = function(){
2
- $("form").attr("autocomplete", "off");
3
-
4
- $('.field_with_errors').addClass('is-invalid');
5
-
6
- var alerts = $(".alert:not(.permanent)")
7
- setTimeout(function(){
8
- alerts.fadeOut();
9
- }, 8000);
10
-
11
- autosize($('textarea'));
12
-
13
- $("select").each(function(){
14
- $(this).removeClass("form-select");
15
-
16
- new SlimSelect({
17
- select: this,
18
- settings: {
19
- //contentLocation: document.body,
20
- contentLocation: this.parentElement,
21
- closeOnSelect: !this.hasAttribute("multiple"),
22
- openPosition: 'down', // options: auto, up, down
23
- //placeholderText: "Select Value",
24
- placeholderText: "Select...",
25
- //searchPlaceholder: 'Search',
26
- //searchText: 'No Results',
27
- //searchingText: 'Searching...',
28
- maxValuesShown: 999, // defaults to 20, max selected items show in multi-selects
29
- //maxValuesShown: 20,
30
- }
31
- })
32
- });
33
- }
34
-
35
- $(function(){
36
- window.init();
37
- });
Binary file
@@ -1,99 +0,0 @@
1
- .no-gutter{
2
- padding:0 !important;
3
- }
4
- .bold{
5
- font-weight:bold !important;
6
- }
7
- .no-bold{
8
- font-weight:400 !important;
9
- }
10
- .italic{
11
- font-style: italic !important;
12
- }
13
- .underline{
14
- text-decoration:underline !important;
15
- }
16
- .space-left{
17
- margin-left:5px !important;
18
- }
19
- .space-left2{
20
- margin-left:10px !important;
21
- }
22
- .space-left3{
23
- margin-left:15px !important;
24
- }
25
- .space-left4{
26
- margin-left:20px !important;
27
- }
28
- .space-left5{
29
- margin-left:30px !important;
30
- }
31
- .space-right{
32
- margin-right:5px !important;
33
- }
34
- .space-right2{
35
- margin-right:10px !important;
36
- }
37
- .space-right3{
38
- margin-right:15px !important;
39
- }
40
- .space-right4{
41
- margin-right:20px !important;
42
- }
43
- .space-right5{
44
- margin-right:30px !important;
45
- }
46
- .space-above{
47
- margin-top:5px !important;
48
- }
49
- .space-above2{
50
- margin-top:10px !important;
51
- }
52
- .space-above3{
53
- margin-top:20px !important;
54
- }
55
- .space-above4{
56
- margin-top:30px !important;
57
- }
58
- .space-above5{
59
- margin-top:40px !important;
60
- }
61
- .space-below{
62
- margin-bottom:5px !important;
63
- }
64
- .space-below2{
65
- margin-bottom:10px !important;
66
- }
67
- .space-below3{
68
- margin-bottom:15px !important;
69
- }
70
- .space-below4{
71
- margin-bottom:20px !important;
72
- }
73
- .space-below5{
74
- margin-bottom:30px !important;
75
- }
76
- .width-100{
77
- width:100%;
78
- }
79
- .width-90{
80
- width: 90%;
81
- }
82
- .table-text-center{
83
- th td{
84
- text-align:center !important;
85
- }
86
- }
87
- .display-table{
88
- height:130px;
89
- display:table;
90
- }
91
- .display-table .vertical-align{
92
- display:table-cell;
93
- vertical-align:middle;
94
- }
95
-
96
-
97
- .hidden{
98
- display: none !important;
99
- }