gettext 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/po/zh_TW/rgettext.po CHANGED
@@ -9,8 +9,8 @@
9
9
  #
10
10
  msgid ""
11
11
  msgstr ""
12
- "Project-Id-Version: ruby-gettext 2.0.0\n"
13
- "POT-Creation-Date: 2009-02-15 11:14+0100\n"
12
+ "Project-Id-Version: ruby-gettext 2.0.3\n"
13
+ "POT-Creation-Date: 2009-05-17 23:09+0900\n"
14
14
  "PO-Revision-Date: 2006-08-21 09:39+0800\n"
15
15
  "Last-Translator: Yang Bob <bob.yang.dev at gmail.com>\n"
16
16
  "Language-Team: zh_TW <xmarsh at gmail.com>\n"
@@ -21,120 +21,109 @@ msgstr ""
21
21
  "X-Poedit-Language: Chinese\n"
22
22
  "X-Poedit-Country: TAIWAN\n"
23
23
 
24
- #: lib/gettext/tools/rgettext.rb:43
25
- msgid "'%{klass}' is ignored."
26
- msgstr "'%{klass}' 忽略"
24
+ #: lib/gettext/tools.rb:68
25
+ msgid "Failed to merge with %{defpo}"
26
+ msgstr "不能與 %{defpo} 合併"
27
27
 
28
- #: lib/gettext/textdomain_manager.rb:157
29
- msgid "3rd parmeter is wrong: value = %{number}"
30
- msgstr "第三个参数錯誤:value = %{number}"
28
+ #: lib/gettext/tools.rb:69
29
+ msgid "New .pot was copied to %{failed_filename}"
30
+ msgstr "新的 .pot 被复制為 %{failed_filename}"
31
31
 
32
- #: lib/gettext/tools.rb:75
32
+ #: lib/gettext/tools.rb:70
33
33
  msgid "Check these po/pot-files. It may have syntax errors or something wrong."
34
34
  msgstr "檢査这些 po/pot-文件。它们可能有語法或者其他錯誤。"
35
35
 
36
+ #: lib/gettext/tools.rb:173
37
+ msgid ""
38
+ "`%{cmd}' can not be found. \n"
39
+ "Install GNU Gettext then set PATH or MSGMERGE_PATH correctly."
40
+ msgstr ""
41
+
42
+ #: lib/gettext/textdomain_manager.rb:147
43
+ msgid "3rd parmeter is wrong: value = %{number}"
44
+ msgstr "第三个参数錯誤:value = %{number}"
45
+
46
+ #: lib/gettext/tools/rgettext.rb:43
47
+ msgid "'%{klass}' is ignored."
48
+ msgstr "'%{klass}' 忽略"
49
+
50
+ #: lib/gettext/tools/rgettext.rb:190
51
+ msgid "Usage: %s input.rb [-r parser.rb] [-o output.pot]"
52
+ msgstr "使用: %s input.rb [-r parser.rb] [-o output.pot]"
53
+
36
54
  #: lib/gettext/tools/rgettext.rb:192
37
55
  msgid "Extract translatable strings from given input files."
38
56
  msgstr "從輸入檔中取出翻譯字串"
39
57
 
40
- #: lib/gettext/tools.rb:73
41
- msgid "Failed to merge with %{defpo}"
42
- msgstr "不能與 %{defpo} 合併"
58
+ #: lib/gettext/tools/rgettext.rb:194 lib/gettext/tools/rmsgfmt.rb:50
59
+ #: lib/gettext/tools/rmsgmerge.rb:407
60
+ msgid "Specific options:"
61
+ msgstr "特殊選項:"
62
+
63
+ #: lib/gettext/tools/rgettext.rb:196 lib/gettext/tools/rmsgfmt.rb:52
64
+ #: lib/gettext/tools/rmsgmerge.rb:409
65
+ msgid "write output to specified file"
66
+ msgstr "輸出到指定檔案"
43
67
 
44
68
  #: lib/gettext/tools/rgettext.rb:200
45
69
  msgid "File '%s' already exists."
46
70
  msgstr "檔案 '%s' 已經存在"
47
71
 
48
- #: lib/gettext/tools/rmsgfmt.rb:47
49
- msgid "Generate binary message catalog from textual translation description."
50
- msgstr "從textual translation description產生二進位訊息 catalog"
51
-
52
- #: lib/gettext/tools/rmsgmerge.rb:405
53
- msgid ""
54
- "Merges two Uniforum style .po files together. The def.po file is an existing "
55
- "PO file with translations. The ref.pot file is the last created PO file with "
56
- "up-to-date source references. ref.pot is generally created by rgettext."
57
- msgstr ""
58
- "合併兩同樣形式的 po 檔, def.po 檔是原來有翻譯的檔案,ref.pot 檔是經過原始碼"
59
- "更新過的新檔,ref.pot 一般是由rgettext 建立。"
72
+ #: lib/gettext/tools/rgettext.rb:205
73
+ msgid "require the library before executing rgettext"
74
+ msgstr "在執行 rgettext 之前需要一個庫"
60
75
 
61
- #: lib/gettext/tools.rb:74
62
- msgid "New .pot was copied to %{failed_filename}"
63
- msgstr "新的 .pot 被复制為 %{failed_filename} 了"
76
+ #: lib/gettext/tools/rgettext.rb:209
77
+ msgid "run in debugging mode"
78
+ msgstr "執行除錯模式"
64
79
 
65
- #: lib/gettext/tools/rgettext.rb:194 lib/gettext/tools/rmsgmerge.rb:407
66
- #: lib/gettext/tools/rmsgfmt.rb:49
67
- msgid "Specific options:"
68
- msgstr "特殊選項:"
80
+ #: lib/gettext/tools/rgettext.rb:213 lib/gettext/tools/rmsgfmt.rb:56
81
+ #: lib/gettext/tools/rmsgmerge.rb:420
82
+ msgid "display version information and exit"
83
+ msgstr "秀出版本資訊後退出"
69
84
 
70
- #: lib/gettext/tools/rmsgmerge.rb:402
71
- msgid "Usage: %s def.po ref.pot [-o output.pot]"
72
- msgstr "使用: %s def.po ref.pot [-o output.pot]"
85
+ #: lib/gettext/tools/rgettext.rb:237 lib/gettext/tools/rmsgfmt.rb:29
86
+ msgid "no input files"
87
+ msgstr "無輸入檔"
73
88
 
74
- #: lib/gettext/tools/rmsgfmt.rb:45
89
+ #: lib/gettext/tools/rmsgfmt.rb:46
75
90
  msgid "Usage: %s input.po [-o output.mo]"
76
91
  msgstr "使用: %s input.po [-o output.mo]"
77
92
 
78
- #: lib/gettext/tools/rgettext.rb:190
79
- msgid "Usage: %s input.rb [-r parser.rb] [-o output.pot]"
80
- msgstr "使用: %s input.rb [-r parser.rb] [-o output.pot]"
81
-
82
- #: src/poparser.ry:38 src/poparser.ry:55
83
- msgid "Warning: fuzzy message was ignored.\n"
84
- msgstr "警告: fuzzy 訊息被忽略\n"
93
+ #: lib/gettext/tools/rmsgfmt.rb:48
94
+ msgid "Generate binary message catalog from textual translation description."
95
+ msgstr "從textual translation description產生二進位訊息 catalog"
85
96
 
86
- #: src/poparser.ry:148
87
- msgid "Warning: obsolete msgid exists.\n"
88
- msgstr "警告: 存在過時的 msgid.\n"
97
+ #: lib/gettext/tools/rmsgmerge.rb:402
98
+ msgid "Usage: %s def.po ref.pot [-o output.pot]"
99
+ msgstr "使用: %s def.po ref.pot [-o output.pot]"
89
100
 
90
- #: lib/gettext/tools.rb:178
101
+ #: lib/gettext/tools/rmsgmerge.rb:405
91
102
  msgid ""
