fair-gettext 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{fair-gettext}
5
- s.version = "2.0.6"
5
+ s.version = "2.0.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.date = %q{2009-02-06}
9
- s.description = %q{Ruby-GetText-Package is a GNU GetText-like program for Ruby. The catalog file(po-file) is same format with GNU GetText. This package allow private and public translations.}
9
+ s.description = %q{Ruby-GetText-Package is a GNU GetText-like program for Ruby. The catalog file(po-file) is same format with GNU GetText. This package allows private and public translations.}
10
10
  s.email = %q{mutomasa at gmail.com}
11
11
  s.executables = ["rgettext", "rmsgmerge", "rmsgfmt"]
12
12
  s.extra_rdoc_files = ["lib/gettext.rb", "lib/gettext/tools.rb", "lib/gettext/core_ext/string.rb", "lib/gettext/version.rb", "README.rdoc"]
@@ -202,7 +202,11 @@ module GetText
202
202
  private
203
203
  def store_pomessage(pomessages, pomessage, file_name, line_no, last_comment) #:nodoc:
204
204
  if pomessage && pomessage.msgid
205
- pomessage.sources << file_name + ":" + line_no
205
+ if pomessage.msgid.include? "[private]"
206
+ pomessage.sources << file_name + ":" + line_no
207
+ else
208
+ pomessage.sources << file_name
209
+ end
206
210
  pomessage.add_comment(last_comment) unless last_comment.empty?
207
211
  pomessages << pomessage
208
212
  true
@@ -102,6 +102,29 @@ module GetText
102
102
  # references
103
103
  curr_pos = @@max_line_length
104
104
  sources.each do |e|
105
+
106
+ e = 'Countries' if e == "config/countries.yml"
107
+ e = 'Regions' if e == "config/regions.yml"
108
+ e = 'Genres' if e == "config/genres.yml"
109
+
110
+ e = 'Flash' if e.include? "app/flash/"
111
+ e = 'Javascript' if e.include? "public/javascripts/combined"
112
+
113
+ if e.include? "app/views/"
114
+ e = e.gsub("app/views/", '')
115
+ e = e.match(/(^\w+)/)[0]
116
+ end
117
+
118
+ if e.include? "app/controllers/"
119
+ e = e.gsub("app/controllers/", '')
120
+ e = e.gsub("_controller.rb", '')
121
+ end
122
+
123
+ if e.include? "app/models/"
124
+ e = e.gsub("app/models/", '')
125
+ e = e.gsub(".rb", 's')
126
+ end
127
+
105
128
  if curr_pos + e.size > @@max_line_length
106
129
  str << "\n#:"
107
130
  curr_pos = 3
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 0
8
- - 6
9
- version: 2.0.6
8
+ - 7
9
+ version: 2.0.7
10
10
  platform: ruby
11
11
  authors: []
12
12
 
@@ -41,7 +41,7 @@ dependencies:
41
41
  version: "0"
42
42
  type: :development
43
43
  version_requirements: *id002
44
- description: Ruby-GetText-Package is a GNU GetText-like program for Ruby. The catalog file(po-file) is same format with GNU GetText. This package allow private and public translations.
44
+ description: Ruby-GetText-Package is a GNU GetText-like program for Ruby. The catalog file(po-file) is same format with GNU GetText. This package allows private and public translations.
45
45
  email: mutomasa at gmail.com
46
46
  executables:
47
47
  - rgettext