locale_to_js 0.0.1 → 0.0.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 +4 -4
- data/lib/locale_to_js/railtie.rb +14 -0
- data/lib/{tasks → locale_to_js/tasks}/locale.rake +2 -2
- data/lib/locale_to_js/version.rb +1 -1
- data/lib/locale_to_js.rb +2 -4
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15dd5424b2e3a843d4d4ffba754c3b68f7576ab25d3dd633ddb03371ef6d3589
|
4
|
+
data.tar.gz: 022c43fb99e28c50e3ef2c439c775664e0083b4f9f42cb6a5327feec2080b51a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d4cb21c68c0865f5c30423d39de6acf60a5e1d7058cea9d82c4c45ac144a0b8a36e16b751dfe70c4775e3745e85f1b5653429c5ee375c2bea3b606acf19bcd1
|
7
|
+
data.tar.gz: e7542dca53fd6947d1dd52d8c79cbb80950c572a69996185c828b278f3232005dfb7309f9d44084eb40c4163ce7210f0b96bce3fcd46008df1a349118aeea862
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# lib/railtie.rb
|
2
|
+
require 'locale_to_js'
|
3
|
+
require 'rails'
|
4
|
+
|
5
|
+
module LocaleToJs
|
6
|
+
class Railtie < Rails::Railtie
|
7
|
+
railtie_name :locale_to_js
|
8
|
+
|
9
|
+
rake_tasks do
|
10
|
+
path = File.expand_path(__dir__)
|
11
|
+
Dir.glob("#{path}/tasks/**/*.rake").each { |f| load f }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -4,9 +4,9 @@ require "locale_to_js/locales/base"
|
|
4
4
|
require "locale_to_js/locales/to_js"
|
5
5
|
require "locale_to_js/locales/to_json"
|
6
6
|
|
7
|
-
namespace :
|
7
|
+
namespace :locale_to_js do
|
8
8
|
desc "Compile les fichiers de locales en fichiers JS"
|
9
|
-
task :
|
9
|
+
task :compile, [] => [] do |_t, args|
|
10
10
|
LocaleToJs::Locales.compile
|
11
11
|
end
|
12
12
|
end
|
data/lib/locale_to_js/version.rb
CHANGED
data/lib/locale_to_js.rb
CHANGED
@@ -5,8 +5,6 @@ require "locale_to_js/locales/base"
|
|
5
5
|
require "locale_to_js/locales/to_js"
|
6
6
|
require "locale_to_js/locales/to_json"
|
7
7
|
|
8
|
-
|
9
|
-
if defined?(
|
10
|
-
rakefile = File.expand_path('../tasks/locale.rake', __FILE__)
|
11
|
-
load rakefile if File.exist?(rakefile)
|
8
|
+
module LocaleToJs
|
9
|
+
require 'locale_to_js/railtie' if defined?(Rails)
|
12
10
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locale_to_js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Clercin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A fork of the react-on-rails rake tasks to transform your Rails locales
|
14
14
|
to JS
|
@@ -23,9 +23,10 @@ files:
|
|
23
23
|
- lib/locale_to_js/locales/base.rb
|
24
24
|
- lib/locale_to_js/locales/to_js.rb
|
25
25
|
- lib/locale_to_js/locales/to_json.rb
|
26
|
+
- lib/locale_to_js/railtie.rb
|
27
|
+
- lib/locale_to_js/tasks/locale.rake
|
26
28
|
- lib/locale_to_js/utils.rb
|
27
29
|
- lib/locale_to_js/version.rb
|
28
|
-
- lib/tasks/locale.rake
|
29
30
|
homepage: https://github.com/kclercin/locale-to-js
|
30
31
|
licenses:
|
31
32
|
- MIT
|