remote_i18n_extension 1.0.0 → 1.0.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: 7534fa537c20f856e3ad95d19b8108731289d5966a2fdde6b72d90420e7f1652
4
- data.tar.gz: 4a974f71c326f864d06d76aa3c00f6b7a06733386081693b0e16a193bad8272f
3
+ metadata.gz: cf4fb1faaaa8f463f224a5f46bb6fada00253c5d1d4c6e5ec866af416ac4b528
4
+ data.tar.gz: 1d54c59b731cde1e6ab83245f4904ac7676bfc57e90ff1368f46196a787744c3
5
5
  SHA512:
6
- metadata.gz: 42d66376720540baff95b4f1de7556eaa3a920750fc73912f5162db4e6d68a2b89a978a655bd754ffcbc6f0ae8db82c685497b8f4777d6fd29a49cb418c564f9
7
- data.tar.gz: '08f0700de67562a9a619306c6b10f5f2339d04571698a93ca199de5e18990e3b80d09d5b2f6911abb9b19b4c687b238f3d70f642f868a170e8f06200a39e55e6'
6
+ metadata.gz: 8665fee608326016e23267c2dde03c282bba3347f47cb7dd675905a96220ebb65bed12224e6f35e1da23bb0ebc0142225cff06839318df7bcd5750de860bcb1d
7
+ data.tar.gz: 957e8fb91ff43097aa26f12e29823e295fca2b10bea3aea125a4f96dc8e5873383131184536bda81f6826135cc6747d3f62400f39de847ce5b134f6c143dd0cf
@@ -1,13 +1,13 @@
1
1
  require 'rails/generators'
2
2
 
3
- module RemoteI18nExtensionHcc
3
+ module RemoteI18nExtension
4
4
  class InstallGenerator < Rails::Generators::Base
5
5
  source_root File.expand_path('../templates', __dir__)
6
6
 
7
- desc 'Creates config file for RemoteI18nExtensionHcc'
7
+ desc 'Creates config file for RemoteI18nExtension'
8
8
 
9
9
  def copy_config
10
- template 'remote_i18n_extension_config.rb', "#{Rails.root}/config/remote_i18n_extension.rb"
10
+ template 'remote_i18n_extension_config.rb', "#{Rails.root}/config/initializers/remote_i18n_extension.rb"
11
11
  end
12
12
  end
13
13
  end
@@ -1,6 +1,6 @@
1
1
  require 'remote_i18n_extension'
2
2
 
3
- RemoteI18nExtensionHcc.config do |config|
3
+ RemoteI18nExtension.config do |config|
4
4
  # All the configurations are mandatory
5
5
 
6
6
  # URL to your remote locales folder housing all the translations
@@ -1,6 +1,6 @@
1
1
  require 'open-uri'
2
2
 
3
- module RemoteI18nExtensionHcc
3
+ module RemoteI18nExtension
4
4
  module Backend
5
5
  class Remote < I18n::Backend::Simple
6
6
  protected
@@ -35,7 +35,7 @@ module RemoteI18nExtensionHcc
35
35
  private
36
36
 
37
37
  def load_remote_locales(filename)
38
- remote_host = RemoteI18nExtensionHcc.remote_host
38
+ remote_host = RemoteI18nExtension.remote_host
39
39
  URI.parse("#{remote_host}/#{filename}").read
40
40
  end
41
41
  end
@@ -1,3 +1,3 @@
1
- module RemoteI18nExtensionHcc
2
- VERSION = '1.0.0'.freeze
1
+ module RemoteI18nExtension
2
+ VERSION = '1.0.2'.freeze
3
3
  end
@@ -1,9 +1,9 @@
1
1
  require 'i18n'
2
2
  require_relative 'remote_i18n_extension/backend/remote'
3
3
 
4
- module RemoteI18nExtensionHcc
4
+ module RemoteI18nExtension
5
5
  I18n.backend = I18n::Backend::Chain.new(
6
- RemoteI18nExtensionHcc::Backend::Remote.new,
6
+ RemoteI18nExtension::Backend::Remote.new,
7
7
  I18n::Backend::Simple.new
8
8
  )
9
9
 
@@ -31,13 +31,17 @@ module RemoteI18nExtensionHcc
31
31
  I18n.t(*args)
32
32
  end
33
33
  alias :t :translate
34
+
35
+ def reload!
36
+ I18n.reload!
37
+ end
34
38
  end
35
39
 
36
40
  private
37
41
 
38
42
  def init_i18n_backend
39
43
  I18n.backend = I18n::Backend::Chain.new(
40
- RemoteI18nExtensionHcc::Backend::Remote.new,
44
+ RemoteI18nExtension::Backend::Remote.new,
41
45
  I18n::Backend::Simple.new
42
46
  )
43
47
  end
@@ -2,12 +2,12 @@ require File.expand_path('lib/remote_i18n_extension/version', __dir__)
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'remote_i18n_extension'
5
- spec.version = RemoteI18nExtensionHcc::VERSION
5
+ spec.version = RemoteI18nExtension::VERSION
6
6
  spec.authors = ['Hassan Ahmed']
7
7
  spec.email = ['hassan91ahmed@gmail.com']
8
8
  spec.summary = 'Support remote fetching of locales'
9
9
  spec.description = 'Support remote fetching of locales'
10
- spec.homepage = 'https://github.com/Gooner91/remoteI18nExtensionHcc'
10
+ spec.homepage = 'https://github.com/Gooner91/remote_i18n_extension'
11
11
  spec.license = 'MIT'
12
12
  spec.platform = Gem::Platform::RUBY
13
13
  spec.required_ruby_version = '>=3.1.3'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_i18n_extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hassan Ahmed
@@ -97,7 +97,7 @@ files:
97
97
  - lib/remote_i18n_extension/backend/remote.rb
98
98
  - lib/remote_i18n_extension/version.rb
99
99
  - remote_i18n_extension.gemspec
100
- homepage: https://github.com/Gooner91/remoteI18nExtensionHcc
100
+ homepage: https://github.com/Gooner91/remote_i18n_extension
101
101
  licenses:
102
102
  - MIT
103
103
  metadata: