gettext 1.8.0-mswin32 → 1.9.0-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +120 -0
- data/NEWS +16 -0
- data/README +27 -19
- data/data/locale/ca/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/ca/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/cs/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/cs/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/de/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/de/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/el/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/el/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/eo/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/eo/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/es/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/es/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/et/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/it/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/it/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ko/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/ko/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/nl/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/nl/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/pt_BR/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/pt_BR/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ru/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/ru/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/sv/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/zh/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/zh/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/zh_TW/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/zh_TW/LC_MESSAGES/rgettext.mo +0 -0
- data/ext/gettext/Makefile +22 -19
- data/ext/gettext/mkmf.log +3 -9
- data/lib/gettext.rb +13 -10
- data/lib/gettext/active_record.rb +130 -113
- data/lib/gettext/erb.rb +2 -2
- data/lib/gettext/locale.rb +11 -5
- data/lib/gettext/locale_cgi.rb +3 -3
- data/lib/gettext/locale_posix.rb +2 -2
- data/lib/gettext/locale_win32.rb +2 -1
- data/lib/gettext/parser/active_record.rb +24 -14
- data/lib/gettext/parser/ruby.rb +4 -63
- data/lib/gettext/rails.rb +23 -20
- data/lib/gettext/rgettext.rb +6 -6
- data/lib/gettext/utils.rb +12 -6
- data/lib/gettext/version.rb +2 -2
- data/po/ca/rails.po +121 -0
- data/po/ca/rgettext.po +130 -0
- data/po/cs/rails.po +30 -26
- data/po/cs/rgettext.po +44 -36
- data/po/de/rails.po +28 -24
- data/po/de/rgettext.po +43 -35
- data/po/el/rails.po +38 -34
- data/po/el/rgettext.po +54 -46
- data/po/eo/rails.po +121 -0
- data/po/eo/rgettext.po +127 -0
- data/po/es/rails.po +28 -24
- data/po/es/rgettext.po +45 -37
- data/po/et/rails.po +28 -24
- data/po/fr/rails.po +39 -33
- data/po/fr/rgettext.po +43 -35
- data/po/it/rails.po +28 -24
- data/po/it/rgettext.po +43 -35
- data/po/ja/rails.po +30 -26
- data/po/ja/rgettext.po +44 -36
- data/po/ko/rails.po +36 -32
- data/po/ko/rgettext.po +43 -35
- data/po/nl/rails.po +32 -28
- data/po/nl/rgettext.po +46 -38
- data/po/pt_BR/rails.po +36 -31
- data/po/pt_BR/rgettext.po +45 -37
- data/po/rails.pot +28 -24
- data/po/rgettext.pot +39 -31
- data/po/ru/rails.po +36 -30
- data/po/ru/rgettext.po +50 -41
- data/po/sv/rgettext.po +40 -32
- data/po/zh/rails.po +29 -24
- data/po/zh/rgettext.po +46 -36
- data/po/zh_TW/rails.po +29 -24
- data/po/zh_TW/rgettext.po +45 -36
- data/samples/cgi/locale/ca/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/ca/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/ca/LC_MESSAGES/hellolib.mo +0 -0
- data/samples/cgi/locale/ca/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/eo/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/eo/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/eo/LC_MESSAGES/hellolib.mo +0 -0
- data/samples/cgi/locale/eo/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/po/ca/helloerb1.po +59 -0
- data/samples/cgi/po/ca/helloerb2.po +51 -0
- data/samples/cgi/po/ca/hellolib.po +23 -0
- data/samples/cgi/po/ca/main.po +83 -0
- data/samples/cgi/po/eo/helloerb1.po +60 -0
- data/samples/cgi/po/eo/helloerb2.po +52 -0
- data/samples/cgi/po/eo/hellolib.po +24 -0
- data/samples/cgi/po/eo/main.po +84 -0
- data/samples/locale/ca/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/helloglade2.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hellogtk.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hellotk.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/helloglade2.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hellogtk.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hellotk.mo +0 -0
- data/samples/po/ca/hello.po +23 -0
- data/samples/po/ca/hello2.po +31 -0
- data/samples/po/ca/hello_noop.po +27 -0
- data/samples/po/ca/hello_plural.po +25 -0
- data/samples/po/ca/helloglade2.po +31 -0
- data/samples/po/ca/hellogtk.po +23 -0
- data/samples/po/ca/hellotk.po +23 -0
- data/samples/po/eo/hello.po +23 -0
- data/samples/po/eo/hello2.po +31 -0
- data/samples/po/eo/hello_noop.po +27 -0
- data/samples/po/eo/hello_plural.po +26 -0
- data/samples/po/eo/helloglade2.po +32 -0
- data/samples/po/eo/hellogtk.po +23 -0
- data/samples/po/eo/hellotk.po +24 -0
- data/samples/rails/app/views/blog/list.rhtml +0 -1
- data/samples/rails/config/environment.rb +2 -0
- data/samples/rails/db/schema.rb +0 -79
- data/samples/rails/lib/tasks/gettext.rake +2 -1
- data/samples/rails/locale/ca/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/cs/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/de/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/el/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/en/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/eo/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/es/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/fr/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/it/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/ja/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/ko/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/nl/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/pt_BR/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/ru/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/zh/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/zh_TW/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/po/blog.pot +106 -106
- data/samples/rails/po/ca/blog.po +105 -0
- data/samples/rails/po/cs/blog.po +107 -110
- data/samples/rails/po/de/blog.po +107 -107
- data/samples/rails/po/el/blog.po +105 -105
- data/samples/rails/po/en/blog.po +107 -107
- data/samples/rails/po/eo/blog.po +106 -0
- data/samples/rails/po/es/blog.po +105 -105
- data/samples/rails/po/fr/blog.po +105 -105
- data/samples/rails/po/it/blog.po +105 -105
- data/samples/rails/po/ja/blog.po +105 -105
- data/samples/rails/po/ko/blog.po +105 -105
- data/samples/rails/po/nl/blog.po +105 -105
- data/samples/rails/po/pt_BR/blog.po +105 -105
- data/samples/rails/po/ru/blog.po +105 -105
- data/samples/rails/po/zh/blog.po +105 -105
- data/samples/rails/po/zh_TW/blog.po +107 -107
- data/samples/rails/vendor/plugins/gettext/locale/ca/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/vendor/plugins/gettext/po/ca/gettext_plugin.po +27 -0
- data/test/README +6 -0
- data/test/Rakefile +1 -1
- data/test/fixtures/book.rb +3 -0
- data/test/fixtures/user.rb +3 -0
- data/test/gettext_test_active_record.rb +347 -67
- data/test/gettext_test_cgi.rb +27 -2
- data/test/gettext_test_parser.rb +102 -4
- data/test/gettext_test_rails.rb +6 -1
- data/test/locale/ja/LC_MESSAGES/active_record.mo +0 -0
- data/test/po/ja/active_record.po +17 -17
- data/test/test.sh +1 -0
- data/test/test_rubyparser.rb +6 -4
- metadata +92 -3
data/lib/gettext/parser/ruby.rb
CHANGED
@@ -9,73 +9,13 @@
|
|
9
9
|
You may redistribute it and/or modify it under the same
|
10
10
|
license terms as Ruby.
|
11
11
|
|
12
|
-
$Id: ruby.rb,v 1.
|
12
|
+
$Id: ruby.rb,v 1.9 2007/01/13 18:34:08 mutoh Exp $
|
13
13
|
=end
|
14
14
|
|
15
15
|
require 'irb/ruby-lex.rb'
|
16
16
|
require 'stringio'
|
17
17
|
|
18
18
|
class RubyLexX < RubyLex # :nodoc: all
|
19
|
-
|
20
|
-
def initialize
|
21
|
-
super
|
22
|
-
@prompt = nil
|
23
|
-
@here_header = nil
|
24
|
-
@lex_state = nil
|
25
|
-
end
|
26
|
-
|
27
|
-
def read_escape
|
28
|
-
case ch = getc
|
29
|
-
when "\n", "\r", "\f"
|
30
|
-
when "\\", "n", "t", "r", "f", "v", "a", "e", "b" #"
|
31
|
-
return "\\".concat(ch)
|
32
|
-
when /[0-7]/
|
33
|
-
ungetc ch
|
34
|
-
3.times do
|
35
|
-
case ch = getc
|
36
|
-
when /[0-7]/
|
37
|
-
when nil
|
38
|
-
break
|
39
|
-
else
|
40
|
-
ungetc
|
41
|
-
break
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
when "x"
|
46
|
-
2.times do
|
47
|
-
case ch = getc
|
48
|
-
when /[0-9a-fA-F]/
|
49
|
-
when nil
|
50
|
-
break
|
51
|
-
else
|
52
|
-
ungetc
|
53
|
-
break
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
when "M"
|
58
|
-
if (ch = getc) != '-'
|
59
|
-
ungetc
|
60
|
-
else
|
61
|
-
if (ch = getc) == "\\" #"
|
62
|
-
read_escape
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
when "C", "c", "^"
|
67
|
-
if ch == "C" and (ch = getc) != "-"
|
68
|
-
ungetc
|
69
|
-
elsif (ch = getc) == "\\" #"
|
70
|
-
read_escape
|
71
|
-
end
|
72
|
-
when '#'
|
73
|
-
return ch
|
74
|
-
else
|
75
|
-
# other characters
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
19
|
# Parser#parse resemlbes RubyLex#lex
|
80
20
|
def parse
|
81
21
|
until ( (tk = token).kind_of?(RubyToken::TkEND_OF_SCRIPT) && !@continue or tk.nil? )
|
@@ -114,7 +54,6 @@ class RubyLexX < RubyLex # :nodoc: all
|
|
114
54
|
|
115
55
|
yield tk
|
116
56
|
end
|
117
|
-
|
118
57
|
return nil
|
119
58
|
end
|
120
59
|
|
@@ -185,7 +124,9 @@ module GetText
|
|
185
124
|
targets
|
186
125
|
end
|
187
126
|
rescue
|
188
|
-
$stderr.
|
127
|
+
$stderr.print "\n\nError: #{$!.inspect} "
|
128
|
+
$stderr.print " in #{file_name}:#{tk.line_no}\n\t #{lines[tk.line_no - 1]}" if tk
|
129
|
+
$stderr.print "\n"
|
189
130
|
exit
|
190
131
|
end
|
191
132
|
targets
|
data/lib/gettext/rails.rb
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
You may redistribute it and/or modify it under the same
|
7
7
|
license terms as Ruby.
|
8
8
|
|
9
|
-
$Id: rails.rb,v 1.
|
9
|
+
$Id: rails.rb,v 1.55 2007/01/21 15:16:06 mutoh Exp $
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'gettext/cgi'
|
13
|
-
require '
|
13
|
+
require 'action_controller'
|
14
14
|
|
15
15
|
module GetText
|
16
16
|
# GetText::Rails supports Ruby on Rails.
|
@@ -70,7 +70,6 @@ module GetText
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
|
74
73
|
module ActionController #:nodoc:
|
75
74
|
class Base
|
76
75
|
helper GetText::Rails
|
@@ -78,23 +77,21 @@ module ActionController #:nodoc:
|
|
78
77
|
|
79
78
|
@@gettext_domainnames = []
|
80
79
|
@@gettext_content_type = nil
|
81
|
-
|
80
|
+
|
82
81
|
prepend_before_filter :init_gettext
|
83
82
|
after_filter :init_content_type
|
84
|
-
|
85
|
-
|
83
|
+
|
86
84
|
def init_gettext_main(cgi) #:nodoc:
|
87
|
-
cgi.params["lang"] = [
|
85
|
+
cgi.params["lang"] = [params["lang"]] if params["lang"]
|
88
86
|
set_cgi(cgi)
|
89
87
|
set_locale_all(nil)
|
90
88
|
end
|
91
89
|
|
92
|
-
REGEXP_GETTEXT_CONTENT_TYPE = /javascript/ #:nodoc:
|
93
90
|
def init_content_type #:nodoc:
|
94
|
-
if
|
95
|
-
|
96
|
-
elsif !
|
97
|
-
|
91
|
+
if headers["Content-Type"] and /javascript/ =~ headers["Content-Type"]
|
92
|
+
headers["Content-Type"] = "text/javascript; charset=#{GetText.output_charset}"
|
93
|
+
elsif ! headers["Content-Type"]
|
94
|
+
headers["Content-Type"] = "#{@@gettext_content_type}; charset=#{GetText.output_charset}"
|
98
95
|
end
|
99
96
|
end
|
100
97
|
|
@@ -111,7 +108,7 @@ module ActionController #:nodoc:
|
|
111
108
|
def init_gettext # :nodoc:
|
112
109
|
cgi = nil
|
113
110
|
if defined? request.cgi
|
114
|
-
|
111
|
+
cgi = request.cgi
|
115
112
|
end
|
116
113
|
call_methods_around_init_gettext(@@before_init_gettext)
|
117
114
|
init_gettext_main(cgi) if @@gettext_domainnames.size > 0
|
@@ -170,7 +167,7 @@ module ActionController #:nodoc:
|
|
170
167
|
# * :content_type - the content type. Default is "text/html"
|
171
168
|
# * :locale_path - the path to locale directory. Default is {RAILS_ROOT}/locale or {plugin root directory}/locale.
|
172
169
|
#
|
173
|
-
# locale is searched the order by
|
170
|
+
# locale is searched the order by params["lang"] > "lang" value of QUERY_STRING >
|
174
171
|
# "lang" value of Cookie > HTTP_ACCEPT_LANGUAGE value > Default locale(en).
|
175
172
|
# And the charset is set order by "the argument of bindtextdomain" > HTTP_ACCEPT_CHARSET > Default charset(UTF-8).
|
176
173
|
#
|
@@ -192,14 +189,17 @@ module ActionController #:nodoc:
|
|
192
189
|
if options.kind_of? String
|
193
190
|
# For backward compatibility
|
194
191
|
opt.merge!(:charset => options, :content_type => content_type)
|
192
|
+
else
|
193
|
+
opt.merge!(options)
|
195
194
|
end
|
196
195
|
GetText.output_charset = opt[:charset]
|
197
196
|
@@gettext_content_type = opt[:content_type]
|
198
197
|
locale_path = opt[:locale_path]
|
199
198
|
unless locale_path
|
200
|
-
|
201
|
-
|
202
|
-
|
199
|
+
cal = caller[0]
|
200
|
+
if cal =~ /app.controllers/
|
201
|
+
locale_path = File.join(cal.split(/app.controllers/)[0] + "locale")
|
202
|
+
else
|
203
203
|
locale_path = File.join(RAILS_ROOT, "locale")
|
204
204
|
end
|
205
205
|
end
|
@@ -239,7 +239,10 @@ module ActionController #:nodoc:
|
|
239
239
|
class TestRequest < AbstractRequest #:nodoc:
|
240
240
|
@cgi = nil
|
241
241
|
def cgi
|
242
|
-
|
242
|
+
unless @cgi
|
243
|
+
ENV['REQUEST_URI'] ||= "http://localhost:3000/"
|
244
|
+
@cgi = CGI.new
|
245
|
+
end
|
243
246
|
@cgi
|
244
247
|
end
|
245
248
|
end
|
@@ -390,7 +393,7 @@ if defined? ActionMailer
|
|
390
393
|
include GetText::Rails
|
391
394
|
extend GetText::Rails
|
392
395
|
|
393
|
-
alias :
|
396
|
+
alias :create_without_gettext! :create! #:nodoc:
|
394
397
|
|
395
398
|
def base64(text, charset="iso-2022-jp", convert=true)
|
396
399
|
if convert
|
@@ -403,7 +406,7 @@ if defined? ActionMailer
|
|
403
406
|
end
|
404
407
|
|
405
408
|
def create!(*arg) #:nodoc:
|
406
|
-
|
409
|
+
create_without_gettext!(*arg)
|
407
410
|
if Locale.get.language == "ja"
|
408
411
|
require 'nkf'
|
409
412
|
@mail.subject = base64(@mail.subject)
|
data/lib/gettext/rgettext.rb
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
=begin
|
3
3
|
rgettext.rb - Generate a .pot file.
|
4
4
|
|
5
|
-
Copyright (C) 2003-
|
5
|
+
Copyright (C) 2003-2006 Masao Mutoh
|
6
6
|
Copyright (C) 2001,2002 Yasushi Shoji, Masao Mutoh
|
7
7
|
|
8
|
-
Yasushi Shoji <yashi
|
9
|
-
Masao Mutoh <mutoh
|
8
|
+
Yasushi Shoji <yashi at atmark-techno.com>
|
9
|
+
Masao Mutoh <mutoh at highway.ne.jp>
|
10
10
|
|
11
11
|
You may redistribute it and/or modify it under the same
|
12
12
|
license terms as Ruby.
|
@@ -25,7 +25,7 @@ module GetText
|
|
25
25
|
|
26
26
|
# constant values
|
27
27
|
VERSION = GetText::VERSION
|
28
|
-
DATE = %w($Date: 2006/
|
28
|
+
DATE = %w($Date: 2006/12/14 16:35:57 $)[1]
|
29
29
|
MAX_LINE_LEN = 70
|
30
30
|
|
31
31
|
@ex_parsers = []
|
@@ -156,12 +156,12 @@ msgstr ""
|
|
156
156
|
unless FileTest.exist? out
|
157
157
|
output = File.new(File.expand_path(out), "w+")
|
158
158
|
else
|
159
|
-
$stderr.puts(_("File '%s'
|
159
|
+
$stderr.puts(_("File '%s' already exists.") % out)
|
160
160
|
exit 1
|
161
161
|
end
|
162
162
|
end
|
163
163
|
|
164
|
-
opts.on("-r", "--require=
|
164
|
+
opts.on("-r", "--require=library", _("require the library before executing rgettext")) do |out|
|
165
165
|
require out
|
166
166
|
end
|
167
167
|
|
data/lib/gettext/utils.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
utils.rb - Utility functions
|
3
3
|
|
4
|
-
Copyright (C) 2005 Masao Mutoh
|
4
|
+
Copyright (C) 2005,2006 Masao Mutoh
|
5
5
|
|
6
6
|
You may redistribute it and/or modify it under the same
|
7
7
|
license terms as Ruby.
|
@@ -36,8 +36,7 @@ module GetText
|
|
36
36
|
# * Returns: self
|
37
37
|
def msgmerge(defpo, refpo, app_version)
|
38
38
|
$stderr.puts defpo
|
39
|
-
cmd = ENV["MSGMERGE_PATH"]
|
40
|
-
cmd ||= "msgmerge"
|
39
|
+
cmd = ENV["MSGMERGE_PATH"] || "msgmerge"
|
41
40
|
|
42
41
|
cont = ""
|
43
42
|
if FileTest.exist? defpo
|
@@ -47,9 +46,16 @@ module GetText
|
|
47
46
|
cont = io.read
|
48
47
|
end
|
49
48
|
end
|
50
|
-
cont.
|
51
|
-
|
52
|
-
|
49
|
+
if cont.empty?
|
50
|
+
failed_filename = refpo + "~"
|
51
|
+
FileUtils.cp(refpo, failed_filename)
|
52
|
+
$stderr.puts _("Failed to merge with %{defpo} - skipping!") % {:defpo => defpo}
|
53
|
+
$stderr.puts _("Please check new .pot in %{failed_filename}") %{:failed_filename => failed_filename}
|
54
|
+
else
|
55
|
+
cont.sub!(/(Project-Id-Version\:).*$/, "\\1 #{app_version}\\n\"")
|
56
|
+
File.open(defpo, "w") do |out|
|
57
|
+
out.write(cont)
|
58
|
+
end
|
53
59
|
end
|
54
60
|
self
|
55
61
|
end
|
data/lib/gettext/version.rb
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
=begin
|
3
3
|
version - version information of Ruby-GetText-Package
|
4
4
|
|
5
|
-
Copyright (C) 2005
|
5
|
+
Copyright (C) 2005-2007 Masao Mutoh
|
6
6
|
|
7
7
|
You may redistribute it and/or modify it under the same
|
8
8
|
license terms as Ruby.
|
9
9
|
=end
|
10
10
|
module GetText
|
11
|
-
VERSION = "1.
|
11
|
+
VERSION = "1.9.0"
|
12
12
|
end
|
data/po/ca/rails.po
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
#
|
2
|
+
# a po-file for Ruby-GetText-Package and Ruby on Rails.
|
3
|
+
#
|
4
|
+
# Copyright (C) 2005,2006 Masao Mutoh
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
6
|
+
#
|
7
|
+
# Ramon Salvadó <rsalvado at gnuine.com>, 2006.
|
8
|
+
#
|
9
|
+
msgid ""
|
10
|
+
msgstr ""
|
11
|
+
"Project-Id-Version: ruby-gettext 1.9.0\n"
|
12
|
+
"POT-Creation-Date: 2006-12-20 00:05+0900\n"
|
13
|
+
"PO-Revision-Date: 2005-12-17 14:33+0900\n"
|
14
|
+
"Last-Translator: Ramon Salvadó <rsalvado at gnuine.com>\n"
|
15
|
+
"Language-Team: Catalan\n"
|
16
|
+
"MIME-Version: 1.0\n"
|
17
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
19
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
20
|
+
|
21
|
+
#: lib/gettext/rails.rb:278
|
22
|
+
msgid "%{num} error prohibited this %{record} from being saved"
|
23
|
+
msgid_plural "%{num} errors prohibited this %{record} from being saved"
|
24
|
+
msgstr[0] "%{num} error impedeix que es pugui guardar %{record}"
|
25
|
+
msgstr[1] "%{num} errors impedeixen que es pugui guardar %{record}"
|
26
|
+
|
27
|
+
#: lib/gettext/rails.rb:280
|
28
|
+
msgid "There was a problem with the following field:"
|
29
|
+
msgid_plural "There were problems with the following fields:"
|
30
|
+
msgstr[0] "Hi ha problemes amb el següent camp:"
|
31
|
+
msgstr[1] "Hi ha problemes amb els següents camps:"
|
32
|
+
|
33
|
+
#: lib/gettext/rails.rb:367
|
34
|
+
msgid "less than 5 seconds"
|
35
|
+
msgstr "menys de 5 segons"
|
36
|
+
|
37
|
+
#: lib/gettext/rails.rb:367
|
38
|
+
msgid "less than 10 seconds"
|
39
|
+
msgstr "menys de 10 segons"
|
40
|
+
|
41
|
+
#: lib/gettext/rails.rb:367
|
42
|
+
msgid "less than 20 seconds"
|
43
|
+
msgstr "menys de 20 segons"
|
44
|
+
|
45
|
+
#: lib/gettext/rails.rb:368
|
46
|
+
msgid "half a minute"
|
47
|
+
msgstr "mig minut"
|
48
|
+
|
49
|
+
#: lib/gettext/rails.rb:368
|
50
|
+
msgid "less than a minute"
|
51
|
+
msgstr "menys d'un minut"
|
52
|
+
|
53
|
+
#: lib/gettext/rails.rb:369
|
54
|
+
msgid "1 minute"
|
55
|
+
msgid_plural "%{num} minutes"
|
56
|
+
msgstr[0] "1 minut"
|
57
|
+
msgstr[1] "%{num} minuts"
|
58
|
+
|
59
|
+
#: lib/gettext/rails.rb:370
|
60
|
+
msgid "about 1 hour"
|
61
|
+
msgid_plural "about %{num} hours"
|
62
|
+
msgstr[0] "al voltant d'1 hora"
|
63
|
+
msgstr[1] "al voltant de %{num} hores"
|
64
|
+
|
65
|
+
#: lib/gettext/rails.rb:371
|
66
|
+
msgid "1 day"
|
67
|
+
msgid_plural "%{num} days"
|
68
|
+
msgstr[0] "1 dia"
|
69
|
+
msgstr[1] "%{num} dies"
|
70
|
+
|
71
|
+
#: lib/gettext/active_record.rb:27
|
72
|
+
msgid "Validation failed: %{error_messages}"
|
73
|
+
msgstr "La validació ha fallat: %{error_messages}"
|
74
|
+
|
75
|
+
#: lib/gettext/active_record.rb:195
|
76
|
+
msgid "%{fn} is not included in the list"
|
77
|
+
msgstr "%{fn} no pertany a la llista de possibles valors"
|
78
|
+
|
79
|
+
#: lib/gettext/active_record.rb:196
|
80
|
+
msgid "%{fn} is reserved"
|
81
|
+
msgstr "%{fn} no està permès"
|
82
|
+
|
83
|
+
#: lib/gettext/active_record.rb:197
|
84
|
+
msgid "%{fn} is invalid"
|
85
|
+
msgstr "%{fn} no és vàlid"
|
86
|
+
|
87
|
+
#: lib/gettext/active_record.rb:198
|
88
|
+
msgid "%{fn} doesn't match confirmation"
|
89
|
+
msgstr "%{fn} no té el mateix valor que la confirmació"
|
90
|
+
|
91
|
+
#: lib/gettext/active_record.rb:199
|
92
|
+
msgid "%{fn} must be accepted"
|
93
|
+
msgstr "%{fn} ha de ser acceptat"
|
94
|
+
|
95
|
+
#: lib/gettext/active_record.rb:200
|
96
|
+
msgid "%{fn} can't be empty"
|
97
|
+
msgstr "%{fn} no pot ser buit"
|
98
|
+
|
99
|
+
#: lib/gettext/active_record.rb:201
|
100
|
+
msgid "%{fn} can't be blank"
|
101
|
+
msgstr "%{fn} no pot estar en blanc"
|
102
|
+
|
103
|
+
#: lib/gettext/active_record.rb:202
|
104
|
+
msgid "%{fn} is too long (maximum is %d characters)"
|
105
|
+
msgstr "%{fn} és massa llarg (màxim de %d caràcters)"
|
106
|
+
|
107
|
+
#: lib/gettext/active_record.rb:203
|
108
|
+
msgid "%{fn} is too short (minimum is %d characters)"
|
109
|
+
msgstr "%{fn} és massa curt (mínim de %d caràcters)"
|
110
|
+
|
111
|
+
#: lib/gettext/active_record.rb:204
|
112
|
+
msgid "%{fn} is the wrong length (should be %d characters)"
|
113
|
+
msgstr "%{fn} té una llargària incorrecta (hauria de tenir %d caràcters)"
|
114
|
+
|
115
|
+
#: lib/gettext/active_record.rb:205
|
116
|
+
msgid "%{fn} has already been taken"
|
117
|
+
msgstr "%{fn} ja existent"
|
118
|
+
|
119
|
+
#: lib/gettext/active_record.rb:206
|
120
|
+
msgid "%{fn} is not a number"
|
121
|
+
msgstr "%{fn} no és un número"
|
data/po/ca/rgettext.po
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
#
|
2
|
+
# po-file for Ruby-GetText-Package
|
3
|
+
#
|
4
|
+
# Copyright (C) 2004-2006 Masao Mutoh
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
6
|
+
#
|
7
|
+
# Ramon Salvadó <rsalvado at gnuine.com>, 2006.
|
8
|
+
#
|
9
|
+
msgid ""
|
10
|
+
msgstr ""
|
11
|
+
"Project-Id-Version: ruby-gettext 1.9.0\n"
|
12
|
+
"POT-Creation-Date: 2006-12-20 00:05+0900\n"
|
13
|
+
"PO-Revision-Date: 2005-12-20 10:33+0900E\n"
|
14
|
+
"Last-Translator: Ramon Salvadó <rsalvado at gnuine.com>\n"
|
15
|
+
"Language-Team: Catalan\n"
|
16
|
+
"MIME-Version: 1.0\n"
|
17
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
19
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
20
|
+
|
21
|
+
#: lib/gettext/utils.rb:52
|
22
|
+
msgid "Failed to merge with %{defpo} - skipping!"
|
23
|
+
msgstr "Ha fallat al fer el merge amb %{defpo} - saltant!"
|
24
|
+
|
25
|
+
#: lib/gettext/utils.rb:53
|
26
|
+
msgid "Please check new .pot in %{failed_filename}"
|
27
|
+
msgstr "Si us plau comprova el nou .pot a %{failed_filename}"
|
28
|
+
|
29
|
+
#: lib/gettext/rmsgfmt.rb:31 lib/gettext/rgettext.rb:196
|
30
|
+
msgid "no input files"
|
31
|
+
msgstr "no hi ha fitxers d'entrada"
|
32
|
+
|
33
|
+
#: lib/gettext/rmsgfmt.rb:47
|
34
|
+
msgid "Usage: %s input.po [-o output.mo]"
|
35
|
+
msgstr "Ús: %s entrada.po [-o sortida.mo]"
|
36
|
+
|
37
|
+
#: lib/gettext/rmsgfmt.rb:49
|
38
|
+
msgid "Generate binary message catalog from textual translation description."
|
39
|
+
msgstr ""
|
40
|
+
"Genera un catàleg de missatges binaris a partir d'un fitxer de traducció "
|
41
|
+
"textual."
|
42
|
+
|
43
|
+
#: lib/gettext/rmsgfmt.rb:51 lib/gettext/rmsgmerge.rb:408
|
44
|
+
#: lib/gettext/rgettext.rb:153
|
45
|
+
msgid "Specific options:"
|
46
|
+
msgstr "Opcions específiques:"
|
47
|
+
|
48
|
+
#: lib/gettext/rmsgfmt.rb:53 lib/gettext/rmsgmerge.rb:410
|
49
|
+
#: lib/gettext/rgettext.rb:155
|
50
|
+
msgid "write output to specified file"
|
51
|
+
msgstr "escriu la sortida en un fitxer especificat"
|
52
|
+
|
53
|
+
#: lib/gettext/rmsgfmt.rb:57 lib/gettext/rmsgmerge.rb:421
|
54
|
+
#: lib/gettext/rgettext.rb:172
|
55
|
+
msgid "display version information and exit"
|
56
|
+
msgstr "mostra informació de la versió i surt"
|
57
|
+
|
58
|
+
#: lib/gettext/rmsgmerge.rb:403
|
59
|
+
msgid "Usage: %s def.po ref.pot [-o output.pot]"
|
60
|
+
msgstr "Ús: %s def.po ref.pot [-o sortida.pot]"
|
61
|
+
|
62
|
+
#: lib/gettext/rmsgmerge.rb:406
|
63
|
+
msgid ""
|
64
|
+
"Merges two Uniforum style .po files together. The def.po file is an existing "
|
65
|
+
"PO file with translations. The ref.pot file is the last created PO file with "
|
66
|
+
"up-to-date source references. ref.pot is generally created by rgettext."
|
67
|
+
msgstr ""
|
68
|
+
"Combina dos fitxers .po d'estil Uniforum. El fitxer def.po és un fitxer PO "
|
69
|
+
"existent amb traduccions. El fitxer ref.pot és l'últim fitxer PO amb "
|
70
|
+
"referències actualitzades. Normalment qui ha creat ref.pot és rgettext"
|
71
|
+
|
72
|
+
#: lib/gettext/rmsgmerge.rb:447
|
73
|
+
msgid "definition po is not given."
|
74
|
+
msgstr "no s'ha donat una definició po"
|
75
|
+
|
76
|
+
#: lib/gettext/rmsgmerge.rb:449
|
77
|
+
msgid "reference pot is not given."
|
78
|
+
msgstr "no s'ha donat una referència pot"
|
79
|
+
|
80
|
+
#: lib/gettext/rgettext.rb:43
|
81
|
+
msgid "'%{klass}' is ignored."
|
82
|
+
msgstr "'%{klass}' ignorat"
|
83
|
+
|
84
|
+
#: lib/gettext/rgettext.rb:149
|
85
|
+
msgid "Usage: %s input.rb [-r parser.rb] [-o output.pot]"
|
86
|
+
msgstr "Ús: %s entrada.po [-r parser.rb] [-o sortida.pot]"
|
87
|
+
|
88
|
+
#: lib/gettext/rgettext.rb:151
|
89
|
+
msgid "Extract translatable strings from given input files."
|
90
|
+
msgstr "Extreu les cadenes de paraules traduïbles dels fitxers d'entrada."
|
91
|
+
|
92
|
+
#: lib/gettext/rgettext.rb:159
|
93
|
+
msgid "File '%s' already exists."
|
94
|
+
msgstr "El fitxer '%s' ja existeix"
|
95
|
+
|
96
|
+
#: lib/gettext/rgettext.rb:164
|
97
|
+
msgid "require the library before executing rgettext"
|
98
|
+
msgstr "requereix la llibreia abans d'executar rgettext"
|
99
|
+
|
100
|
+
#: lib/gettext/rgettext.rb:168
|
101
|
+
msgid "run in debugging mode"
|
102
|
+
msgstr "executa en mode debug"
|
103
|
+
|
104
|
+
#: lib/gettext/parser/glade.rb:74
|
105
|
+
msgid "`%{file}' is not glade-2.0 format."
|
106
|
+
msgstr "El fitxer `%{file}' no té el format glade-2.0."
|
107
|
+
|
108
|
+
#: lib/gettext/parser/active_record.rb:39
|
109
|
+
msgid "'%{file}' is not found."
|
110
|
+
msgstr "El fitxer '%{file}' no s'ha trobat"
|
111
|
+
|
112
|
+
#: lib/gettext/parser/active_record.rb:80
|
113
|
+
msgid "Ignored '%{file}'. Solve dependencies first."
|
114
|
+
msgstr "S'ignora el fitxer '%{file}'. Primer ha de resoldre les dependències."
|
115
|
+
|
116
|
+
#: lib/gettext/parser/active_record.rb:104
|
117
|
+
msgid "No database is available."
|
118
|
+
msgstr "No hi ha una base de dades disponible."
|
119
|
+
|
120
|
+
#: lib/gettext/parser/active_record.rb:137
|
121
|
+
msgid "rubygems are not found."
|
122
|
+
msgstr "no s'ha trobat rubygems"
|
123
|
+
|
124
|
+
#: src/poparser.ry:26 src/poparser.ry:41
|
125
|
+
msgid "Warning: fuzzy message was ignored.\n"
|
126
|
+
msgstr "Avís: s'ha ignorat el missatge ambigu.\n"
|
127
|
+
|
128
|
+
#: src/poparser.ry:125
|
129
|
+
msgid "Warning: obsolete msgid exists.\n"
|
130
|
+
msgstr "Avís: existeix un msgid obsolet.\n"
|