haml-magic-translations 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ time with translations.
18
18
  gem.email = "jardiniers@potager.org"
19
19
  gem.homepage = "http://github.com/potager/haml-magic-translations"
20
20
  gem.authors = ["Kriss Kowalik", "potager.org"]
21
- gem.add_dependency "haml", ">= 3.1.0"
21
+ gem.add_dependency "haml", "~> 3.1"
22
22
  gem.add_development_dependency "actionpack"
23
23
  gem.add_development_dependency "gettext"
24
24
  gem.add_development_dependency "fast_gettext"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.4.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{haml-magic-translations}
8
- s.version = "0.3.1"
8
+ s.version = "0.4.0"
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{2012-04-09}
12
+ s.date = %q{2013-03-15}
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
@@ -52,7 +52,7 @@ time with translations.
52
52
  s.specification_version = 3
53
53
 
54
54
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
55
- s.add_runtime_dependency(%q<haml>, [">= 3.1.0"])
55
+ s.add_runtime_dependency(%q<haml>, ["~> 3.1"])
56
56
  s.add_development_dependency(%q<actionpack>, [">= 0"])
57
57
  s.add_development_dependency(%q<gettext>, [">= 0"])
58
58
  s.add_development_dependency(%q<fast_gettext>, [">= 0"])
@@ -60,7 +60,7 @@ time with translations.
60
60
  s.add_development_dependency(%q<rdoc>, [">= 2.4.2"])
61
61
  s.add_development_dependency(%q<maruku>, [">= 0"])
62
62
  else
63
- s.add_dependency(%q<haml>, [">= 3.1.0"])
63
+ s.add_dependency(%q<haml>, ["~> 3.1"])
64
64
  s.add_dependency(%q<actionpack>, [">= 0"])
65
65
  s.add_dependency(%q<gettext>, [">= 0"])
66
66
  s.add_dependency(%q<fast_gettext>, [">= 0"])
@@ -69,7 +69,7 @@ time with translations.
69
69
  s.add_dependency(%q<maruku>, [">= 0"])
70
70
  end
71
71
  else
72
- s.add_dependency(%q<haml>, [">= 3.1.0"])
72
+ s.add_dependency(%q<haml>, ["~> 3.1"])
73
73
  s.add_dependency(%q<actionpack>, [">= 0"])
74
74
  s.add_dependency(%q<gettext>, [">= 0"])
75
75
  s.add_dependency(%q<fast_gettext>, [">= 0"])
@@ -178,7 +178,7 @@ module Haml::MagicTranslations
178
178
  super unless magic_translations?
179
179
 
180
180
  case @node.value[:name]
181
- when 'markdown'
181
+ when 'markdown', 'maruku'
182
182
  @node.value[:text] = "\#{_(<<-'END_OF_TRANSLATABLE_MARKDOWN'.rstrip
183
183
  #{@node.value[:text].rstrip.gsub(/\n/, '\n')}
184
184
  END_OF_TRANSLATABLE_MARKDOWN
@@ -129,7 +129,7 @@ module Haml::MagicTranslations::RGetText # :nodoc:
129
129
  return super unless self.options[:rgettext]
130
130
 
131
131
  case @node.value[:name]
132
- when 'markdown'
132
+ when 'markdown', 'maruku'
133
133
  add_target(@node.value[:text].rstrip.gsub(/\n/, '\n'))
134
134
  when 'javascript'
135
135
  lineno = 0
@@ -136,7 +136,7 @@ module Haml
136
136
  HAML
137
137
  <script type='text/javascript'>
138
138
  //<![CDATA[
139
- var text = "Magiczne tłumaczenie działa!";
139
+ var text = "Magiczne t\u0142umaczenie dzia\u0142a!";
140
140
  //]]>
141
141
  </script>
142
142
  HTML
@@ -148,7 +148,7 @@ module Haml
148
148
  HAML
149
149
  <script type='text/javascript'>
150
150
  //<![CDATA[
151
- var text = "Magiczne tłumaczenie działa!";
151
+ var text = "Magiczne t\u0142umaczenie dzia\u0142a!";
152
152
  //]]>
153
153
  </script>
154
154
  HTML
@@ -182,7 +182,7 @@ module Haml
182
182
  context 'when translating strings in Markdown' do
183
183
  it "should translate strings inside _('')" do
184
184
  render(<<-'HAML'.strip_heredoc).should == <<-'HTML'.strip_heredoc
185
- :markdown
185
+ :maruku
186
186
  Now we will check multiline strings,
187
187
  which should be also translated.
188
188
  HAML
data/spec/spec_helper.rb CHANGED
@@ -11,6 +11,7 @@ require 'action_controller'
11
11
  require 'action_view'
12
12
 
13
13
  require 'haml/magic_translations'
14
+ require 'haml/template'
14
15
 
15
16
  Haml::Template.options[:ugly] = false
16
17
  Haml::Template.options[:format] = :xhtml
metadata CHANGED
@@ -1,144 +1,143 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: haml-magic-translations
3
- version: !ruby/object:Gem::Version
4
- hash: 17
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 3
9
- - 1
10
- version: 0.3.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Kriss Kowalik
14
9
  - potager.org
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2012-04-09 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
13
+ date: 2013-03-15 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
22
16
  name: haml
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
25
18
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 3
32
- - 1
33
- - 0
34
- version: 3.1.0
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: '3.1'
35
23
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: actionpack
39
24
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: '3.1'
31
+ - !ruby/object:Gem::Dependency
32
+ name: actionpack
33
+ requirement: !ruby/object:Gem::Requirement
41
34
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 3
46
- segments:
47
- - 0
48
- version: "0"
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
49
39
  type: :development
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: gettext
53
40
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
41
+ version_requirements: !ruby/object:Gem::Requirement
55
42
  none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: gettext
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
63
55
  type: :development
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
66
- name: fast_gettext
67
56
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
57
+ version_requirements: !ruby/object:Gem::Requirement
69
58
  none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ - !ruby/object:Gem::Dependency
64
+ name: fast_gettext
65
+ requirement: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
77
71
  type: :development
78
- version_requirements: *id004
79
- - !ruby/object:Gem::Dependency
80
- name: rspec
81
72
  prerelease: false
82
- requirement: &id005 !ruby/object:Gem::Requirement
73
+ version_requirements: !ruby/object:Gem::Requirement
83
74
  none: false
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- hash: 7
88
- segments:
89
- - 2
90
- version: "2"
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ - !ruby/object:Gem::Dependency
80
+ name: rspec
81
+ requirement: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '2'
91
87
  type: :development
92
- version_requirements: *id005
93
- - !ruby/object:Gem::Dependency
94
- name: rdoc
95
88
  prerelease: false
96
- requirement: &id006 !ruby/object:Gem::Requirement
89
+ version_requirements: !ruby/object:Gem::Requirement
97
90
  none: false
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- hash: 27
102
- segments:
103
- - 2
104
- - 4
105
- - 2
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '2'
95
+ - !ruby/object:Gem::Dependency
96
+ name: rdoc
97
+ requirement: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
106
102
  version: 2.4.2
107
103
  type: :development
108
- version_requirements: *id006
109
- - !ruby/object:Gem::Dependency
110
- name: maruku
111
104
  prerelease: false
112
- requirement: &id007 !ruby/object:Gem::Requirement
105
+ version_requirements: !ruby/object:Gem::Requirement
113
106
  none: false
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- hash: 3
118
- segments:
119
- - 0
120
- version: "0"
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: 2.4.2
111
+ - !ruby/object:Gem::Dependency
112
+ name: maruku
113
+ requirement: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
121
119
  type: :development
122
- version_requirements: *id007
123
- description: |
124
- This plugin provides "magical translations" in your .haml files. What does it
125
- mean? It's mean that all your raw texts in templates will be automatically
126
- translated by GetText, FastGettext or Gettext backend from I18n. No more
127
- complicated translation keys and ugly translation methods in views. Now you can
128
- only write in your language, nothing more. At the end of your work you can easy
129
- find all phrases to translate and generate .po files for it. This type of files
130
- are also more readable and easier to translate, thanks to it you save your
131
- time with translations.
132
-
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ description: ! "This plugin provides \"magical translations\" in your .haml files.
128
+ What does it\nmean? It's mean that all your raw texts in templates will be automatically\ntranslated
129
+ by GetText, FastGettext or Gettext backend from I18n. No more \ncomplicated translation
130
+ keys and ugly translation methods in views. Now you can\nonly write in your language,
131
+ nothing more. At the end of your work you can easy \nfind all phrases to translate
132
+ and generate .po files for it. This type of files \nare also more readable and easier
133
+ to translate, thanks to it you save your \ntime with translations.\n"
133
134
  email: jardiniers@potager.org
134
135
  executables: []
135
-
136
136
  extensions: []
137
-
138
- extra_rdoc_files:
137
+ extra_rdoc_files:
139
138
  - LICENSE
140
139
  - README.rdoc
141
- files:
140
+ files:
142
141
  - LICENSE
143
142
  - README.rdoc
144
143
  - Rakefile
@@ -157,37 +156,26 @@ files:
157
156
  - spec/spec_helper.rb
158
157
  homepage: http://github.com/potager/haml-magic-translations
159
158
  licenses: []
160
-
161
159
  post_install_message:
162
160
  rdoc_options: []
163
-
164
- require_paths:
161
+ require_paths:
165
162
  - lib
166
- required_ruby_version: !ruby/object:Gem::Requirement
163
+ required_ruby_version: !ruby/object:Gem::Requirement
167
164
  none: false
168
- requirements:
169
- - - ">="
170
- - !ruby/object:Gem::Version
171
- hash: 3
172
- segments:
173
- - 0
174
- version: "0"
175
- required_rubygems_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ! '>='
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
169
+ required_rubygems_version: !ruby/object:Gem::Requirement
176
170
  none: false
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- hash: 3
181
- segments:
182
- - 0
183
- version: "0"
171
+ requirements:
172
+ - - ! '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
184
175
  requirements: []
185
-
186
176
  rubyforge_project:
187
- rubygems_version: 1.8.15
177
+ rubygems_version: 1.8.23
188
178
  signing_key:
189
179
  specification_version: 3
190
180
  summary: Provides automaticaly translations in haml templates
191
181
  test_files: []
192
-
193
- has_rdoc: