gettext_activerecord 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +55 -0
- data/ChangeLog +4 -0
- data/README.rdoc +172 -0
- data/Rakefile +110 -0
- data/data/locale/bg/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/bs/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/ca/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/cs/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/de/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/el/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/eo/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/es/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/et/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/hr/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/hu/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/it/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/ko/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/lv/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/nb/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/nl/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/pt_BR/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/ru/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/sr/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/ua/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/vi/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/zh/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/data/locale/zh_TW/LC_MESSAGES/gettext_activerecord.mo +0 -0
- data/lib/gettext_activerecord/base.rb +66 -0
- data/lib/gettext_activerecord/i18n.rb +27 -0
- data/lib/gettext_activerecord/migration.rb +16 -0
- data/lib/gettext_activerecord/parser.rb +216 -0
- data/lib/gettext_activerecord/schema_definitions.rb +28 -0
- data/lib/gettext_activerecord/tools.rb +25 -0
- data/lib/gettext_activerecord/validations.rb +189 -0
- data/lib/gettext_activerecord/version.rb +12 -0
- data/lib/gettext_activerecord.rb +19 -0
- data/po/bg/gettext_activerecord.po +115 -0
- data/po/bs/gettext_activerecord.po +125 -0
- data/po/ca/gettext_activerecord.po +116 -0
- data/po/cs/gettext_activerecord.po +124 -0
- data/po/de/gettext_activerecord.po +117 -0
- data/po/el/gettext_activerecord.po +115 -0
- data/po/eo/gettext_activerecord.po +116 -0
- data/po/es/gettext_activerecord.po +116 -0
- data/po/et/gettext_activerecord.po +116 -0
- data/po/fr/gettext_activerecord.po +118 -0
- data/po/gettext_activerecord.pot +113 -0
- data/po/hr/gettext_activerecord.po +125 -0
- data/po/hu/gettext_activerecord.po +116 -0
- data/po/it/gettext_activerecord.po +122 -0
- data/po/ja/gettext_activerecord.po +116 -0
- data/po/ko/gettext_activerecord.po +123 -0
- data/po/lv/gettext_activerecord.po +116 -0
- data/po/nb/gettext_activerecord.po +117 -0
- data/po/nl/gettext_activerecord.po +123 -0
- data/po/pt_BR/gettext_activerecord.po +117 -0
- data/po/ru/gettext_activerecord.po +117 -0
- data/po/sr/gettext_activerecord.po +117 -0
- data/po/test.rb +8 -0
- data/po/ua/gettext_activerecord.po +120 -0
- data/po/vi/gettext_activerecord.po +116 -0
- data/po/zh/gettext_activerecord.po +119 -0
- data/po/zh_TW/gettext_activerecord.po +119 -0
- data/replace.rb +21 -0
- data/sample/README.rdoc +9 -0
- data/sample/Rakefile +32 -0
- data/sample/book.rb +3 -0
- data/sample/config/database.yml +3 -0
- data/sample/data/locale/ja/LC_MESSAGES/sample_ar.mo +0 -0
- data/sample/db/development.sqlite3 +0 -0
- data/sample/db/schema.rb +5 -0
- data/sample/locale/ja/LC_MESSAGES/sample_ar.mo +0 -0
- data/sample/po/ja/sample_ar.po +29 -0
- data/sample/po/sample_ar.pot +29 -0
- data/sample/sample.rb +22 -0
- data/test/Rakefile +43 -0
- data/test/db/migrate.rb +41 -0
- data/test/db/sqlite.rb +8 -0
- data/test/helper.rb +38 -0
- data/test/locale/ja/LC_MESSAGES/active_record.mo +0 -0
- data/test/models/book.rb +3 -0
- data/test/models/developer.rb +5 -0
- data/test/models/inept_wizard.rb +3 -0
- data/test/models/reply.rb +40 -0
- data/test/models/topic.rb +68 -0
- data/test/models/user.rb +3 -0
- data/test/models/wizard.rb +5 -0
- data/test/po/active_record.pot +388 -0
- data/test/po/ja/active_record.po +387 -0
- data/test/test_parser.rb +95 -0
- data/test/test_validations.rb +2575 -0
- data/test/vendor/repair_helper.rb +50 -0
- data/test.rb +2 -0
- metadata +268 -0
@@ -0,0 +1,387 @@
|
|
1
|
+
# Japanese translations for PACKAGE package
|
2
|
+
# Copyright (C) 2006 THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
+
# This file is distributed under the same license as the PACKAGE package.
|
4
|
+
# Masao Mutoh <mutomasa at gmail.com>, 2006.
|
5
|
+
#
|
6
|
+
msgid ""
|
7
|
+
msgstr ""
|
8
|
+
"Project-Id-Version: active_record 1.0.0\n"
|
9
|
+
"POT-Creation-Date: 2009-02-16 02:51+0900\n"
|
10
|
+
"PO-Revision-Date: 2006-08-09 02:17+0900\n"
|
11
|
+
"Last-Translator: Masao Mutoh <mutomasa at gmail.com>\n"
|
12
|
+
"Language-Team: Japanese\n"
|
13
|
+
"MIME-Version: 1.0\n"
|
14
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
15
|
+
"Content-Transfer-Encoding: 8bit\n"
|
16
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
17
|
+
|
18
|
+
#: fixtures/developer.rb:-
|
19
|
+
msgid "developer"
|
20
|
+
msgstr "開発者"
|
21
|
+
|
22
|
+
#: fixtures/developer.rb:-
|
23
|
+
msgid "Developer|Name"
|
24
|
+
msgstr "開発者名"
|
25
|
+
|
26
|
+
#: fixtures/developer.rb:-
|
27
|
+
msgid "Developer|Salary"
|
28
|
+
msgstr "給料"
|
29
|
+
|
30
|
+
#: fixtures/developer.rb:-
|
31
|
+
msgid "Developer|Created at"
|
32
|
+
msgstr "生成日"
|
33
|
+
|
34
|
+
#: fixtures/developer.rb:-
|
35
|
+
msgid "Developer|Updated at"
|
36
|
+
msgstr "更新日"
|
37
|
+
|
38
|
+
#: fixtures/developer.rb:2
|
39
|
+
msgid "Developer|Non existent"
|
40
|
+
msgstr "存在しない"
|
41
|
+
|
42
|
+
#: fixtures/topic.rb:- fixtures/reply.rb:-
|
43
|
+
msgid "topic"
|
44
|
+
msgstr "トピック"
|
45
|
+
|
46
|
+
#: fixtures/topic.rb:-
|
47
|
+
msgid "Topic|Title"
|
48
|
+
msgstr "タイトル"
|
49
|
+
|
50
|
+
#: fixtures/topic.rb:-
|
51
|
+
msgid "Topic|Author name"
|
52
|
+
msgstr "著者名"
|
53
|
+
|
54
|
+
#: fixtures/topic.rb:-
|
55
|
+
msgid "Topic|Author email address"
|
56
|
+
msgstr "著者Eメールアドレス"
|
57
|
+
|
58
|
+
#: fixtures/topic.rb:-
|
59
|
+
msgid "Topic|Written on"
|
60
|
+
msgstr "リテンオン"
|
61
|
+
|
62
|
+
#: fixtures/topic.rb:-
|
63
|
+
msgid "Topic|Bonus time"
|
64
|
+
msgstr "ボーナスタイム"
|
65
|
+
|
66
|
+
#: fixtures/topic.rb:-
|
67
|
+
msgid "Topic|Last read"
|
68
|
+
msgstr "最後の読み込み"
|
69
|
+
|
70
|
+
#: fixtures/topic.rb:-
|
71
|
+
msgid "Topic|Content"
|
72
|
+
msgstr "内容"
|
73
|
+
|
74
|
+
#: fixtures/topic.rb:-
|
75
|
+
msgid "Topic|Approved"
|
76
|
+
msgstr "承認"
|
77
|
+
|
78
|
+
#: fixtures/topic.rb:-
|
79
|
+
msgid "Topic|Replies count"
|
80
|
+
msgstr "リプライ数"
|
81
|
+
|
82
|
+
#: fixtures/topic.rb:-
|
83
|
+
msgid "Topic|Parent"
|
84
|
+
msgstr "親"
|
85
|
+
|
86
|
+
#: fixtures/topic.rb:-
|
87
|
+
msgid "Topic|Type"
|
88
|
+
msgstr "種別"
|
89
|
+
|
90
|
+
#: fixtures/topic.rb:35
|
91
|
+
msgid "Topic|Terms of service"
|
92
|
+
msgstr "利用規約"
|
93
|
+
|
94
|
+
#: fixtures/topic.rb:36 test_validations.rb:523
|
95
|
+
msgid "must be abided"
|
96
|
+
msgstr "に従ってください。"
|
97
|
+
|
98
|
+
#: fixtures/reply.rb:-
|
99
|
+
msgid "reply"
|
100
|
+
msgstr "リプライ"
|
101
|
+
|
102
|
+
#: fixtures/reply.rb:-
|
103
|
+
msgid "Reply|Title"
|
104
|
+
msgstr "Replyタイトル"
|
105
|
+
|
106
|
+
#: fixtures/reply.rb:-
|
107
|
+
msgid "Reply|Author name"
|
108
|
+
msgstr "Reply著者名"
|
109
|
+
|
110
|
+
#: fixtures/reply.rb:-
|
111
|
+
msgid "Reply|Author email address"
|
112
|
+
msgstr "Reply著者Eメールアドレス"
|
113
|
+
|
114
|
+
#: fixtures/reply.rb:-
|
115
|
+
msgid "Reply|Written on"
|
116
|
+
msgstr ""
|
117
|
+
|
118
|
+
#: fixtures/reply.rb:-
|
119
|
+
msgid "Reply|Bonus time"
|
120
|
+
msgstr "Replyボーナスタイム"
|
121
|
+
|
122
|
+
#: fixtures/reply.rb:-
|
123
|
+
msgid "Reply|Last read"
|
124
|
+
msgstr ""
|
125
|
+
|
126
|
+
#: fixtures/reply.rb:-
|
127
|
+
msgid "Reply|Content"
|
128
|
+
msgstr "Reply内容"
|
129
|
+
|
130
|
+
#: fixtures/reply.rb:-
|
131
|
+
msgid "Reply|Approved"
|
132
|
+
msgstr "Reply承認"
|
133
|
+
|
134
|
+
#: fixtures/reply.rb:-
|
135
|
+
msgid "Reply|Replies count"
|
136
|
+
msgstr "Replyリプライ数"
|
137
|
+
|
138
|
+
#: fixtures/reply.rb:-
|
139
|
+
msgid "Reply|Parent"
|
140
|
+
msgstr "Reply親"
|
141
|
+
|
142
|
+
#: fixtures/reply.rb:-
|
143
|
+
msgid "Reply|Type"
|
144
|
+
msgstr "Reply種別"
|
145
|
+
|
146
|
+
#: fixtures/reply.rb:-
|
147
|
+
msgid "sillyreply"
|
148
|
+
msgstr "バカな承認"
|
149
|
+
|
150
|
+
#: fixtures/reply.rb:-
|
151
|
+
msgid "SillyReply|Title"
|
152
|
+
msgstr "Sillyタイトル"
|
153
|
+
|
154
|
+
#: fixtures/reply.rb:-
|
155
|
+
msgid "SillyReply|Author name"
|
156
|
+
msgstr "Silly著者名"
|
157
|
+
|
158
|
+
#: fixtures/reply.rb:-
|
159
|
+
msgid "SillyReply|Author email address"
|
160
|
+
msgstr "Silly著者Eメールアドレス"
|
161
|
+
|
162
|
+
#: fixtures/reply.rb:-
|
163
|
+
msgid "SillyReply|Written on"
|
164
|
+
msgstr ""
|
165
|
+
|
166
|
+
#: fixtures/reply.rb:-
|
167
|
+
msgid "SillyReply|Bonus time"
|
168
|
+
msgstr "Sillyボーナスタイム"
|
169
|
+
|
170
|
+
#: fixtures/reply.rb:-
|
171
|
+
msgid "SillyReply|Last read"
|
172
|
+
msgstr ""
|
173
|
+
|
174
|
+
#: fixtures/reply.rb:-
|
175
|
+
msgid "SillyReply|Content"
|
176
|
+
msgstr "Silly内容"
|
177
|
+
|
178
|
+
#: fixtures/reply.rb:-
|
179
|
+
msgid "SillyReply|Approved"
|
180
|
+
msgstr "Silly承認"
|
181
|
+
|
182
|
+
#: fixtures/reply.rb:-
|
183
|
+
msgid "SillyReply|Replies count"
|
184
|
+
msgstr "Sillyリプライ数"
|
185
|
+
|
186
|
+
#: fixtures/reply.rb:-
|
187
|
+
msgid "SillyReply|Parent"
|
188
|
+
msgstr ""
|
189
|
+
|
190
|
+
#: fixtures/reply.rb:-
|
191
|
+
msgid "SillyReply|Type"
|
192
|
+
msgstr "承認"
|
193
|
+
|
194
|
+
#: fixtures/reply.rb:4
|
195
|
+
msgid "Reply|Topic"
|
196
|
+
msgstr "Replyトピック"
|
197
|
+
|
198
|
+
#: fixtures/reply.rb:16 fixtures/reply.rb:20
|
199
|
+
msgid "Empty"
|
200
|
+
msgstr "空です。"
|
201
|
+
|
202
|
+
#: fixtures/reply.rb:25
|
203
|
+
msgid "is Content Mismatch"
|
204
|
+
msgstr "は内容がミスマッチです。"
|
205
|
+
|
206
|
+
#: fixtures/reply.rb:30
|
207
|
+
msgid "is Wrong Create"
|
208
|
+
msgstr "が不正に生成されました。"
|
209
|
+
|
210
|
+
#: fixtures/reply.rb:34
|
211
|
+
msgid "is Wrong Update"
|
212
|
+
msgstr "が不正に更新されました。"
|
213
|
+
|
214
|
+
#: test_validations.rb:-
|
215
|
+
msgid "course"
|
216
|
+
msgstr "手品師"
|
217
|
+
|
218
|
+
#: test_validations.rb:-
|
219
|
+
msgid "inept wizard"
|
220
|
+
msgstr "不器用な魔術師"
|
221
|
+
|
222
|
+
#: test_validations.rb:-
|
223
|
+
msgid "IneptWizard|Name"
|
224
|
+
msgstr "不器用な魔術師名"
|
225
|
+
|
226
|
+
#: test_validations.rb:-
|
227
|
+
msgid "IneptWizard|City"
|
228
|
+
msgstr "不器用な魔術師名"
|
229
|
+
|
230
|
+
#: test_validations.rb:-
|
231
|
+
msgid "IneptWizard|Type"
|
232
|
+
msgstr "不器用な魔術師タイプ"
|
233
|
+
|
234
|
+
#: test_validations.rb:-
|
235
|
+
msgid "person"
|
236
|
+
msgstr "人"
|
237
|
+
|
238
|
+
#: test_validations.rb:-
|
239
|
+
msgid "protectedperson"
|
240
|
+
msgstr "守られた人"
|
241
|
+
|
242
|
+
#: test_validations.rb:-
|
243
|
+
msgid "ProtectedPerson|First name"
|
244
|
+
msgstr "名前"
|
245
|
+
|
246
|
+
#: test_validations.rb:-
|
247
|
+
msgid "ProtectedPerson|Lock version"
|
248
|
+
msgstr "ロックバージョン"
|
249
|
+
|
250
|
+
#: test_validations.rb:-
|
251
|
+
msgid "conjurer"
|
252
|
+
msgstr "手品師"
|
253
|
+
|
254
|
+
#: test_validations.rb:-
|
255
|
+
msgid "Conjurer|Name"
|
256
|
+
msgstr "手品師名"
|
257
|
+
|
258
|
+
#: test_validations.rb:-
|
259
|
+
msgid "Conjurer|City"
|
260
|
+
msgstr "手品師町"
|
261
|
+
|
262
|
+
#: test_validations.rb:-
|
263
|
+
msgid "Conjurer|Type"
|
264
|
+
msgstr "手品師タイプ"
|
265
|
+
|
266
|
+
#: test_validations.rb:-
|
267
|
+
msgid "thaumaturgist"
|
268
|
+
msgstr "奇術師"
|
269
|
+
|
270
|
+
#: test_validations.rb:-
|
271
|
+
msgid "Thaumaturgist|Name"
|
272
|
+
msgstr "奇術師名"
|
273
|
+
|
274
|
+
#: test_validations.rb:-
|
275
|
+
msgid "Thaumaturgist|City"
|
276
|
+
msgstr "奇術師町"
|
277
|
+
|
278
|
+
#: test_validations.rb:-
|
279
|
+
msgid "Thaumaturgist|Type"
|
280
|
+
msgstr "奇術師タイプ"
|
281
|
+
|
282
|
+
#: test_validations.rb:409
|
283
|
+
msgid "gotcha"
|
284
|
+
msgstr "ごっちゃ"
|
285
|
+
|
286
|
+
#: test_validations.rb:501
|
287
|
+
msgid "%{fn} must be abided"
|
288
|
+
msgstr "%{fn}に従ってください。"
|
289
|
+
|
290
|
+
#: test_validations.rb:719 test_validations.rb:773
|
291
|
+
msgid "%{fn} is bad data"
|
292
|
+
msgstr "%{fn}は悪いデータです。"
|
293
|
+
|
294
|
+
#: test_validations.rb:740 test_validations.rb:825
|
295
|
+
msgid "is bad data"
|
296
|
+
msgstr "は悪いデータです。"
|
297
|
+
|
298
|
+
#: test_validations.rb:877
|
299
|
+
msgid "%{fn} can not be %{val}"
|
300
|
+
msgstr "%{val}は%{fn}ではありません。"
|
301
|
+
|
302
|
+
#: test_validations.rb:891
|
303
|
+
msgid "can not be %{val}"
|
304
|
+
msgstr "は%{val}ではありません。"
|
305
|
+
|
306
|
+
#: test_validations.rb:939
|
307
|
+
msgid "%{fn} option %{val} is not in the list"
|
308
|
+
msgstr "オプション%{val}は%{fn}一覧にありません。"
|
309
|
+
|
310
|
+
#: test_validations.rb:961
|
311
|
+
msgid "option %{val} is not in the list"
|
312
|
+
msgstr "オプション%{val}は一覧にありません。"
|
313
|
+
|
314
|
+
#: test_validations.rb:991
|
315
|
+
msgid "%{fn} option %{val} is restricted"
|
316
|
+
msgstr "オプション%{fn}%{val}は制限されています。"
|
317
|
+
|
318
|
+
#: test_validations.rb:1013
|
319
|
+
msgid "option %{val} is restricted"
|
320
|
+
msgstr "オプション%{val}は制限されています。"
|
321
|
+
|
322
|
+
#: test_validations.rb:1129 test_validations.rb:1165
|
323
|
+
msgid "my string(%{fn}) is too short: %d"
|
324
|
+
msgstr "文字列:%{fn}は短すぎ: %d"
|
325
|
+
|
326
|
+
#: test_validations.rb:1129 test_validations.rb:1165
|
327
|
+
msgid "my string(%{fn}) is too long: %d"
|
328
|
+
msgstr "文字列:%{fn}は長すぎ: %d"
|
329
|
+
|
330
|
+
#: test_validations.rb:1147 test_validations.rb:1191
|
331
|
+
msgid "my string is too short: %d"
|
332
|
+
msgstr "文字列は短すぎ: %d"
|
333
|
+
|
334
|
+
#: test_validations.rb:1147 test_validations.rb:1191
|
335
|
+
msgid "my string is too long: %d"
|
336
|
+
msgstr "文字列は長すぎ: %d"
|
337
|
+
|
338
|
+
#: test_validations.rb:1250
|
339
|
+
msgid "%{fn} %d dayo"
|
340
|
+
msgstr "%{fn}は%d以上だよ。"
|
341
|
+
|
342
|
+
#: test_validations.rb:1267
|
343
|
+
msgid "%d dayo"
|
344
|
+
msgstr "は%d以上だよ。"
|
345
|
+
|
346
|
+
#: test_validations.rb:1293 test_validations.rb:1327 test_validations.rb:1363
|
347
|
+
#: test_validations.rb:1398 test_validations.rb:1434 test_validations.rb:2009
|
348
|
+
#: test_validations.rb:2048 test_validations.rb:2111 test_validations.rb:2151
|
349
|
+
#: test_validations.rb:2177 test_validations.rb:2235 test_validations.rb:2274
|
350
|
+
msgid "%{fn} hoo %d"
|
351
|
+
msgstr "%{fn}ふー%d"
|
352
|
+
|
353
|
+
#: test_validations.rb:1310 test_validations.rb:1345 test_validations.rb:1381
|
354
|
+
#: test_validations.rb:1416 test_validations.rb:1451 test_validations.rb:1468
|
355
|
+
#: test_validations.rb:1485 test_validations.rb:2029 test_validations.rb:2067
|
356
|
+
#: test_validations.rb:2092 test_validations.rb:2131 test_validations.rb:2197
|
357
|
+
#: test_validations.rb:2217 test_validations.rb:2254 test_validations.rb:2294
|
358
|
+
msgid "hoo %d"
|
359
|
+
msgstr "ふー%d"
|
360
|
+
|
361
|
+
#: test_validations.rb:1525
|
362
|
+
msgid "%{fn} will never be valid"
|
363
|
+
msgstr "%{fn}は決して正しくならないでしょう。"
|
364
|
+
|
365
|
+
#: test_validations.rb:1542
|
366
|
+
msgid "will never be valid"
|
367
|
+
msgstr "は決して正しくならないでしょう。"
|
368
|
+
|
369
|
+
#: test_validations.rb:1566 test_validations.rb:1612 test_validations.rb:1695
|
370
|
+
#: test_validations.rb:1741 test_validations.rb:1780 test_validations.rb:1818
|
371
|
+
#: test_validations.rb:1863 test_validations.rb:1899 test_validations.rb:1946
|
372
|
+
msgid "%{fn} contains 'single' and \"double\" quotes"
|
373
|
+
msgstr "%{fn}は'シングル' \"ダブル\"クオートを含む。"
|
374
|
+
|
375
|
+
#: test_validations.rb:1589 test_validations.rb:1637 test_validations.rb:1718
|
376
|
+
#: test_validations.rb:1764 test_validations.rb:1802 test_validations.rb:1840
|
377
|
+
#: test_validations.rb:1886 test_validations.rb:1923 test_validations.rb:1977
|
378
|
+
msgid "This string contains 'single' and \"double\" quotes"
|
379
|
+
msgstr "この文字列は'シングル' \"ダブル\"クオートを含む。"
|
380
|
+
|
381
|
+
#: test_validations.rb:2548
|
382
|
+
msgid "smaller than %{count}"
|
383
|
+
msgstr ""
|
384
|
+
|
385
|
+
#: test_validations.rb:2555
|
386
|
+
msgid "greater than %{count}"
|
387
|
+
msgstr ""
|
data/test/test_parser.rb
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
require 'gettext_activerecord/tools'
|
4
|
+
|
5
|
+
# setup the parser
|
6
|
+
# Don't need this because DB connection is established in helper.rb.
|
7
|
+
#GetText::ActiveRecordParser.init(
|
8
|
+
# :adapter => 'sqlite3',
|
9
|
+
# :database => ':memory:'
|
10
|
+
#)
|
11
|
+
|
12
|
+
class TestGetTextParser < Test::Unit::TestCase
|
13
|
+
def test_class
|
14
|
+
GetText::ActiveRecordParser.target?("models/topic.rb")
|
15
|
+
ary = GetText::ActiveRecordParser.parse("models/topic.rb")
|
16
|
+
assert_equal(14, ary.size)
|
17
|
+
assert_equal(["topic", "models/topic.rb:-"], ary[0])
|
18
|
+
assert_equal(["Topic|Title", "models/topic.rb:-"], ary[1])
|
19
|
+
assert_equal(["Topic|Author name", "models/topic.rb:-"], ary[2])
|
20
|
+
assert_equal(["Topic|Author email address", "models/topic.rb:-"], ary[3])
|
21
|
+
assert_equal(["Topic|Written on", "models/topic.rb:-"], ary[4])
|
22
|
+
assert_equal(["Topic|Bonus time", "models/topic.rb:-"], ary[5])
|
23
|
+
assert_equal(["Topic|Last read", "models/topic.rb:-"], ary[6])
|
24
|
+
assert_equal(["Topic|Content", "models/topic.rb:-"], ary[7])
|
25
|
+
assert_equal(["Topic|Approved", "models/topic.rb:-"], ary[8])
|
26
|
+
assert_equal(["Topic|Replies count", "models/topic.rb:-"], ary[9])
|
27
|
+
assert_equal(["Topic|Parent", "models/topic.rb:-"], ary[10])
|
28
|
+
assert_equal(["Topic|Type", "models/topic.rb:-"], ary[11])
|
29
|
+
assert_equal(["Topic|Terms of service", "models/topic.rb:35"], ary[12])
|
30
|
+
assert_equal(["must be abided", "models/topic.rb:36"], ary[13])
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_subclass
|
34
|
+
GetText::ActiveRecordParser.target?("models/reply.rb")
|
35
|
+
ary = GetText::ActiveRecordParser.parse("models/reply.rb")
|
36
|
+
ary.sort!{|a, b| a[0].downcase <=> b[0].downcase}
|
37
|
+
|
38
|
+
assert_equal(30, ary.size)
|
39
|
+
assert_equal(["Empty", "models/reply.rb:16", "models/reply.rb:20"], ary[0])
|
40
|
+
assert_equal(["is Content Mismatch", "models/reply.rb:25"], ary[1])
|
41
|
+
assert_equal(["is Wrong Create", "models/reply.rb:30"], ary[2])
|
42
|
+
assert_equal(["is Wrong Update", "models/reply.rb:34"], ary[3])
|
43
|
+
assert_equal(["reply", "models/reply.rb:-"], ary[4])
|
44
|
+
assert_equal(["Reply|Approved", "models/reply.rb:-"], ary[5])
|
45
|
+
assert_equal(["Reply|Author email address", "models/reply.rb:-"], ary[6])
|
46
|
+
assert_equal(["Reply|Author name", "models/reply.rb:-"], ary[7])
|
47
|
+
assert_equal(["Reply|Bonus time", "models/reply.rb:-"], ary[8])
|
48
|
+
assert_equal(["Reply|Content", "models/reply.rb:-"], ary[9])
|
49
|
+
assert_equal(["Reply|Last read", "models/reply.rb:-"], ary[10])
|
50
|
+
assert_equal(["Reply|Parent", "models/reply.rb:-"], ary[11])
|
51
|
+
assert_equal(["Reply|Replies count", "models/reply.rb:-"], ary[12])
|
52
|
+
assert_equal(["Reply|Title", "models/reply.rb:-"], ary[13])
|
53
|
+
# this target is from N_().
|
54
|
+
assert_equal(["Reply|Topic", "models/reply.rb:4"], ary[14])
|
55
|
+
assert_equal(["Reply|Type", "models/reply.rb:-"], ary[15])
|
56
|
+
assert_equal(["Reply|Written on", "models/reply.rb:-"], ary[16])
|
57
|
+
|
58
|
+
assert_equal(["sillyreply", "models/reply.rb:-"], ary[17])
|
59
|
+
assert_equal(["SillyReply|Approved", "models/reply.rb:-"], ary[18])
|
60
|
+
assert_equal(["SillyReply|Author email address", "models/reply.rb:-"], ary[19])
|
61
|
+
assert_equal(["SillyReply|Author name", "models/reply.rb:-"], ary[20])
|
62
|
+
assert_equal(["SillyReply|Bonus time", "models/reply.rb:-"], ary[21])
|
63
|
+
assert_equal(["SillyReply|Content", "models/reply.rb:-"], ary[22])
|
64
|
+
assert_equal(["SillyReply|Last read", "models/reply.rb:-"], ary[23])
|
65
|
+
assert_equal(["SillyReply|Parent", "models/reply.rb:-"], ary[24])
|
66
|
+
assert_equal(["SillyReply|Replies count", "models/reply.rb:-"], ary[25])
|
67
|
+
assert_equal(["SillyReply|Title", "models/reply.rb:-"], ary[26])
|
68
|
+
assert_equal(["SillyReply|Type", "models/reply.rb:-"], ary[27])
|
69
|
+
assert_equal(["SillyReply|Written on", "models/reply.rb:-"], ary[28])
|
70
|
+
|
71
|
+
assert_equal(["topic", "models/reply.rb:-"], ary[29])
|
72
|
+
end
|
73
|
+
|
74
|
+
def test_untranslate
|
75
|
+
GetText::ActiveRecordParser.target?("models/book.rb")
|
76
|
+
ary = GetText::ActiveRecordParser.parse("models/book.rb")
|
77
|
+
ary.sort!{|a, b| a[0].downcase <=> b[0].downcase}
|
78
|
+
assert_equal(4, ary.size)
|
79
|
+
assert_equal(["book", "models/book.rb:-"], ary[0])
|
80
|
+
assert_equal(["Book|Created at", "models/book.rb:-"], ary[1])
|
81
|
+
assert_equal(["Book|Price", "models/book.rb:-"], ary[2])
|
82
|
+
assert_equal(["Book|Updated at", "models/book.rb:-"], ary[3])
|
83
|
+
end
|
84
|
+
|
85
|
+
def test_untranslate_all
|
86
|
+
GetText::ActiveRecordParser.target?("models/user.rb")
|
87
|
+
ary = GetText::ActiveRecordParser.parse("models/user.rb")
|
88
|
+
assert_equal(0, ary.size)
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_abstract_class
|
92
|
+
ary = GetText::ActiveRecordParser.parse("models/wizard.rb")
|
93
|
+
assert_equal(0, ary.size)
|
94
|
+
end
|
95
|
+
end
|