92
- "`%{cmd}' can not be found. \n"
93
- "Install GNU Gettext then set PATH or MSGMERGE_PATH correctly."
103
+ "Merges two Uniforum style .po files together. The def.po file is an existing "
104
+ "PO file with translations. The ref.pot file is the last created PO file with "
105
+ "up-to-date source references. ref.pot is generally created by rgettext."
94
106
  msgstr ""
95
-
96
- #: lib/gettext/parser/glade.rb:75
97
- msgid "`%{file}' is not glade-2.0 format."
98
- msgstr "`%{file}' 不是 glade-2.0 格式"
107
+ "合併兩同樣形式的 po 檔, def.po 檔是原來有翻譯的檔案,ref.pot 檔是經過原始碼"
108
+ "更新過的新檔,ref.pot 一般是由rgettext 建立。"
99
109
 
100
110
  #: lib/gettext/tools/rmsgmerge.rb:446
101
111
  msgid "definition po is not given."
102
112
  msgstr "沒有指定PO檔"
103
113
 
104
- #: lib/gettext/tools/rgettext.rb:213 lib/gettext/tools/rmsgmerge.rb:420
105
- #: lib/gettext/tools/rmsgfmt.rb:55
106
- msgid "display version information and exit"
107
- msgstr "秀出版本資訊後退出"
108
-
109
- #: lib/gettext/tools/rgettext.rb:237 lib/gettext/tools/rmsgfmt.rb:29
110
- msgid "no input files"
111
- msgstr "無輸入檔"
112
-
113
114
  #: lib/gettext/tools/rmsgmerge.rb:448
114
115
  msgid "reference pot is not given."
115
116
  msgstr "沒指定參考pot檔"
116
117
 
117
- #: lib/gettext/tools/rgettext.rb:205
118
- msgid "require the library before executing rgettext"
119
- msgstr "在執行 rgettext 之前需要一個庫"
120
-
121
- #: lib/gettext/tools/rgettext.rb:209
122
- msgid "run in debugging mode"
123
- msgstr "執行除錯模式"
124
-
125
- #: lib/gettext/tools/rgettext.rb:196 lib/gettext/tools/rmsgmerge.rb:409
126
- #: lib/gettext/tools/rmsgfmt.rb:51
127
- msgid "write output to specified file"
128
- msgstr "輸出到指定檔案"
129
-
130
- #~ msgid "'%{file}' is not found."
131
- #~ msgstr "'%{file}' 找不到"
118
+ #: lib/gettext/parser/glade.rb:75
119
+ msgid "`%{file}' is not glade-2.0 format."
120
+ msgstr "`%{file}' 不是 glade-2.0 格式"
132
121
 
133
- #~ msgid "Ignored '%{file}'. Solve dependencies first."
134
- #~ msgstr "忽略檔案 '%{file}'. 先解決相依問題。"
122
+ #: src/poparser.ry:38 src/poparser.ry:55
123
+ msgid "Warning: fuzzy message was ignored.\n"
124
+ msgstr "警告: fuzzy 訊息被忽略\n"
135
125
 
136
- #~ msgid "No database is available."
137
- #~ msgstr "無資料庫可用"
126
+ #: src/poparser.ry:148
127
+ msgid "Warning: obsolete msgid exists.\n"
128
+ msgstr "警告: 存在過時的 msgid.\n"
138
129
 
139
- #~ msgid "rubygems are not found."
140
- #~ msgstr "找不到 rubygems"
data/test/Rakefile CHANGED
@@ -1,8 +1,5 @@
1
1
  $LOAD_PATH.unshift "../lib"
2
2
 
3
- #gems that are required, to run the tests...
4
- gem 'locale'
5
-
6
3
  task :default => :test
7
4
 
8
5
  desc "Create mo files"
@@ -15,6 +12,6 @@ desc 'Run all tests'
15
12
  task :test do
16
13
  Dir.glob("**/test_*.rb").each do |path|
17
14
  puts ""
18
- ruby "-I../lib:../../locale/lib", "-rubygems", path rescue nil
15
+ ruby "-I../lib:../../locale/lib -rubygems #{path}"
19
16
  end
20
17
  end
data/test/test_string.rb CHANGED
@@ -12,14 +12,25 @@ class TestGetTextString < Test::Unit::TestCase
12
12
  assert_raise(ArgumentError) { "%-%" % [1] }
13
13
  end
14
14
 
15
+ def test_percent
16
+ assert_equal("% 1", "%% %<num>d" % {:num => 1.0})
17
+ assert_equal("%{num} %<num>d", "%%{num} %%<num>d" % {:num => 1})
18
+ end
19
+
15
20
  def test_sprintf_percent_in_replacement
16
21
  assert_equal("%<not_translated>s", "%{msg}" % { :msg => '%<not_translated>s', :not_translated => 'should not happen' })
17
22
  end
23
+
18
24
  def test_sprintf_lack_argument
19
25
  assert_equal("%{num}, test", "%{num}, %{record}" % {:record => "test"})
20
26
  assert_equal("%{record}", "%{record}" % {:num => 1})
21
27
  end
22
28
 
29
+ def test_no_placeholder
30
+ assert_equal("aaa", "aaa" % {:num => 1})
31
+ assert_equal("bbb", "bbb" % [1])
32
+ end
33
+
23
34
  def test_sprintf_ruby19_style
24
35
  assert_equal("1", "%<num>d" % {:num => 1})
25
36
  assert_equal("0b1", "%<num>#b" % {:num => 1})
@@ -28,8 +39,8 @@ class TestGetTextString < Test::Unit::TestCase
28
39
  assert_equal(" 1", "%<num>3.0f" % {:num => 1.0})
29
40
  assert_equal("100.00", "%<num>2.2f" % {:num => 100.0})
30
41
  assert_equal("0x64", "%<num>#x" % {:num => 100.0})
31
- assert_raise { "%<num>,d" % {:num => 100} }
32
- assert_raise { "%<num>/d" % {:num => 100} }
42
+ assert_raise(ArgumentError) { "%<num>,d" % {:num => 100} }
43
+ assert_raise(ArgumentError) { "%<num>/d" % {:num => 100} }
33
44
  end
34
45
 
35
46
  def test_sprintf_old_style
@@ -39,11 +50,8 @@ class TestGetTextString < Test::Unit::TestCase
39
50
  def test_sprintf_mix
40
51
  assert_equal("foo 1.000000", "%{name} %<num>f" % {:name => "foo", :num => 1.0})
41
52
  assert_equal("%{name} 1.000000", "%{name} %f" % [1.0])
53
+ assert_equal("%{name} 1.000000", "%{name} %f" % [1.0, 2.0])
42
54
  end
43
55
 
44
- def test_percent
45
- assert_equal("% 1", "%% %<num>d" % {:num => 1.0})
46
- assert_equal("%{num} %<num>d", "%%{num} %%<num>d" % {:num => 1})
47
- end
48
56
 
49
57
  end
@@ -3,10 +3,10 @@ require 'testlib/helper'
3
3
  require 'gettext/tools'
4
4
  class TestToolsTools < Test::Unit::TestCase
5
5
  def setup
6
- `cp -r tools/files tools/test_files`
6
+ FileUtils.cp_r "tools/files", "tools/test_files"
7
7
  end
8
8
  def teardown
9
- `rm -rf tools/test_files`
9
+ FileUtils.rm_rf "tools/test_files"
10
10
  end
11
11
 
12
12
  def test_msgmerge_merges_old_and_new_po_file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettext
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masao Mutoh
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-09 00:00:00 +09:00
12
+ date: 2009-05-23 00:00:00 +09:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 2.0.3
23
+ version: 2.0.4
24
24
  version:
25
25
  description: Ruby-GetText-Package is a GNU GetText-like program for Ruby. The catalog file(po-file) is same format with GNU GetText. So you can use GNU GetText tools for maintaining.
26
26
  email: mutomasa at gmail.com
@@ -77,7 +77,6 @@ files:
77
77
  - po/pt_BR/rgettext.po
78
78
  - po/ja
79
79
  - po/ja/rgettext.po
80
- - po/ja/rails.po.old
81
80
  - po/zh_TW
82
81
  - po/zh_TW/rgettext.po
83
82
  - po/ru
@@ -85,7 +84,6 @@ files:
85
84
  - po/bs
