web_translate_it 1.8.1.8 → 1.8.1.9
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.
- data/history.md +6 -0
- data/lib/web_translate_it/util.rb +24 -17
- data/version.yml +1 -1
- metadata +11 -25
- data/examples/en.yml +0 -43
data/history.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## Version 1.8.1.9 / 2011-07-29
|
|
2
|
+
|
|
3
|
+
* Possible fix for encoding issue in .gemspec file, #66
|
|
4
|
+
* Removed dependancy on ansi gem, so wti can now install smoothly on Windows machines.
|
|
5
|
+
Windows users had to manually install an extra `win32console` gem. #62.
|
|
6
|
+
|
|
1
7
|
## Version 1.8.1.8 / 2011-07-29
|
|
2
8
|
|
|
3
9
|
* Revert previous commit, which didn’t work. Added an extra step to the Windows installation
|
|
@@ -122,45 +122,52 @@ module WebTranslateIt
|
|
|
122
122
|
|
|
123
123
|
def self.sanitize_locale(locale)
|
|
124
124
|
locale.gsub('_', '-')
|
|
125
|
-
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
##
|
|
128
|
+
# Returns whether a terminal can display ansi colors
|
|
129
|
+
|
|
130
|
+
def self.can_display_colors?
|
|
131
|
+
!RUBY_PLATFORM.downcase.include?("mingw32")
|
|
132
|
+
end
|
|
126
133
|
end
|
|
127
134
|
end
|
|
128
135
|
|
|
129
136
|
class Array
|
|
130
|
-
require 'ansi/columns'
|
|
131
|
-
|
|
132
137
|
def to_columns
|
|
133
|
-
|
|
134
|
-
columns.to_s(self.size)
|
|
138
|
+
" #{self[0].backward_truncate} | #{self[1]} #{self[2]}"
|
|
135
139
|
end
|
|
136
140
|
end
|
|
137
141
|
|
|
138
142
|
class String
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
|
|
144
|
+
def backward_truncate
|
|
145
|
+
if length <= 50
|
|
146
|
+
spaces = ""
|
|
147
|
+
(50-length).times{ spaces << " " }
|
|
148
|
+
return self << spaces
|
|
149
|
+
else
|
|
150
|
+
return "..." << self[self.length-50+3..self.length]
|
|
151
|
+
end
|
|
152
|
+
end
|
|
141
153
|
|
|
142
154
|
def success
|
|
143
|
-
|
|
144
|
-
self.green
|
|
155
|
+
WebTranslateIt::Util.can_display_colors? ? "\e[32m#{self}\e[0m" : self
|
|
145
156
|
end
|
|
146
157
|
|
|
147
158
|
def failure
|
|
148
|
-
|
|
149
|
-
self.red.bold
|
|
159
|
+
WebTranslateIt::Util.can_display_colors? ? "\e[31m#{self}\e[0m" : self
|
|
150
160
|
end
|
|
151
161
|
|
|
152
162
|
def checksumify
|
|
153
|
-
|
|
154
|
-
self[0..6].yellow
|
|
163
|
+
WebTranslateIt::Util.can_display_colors? ? "\e[33m#{self[0..6]}\e[0m" : self[0..6]
|
|
155
164
|
end
|
|
156
165
|
|
|
157
166
|
def titleize
|
|
158
|
-
|
|
159
|
-
self.bold.underline
|
|
167
|
+
WebTranslateIt::Util.can_display_colors? ? "\e[1m#{self}\e[0m\n\n" : self
|
|
160
168
|
end
|
|
161
169
|
|
|
162
170
|
def important
|
|
163
|
-
|
|
164
|
-
self.bold
|
|
171
|
+
WebTranslateIt::Util.can_display_colors? ? "\e[1m#{self}\e[0m" : self
|
|
165
172
|
end
|
|
166
173
|
end
|
data/version.yml
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: web_translate_it
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.8.1.
|
|
4
|
+
version: 1.8.1.9
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,12 +9,11 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2011-07
|
|
13
|
-
default_executable: wti
|
|
12
|
+
date: 2011-09-07 00:00:00.000000000 Z
|
|
14
13
|
dependencies:
|
|
15
14
|
- !ruby/object:Gem::Dependency
|
|
16
15
|
name: multipart-post
|
|
17
|
-
requirement: &
|
|
16
|
+
requirement: &70281540470320 !ruby/object:Gem::Requirement
|
|
18
17
|
none: false
|
|
19
18
|
requirements:
|
|
20
19
|
- - ~>
|
|
@@ -22,10 +21,10 @@ dependencies:
|
|
|
22
21
|
version: 1.1.3
|
|
23
22
|
type: :runtime
|
|
24
23
|
prerelease: false
|
|
25
|
-
version_requirements: *
|
|
24
|
+
version_requirements: *70281540470320
|
|
26
25
|
- !ruby/object:Gem::Dependency
|
|
27
26
|
name: trollop
|
|
28
|
-
requirement: &
|
|
27
|
+
requirement: &70281540468760 !ruby/object:Gem::Requirement
|
|
29
28
|
none: false
|
|
30
29
|
requirements:
|
|
31
30
|
- - ~>
|
|
@@ -33,10 +32,10 @@ dependencies:
|
|
|
33
32
|
version: 1.16.2
|
|
34
33
|
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
|
-
version_requirements: *
|
|
35
|
+
version_requirements: *70281540468760
|
|
37
36
|
- !ruby/object:Gem::Dependency
|
|
38
37
|
name: sinatra
|
|
39
|
-
requirement: &
|
|
38
|
+
requirement: &70281540467180 !ruby/object:Gem::Requirement
|
|
40
39
|
none: false
|
|
41
40
|
requirements:
|
|
42
41
|
- - ~>
|
|
@@ -44,21 +43,10 @@ dependencies:
|
|
|
44
43
|
version: 1.2.6
|
|
45
44
|
type: :runtime
|
|
46
45
|
prerelease: false
|
|
47
|
-
version_requirements: *
|
|
48
|
-
- !ruby/object:Gem::Dependency
|
|
49
|
-
name: ansi
|
|
50
|
-
requirement: &2152813600 !ruby/object:Gem::Requirement
|
|
51
|
-
none: false
|
|
52
|
-
requirements:
|
|
53
|
-
- - ~>
|
|
54
|
-
- !ruby/object:Gem::Version
|
|
55
|
-
version: '1.3'
|
|
56
|
-
type: :runtime
|
|
57
|
-
prerelease: false
|
|
58
|
-
version_requirements: *2152813600
|
|
46
|
+
version_requirements: *70281540467180
|
|
59
47
|
- !ruby/object:Gem::Dependency
|
|
60
48
|
name: rspec
|
|
61
|
-
requirement: &
|
|
49
|
+
requirement: &70281540459200 !ruby/object:Gem::Requirement
|
|
62
50
|
none: false
|
|
63
51
|
requirements:
|
|
64
52
|
- - ! '>='
|
|
@@ -66,7 +54,7 @@ dependencies:
|
|
|
66
54
|
version: 2.6.0
|
|
67
55
|
type: :development
|
|
68
56
|
prerelease: false
|
|
69
|
-
version_requirements: *
|
|
57
|
+
version_requirements: *70281540459200
|
|
70
58
|
description:
|
|
71
59
|
email: edouard@atelierconvivialite.com
|
|
72
60
|
executables:
|
|
@@ -80,7 +68,6 @@ files:
|
|
|
80
68
|
- licence
|
|
81
69
|
- readme.md
|
|
82
70
|
- version.yml
|
|
83
|
-
- examples/en.yml
|
|
84
71
|
- examples/locale.rb
|
|
85
72
|
- examples/translation.yml
|
|
86
73
|
- lib/web_translate_it/auto_fetch.rb
|
|
@@ -108,7 +95,6 @@ files:
|
|
|
108
95
|
- spec/web_translate_it/translation_file_spec.rb
|
|
109
96
|
- spec/web_translate_it/util_spec.rb
|
|
110
97
|
- spec/web_translate_it_spec.rb
|
|
111
|
-
has_rdoc: true
|
|
112
98
|
homepage: https://webtranslateit.com
|
|
113
99
|
licenses: []
|
|
114
100
|
post_install_message:
|
|
@@ -131,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
131
117
|
version: '0'
|
|
132
118
|
requirements: []
|
|
133
119
|
rubyforge_project:
|
|
134
|
-
rubygems_version: 1.
|
|
120
|
+
rubygems_version: 1.8.10
|
|
135
121
|
signing_key:
|
|
136
122
|
specification_version: 3
|
|
137
123
|
summary: A CLI to sync locale files with webtranslateit.com.
|
data/examples/en.yml
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
fr:
|
|
2
|
-
activerecord:
|
|
3
|
-
errors:
|
|
4
|
-
models:
|
|
5
|
-
invitation:
|
|
6
|
-
attributes:
|
|
7
|
-
email:
|
|
8
|
-
user_already_invited: "This user has already been invited"
|
|
9
|
-
user_already_member: "This user is already a member"
|
|
10
|
-
project_file:
|
|
11
|
-
attributes:
|
|
12
|
-
file:
|
|
13
|
-
file_format_not_supported: "Sorry, we currenly support only Gettext .pot/.po, .yml/.yaml and .strings"
|
|
14
|
-
templates:
|
|
15
|
-
header:
|
|
16
|
-
body: "there were problems with the following fields:"
|
|
17
|
-
messages:
|
|
18
|
-
accepted: "must be accepted"
|
|
19
|
-
blank: "can't be blank"
|
|
20
|
-
confirmation: "doesn't match confirmation"
|
|
21
|
-
empty: "can't be empty"
|
|
22
|
-
equal_to: "must be equal to {{count}}"
|
|
23
|
-
even: "must be even"
|
|
24
|
-
exclusion: "is reserved"
|
|
25
|
-
greater_than: "must be greater than {{count}}"
|
|
26
|
-
greater_than_or_equal_to: "must be greater than or equal to {{count}}"
|
|
27
|
-
inclusion: "is not included in the list"
|
|
28
|
-
invalid: "is invalid"
|
|
29
|
-
less_than: "must be less than {{count}}"
|
|
30
|
-
less_than_or_equal_to: "must be less than or equal to {{count}}"
|
|
31
|
-
not_a_number: "is not a number"
|
|
32
|
-
odd: "must be odd"
|
|
33
|
-
taken: "is already taken"
|
|
34
|
-
too_long: "is too long (maximum is {{count}} characters)"
|
|
35
|
-
too_short: "is too short (minimum is {{count}} characters)"
|
|
36
|
-
wrong_length: "is the wrong length (should be {{count}} characters)"
|
|
37
|
-
one: "1 error prohibited this {{model}} from being saved"
|
|
38
|
-
other: "{{count}} errors prohibited this {{model}} from being saved"
|
|
39
|
-
another_one: dskjdks
|
|
40
|
-
another_string: "this is another string"
|
|
41
|
-
hello: "Hello world!!"
|
|
42
|
-
new_string: hehe
|
|
43
|
-
test: " & & "
|