haml-magic-translations 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +1 -1
- data/README.rdoc +2 -2
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/haml-magic-translations.gemspec +2 -4
- data/spec/haml/magic_translations/xgettext/haml_parser_spec.rb +1 -1
- data/spec/haml/magic_translations_spec.rb +6 -0
- metadata +24 -42
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1c90150ee945578913de2ee0a424e4b346816a8d
|
4
|
+
data.tar.gz: 07dacec7966839bc3630c3f4ac1d91a8b5d9c3e7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e162b1075cff70133d401ec36b384d68db50ac4d38ea8356e5226e65de4ec2427944e8020f8b710b683d2f9056d47f3ada17588d524da6fb1df77bea78563a5a
|
7
|
+
data.tar.gz: 797a0943bfa85233e37b62c20119f90d93259f2ae9baf6f5c2a34d66ce05b9f5fc5ab30e589b52837e840af187343e83474bd75b14a961cbf87cb8c881d28b2e
|
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -17,9 +17,9 @@ You can install haml-magic-translations directly from rubygems:
|
|
17
17
|
|
18
18
|
...or as Ruby on Rails plugin:
|
19
19
|
|
20
|
-
script/plugin install
|
20
|
+
script/plugin install https://github.com/potager/haml-magic-translations
|
21
21
|
or
|
22
|
-
rails plugin install
|
22
|
+
rails plugin install https://github.com/potager/haml-magic-translations
|
23
23
|
|
24
24
|
=== Gettings started with Gettext
|
25
25
|
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.1.
|
1
|
+
4.1.1
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{haml-magic-translations}
|
8
|
-
s.version = "4.1.
|
8
|
+
s.version = "4.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kriss Kowalik", "potager.org"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2015-09-09}
|
13
13
|
s.description = %q{This plugin provides "magical translations" in your .haml files. What does it
|
14
14
|
mean? It's mean that all your raw texts in templates will be automatically
|
15
15
|
translated by GetText, FastGettext or Gettext backend from I18n. No more
|
@@ -33,9 +33,7 @@ time with translations.
|
|
33
33
|
"init.rb",
|
34
34
|
"lib/haml-magic-translations.rb",
|
35
35
|
"lib/haml/magic_translations.rb",
|
36
|
-
"lib/haml/magic_translations/tasks.rb",
|
37
36
|
"lib/haml/magic_translations/xgettext/haml_parser.rb",
|
38
|
-
"spec/haml/magic_translations/tasks_spec.rb",
|
39
37
|
"spec/haml/magic_translations/xgettext/haml_parser_spec.rb",
|
40
38
|
"spec/haml/magic_translations_spec.rb",
|
41
39
|
"spec/locales/en.po",
|
@@ -143,7 +143,7 @@ module Haml::MagicTranslations::XGetText
|
|
143
143
|
HAML
|
144
144
|
end
|
145
145
|
it 'should appear only once in the targets' do
|
146
|
-
expect(subject.collect { |t| t[0] }).to
|
146
|
+
expect(subject.collect { |t| t[0] }.length).to eql 1
|
147
147
|
end
|
148
148
|
it 'should record two target locations' do
|
149
149
|
should == [['Hello!', '(haml):1', '(haml):2']]
|
@@ -7,6 +7,12 @@ require 'gettext/tools'
|
|
7
7
|
# Stolen from ActiveSupport. We have to cut and paste it here so it
|
8
8
|
# does not turn the encoding back to US-ASCII. Strange issue.
|
9
9
|
class String
|
10
|
+
unless String.method_defined? :try
|
11
|
+
def try(*args)
|
12
|
+
send(*args) if respond_to?(args.first)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
10
16
|
def strip_heredoc
|
11
17
|
indent = scan(/^[ \t]*(?=\S)/).min.try(:size) || 0
|
12
18
|
gsub(/^[ \t]{#{indent}}/, '')
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml-magic-translations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
5
|
-
prerelease:
|
4
|
+
version: 4.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Kriss Kowalik
|
@@ -10,138 +9,122 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: haml
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- - ~>
|
18
|
+
- - "~>"
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: '4.0'
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- - ~>
|
25
|
+
- - "~>"
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: '4.0'
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: haml-contrib
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- -
|
32
|
+
- - ">="
|
37
33
|
- !ruby/object:Gem::Version
|
38
34
|
version: '1.0'
|
39
35
|
type: :development
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- -
|
39
|
+
- - ">="
|
45
40
|
- !ruby/object:Gem::Version
|
46
41
|
version: '1.0'
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: actionpack
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- -
|
46
|
+
- - ">="
|
53
47
|
- !ruby/object:Gem::Version
|
54
48
|
version: '0'
|
55
49
|
type: :development
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
|
-
- -
|
53
|
+
- - ">="
|
61
54
|
- !ruby/object:Gem::Version
|
62
55
|
version: '0'
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: gettext
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
|
-
- -
|
60
|
+
- - ">="
|
69
61
|
- !ruby/object:Gem::Version
|
70
62
|
version: '2.3'
|
71
63
|
type: :development
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
|
-
- -
|
67
|
+
- - ">="
|
77
68
|
- !ruby/object:Gem::Version
|
78
69
|
version: '2.3'
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: fast_gettext
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
|
-
- -
|
74
|
+
- - ">="
|
85
75
|
- !ruby/object:Gem::Version
|
86
76
|
version: '0'
|
87
77
|
type: :development
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
|
-
- -
|
81
|
+
- - ">="
|
93
82
|
- !ruby/object:Gem::Version
|
94
83
|
version: '0'
|
95
84
|
- !ruby/object:Gem::Dependency
|
96
85
|
name: rspec
|
97
86
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
87
|
requirements:
|
100
|
-
- -
|
88
|
+
- - ">="
|
101
89
|
- !ruby/object:Gem::Version
|
102
90
|
version: '2.11'
|
103
91
|
type: :development
|
104
92
|
prerelease: false
|
105
93
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
94
|
requirements:
|
108
|
-
- -
|
95
|
+
- - ">="
|
109
96
|
- !ruby/object:Gem::Version
|
110
97
|
version: '2.11'
|
111
98
|
- !ruby/object:Gem::Dependency
|
112
99
|
name: rdoc
|
113
100
|
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
101
|
requirements:
|
116
|
-
- -
|
102
|
+
- - ">="
|
117
103
|
- !ruby/object:Gem::Version
|
118
104
|
version: 2.4.2
|
119
105
|
type: :development
|
120
106
|
prerelease: false
|
121
107
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
108
|
requirements:
|
124
|
-
- -
|
109
|
+
- - ">="
|
125
110
|
- !ruby/object:Gem::Version
|
126
111
|
version: 2.4.2
|
127
112
|
- !ruby/object:Gem::Dependency
|
128
113
|
name: maruku
|
129
114
|
requirement: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
115
|
requirements:
|
132
|
-
- -
|
116
|
+
- - ">="
|
133
117
|
- !ruby/object:Gem::Version
|
134
118
|
version: '0'
|
135
119
|
type: :development
|
136
120
|
prerelease: false
|
137
121
|
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
122
|
requirements:
|
140
|
-
- -
|
123
|
+
- - ">="
|
141
124
|
- !ruby/object:Gem::Version
|
142
125
|
version: '0'
|
143
|
-
description:
|
144
|
-
|
126
|
+
description: "This plugin provides \"magical translations\" in your .haml files. What
|
127
|
+
does it\nmean? It's mean that all your raw texts in templates will be automatically\ntranslated
|
145
128
|
by GetText, FastGettext or Gettext backend from I18n. No more \ncomplicated translation
|
146
129
|
keys and ugly translation methods in views. Now you can\nonly write in your language,
|
147
130
|
nothing more. At the end of your work you can easy \nfind all phrases to translate
|
@@ -170,25 +153,24 @@ files:
|
|
170
153
|
- spec/spec_helper.rb
|
171
154
|
homepage: https://github.com/potager/haml-magic-translations
|
172
155
|
licenses: []
|
156
|
+
metadata: {}
|
173
157
|
post_install_message:
|
174
158
|
rdoc_options: []
|
175
159
|
require_paths:
|
176
160
|
- lib
|
177
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
178
|
-
none: false
|
179
162
|
requirements:
|
180
|
-
- -
|
163
|
+
- - ">="
|
181
164
|
- !ruby/object:Gem::Version
|
182
165
|
version: '0'
|
183
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
|
-
none: false
|
185
167
|
requirements:
|
186
|
-
- -
|
168
|
+
- - ">="
|
187
169
|
- !ruby/object:Gem::Version
|
188
170
|
version: '0'
|
189
171
|
requirements: []
|
190
172
|
rubyforge_project:
|
191
|
-
rubygems_version:
|
173
|
+
rubygems_version: 2.2.2
|
192
174
|
signing_key:
|
193
175
|
specification_version: 3
|
194
176
|
summary: Provides automaticaly translations in haml templates
|