active_translate_self 0.2.0 → 0.3.0

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: baba3c9132c1bff4d58a65b1f8b7f5b00ebcd306a750f57d0acef4bd3553edb1
4
- data.tar.gz: 149ab9db31874fcba409d6db97bcd79284630f3e96367fe04a98b2959093d6e1
3
+ metadata.gz: 8be859b957fdf07c519a5c1afb68e870bfdee5854a81d329cf76029133a5efb6
4
+ data.tar.gz: 91231060b8ebb7a55dab987c6382d795b10b928c23e853e72637adfa76965571
5
5
  SHA512:
6
- metadata.gz: 82288f8926992b55b5ba8d0281ec5e22b47f0afd8020a1c77f79f90e51a3b3398e35a4b554c86dcdfb2278cef8b7c7d17c0b9665bbc97decbe84cd6c88ed9d34
7
- data.tar.gz: 9d21f4d50bdf2590e69880a6389720923e925ab4a60cd09997cb0533c527d76faac6b8c206c146e3ea147915ee5a4b2889a87e1129767f857b044cb842b05851
6
+ metadata.gz: 5501a76025408a66aed069b2b535316943a19d7c08e9d0d2ae7400619e4bd8e95c814b6b70e08ab31375b491ae818fd6ce53de06d0065765a9951863d7adc0a1
7
+ data.tar.gz: bf8dd0cbae15e93188a2e6ffd21c0fe6710b919be289771fb9ea3f1d5ef0d24e8a8f8f6aacfb3a109654f45c61ff3e9946a5caaa0a2e43aa0063da6600b57951
data/README.md CHANGED
@@ -10,8 +10,23 @@ Finnish, English, Japanese, Russian!
10
10
  Translate Ruby strings in Rails to a language of your choice!
11
11
  Any and all languages supported, as long as they're also supported by DeepL. If your language is not supported at the moment, you just need to wait a bit. Or make a PR for TranslateSelf to add Google Translate backend to it.
12
12
 
13
+ ## Supported languages:
14
+
15
+ supported languages are: Bulgarian, Chinese, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hungarian, Italian, Japanese, Latvian, Lithuanian, Polish, Portuguese, Romanian, Russian, Slovak, Slovenian, Spanish, and Swedish.
16
+
13
17
  ## Usage
14
18
  Easy to use!
19
+
20
+ Now your models get superpowers if they have string fields:
21
+
22
+ ```ruby
23
+ user = User.find(2020)
24
+ user.favorite_food # or any field name that is a string in Ruby
25
+ # hamburgers
26
+ user.favorite_food.to_ru # or to_fi, to_es, to_ja...
27
+ # гамбургер
28
+ ```
29
+
15
30
  Just get a DeepL auth key (free!), and create an initializer(`config/initializers/active_translate_self.rb`), add the auth key to your Rails credentials file with the following command:
16
31
  ```shell
17
32
  $ EDITOR="vim" rails credentials:edit
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveTranslateSelf
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_translate_self
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sampo Kuokkanen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-07 00:00:00.000000000 Z
11
+ date: 2021-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails