translate_self 1.0.0 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2c1d57419e246c33dea7d7f7af61decb6c1ee636b62f64a1bbf530019ea00b2
4
- data.tar.gz: 0f171aedf2478b02f6cdbf3314ab92edf2fdbf77534219adf28b4b69287278c9
3
+ metadata.gz: e2f3c2abce98a2adee409991a78dd742815c7e0b1bfb380505180d4f5c52a5b9
4
+ data.tar.gz: 3feb43446a4549581992be68d65389e9d3e9ca2f55381a7a5d2e56df6f1573ea
5
5
  SHA512:
6
- metadata.gz: 9e13a519bf56de48388720d1f59651ace62a583aade21e1c3a78131b01a4875ac1573bdeb6b99bb9df7cdb57cad71748d999906cc8e6518f72bd885d6bd6a213
7
- data.tar.gz: cc6061fe3c583c184f62de2ce7990d274b76539aceee34025e7d0488151bc6a40665402a0f3e170f1b43f3046aae6507a7bd1843dcd08da71e2829453a58a5af
6
+ metadata.gz: 5518f3c6d39c0d8a2b3e79fbd9c4302c85c714d12a075de90b59fd647444e08902bd317e3e90d20e99d50ed94280833aa75e5beb381498f5f04636f4f63cb7ef
7
+ data.tar.gz: 5266142227b3bccaffb4a1d9bee31f7ac27b3d8f8f5779c0a1efd99ed9d9a80b5ced3a1b463a4db373717c34a237d9aa016c6cef12bcbb0d59bfcb383482fea4
data/CHANGELOG.md CHANGED
@@ -46,4 +46,9 @@ Seems like you need to update it by hand!
46
46
  - Refactored the translation part a bit.
47
47
  - Now you can translate strings that are over 30 kilobyte!
48
48
  I couldn't test this too much because of the limits on the free plan,
49
- but if you can test this feature, I'd be really happy to hear how it is working for you.
49
+ but if you can test this feature, I'd be really happy to hear how it is working for you.
50
+
51
+ ## [1.0.1] - 2021-07-13
52
+
53
+ - I'm reading Polished Ruby, and I just learned that it's faster to pass symbols than strings sometimes,
54
+ so as this library is very performance-oriented, symbols it is!
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- translate_self (1.0.0)
4
+ translate_self (1.0.1)
5
5
  deepl-rb
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -59,11 +59,12 @@ Or install it yourself as:
59
59
 
60
60
  $ gem install translate_self
61
61
 
62
- ## Usage
63
62
 
64
- Currently available languages:
63
+ ## Supported languages:
64
+
65
+ 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.
65
66
 
66
- [:bg, :cs, :da, :de, :el, :en, :es, :et, :fi, :fr, :hu, :it, :ja, :lt, :lv, :nl, :pl, :pt, :ro, :ru, :sk, :sl, :sv, :zh]
67
+ ## Usage
67
68
 
68
69
  You can assign a string a language:
69
70
 
@@ -41,10 +41,10 @@ module Translation
41
41
  # @param [String] the language to translate to, e.g. "fi"
42
42
  # @return [String] the contents translated to another language
43
43
  @@languages.each do |lan|
44
- define_method("translate_to_#{lan}") do |language = lan|
44
+ define_method("translate_to_#{lan}".to_sym) do |language = lan|
45
45
  call_deepl(self.language, language)
46
46
  end
47
- alias_method "to_#{lan}", "translate_to_#{lan}"
47
+ alias_method "to_#{lan}".to_sym, "translate_to_#{lan}".to_sym
48
48
  end
49
49
 
50
50
  private
@@ -1,3 +1,3 @@
1
1
  module TranslateSelf
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: translate_self
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sampo Kuokkanen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-11 00:00:00.000000000 Z
11
+ date: 2021-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deepl-rb