gettext 3.3.5 → 3.3.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +4 -0
  3. data/doc/text/news.md +220 -0
  4. data/gettext.gemspec +4 -4
  5. data/lib/gettext/locale_path.rb +12 -8
  6. data/lib/gettext/mo.rb +7 -5
  7. data/lib/gettext/tools/msginit.rb +221 -50
  8. data/lib/gettext/tools/msgmerge.rb +13 -0
  9. data/lib/gettext/tools/parser/erb.rb +9 -1
  10. data/lib/gettext/tools/parser/glade.rb +38 -40
  11. data/lib/gettext/tools/parser/gtk_builder_ui_definitions.rb +6 -6
  12. data/lib/gettext/tools/parser/ruby.rb +2 -2
  13. data/lib/gettext/version.rb +2 -2
  14. data/locale/bg/LC_MESSAGES/gettext.mo +0 -0
  15. data/locale/bs/LC_MESSAGES/gettext.mo +0 -0
  16. data/locale/ca/LC_MESSAGES/gettext.mo +0 -0
  17. data/locale/cs/LC_MESSAGES/gettext.mo +0 -0
  18. data/locale/de/LC_MESSAGES/gettext.mo +0 -0
  19. data/locale/el/LC_MESSAGES/gettext.mo +0 -0
  20. data/locale/eo/LC_MESSAGES/gettext.mo +0 -0
  21. data/locale/es/LC_MESSAGES/gettext.mo +0 -0
  22. data/locale/et/LC_MESSAGES/gettext.mo +0 -0
  23. data/locale/fr/LC_MESSAGES/gettext.mo +0 -0
  24. data/locale/hr/LC_MESSAGES/gettext.mo +0 -0
  25. data/locale/hu/LC_MESSAGES/gettext.mo +0 -0
  26. data/locale/it/LC_MESSAGES/gettext.mo +0 -0
  27. data/locale/ja/LC_MESSAGES/gettext.mo +0 -0
  28. data/locale/ko/LC_MESSAGES/gettext.mo +0 -0
  29. data/locale/lv/LC_MESSAGES/gettext.mo +0 -0
  30. data/locale/nb/LC_MESSAGES/gettext.mo +0 -0
  31. data/locale/nl/LC_MESSAGES/gettext.mo +0 -0
  32. data/locale/pt_BR/LC_MESSAGES/gettext.mo +0 -0
  33. data/locale/ru/LC_MESSAGES/gettext.mo +0 -0
  34. data/locale/sr/LC_MESSAGES/gettext.mo +0 -0
  35. data/locale/uk/LC_MESSAGES/gettext.mo +0 -0
  36. data/locale/vi/LC_MESSAGES/gettext.mo +0 -0
  37. data/locale/zh/LC_MESSAGES/gettext.mo +0 -0
  38. data/locale/zh_TW/LC_MESSAGES/gettext.mo +0 -0
  39. data/po/bg/gettext.edit.po +36 -554
  40. data/po/bg/gettext.po +0 -423
  41. data/po/bs/gettext.edit.po +36 -554
  42. data/po/bs/gettext.po +0 -423
  43. data/po/ca/gettext.edit.po +36 -554
  44. data/po/ca/gettext.po +0 -423
  45. data/po/cs/gettext.edit.po +36 -554
  46. data/po/cs/gettext.po +0 -423
  47. data/po/de/gettext.edit.po +36 -554
  48. data/po/de/gettext.po +0 -423
  49. data/po/el/gettext.edit.po +36 -554
  50. data/po/el/gettext.po +0 -423
  51. data/po/eo/gettext.edit.po +36 -554
  52. data/po/eo/gettext.po +0 -423
  53. data/po/es/gettext.edit.po +36 -554
  54. data/po/es/gettext.po +0 -423
  55. data/po/et/gettext.edit.po +36 -554
  56. data/po/et/gettext.po +0 -423
  57. data/po/fr/gettext.edit.po +36 -554
  58. data/po/fr/gettext.po +0 -423
  59. data/po/gettext.pot +37 -619
  60. data/po/hr/gettext.edit.po +36 -554
  61. data/po/hr/gettext.po +0 -423
  62. data/po/hu/gettext.edit.po +36 -554
  63. data/po/hu/gettext.po +0 -423
  64. data/po/it/gettext.edit.po +36 -554
  65. data/po/it/gettext.po +0 -423
  66. data/po/ja/gettext.edit.po +36 -554
  67. data/po/ja/gettext.po +0 -423
  68. data/po/ko/gettext.edit.po +36 -554
  69. data/po/ko/gettext.po +0 -423
  70. data/po/lv/gettext.edit.po +36 -554
  71. data/po/lv/gettext.po +0 -423
  72. data/po/nb/gettext.edit.po +36 -554
  73. data/po/nb/gettext.po +0 -423
  74. data/po/nl/gettext.edit.po +36 -554
  75. data/po/nl/gettext.po +0 -423
  76. data/po/pt_BR/gettext.edit.po +36 -554
  77. data/po/pt_BR/gettext.po +0 -423
  78. data/po/ru/gettext.edit.po +36 -554
  79. data/po/ru/gettext.po +0 -423
  80. data/po/sr/gettext.edit.po +36 -554
  81. data/po/sr/gettext.po +0 -423
  82. data/po/sv/gettext.edit.po +34 -555
  83. data/po/sv/gettext.po +0 -423
  84. data/po/uk/gettext.edit.po +36 -554
  85. data/po/uk/gettext.po +0 -423
  86. data/po/vi/gettext.edit.po +36 -554
  87. data/po/vi/gettext.po +0 -423
  88. data/po/zh/gettext.edit.po +36 -554
  89. data/po/zh/gettext.po +0 -423
  90. data/po/zh_TW/gettext.edit.po +36 -554
  91. data/po/zh_TW/gettext.po +0 -423
  92. data/test/fixtures/_.rb +1 -1
  93. data/test/fixtures/erb/minus.rhtml +12 -0
  94. data/test/fixtures/{gladeparser.glade → glade/2.glade} +0 -0
  95. data/test/fixtures/glade/3.glade +63 -0
  96. data/test/fixtures/gtk_builder_ui_definitions.ui~ +68 -0
  97. data/test/fixtures/multi_text_domain.rb +12 -12
  98. data/test/fixtures/np_.rb +1 -1
  99. data/test/fixtures/ns_.rb +1 -1
  100. data/test/fixtures/p_.rb +1 -1
  101. data/test/fixtures/ruby/{percent_i.rb → percent_lower_i.rb} +0 -0
  102. data/test/fixtures/ruby/{percent_w.rb → percent_lower_w.rb} +0 -0
  103. data/test/fixtures/ruby/{percent_I.rb → percent_upper_i.rb} +0 -0
  104. data/test/fixtures/ruby/{percent_W.rb → percent_upper_w.rb} +0 -0
  105. data/test/fixtures/s_.rb +1 -1
  106. data/test/fixtures/simple.rb +1 -1
  107. data/test/fixtures/upper_nn_.rb +77 -0
  108. data/test/po/_.pot +20 -4
  109. data/test/po/ja/_.edit.po +24 -0
  110. data/test/po/np_.pot +8 -5
  111. data/test/po/ns_.pot +6 -4
  112. data/test/po/p_.pot +3 -3
  113. data/test/po/s_.pot +6 -4
  114. data/test/run-test.rb +0 -1
  115. data/test/test_parser.rb +42 -17
  116. data/test/tools/parser/test_glade.rb +91 -0
  117. data/test/tools/parser/test_gtk_builder_ui_definitions.rb +19 -1
  118. data/test/tools/parser/test_ruby.rb +4 -4
  119. data/test/tools/test_msginit.rb +77 -3
  120. data/test/tools/test_msgmerge.rb +34 -0
  121. metadata +29 -25
data/po/zh_TW/gettext.po CHANGED
@@ -208,9 +208,6 @@ msgstr ""
208
208
  msgid "Display version information and exit"
209
209
  msgstr "秀出版本資訊後退出"
210
210
 
211
- msgid "`%{file}' is not glade-2.0 format."
212
- msgstr "`%{file}' 不是 glade-2.0 格式"
213
-
214
211
  msgid "'%{klass}' is ignored."
215
212
  msgstr "'%{klass}' 忽略"
216
213
 
@@ -281,423 +278,3 @@ msgid ""
281
278
  "Warning: The empty \"\" msgid is reserved by gettext. So gettext(\"\") doesn't ret"
282
279
  "urns empty string but the header entry in po file."
283
280
  msgstr ""
284
-
285
- msgid "This message is from hellolib."
286
- msgstr ""
287
-
288
- msgid ""
289
- "Hello World\n"
290
- msgstr ""
291
-
292
- msgid ""
293
- "One is %{num}\n"
294
- msgstr ""
295
-
296
- msgid ""
297
- "Hello %{world}\n"
298
- msgstr ""
299
-
300
- msgid "World"
301
- msgstr ""
302
-
303
- msgid "window1"
304
- msgstr ""
305
-
306
- msgid ""
307
- "first line\n"
308
- "second line\n"
309
- "third line"
310
- msgstr ""
311
-
312
- msgid "<Hello world>"
313
- msgstr ""
314
-
315
- msgid "hello, gtk world"
316
- msgstr ""
317
-
318
- msgid "Hello World"
319
- msgstr ""
320
-
321
- msgid "Hello World2"
322
- msgstr ""
323
-
324
- msgid ""
325
- "There is an apple.\n"
326
- msgid_plural ""
327
- "There are %{num} apples.\n"
328
- msgstr[0] ""
329
- msgstr[1] ""
330
-
331
- msgid "hello, tk world"
332
- msgstr ""
333
-
334
- msgid "aaa"
335
- msgid_plural "aaa2"
336
- msgstr[0] ""
337
- msgstr[1] ""
338
-
339
- msgid ""
340
- "aaa\n"
341
- msgstr ""
342
-
343
- msgid ""
344
- "bbb\n"
345
- "ccc"
346
- msgstr ""
347
-
348
- msgid ""
349
- "bbb\n"
350
- "ccc\n"
351
- "ddd\n"
352
- msgstr ""
353
-
354
- msgid "eee"
355
- msgstr ""
356
-
357
- msgid "fff"
358
- msgid_plural "fff2"
359
- msgstr[0] ""
360
- msgstr[1] ""
361
-
362
- msgid "ggghhhiii"
363
- msgid_plural "jjjkkklll"
364
- msgstr[0] ""
365
- msgstr[1] ""
366
-
367
- msgid "a\"b\"c\""
368
- msgid_plural "a\"b\"c\"2"
369
- msgstr[0] ""
370
- msgstr[1] ""
371
-
372
- msgid "d\"e\"f\""
373
- msgid_plural "d\"e\"f\"2"
374
- msgstr[0] ""
375
- msgstr[1] ""
376
-
377
- msgid "jjj"
378
- msgstr ""
379
-
380
- msgid "kkk"
381
- msgstr ""
382
-
383
- msgid "lllmmm"
384
- msgstr ""
385
-
386
- msgid ""
387
- "nnn\n"
388
- "ooo"
389
- msgstr ""
390
-
391
- msgid "#"
392
- msgstr ""
393
-
394
- msgid "\taaa'bbb\\ccc"
395
- msgstr ""
396
-
397
- msgid ""
398
- "Here document1\n"
399
- "Here document2\n"
400
- msgstr ""
401
-
402
- msgid "in_quote"
403
- msgstr ""
404
-
405
- #. TRANSLATORS: This is a proper name. See the gettext
406
- #. manual, section Names. Note this is actually a non-ASCII
407
- #. name: The first name is (with Unicode escapes)
408
- #. "Fran\u00e7ois" or (with HTML entities) "Fran&ccedil;ois".
409
- #. Pronunciation is like "fraa-swa pee-nar".
410
- #. This is an example from GNU gettext documentation.
411
- msgid "Francois Pinard"
412
- msgstr ""
413
-
414
- msgid "No TRANSLATORS comment"
415
- msgstr ""
416
-
417
- msgid "self explaining"
418
- msgstr ""
419
-
420
- msgid "This is a # including string."
421
- msgstr ""
422
-
423
- msgid "double \"quote\" in double quote"
424
- msgstr ""
425
-
426
- msgid "double \"quote\" in single quote"
427
- msgstr ""
428
-
429
- msgid "literal concatenation with continuation line"
430
- msgstr ""
431
-
432
- msgid ""
433
- "middle\n"
434
- "new line"
435
- msgstr ""
436
-
437
- msgid ""
438
- "multiple\n"
439
- "lines\n"
440
- "literal\n"
441
- msgstr ""
442
-
443
- msgid "multiple"
444
- msgstr ""
445
-
446
- msgid "in same line"
447
- msgstr ""
448
-
449
- msgid "multiple same messages"
450
- msgstr ""
451
-
452
- msgid "one line"
453
- msgstr ""
454
-
455
- msgid ""
456
- "one new line\n"
457
- msgstr ""
458
-
459
- msgid "in_symbol_array"
460
- msgstr ""
461
-
462
- msgid "hello world"
463
- msgstr ""
464
-
465
- msgid "in_string_array"
466
- msgstr ""
467
-
468
- msgid "Hello"
469
- msgstr ""
470
-
471
- msgid "You should escape '\\' as '\\\\'."
472
- msgstr ""
473
-
474
- msgid "normal text"
475
- msgstr ""
476
-
477
- msgid ""
478
- "1st line\n"
479
- "2nd line\n"
480
- "3rd line"
481
- msgstr ""
482
-
483
- msgid "<span color=\"red\" weight=\"bold\" size=\"large\">markup </span>"
484
- msgstr ""
485
-
486
- msgid ""
487
- "<span color=\"red\">1st line markup </span>\n"
488
- "<span color=\"blue\">2nd line markup</span>"
489
- msgstr ""
490
-
491
- msgid "<span>&quot;markup&quot; with &lt;escaped strings&gt;</span>"
492
- msgstr ""
493
-
494
- msgid "duplicated"
495
- msgstr ""
496
-
497
- msgid ""
498
- "bbb\n"
499
- msgid_plural ""
500
- "ccc2\n"
501
- "ccc2"
502
- msgstr[0] ""
503
- msgstr[1] ""
504
-
505
- msgid ""
506
- "ddd\n"
507
- "ddd"
508
- msgid_plural ""
509
- "ddd2\n"
510
- "ddd2"
511
- msgstr[0] ""
512
- msgstr[1] ""
513
-
514
- msgid ""
515
- "eee\n"
516
- "eee\n"
517
- msgid_plural ""
518
- "eee2\n"
519
- "eee2\n"
520
- msgstr[0] ""
521
- msgstr[1] ""
522
-
523
- msgid ""
524
- "ddd\n"
525
- "eee\n"
526
- msgid_plural ""
527
- "ddd\n"
528
- "eee2"
529
- msgstr[0] ""
530
- msgstr[1] ""
531
-
532
- msgid "ggg"
533
- msgid_plural "ggg2"
534
- msgstr[0] ""
535
- msgstr[1] ""
536
-
537
- msgid "mmmmmm"
538
- msgid_plural "mmm2mmm2"
539
- msgstr[0] ""
540
- msgstr[1] ""
541
-
542
- msgid "nnn"
543
- msgid_plural "nnn2"
544
- msgstr[0] ""
545
- msgstr[1] ""
546
-
547
- msgid "ooo"
548
- msgid_plural "ppp"
549
- msgstr[0] ""
550
- msgstr[1] ""
551
-
552
- msgid "qqq"
553
- msgid_plural "rrr"
554
- msgstr[0] ""
555
- msgstr[1] ""
556
-
557
- #. TRANSLATORS:please provide translations for all
558
- #. the plural forms!
559
- msgid "comment"
560
- msgid_plural "comments"
561
- msgstr[0] ""
562
- msgstr[1] ""
563
-
564
- msgid "language"
565
- msgstr ""
566
-
567
- msgid "LANGUAGE"
568
- msgstr ""
569
-
570
- msgid "no data"
571
- msgstr ""
572
-
573
- msgid "こんにちは"
574
- msgstr ""
575
-
576
- msgctxt "Magazine"
577
- msgid "a book"
578
- msgid_plural "%{num} books"
579
- msgstr[0] ""
580
- msgstr[1] ""
581
-
582
- msgctxt "Hardcover"
583
- msgid "a book"
584
- msgid_plural "%{num} books"
585
- msgstr[0] ""
586
- msgstr[1] ""
587
-
588
- msgctxt "Magaine"
589
- msgid "I have a magazine"
590
- msgid_plural "I have %{num} magazines"
591
- msgstr[0] ""
592
- msgstr[1] ""
593
-
594
- msgctxt "Hardcover"
595
- msgid "a picture"
596
- msgid_plural "%{num} pictures"
597
- msgstr[0] ""
598
- msgstr[1] ""
599
-
600
- msgid "AAA|BBB"
601
- msgid_plural "CCC"
602
- msgstr[0] ""
603
- msgstr[1] ""
604
-
605
- msgid "AAA"
606
- msgid_plural "BBB"
607
- msgstr[0] ""
608
- msgstr[1] ""
609
-
610
- msgid "AAA|CCC"
611
- msgid_plural "DDD"
612
- msgstr[0] ""
613
- msgstr[1] ""
614
-
615
- msgid "AAA|BBB|CCC"
616
- msgid_plural "DDD"
617
- msgstr[0] ""
618
- msgstr[1] ""
619
-
620
- msgid "AAA$BBB"
621
- msgid_plural "CCC"
622
- msgstr[0] ""
623
- msgstr[1] ""
624
-
625
- msgid "AAA$B|BB"
626
- msgid_plural "CCC"
627
- msgstr[0] ""
628
- msgstr[1] ""
629
-
630
- msgid "AAA$B|CC"
631
- msgid_plural "DDD"
632
- msgstr[0] ""
633
- msgstr[1] ""
634
-
635
- msgid "AAA|CCC|BBB"
636
- msgid_plural "DDD"
637
- msgstr[0] ""
638
- msgstr[1] ""
639
-
640
- msgid "context|context$message"
641
- msgid_plural "context|context$messages"
642
- msgstr[0] ""
643
- msgstr[1] ""
644
-
645
- msgctxt "AAA"
646
- msgid "BBB"
647
- msgstr ""
648
-
649
- msgctxt "AAA|BBB"
650
- msgid "CCC"
651
- msgstr ""
652
-
653
- msgctxt "AAA"
654
- msgid "CCC"
655
- msgstr ""
656
-
657
- msgctxt "CCC"
658
- msgid "BBB"
659
- msgstr ""
660
-
661
- msgid "BBB"
662
- msgstr ""
663
-
664
- #. TRANSLATORS:please translate 'name' in the context of 'program'.
665
- #. Hint: the translation should NOT contain the translation of 'program'.
666
- msgctxt "program"
667
- msgid "name"
668
- msgstr ""
669
-
670
- msgid "one is %d."
671
- msgstr ""
672
-
673
- msgid "untranslated"
674
- msgstr ""
675
-
676
- msgid "nomsgstr"
677
- msgstr ""
678
-
679
- msgid "test"
680
- msgstr ""
681
-
682
- msgid "one"
683
- msgid_plural "two"
684
- msgstr[0] ""
685
- msgstr[1] ""
686
-
687
- msgid "first"
688
- msgid_plural "second"
689
- msgstr[0] ""
690
- msgstr[1] ""
691
-
692
- msgid "first_2"
693
- msgid_plural "second_2"
694
- msgstr[0] ""
695
- msgstr[1] ""
696
-
697
- msgid "single"
698
- msgid_plural "plural"
699
- msgstr[0] ""
700
- msgstr[1] ""
701
-
702
- msgid "a translation"
703
- msgstr ""
data/test/fixtures/_.rb CHANGED
@@ -24,7 +24,7 @@ require 'gettext'
24
24
  include GetText
25
25
 
26
26
  class MessageFixture
27
- bindtextdomain("rubyparser", :path => "locale")
27
+ bindtextdomain("rubyparser", :path => Helper::Path.locale_path)
28
28
 
29
29
  def test_1
30
30
  _("aaa")
@@ -0,0 +1,12 @@
1
+ <%
2
+ require 'gettext'
3
+ include GetText
4
+ bindtextdomain("helloerb", :path => "locale")
5
+ %>
6
+ <html>
7
+ <head>
8
+ <title><%= _("Hello") -%></title>
9
+ </head>
10
+ <body>
11
+ </body>
12
+ </html>