gettext 3.4.0 → 3.4.3
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.
- checksums.yaml +4 -4
- data/doc/text/news.md +39 -0
- data/gettext.gemspec +3 -1
- data/lib/gettext/mo.rb +5 -14
- data/lib/gettext/text_domain_manager.rb +6 -5
- data/lib/gettext/tools/parser/erubi.rb +88 -0
- data/lib/gettext/tools/xgettext.rb +6 -0
- data/lib/gettext/version.rb +2 -2
- data/locale/ja/LC_MESSAGES/gettext.mo +0 -0
- data/po/bg/gettext.edit.po +13 -9
- data/po/bg/gettext.po +3 -0
- data/po/bs/gettext.edit.po +13 -9
- data/po/bs/gettext.po +3 -0
- data/po/ca/gettext.edit.po +13 -9
- data/po/ca/gettext.po +3 -0
- data/po/cs/gettext.edit.po +13 -9
- data/po/cs/gettext.po +3 -0
- data/po/de/gettext.edit.po +13 -9
- data/po/de/gettext.po +3 -0
- data/po/el/gettext.edit.po +13 -9
- data/po/el/gettext.po +3 -0
- data/po/eo/gettext.edit.po +13 -9
- data/po/eo/gettext.po +3 -0
- data/po/es/gettext.edit.po +13 -9
- data/po/es/gettext.po +3 -0
- data/po/et/gettext.edit.po +13 -9
- data/po/et/gettext.po +3 -0
- data/po/fr/gettext.edit.po +13 -9
- data/po/fr/gettext.po +3 -0
- data/po/gettext.pot +16 -12
- data/po/hr/gettext.edit.po +13 -9
- data/po/hr/gettext.po +3 -0
- data/po/hu/gettext.edit.po +13 -9
- data/po/hu/gettext.po +3 -0
- data/po/it/gettext.edit.po +13 -9
- data/po/it/gettext.po +3 -0
- data/po/ja/gettext.edit.po +14 -10
- data/po/ja/gettext.po +4 -1
- data/po/ko/gettext.edit.po +13 -9
- data/po/ko/gettext.po +3 -0
- data/po/lv/gettext.edit.po +13 -9
- data/po/lv/gettext.po +3 -0
- data/po/nb/gettext.edit.po +13 -9
- data/po/nb/gettext.po +3 -0
- data/po/nl/gettext.edit.po +13 -9
- data/po/nl/gettext.po +3 -0
- data/po/pt_BR/gettext.edit.po +13 -9
- data/po/pt_BR/gettext.po +3 -0
- data/po/ru/gettext.edit.po +13 -9
- data/po/ru/gettext.po +3 -0
- data/po/sr/gettext.edit.po +13 -9
- data/po/sr/gettext.po +3 -0
- data/po/sv/gettext.edit.po +13 -9
- data/po/sv/gettext.po +3 -0
- data/po/uk/gettext.edit.po +13 -9
- data/po/uk/gettext.po +3 -0
- data/po/vi/gettext.edit.po +13 -9
- data/po/vi/gettext.po +3 -0
- data/po/zh/gettext.edit.po +13 -9
- data/po/zh/gettext.po +3 -0
- data/po/zh_TW/gettext.edit.po +13 -9
- data/po/zh_TW/gettext.po +3 -0
- data/test/fixtures/erb/case.rhtml +16 -0
- data/test/fixtures/simple.rb +4 -0
- data/test/locale/fr/LC_MESSAGES/test1.mo +0 -0
- data/test/locale/fr_BE/LC_MESSAGES/test1.mo +0 -0
- data/test/locale/fr_BE_Foo/LC_MESSAGES/test1.mo +0 -0
- data/test/po/fr/test1.po +7 -0
- data/test/po/fr_BE/test1.po +24 -0
- data/test/po/fr_BE_Foo/test1.po +20 -0
- data/test/po/ja/_.po +15 -0
- data/test/test_gettext.rb +23 -0
- data/test/test_locale_path.rb +12 -4
- data/test/test_parser.rb +62 -0
- data/test/tools/test_xgettext.rb +85 -0
- metadata +39 -4
data/po/sr/gettext.edit.po
CHANGED
|
@@ -21,12 +21,12 @@ msgstr ""
|
|
|
21
21
|
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4"
|
|
22
22
|
" && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
|
23
23
|
|
|
24
|
-
#: ../lib/gettext/text_domain_manager.rb:
|
|
24
|
+
#: ../lib/gettext/text_domain_manager.rb:149
|
|
25
25
|
#, fuzzy
|
|
26
26
|
msgid "ngettext: 3rd parmeter is wrong: value = %{number}"
|
|
27
27
|
msgstr "3. параметар је погрешан: вредност = %{number}"
|
|
28
28
|
|
|
29
|
-
#: ../lib/gettext/text_domain_manager.rb:
|
|
29
|
+
#: ../lib/gettext/text_domain_manager.rb:155
|
|
30
30
|
msgid "ngettext: 3rd parameter should be a number, not nil."
|
|
31
31
|
msgstr ""
|
|
32
32
|
|
|
@@ -144,7 +144,7 @@ msgstr "Формирање бинарног каталога порука из
|
|
|
144
144
|
msgid "write output to specified file"
|
|
145
145
|
msgstr "писање излаза у задат фајл"
|
|
146
146
|
|
|
147
|
-
#: ../lib/gettext/tools/msgfmt.rb:93 ../lib/gettext/tools/xgettext.rb:
|
|
147
|
+
#: ../lib/gettext/tools/msgfmt.rb:93 ../lib/gettext/tools/xgettext.rb:355
|
|
148
148
|
msgid "display version information and exit"
|
|
149
149
|
msgstr "приказ информација о верзији и излаз"
|
|
150
150
|
|
|
@@ -303,31 +303,35 @@ msgid "require the library before executing xgettext"
|
|
|
303
303
|
msgstr "захтевај библиотеку пре извршења rgettext-а"
|
|
304
304
|
|
|
305
305
|
#: ../lib/gettext/tools/xgettext.rb:334
|
|
306
|
+
msgid "Add PARSER to parser list for xgettext"
|
|
307
|
+
msgstr ""
|
|
308
|
+
|
|
309
|
+
#: ../lib/gettext/tools/xgettext.rb:340
|
|
306
310
|
msgid "If TAG is specified, place comment blocks starting with TAG and precedding keyword lines in output file"
|
|
307
311
|
msgstr ""
|
|
308
312
|
|
|
309
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
313
|
+
#: ../lib/gettext/tools/xgettext.rb:341
|
|
310
314
|
msgid "If TAG is not specified, place all comment blocks preceing keyword lines in output file"
|
|
311
315
|
msgstr ""
|
|
312
316
|
|
|
313
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
317
|
+
#: ../lib/gettext/tools/xgettext.rb:342
|
|
314
318
|
msgid "(default: %s)"
|
|
315
319
|
msgstr ""
|
|
316
320
|
|
|
317
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
321
|
+
#: ../lib/gettext/tools/xgettext.rb:342
|
|
318
322
|
msgid "no TAG"
|
|
319
323
|
msgstr ""
|
|
320
324
|
|
|
321
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
325
|
+
#: ../lib/gettext/tools/xgettext.rb:346
|
|
322
326
|
msgid "run in debugging mode"
|
|
323
327
|
msgstr "ради у дибагинг моду"
|
|
324
328
|
|
|
325
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
329
|
+
#: ../lib/gettext/tools/xgettext.rb:350
|
|
326
330
|
#, fuzzy
|
|
327
331
|
msgid "display this help and exit"
|
|
328
332
|
msgstr "приказ информација о верзији и излаз"
|
|
329
333
|
|
|
330
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
334
|
+
#: ../lib/gettext/tools/xgettext.rb:381
|
|
331
335
|
msgid "Warning: The empty \"\" msgid is reserved by gettext. So gettext(\"\") doesn't returns empty string but the header entry in po file."
|
|
332
336
|
msgstr ""
|
|
333
337
|
|
data/po/sr/gettext.po
CHANGED
|
@@ -251,6 +251,9 @@ msgstr ""
|
|
|
251
251
|
msgid "require the library before executing xgettext"
|
|
252
252
|
msgstr "захтевај библиотеку пре извршења rgettext-а"
|
|
253
253
|
|
|
254
|
+
msgid "Add PARSER to parser list for xgettext"
|
|
255
|
+
msgstr ""
|
|
256
|
+
|
|
254
257
|
msgid ""
|
|
255
258
|
"If TAG is specified, place comment blocks starting with TAG and precedding key"
|
|
256
259
|
"word lines in output file"
|
data/po/sv/gettext.edit.po
CHANGED
|
@@ -19,11 +19,11 @@ msgstr ""
|
|
|
19
19
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
20
20
|
"Content-Transfer-Encoding: 8bit\n"
|
|
21
21
|
|
|
22
|
-
#: ../lib/gettext/text_domain_manager.rb:
|
|
22
|
+
#: ../lib/gettext/text_domain_manager.rb:149
|
|
23
23
|
msgid "ngettext: 3rd parmeter is wrong: value = %{number}"
|
|
24
24
|
msgstr ""
|
|
25
25
|
|
|
26
|
-
#: ../lib/gettext/text_domain_manager.rb:
|
|
26
|
+
#: ../lib/gettext/text_domain_manager.rb:155
|
|
27
27
|
msgid "ngettext: 3rd parameter should be a number, not nil."
|
|
28
28
|
msgstr ""
|
|
29
29
|
|
|
@@ -139,7 +139,7 @@ msgstr "Generera binära meddelandekataloger från textuell översättningsdata.
|
|
|
139
139
|
msgid "write output to specified file"
|
|
140
140
|
msgstr ""
|
|
141
141
|
|
|
142
|
-
#: ../lib/gettext/tools/msgfmt.rb:93 ../lib/gettext/tools/xgettext.rb:
|
|
142
|
+
#: ../lib/gettext/tools/msgfmt.rb:93 ../lib/gettext/tools/xgettext.rb:355
|
|
143
143
|
msgid "display version information and exit"
|
|
144
144
|
msgstr ""
|
|
145
145
|
|
|
@@ -292,29 +292,33 @@ msgid "require the library before executing xgettext"
|
|
|
292
292
|
msgstr ""
|
|
293
293
|
|
|
294
294
|
#: ../lib/gettext/tools/xgettext.rb:334
|
|
295
|
+
msgid "Add PARSER to parser list for xgettext"
|
|
296
|
+
msgstr ""
|
|
297
|
+
|
|
298
|
+
#: ../lib/gettext/tools/xgettext.rb:340
|
|
295
299
|
msgid "If TAG is specified, place comment blocks starting with TAG and precedding keyword lines in output file"
|
|
296
300
|
msgstr ""
|
|
297
301
|
|
|
298
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
302
|
+
#: ../lib/gettext/tools/xgettext.rb:341
|
|
299
303
|
msgid "If TAG is not specified, place all comment blocks preceing keyword lines in output file"
|
|
300
304
|
msgstr ""
|
|
301
305
|
|
|
302
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
306
|
+
#: ../lib/gettext/tools/xgettext.rb:342
|
|
303
307
|
msgid "(default: %s)"
|
|
304
308
|
msgstr ""
|
|
305
309
|
|
|
306
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
310
|
+
#: ../lib/gettext/tools/xgettext.rb:342
|
|
307
311
|
msgid "no TAG"
|
|
308
312
|
msgstr ""
|
|
309
313
|
|
|
310
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
314
|
+
#: ../lib/gettext/tools/xgettext.rb:346
|
|
311
315
|
msgid "run in debugging mode"
|
|
312
316
|
msgstr ""
|
|
313
317
|
|
|
314
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
318
|
+
#: ../lib/gettext/tools/xgettext.rb:350
|
|
315
319
|
msgid "display this help and exit"
|
|
316
320
|
msgstr ""
|
|
317
321
|
|
|
318
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
322
|
+
#: ../lib/gettext/tools/xgettext.rb:381
|
|
319
323
|
msgid "Warning: The empty \"\" msgid is reserved by gettext. So gettext(\"\") doesn't returns empty string but the header entry in po file."
|
|
320
324
|
msgstr ""
|
data/po/sv/gettext.po
CHANGED
|
@@ -237,6 +237,9 @@ msgstr ""
|
|
|
237
237
|
msgid "require the library before executing xgettext"
|
|
238
238
|
msgstr ""
|
|
239
239
|
|
|
240
|
+
msgid "Add PARSER to parser list for xgettext"
|
|
241
|
+
msgstr ""
|
|
242
|
+
|
|
240
243
|
msgid ""
|
|
241
244
|
"If TAG is specified, place comment blocks starting with TAG and precedding key"
|
|
242
245
|
"word lines in output file"
|
data/po/uk/gettext.edit.po
CHANGED
|
@@ -24,12 +24,12 @@ msgstr ""
|
|
|
24
24
|
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
|
25
25
|
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
|
26
26
|
|
|
27
|
-
#: ../lib/gettext/text_domain_manager.rb:
|
|
27
|
+
#: ../lib/gettext/text_domain_manager.rb:149
|
|
28
28
|
#, fuzzy
|
|
29
29
|
msgid "ngettext: 3rd parmeter is wrong: value = %{number}"
|
|
30
30
|
msgstr "Третій параметр неправильний: value = %{number}"
|
|
31
31
|
|
|
32
|
-
#: ../lib/gettext/text_domain_manager.rb:
|
|
32
|
+
#: ../lib/gettext/text_domain_manager.rb:155
|
|
33
33
|
msgid "ngettext: 3rd parameter should be a number, not nil."
|
|
34
34
|
msgstr ""
|
|
35
35
|
|
|
@@ -147,7 +147,7 @@ msgstr "Генерує бінарний каталог повідомлень і
|
|
|
147
147
|
msgid "write output to specified file"
|
|
148
148
|
msgstr "записати результат у вказаний файл"
|
|
149
149
|
|
|
150
|
-
#: ../lib/gettext/tools/msgfmt.rb:93 ../lib/gettext/tools/xgettext.rb:
|
|
150
|
+
#: ../lib/gettext/tools/msgfmt.rb:93 ../lib/gettext/tools/xgettext.rb:355
|
|
151
151
|
msgid "display version information and exit"
|
|
152
152
|
msgstr "показати інформацію про версію і завершити роботу"
|
|
153
153
|
|
|
@@ -306,31 +306,35 @@ msgid "require the library before executing xgettext"
|
|
|
306
306
|
msgstr "для виконання rgettext необхідна бібліотека"
|
|
307
307
|
|
|
308
308
|
#: ../lib/gettext/tools/xgettext.rb:334
|
|
309
|
+
msgid "Add PARSER to parser list for xgettext"
|
|
310
|
+
msgstr ""
|
|
311
|
+
|
|
312
|
+
#: ../lib/gettext/tools/xgettext.rb:340
|
|
309
313
|
msgid "If TAG is specified, place comment blocks starting with TAG and precedding keyword lines in output file"
|
|
310
314
|
msgstr ""
|
|
311
315
|
|
|
312
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
316
|
+
#: ../lib/gettext/tools/xgettext.rb:341
|
|
313
317
|
msgid "If TAG is not specified, place all comment blocks preceing keyword lines in output file"
|
|
314
318
|
msgstr ""
|
|
315
319
|
|
|
316
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
320
|
+
#: ../lib/gettext/tools/xgettext.rb:342
|
|
317
321
|
msgid "(default: %s)"
|
|
318
322
|
msgstr ""
|
|
319
323
|
|
|
320
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
324
|
+
#: ../lib/gettext/tools/xgettext.rb:342
|
|
321
325
|
msgid "no TAG"
|
|
322
326
|
msgstr ""
|
|
323
327
|
|
|
324
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
328
|
+
#: ../lib/gettext/tools/xgettext.rb:346
|
|
325
329
|
msgid "run in debugging mode"
|
|
326
330
|
msgstr "запуск в режимі відлагодження"
|
|
327
331
|
|
|
328
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
332
|
+
#: ../lib/gettext/tools/xgettext.rb:350
|
|
329
333
|
#, fuzzy
|
|
330
334
|
msgid "display this help and exit"
|
|
331
335
|
msgstr "показати інформацію про версію і завершити роботу"
|
|
332
336
|
|
|
333
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
337
|
+
#: ../lib/gettext/tools/xgettext.rb:381
|
|
334
338
|
msgid "Warning: The empty \"\" msgid is reserved by gettext. So gettext(\"\") doesn't returns empty string but the header entry in po file."
|
|
335
339
|
msgstr ""
|
|
336
340
|
|
data/po/uk/gettext.po
CHANGED
|
@@ -255,6 +255,9 @@ msgstr ""
|
|
|
255
255
|
msgid "require the library before executing xgettext"
|
|
256
256
|
msgstr "для виконання rgettext необхідна бібліотека"
|
|
257
257
|
|
|
258
|
+
msgid "Add PARSER to parser list for xgettext"
|
|
259
|
+
msgstr ""
|
|
260
|
+
|
|
258
261
|
msgid ""
|
|
259
262
|
"If TAG is specified, place comment blocks starting with TAG and precedding key"
|
|
260
263
|
"word lines in output file"
|
data/po/vi/gettext.edit.po
CHANGED
|
@@ -20,12 +20,12 @@ msgstr ""
|
|
|
20
20
|
"Content-Transfer-Encoding: 8bit\n"
|
|
21
21
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
22
22
|
|
|
23
|
-
#: ../lib/gettext/text_domain_manager.rb:
|
|
23
|
+
#: ../lib/gettext/text_domain_manager.rb:149
|
|
24
24
|
#, fuzzy
|
|
25
25
|
msgid "ngettext: 3rd parmeter is wrong: value = %{number}"
|
|
26
26
|
msgstr "Tham số thứ 3 sai: giá trị = %{number}"
|
|
27
27
|
|
|
28
|
-
#: ../lib/gettext/text_domain_manager.rb:
|
|
28
|
+
#: ../lib/gettext/text_domain_manager.rb:155
|
|
29
29
|
msgid "ngettext: 3rd parameter should be a number, not nil."
|
|
30
30
|
msgstr ""
|
|
31
31
|
|
|
@@ -143,7 +143,7 @@ msgstr "Sinh message catalog nhị phân từ chuỗi văn bản."
|
|
|
143
143
|
msgid "write output to specified file"
|
|
144
144
|
msgstr "ghi ra tập tin được chỉ định"
|
|
145
145
|
|
|
146
|
-
#: ../lib/gettext/tools/msgfmt.rb:93 ../lib/gettext/tools/xgettext.rb:
|
|
146
|
+
#: ../lib/gettext/tools/msgfmt.rb:93 ../lib/gettext/tools/xgettext.rb:355
|
|
147
147
|
msgid "display version information and exit"
|
|
148
148
|
msgstr "hiện thông tin về phiên bản rồi thoát"
|
|
149
149
|
|
|
@@ -302,31 +302,35 @@ msgid "require the library before executing xgettext"
|
|
|
302
302
|
msgstr "require thư viện trước khi chạy rgettext"
|
|
303
303
|
|
|
304
304
|
#: ../lib/gettext/tools/xgettext.rb:334
|
|
305
|
+
msgid "Add PARSER to parser list for xgettext"
|
|
306
|
+
msgstr ""
|
|
307
|
+
|
|
308
|
+
#: ../lib/gettext/tools/xgettext.rb:340
|
|
305
309
|
msgid "If TAG is specified, place comment blocks starting with TAG and precedding keyword lines in output file"
|
|
306
310
|
msgstr ""
|
|
307
311
|
|
|
308
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
312
|
+
#: ../lib/gettext/tools/xgettext.rb:341
|
|
309
313
|
msgid "If TAG is not specified, place all comment blocks preceing keyword lines in output file"
|
|
310
314
|
msgstr ""
|
|
311
315
|
|
|
312
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
316
|
+
#: ../lib/gettext/tools/xgettext.rb:342
|
|
313
317
|
msgid "(default: %s)"
|
|
314
318
|
msgstr ""
|
|
315
319
|
|
|
316
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
320
|
+
#: ../lib/gettext/tools/xgettext.rb:342
|
|
317
321
|
msgid "no TAG"
|
|
318
322
|
msgstr ""
|
|
319
323
|
|
|
320
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
324
|
+
#: ../lib/gettext/tools/xgettext.rb:346
|
|
321
325
|
msgid "run in debugging mode"
|
|
322
326
|
msgstr "chạy trong chế độ debug"
|
|
323
327
|
|
|
324
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
328
|
+
#: ../lib/gettext/tools/xgettext.rb:350
|
|
325
329
|
#, fuzzy
|
|
326
330
|
msgid "display this help and exit"
|
|
327
331
|
msgstr "hiện thông tin về phiên bản rồi thoát"
|
|
328
332
|
|
|
329
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
333
|
+
#: ../lib/gettext/tools/xgettext.rb:381
|
|
330
334
|
msgid "Warning: The empty \"\" msgid is reserved by gettext. So gettext(\"\") doesn't returns empty string but the header entry in po file."
|
|
331
335
|
msgstr ""
|
|
332
336
|
|
data/po/vi/gettext.po
CHANGED
|
@@ -250,6 +250,9 @@ msgstr ""
|
|
|
250
250
|
msgid "require the library before executing xgettext"
|
|
251
251
|
msgstr "require thư viện trước khi chạy rgettext"
|
|
252
252
|
|
|
253
|
+
msgid "Add PARSER to parser list for xgettext"
|
|
254
|
+
msgstr ""
|
|
255
|
+
|
|
253
256
|
msgid ""
|
|
254
257
|
"If TAG is specified, place comment blocks starting with TAG and precedding key"
|
|
255
258
|
"word lines in output file"
|
data/po/zh/gettext.edit.po
CHANGED
|
@@ -23,12 +23,12 @@ msgstr ""
|
|
|
23
23
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
24
24
|
"X-Generator: KBabel 1.9.1\n"
|
|
25
25
|
|
|
26
|
-
#: ../lib/gettext/text_domain_manager.rb:
|
|
26
|
+
#: ../lib/gettext/text_domain_manager.rb:149
|
|
27
27
|
#, fuzzy
|
|
28
28
|
msgid "ngettext: 3rd parmeter is wrong: value = %{number}"
|
|
29
29
|
msgstr "第三个参数错误:value = %{number}"
|
|
30
30
|
|
|
31
|
-
#: ../lib/gettext/text_domain_manager.rb:
|
|
31
|
+
#: ../lib/gettext/text_domain_manager.rb:155
|
|
32
32
|
msgid "ngettext: 3rd parameter should be a number, not nil."
|
|
33
33
|
msgstr ""
|
|
34
34
|
|
|
@@ -146,7 +146,7 @@ msgstr "从文本叙述翻译生成二进制信息目录。"
|
|
|
146
146
|
msgid "write output to specified file"
|
|
147
147
|
msgstr "输出到指定文件"
|
|
148
148
|
|
|
149
|
-
#: ../lib/gettext/tools/msgfmt.rb:93 ../lib/gettext/tools/xgettext.rb:
|
|
149
|
+
#: ../lib/gettext/tools/msgfmt.rb:93 ../lib/gettext/tools/xgettext.rb:355
|
|
150
150
|
msgid "display version information and exit"
|
|
151
151
|
msgstr "显示版本信息并退出"
|
|
152
152
|
|
|
@@ -305,31 +305,35 @@ msgid "require the library before executing xgettext"
|
|
|
305
305
|
msgstr "在执行 rgettext 之前需要一个库"
|
|
306
306
|
|
|
307
307
|
#: ../lib/gettext/tools/xgettext.rb:334
|
|
308
|
+
msgid "Add PARSER to parser list for xgettext"
|
|
309
|
+
msgstr ""
|
|
310
|
+
|
|
311
|
+
#: ../lib/gettext/tools/xgettext.rb:340
|
|
308
312
|
msgid "If TAG is specified, place comment blocks starting with TAG and precedding keyword lines in output file"
|
|
309
313
|
msgstr ""
|
|
310
314
|
|
|
311
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
315
|
+
#: ../lib/gettext/tools/xgettext.rb:341
|
|
312
316
|
msgid "If TAG is not specified, place all comment blocks preceing keyword lines in output file"
|
|
313
317
|
msgstr ""
|
|
314
318
|
|
|
315
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
319
|
+
#: ../lib/gettext/tools/xgettext.rb:342
|
|
316
320
|
msgid "(default: %s)"
|
|
317
321
|
msgstr ""
|
|
318
322
|
|
|
319
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
323
|
+
#: ../lib/gettext/tools/xgettext.rb:342
|
|
320
324
|
msgid "no TAG"
|
|
321
325
|
msgstr ""
|
|
322
326
|
|
|
323
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
327
|
+
#: ../lib/gettext/tools/xgettext.rb:346
|
|
324
328
|
msgid "run in debugging mode"
|
|
325
329
|
msgstr "运行于调试模式"
|
|
326
330
|
|
|
327
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
331
|
+
#: ../lib/gettext/tools/xgettext.rb:350
|
|
328
332
|
#, fuzzy
|
|
329
333
|
msgid "display this help and exit"
|
|
330
334
|
msgstr "显示版本信息并退出"
|
|
331
335
|
|
|
332
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
336
|
+
#: ../lib/gettext/tools/xgettext.rb:381
|
|
333
337
|
msgid "Warning: The empty \"\" msgid is reserved by gettext. So gettext(\"\") doesn't returns empty string but the header entry in po file."
|
|
334
338
|
msgstr ""
|
|
335
339
|
|
data/po/zh/gettext.po
CHANGED
|
@@ -252,6 +252,9 @@ msgstr ""
|
|
|
252
252
|
msgid "require the library before executing xgettext"
|
|
253
253
|
msgstr "在执行 rgettext 之前需要一个库"
|
|
254
254
|
|
|
255
|
+
msgid "Add PARSER to parser list for xgettext"
|
|
256
|
+
msgstr ""
|
|
257
|
+
|
|
255
258
|
msgid ""
|
|
256
259
|
"If TAG is specified, place comment blocks starting with TAG and precedding key"
|
|
257
260
|
"word lines in output file"
|
data/po/zh_TW/gettext.edit.po
CHANGED
|
@@ -22,12 +22,12 @@ msgstr ""
|
|
|
22
22
|
"X-Poedit-Language: Chinese\n"
|
|
23
23
|
"X-Poedit-Country: TAIWAN\n"
|
|
24
24
|
|
|
25
|
-
#: ../lib/gettext/text_domain_manager.rb:
|
|
25
|
+
#: ../lib/gettext/text_domain_manager.rb:149
|
|
26
26
|
#, fuzzy
|
|
27
27
|
msgid "ngettext: 3rd parmeter is wrong: value = %{number}"
|
|
28
28
|
msgstr "第三个参数錯誤:value = %{number}"
|
|
29
29
|
|
|
30
|
-
#: ../lib/gettext/text_domain_manager.rb:
|
|
30
|
+
#: ../lib/gettext/text_domain_manager.rb:155
|
|
31
31
|
msgid "ngettext: 3rd parameter should be a number, not nil."
|
|
32
32
|
msgstr ""
|
|
33
33
|
|
|
@@ -145,7 +145,7 @@ msgstr "從textual translation description產生二進位訊息 catalog"
|
|
|
145
145
|
msgid "write output to specified file"
|
|
146
146
|
msgstr "輸出到指定檔案"
|
|
147
147
|
|
|
148
|
-
#: ../lib/gettext/tools/msgfmt.rb:93 ../lib/gettext/tools/xgettext.rb:
|
|
148
|
+
#: ../lib/gettext/tools/msgfmt.rb:93 ../lib/gettext/tools/xgettext.rb:355
|
|
149
149
|
msgid "display version information and exit"
|
|
150
150
|
msgstr "秀出版本資訊後退出"
|
|
151
151
|
|
|
@@ -304,31 +304,35 @@ msgid "require the library before executing xgettext"
|
|
|
304
304
|
msgstr "在執行 rgettext 之前需要一個庫"
|
|
305
305
|
|
|
306
306
|
#: ../lib/gettext/tools/xgettext.rb:334
|
|
307
|
+
msgid "Add PARSER to parser list for xgettext"
|
|
308
|
+
msgstr ""
|
|
309
|
+
|
|
310
|
+
#: ../lib/gettext/tools/xgettext.rb:340
|
|
307
311
|
msgid "If TAG is specified, place comment blocks starting with TAG and precedding keyword lines in output file"
|
|
308
312
|
msgstr ""
|
|
309
313
|
|
|
310
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
314
|
+
#: ../lib/gettext/tools/xgettext.rb:341
|
|
311
315
|
msgid "If TAG is not specified, place all comment blocks preceing keyword lines in output file"
|
|
312
316
|
msgstr ""
|
|
313
317
|
|
|
314
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
318
|
+
#: ../lib/gettext/tools/xgettext.rb:342
|
|
315
319
|
msgid "(default: %s)"
|
|
316
320
|
msgstr ""
|
|
317
321
|
|
|
318
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
322
|
+
#: ../lib/gettext/tools/xgettext.rb:342
|
|
319
323
|
msgid "no TAG"
|
|
320
324
|
msgstr ""
|
|
321
325
|
|
|
322
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
326
|
+
#: ../lib/gettext/tools/xgettext.rb:346
|
|
323
327
|
msgid "run in debugging mode"
|
|
324
328
|
msgstr "執行除錯模式"
|
|
325
329
|
|
|
326
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
330
|
+
#: ../lib/gettext/tools/xgettext.rb:350
|
|
327
331
|
#, fuzzy
|
|
328
332
|
msgid "display this help and exit"
|
|
329
333
|
msgstr "秀出版本資訊後退出"
|
|
330
334
|
|
|
331
|
-
#: ../lib/gettext/tools/xgettext.rb:
|
|
335
|
+
#: ../lib/gettext/tools/xgettext.rb:381
|
|
332
336
|
msgid "Warning: The empty \"\" msgid is reserved by gettext. So gettext(\"\") doesn't returns empty string but the header entry in po file."
|
|
333
337
|
msgstr ""
|
|
334
338
|
|
data/po/zh_TW/gettext.po
CHANGED
|
@@ -251,6 +251,9 @@ msgstr ""
|
|
|
251
251
|
msgid "require the library before executing xgettext"
|
|
252
252
|
msgstr "在執行 rgettext 之前需要一個庫"
|
|
253
253
|
|
|
254
|
+
msgid "Add PARSER to parser list for xgettext"
|
|
255
|
+
msgstr ""
|
|
256
|
+
|
|
254
257
|
msgid ""
|
|
255
258
|
"If TAG is specified, place comment blocks starting with TAG and precedding key"
|
|
256
259
|
"word lines in output file"
|
data/test/fixtures/simple.rb
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/test/po/fr/test1.po
CHANGED
|
@@ -13,6 +13,7 @@ msgstr ""
|
|
|
13
13
|
"MIME-Version: 1.0\n"
|
|
14
14
|
"Content-Type: text/plain; charset=utf-8\n"
|
|
15
15
|
"Content-Transfer-Encoding: ENCODING\n"
|
|
16
|
+
"Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
|
|
16
17
|
|
|
17
18
|
#: simple.rb:10
|
|
18
19
|
msgid "language"
|
|
@@ -21,3 +22,9 @@ msgstr "french"
|
|
|
21
22
|
#: simple.rb:14
|
|
22
23
|
msgid "one is %d."
|
|
23
24
|
msgstr "FRENCH:ONE IS %d."
|
|
25
|
+
|
|
26
|
+
#: simple.rb:18
|
|
27
|
+
msgid "There is an apple."
|
|
28
|
+
msgid_plural "There are %{num} apples."
|
|
29
|
+
msgstr[0] "FRENCH:Il y a une pomme."
|
|
30
|
+
msgstr[1] "FRENCH:Il y a %{num} pommes."
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# SOME DESCRIPTIVE TITLE.
|
|
2
|
+
# Copyright (C) YEAR ORGANIZATION
|
|
3
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
4
|
+
#
|
|
5
|
+
#, fuzzy
|
|
6
|
+
msgid ""
|
|
7
|
+
msgstr ""
|
|
8
|
+
"Project-Id-Version: PACKAGE VERSION\n"
|
|
9
|
+
"POT-Creation-Date: 2002-01-01 02:24:56+0900\n"
|
|
10
|
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
11
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
12
|
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
13
|
+
"MIME-Version: 1.0\n"
|
|
14
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
|
15
|
+
"Content-Transfer-Encoding: ENCODING\n"
|
|
16
|
+
"Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
|
|
17
|
+
|
|
18
|
+
#: simple.rb:10
|
|
19
|
+
msgid "language"
|
|
20
|
+
msgstr "french-Belgium"
|
|
21
|
+
|
|
22
|
+
#: simple.rb:14
|
|
23
|
+
msgid "one is %d."
|
|
24
|
+
msgstr "FRENCH-BELGIUM:ONE IS %d."
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# SOME DESCRIPTIVE TITLE.
|
|
2
|
+
# Copyright (C) YEAR ORGANIZATION
|
|
3
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
4
|
+
#
|
|
5
|
+
#, fuzzy
|
|
6
|
+
msgid ""
|
|
7
|
+
msgstr ""
|
|
8
|
+
"Project-Id-Version: PACKAGE VERSION\n"
|
|
9
|
+
"POT-Creation-Date: 2002-01-01 02:24:56+0900\n"
|
|
10
|
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
11
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
12
|
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
13
|
+
"MIME-Version: 1.0\n"
|
|
14
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
|
15
|
+
"Content-Transfer-Encoding: ENCODING\n"
|
|
16
|
+
"Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
|
|
17
|
+
|
|
18
|
+
#: simple.rb:10
|
|
19
|
+
msgid "language"
|
|
20
|
+
msgstr "french-Belgium-Foo"
|
data/test/po/ja/_.po
CHANGED
|
@@ -133,3 +133,18 @@ msgstr "ONE LINE"
|
|
|
133
133
|
msgid ""
|
|
134
134
|
"one new line\n"
|
|
135
135
|
msgstr ""
|
|
136
|
+
|
|
137
|
+
msgid "in_symbol_array"
|
|
138
|
+
msgstr ""
|
|
139
|
+
|
|
140
|
+
msgid "hello world"
|
|
141
|
+
msgstr ""
|
|
142
|
+
|
|
143
|
+
msgid "in_string_array"
|
|
144
|
+
msgstr ""
|
|
145
|
+
|
|
146
|
+
msgid "Hello"
|
|
147
|
+
msgstr ""
|
|
148
|
+
|
|
149
|
+
msgid "World"
|
|
150
|
+
msgstr ""
|
data/test/test_gettext.rb
CHANGED
|
@@ -59,6 +59,29 @@ class TestGetText < Test::Unit::TestCase
|
|
|
59
59
|
assert_equal("nomsgstr", _("nomsgstr"))
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
+
def test_fallbacks
|
|
63
|
+
bindtextdomain("test1", "locale")
|
|
64
|
+
test = Simple.new
|
|
65
|
+
|
|
66
|
+
# Translation present in all candidates
|
|
67
|
+
GetText.set_current_locale("fr_BE_Foo")
|
|
68
|
+
assert_equal("french-Belgium-Foo", test.test)
|
|
69
|
+
GetText.set_current_locale("fr_BE")
|
|
70
|
+
assert_equal("french-Belgium", test.test)
|
|
71
|
+
GetText.set_current_locale("fr")
|
|
72
|
+
assert_equal("french", test.test)
|
|
73
|
+
|
|
74
|
+
# Translation Missing in fr_BE_Foo (fallback to fr_BE)
|
|
75
|
+
GetText.set_current_locale("fr_BE_Foo")
|
|
76
|
+
assert_equal("FRENCH-BELGIUM:ONE IS 1.", test.test_formatted_string)
|
|
77
|
+
|
|
78
|
+
# Translation Missing in fr_BE_Foo *and* fr_BE (both languages fallback to fr)
|
|
79
|
+
GetText.set_current_locale("fr_BE_Foo")
|
|
80
|
+
assert_equal("FRENCH:Il y a 5 pommes.", test.test_plural)
|
|
81
|
+
GetText.set_current_locale("fr_BE")
|
|
82
|
+
assert_equal("FRENCH:Il y a 5 pommes.", test.test_plural)
|
|
83
|
+
end
|
|
84
|
+
|
|
62
85
|
def test_empty
|
|
63
86
|
bindtextdomain("test1", "locale")
|
|
64
87
|
assert_equal("japanese", gettext("language"))
|
data/test/test_locale_path.rb
CHANGED
|
@@ -53,9 +53,11 @@ class TestLocalePath < Test::Unit::TestCase
|
|
|
53
53
|
testdir = File.dirname(File.expand_path(__FILE__))
|
|
54
54
|
path = GetText::LocalePath.new("test1", "#{testdir}/locale")
|
|
55
55
|
assert_equal({
|
|
56
|
-
"ja"
|
|
57
|
-
"fr"
|
|
58
|
-
"
|
|
56
|
+
"ja" => "#{testdir}/locale/ja/LC_MESSAGES/test1.mo",
|
|
57
|
+
"fr" => "#{testdir}/locale/fr/LC_MESSAGES/test1.mo",
|
|
58
|
+
"fr_BE" => "#{testdir}/locale/fr_BE/LC_MESSAGES/test1.mo",
|
|
59
|
+
"fr_BE_Foo" => "#{testdir}/locale/fr_BE_Foo/LC_MESSAGES/test1.mo",
|
|
60
|
+
"zh_Hant" => "#{testdir}/locale/zh_Hant/LC_MESSAGES/test1.mo"
|
|
59
61
|
},
|
|
60
62
|
path.locale_paths)
|
|
61
63
|
assert_equal("#{testdir}/locale/ja/LC_MESSAGES/test1.mo",
|
|
@@ -66,6 +68,12 @@ class TestLocalePath < Test::Unit::TestCase
|
|
|
66
68
|
path.current_path(Locale::Tag.parse("ja_JP.UTF-8")))
|
|
67
69
|
assert_equal(nil,
|
|
68
70
|
path.current_path(Locale::Tag.parse("en")))
|
|
71
|
+
assert_equal("#{testdir}/locale/fr/LC_MESSAGES/test1.mo",
|
|
72
|
+
path.current_path(Locale::Tag.parse("fr")))
|
|
73
|
+
assert_equal("#{testdir}/locale/fr_BE/LC_MESSAGES/test1.mo",
|
|
74
|
+
path.current_path(Locale::Tag.parse("fr-BE")))
|
|
75
|
+
assert_equal("#{testdir}/locale/fr_BE_Foo/LC_MESSAGES/test1.mo",
|
|
76
|
+
path.current_path(Locale::Tag.parse("fr-BE-Foo")))
|
|
69
77
|
assert_equal("#{testdir}/locale/zh_Hant/LC_MESSAGES/test1.mo",
|
|
70
78
|
path.current_path(Locale::Tag.parse("zh-Hant")))
|
|
71
79
|
end
|
|
@@ -73,7 +81,7 @@ class TestLocalePath < Test::Unit::TestCase
|
|
|
73
81
|
def test_supported_locales
|
|
74
82
|
testdir = File.dirname(File.expand_path(__FILE__))
|
|
75
83
|
path = GetText::LocalePath.new("test1", "#{testdir}/locale")
|
|
76
|
-
assert_equal ["fr", "ja", "zh_Hant"], path.supported_locales
|
|
84
|
+
assert_equal ["fr", "fr_BE", "fr_BE_Foo", "ja", "zh_Hant"], path.supported_locales
|
|
77
85
|
|
|
78
86
|
path = GetText::LocalePath.new("plural", "#{testdir}/locale")
|
|
79
87
|
assert_equal ["cr", "da", "fr", "ir", "ja", "la", "li", "po", "sl"], path.supported_locales
|