gettext_i18n_rails 0.2.10 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.md CHANGED
@@ -178,6 +178,22 @@ FastGettext supports pluralization
178
178
 
179
179
  Abnormal plurals like e.g. Polish that has 4 different can also be addressed, see [FastGettext Readme](http://github.com/grosser/fast_gettext)
180
180
 
181
+ Customizing list of translatable files
182
+ ======================================
183
+ When you run
184
+
185
+ rake gettext:find
186
+
187
+ by default the following files are going to be scanned for translations: {app,lib,config,locale}/**/*.{rb,erb,haml}. If
188
+ you want to specify a different list, you can redefine files_to_translate in the gettext namespace in a file like
189
+ lib/tasks/gettext.rake:
190
+
191
+ namespace :gettext do
192
+ def files_to_translate
193
+ Dir.glob("{app,lib,config,locale}/**/*.{rb,erb,haml,rhtml}")
194
+ end
195
+ end
196
+
181
197
  TODO
182
198
  =====
183
199
  - fix % on string to respect html_safe: `("<a>%{x}</a>".html_safe % {:x=>'<script>y</script>'})` should escape the `<script>y</script>` part)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.10
1
+ 0.2.11
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gettext_i18n_rails}
8
- s.version = "0.2.10"
8
+ s.version = "0.2.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
12
- s.date = %q{2010-10-27}
12
+ s.date = %q{2010-11-16}
13
13
  s.email = %q{grosser.michael@gmail.com}
14
14
  s.files = [
15
15
  ".gitignore",
@@ -20,7 +20,7 @@ namespace :gettext do
20
20
  if GetText.respond_to? :update_pofiles_org
21
21
  GetText.update_pofiles_org(
22
22
  text_domain(),
23
- Dir.glob("{app,lib,config,locale}/**/*.{rb,erb,haml}"),
23
+ files_to_translate(),
24
24
  "version 0.0.1",
25
25
  :po_root => 'locale',
26
26
  :msgmerge=>['--sort-output']
@@ -113,4 +113,8 @@ namespace :gettext do
113
113
  # if your textdomain is not 'app': require the environment before calling e.g. gettext:find OR add TEXTDOMAIN=my_domain
114
114
  ENV['TEXTDOMAIN'] || (FastGettext.text_domain rescue nil) || "app"
115
115
  end
116
+
117
+ def files_to_translate
118
+ Dir.glob("{app,lib,config,locale}/**/*.{rb,erb,haml}")
119
+ end
116
120
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 10
9
- version: 0.2.10
8
+ - 11
9
+ version: 0.2.11
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Grosser
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-27 00:00:00 +02:00
17
+ date: 2010-11-16 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency