remote-i18n 0.1.0 → 0.1.1
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/README.md +3 -3
- data/lib/generators/remote_i18n_config_generator.rb +3 -1
- data/lib/remote_i18n/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: daeab89605fe4c1f7947fbde13e0dd36af0c040f0f8fc25dd351a1bfaf36834f
|
|
4
|
+
data.tar.gz: 153ffb77931c743d0621eeca1be4577b07c13924847e0e0abef60fe03a322c90
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd2637aaa46522aa096ef8e74e688e8432b41215fffb72df75730aea21101cebdc80158d6cb74ca674356817bf6bf32ff3f01ff68c7d0861c74171f662045e14
|
|
7
|
+
data.tar.gz: 747e7c5c3d189917b9d9fe5223eb971277662e0a46df98e5f5497ecc5198d27530218df40bd1c47901df6c87ffe3e6955ae9986be793bad37a5c63131dc50269
|
data/README.md
CHANGED
|
@@ -9,7 +9,7 @@ TODO: Delete this and the text above, and describe your gem
|
|
|
9
9
|
Add this line to your application's Gemfile:
|
|
10
10
|
|
|
11
11
|
```ruby
|
|
12
|
-
gem 'remote_i18n'
|
|
12
|
+
gem 'remote-i18n', require: 'remote_i18n'
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
And then execute:
|
|
@@ -18,7 +18,7 @@ And then execute:
|
|
|
18
18
|
|
|
19
19
|
Or install it yourself as:
|
|
20
20
|
|
|
21
|
-
$ gem install
|
|
21
|
+
$ gem install remote-i18n
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ Or install it yourself as:
|
|
|
26
26
|
- This gem uses existing "Simple" backend as a base for new "Remote" backend. It needs to be extended further to use "Key-Pair" backend with the remote support (TODO for future versions)
|
|
27
27
|
- To use it, manually provide the "remote locations URLs" from where translations are to be fetched.
|
|
28
28
|
- You can also set the "fallback locations" as you simply do with the normal `I18n` implementation.
|
|
29
|
-
- Generate a config file using `
|
|
29
|
+
- Using Rails - Generate a config file using `rails generate remote_i18n_config`, or create your own initializer.
|
|
30
30
|
- Example code is below:
|
|
31
31
|
```
|
|
32
32
|
# Remote URLs where the translation files are hosted
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
INITIALIZER_CONTENT = "
|
|
3
|
+
INITIALIZER_CONTENT = "require 'remote_i18n'
|
|
4
|
+
|
|
5
|
+
# Remote URLs where the translation files are hosted
|
|
4
6
|
I18n.config.remote_urls = [
|
|
5
7
|
'https://raw.githubusercontent.com/g1stavo/rails-i18n/master/config/locales/en.yml',
|
|
6
8
|
'https://raw.githubusercontent.com/g1stavo/rails-i18n/master/config/locales/pt-BR.yml'
|
data/lib/remote_i18n/version.rb
CHANGED