86
85
  - po/bs/rgettext.po
87
86
  - po/de
88
- - po/de/#rails.po#
89
87
  - po/de/rgettext.po
90
88
  - po/ca
91
89
  - po/ca/rgettext.po
data/po/de/#rails.po# DELETED
@@ -1,175 +0,0 @@
1
- #
2
- # a po-file for Ruby-GetText-Package and Ruby on Rails.
3
- #
4
- # Copyright (C) 2005-2008 Masao Mutoh
5
- #
6
- # This file is distributed under the same license as the Ruby-GetText-Package.
7
- #
8
- # Patrick Lenz, 2006,2007,2008
9
- # Sasa Ebach, 2005
10
- #
11
- msgid ""
12
- msgstr ""
13
- "Project-Id-Version: ruby-gettext 1.93.0\n"
14
- "POT-Creation-Date: 2008-10-07 00:13+0900\n"
15
- "PO-Revision-Date: 2008-07-13 10:00W. Europe Standard Time\n"
16
- "Last-Translator: Patrick Lenz <patrick at limited-overload.de>\n"
17
- "Language-Team: German\n"
18
- "MIME-Version: 1.0\n"
19
- "Content-Type: text/plain; charset=UTF-8\n"
20
- "Content-Transfer-Encoding: 8bit\n"
21
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
22
-
23
- #: lib/gettext/rails.rb:327
24
- msgid "%{num} error prohibited this %{record} from being saved"
25
- msgid_plural "%{num} errors prohibited this %{record} from being saved"
26
- msgstr[0] ""
27
- "%{num} Fehler hat verhindert, dass dieser %{record} gespeichert werden konnte"
28
- msgstr[1] ""
29
- "%{num} Fehler haben verhindert, dass dieser %{record} gespeichert werden "
30
- "konnte"
31
-
32
- #: lib/gettext/rails.rb:329
33
- msgid "There was a problem with the following field:"
34
- msgid_plural "There were problems with the following fields:"
35
- msgstr[0] "Folgendes Feld hat Probleme verursacht:"
36
- msgstr[1] "Folgende Felder haben Probleme verursacht:"
37
-
38
- #: lib/gettext/rails.rb:435
39
- msgid "less than 5 seconds"
40
- msgstr "weniger als 5 Sekunden"
41
-
42
- #: lib/gettext/rails.rb:435
43
- msgid "less than 10 seconds"
44
- msgstr "weniger als 10 Sekunden"
45
-
46
- #: lib/gettext/rails.rb:435
47
- msgid "less than 20 seconds"
48
- msgstr "weniger als 20 Sekunden"
49
-
50
- #: lib/gettext/rails.rb:436
51
- msgid "half a minute"
52
- msgstr "eine halbe Minute"
53
-
54
- #: lib/gettext/rails.rb:436
55
- msgid "less than a minute"
56
- msgstr "weniger als eine Minute"
57
-
58
- #: lib/gettext/rails.rb:436
59
- msgid "about 1 month"
60
- msgstr "ungef��hr 1 Monat"
61
-
62
- #: lib/gettext/rails.rb:437
63
- msgid "about 1 year"
64
- msgstr "ungef��hr 1 Jahr"
65
-
66
- #: lib/gettext/rails.rb:438
67
- msgid "1 minute"
68
- msgid_plural "%{num} minutes"
69
- msgstr[0] "1 Minute"
70
- msgstr[1] "%{num} Minuten"
71
-
72
- #: lib/gettext/rails.rb:439
73
- msgid "about 1 hour"
74
- msgid_plural "about %{num} hours"
75
- msgstr[0] "ungef��hr 1 Stunde"
76
- msgstr[1] "ungef��hr %{num} Stunden"
77
-
78
- #: lib/gettext/rails.rb:440
79
- msgid "1 day"
80
- msgid_plural "%{num} days"
81
- msgstr[0] "1 Tag"
82
- msgstr[1] "%{num} Tage"
83
-
84
- #: lib/gettext/rails.rb:441
85
- msgid "1 month"
86
- msgid_plural "%{num} months"
87
- msgstr[0] "1 Monat"
88
- msgstr[1] "%{num} Monate"
89
-
90
- #: lib/gettext/rails.rb:442
91
- msgid "over 1 year"
92
- msgid_plural "over %{num} years"
93
- msgstr[0] "��ber 1 Jahr"
94
- msgstr[1] "��ber %{num} Jahre"
95
-
96
- #: lib/gettext/active_record.rb:28
97
- msgid "Validation failed: %{error_messages}"
98
- msgstr "Validierung fehlgeschlagen: %{error_messages}"
99
-
100
- #: lib/gettext/active_record.rb:247
101
- msgid "%{fn} is not included in the list"
102
- msgstr "%{fn} kommt nicht in der Liste vor"
103
-
104
- #: lib/gettext/active_record.rb:248
105
- msgid "%{fn} is reserved"
106
- msgstr "%{fn} ist reserviert"
107
-
108
- #: lib/gettext/active_record.rb:249
109
- msgid "%{fn} is invalid"
110
- msgstr "%{fn} ist ung��ltig"
111
-
112
- #: lib/gettext/active_record.rb:250
113
- msgid "%{fn} doesn't match confirmation"
114
- msgstr "%{fn} stimmt nicht mit der Best��tigung ��berein"
115
-
116
- #: lib/gettext/active_record.rb:251
117
- msgid "%{fn} must be accepted"
118
- msgstr "%{fn} muss akzeptiert werden"
119
-
120
- #: lib/gettext/active_record.rb:252
121
- msgid "%{fn} can't be empty"
122
- msgstr "%{fn} darf nicht leer sein"
123
-
124
- #: lib/gettext/active_record.rb:253
125
- msgid "%{fn} can't be blank"
126
- msgstr "%{fn} darf nicht leer sein"
127
-
128
- #: lib/gettext/active_record.rb:254
129
- msgid "%{fn} is too long (maximum is %d characters)"
130
- msgstr "%{fn} ist zu lang (max. %d Zeichen)"
131
-
132
- #: lib/gettext/active_record.rb:255
133
- msgid "%{fn} is too short (minimum is %d characters)"
134
- msgstr "%{fn} ist zu kurz (min. %d Zeichen)"
135
-
136
- #: lib/gettext/active_record.rb:256
137
- msgid "%{fn} is the wrong length (should be %d characters)"
138
- msgstr "%{fn} hat eine falsche L��nge (sollte %d Zeichen lang sein)"
139
-
140
- #: lib/gettext/active_record.rb:257
141
- msgid "%{fn} has already been taken"
142
- msgstr "%{fn} existiert bereits"
143
-
144
- #~ #: lib/gettext/active_record.rb:258
145
- #~ #, fuzzy
146
- #~ msgid "%{fn} is not a number"
147
- #~ msgstr "%{fn} ist keine Ziffer"
148
-
149
- #: lib/gettext/active_record.rb:259
150
- msgid "%{fn} must be greater than %d"
151
- msgstr "%{fn} muss gr����er sein als %d"
152
-
153
- #: lib/gettext/active_record.rb:260
154
- msgid "%{fn} must be greater than or equal to %d"
155
- msgstr "%{fn} muss gr����er oder gleich %d sein"
156
-
157
- #: lib/gettext/active_record.rb:261
158
- msgid "%{fn} must be equal to %d"
159
- msgstr "%{fn} muss gleich %d sein"
160
-
161
- #: lib/gettext/active_record.rb:262
162
- msgid "%{fn} must be less than %d"
163
- msgstr "%{fn} muss kleiner sein als %d"
164
-
165
- #: lib/gettext/active_record.rb:263
166
- msgid "%{fn} must be less than or equal to %d"
167
- msgstr "%{fn} muss kleiner oder gleich %d sein"
168
-
169
- #: lib/gettext/active_record.rb:264
170
- msgid "%{fn} must be odd"
171
- msgstr "%{fn} muss ungerade sein"
172
-
173
- #: lib/gettext/active_record.rb:265
174
- msgid "%{fn} must be even"
175
- msgstr "%{fn} muss gerade sein"