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 +4 -4
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +1 -1
- data/README.md +4 -3
- data/lib/translate_self/translation.rb +2 -2
- data/lib/translate_self/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2f3c2abce98a2adee409991a78dd742815c7e0b1bfb380505180d4f5c52a5b9
|
4
|
+
data.tar.gz: 3feb43446a4549581992be68d65389e9d3e9ca2f55381a7a5d2e56df6f1573ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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
|
-
|
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
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2021-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deepl-rb
|