gettext 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. data/ChangeLog +128 -0
  2. data/NEWS +10 -0
  3. data/README +21 -23
  4. data/Rakefile +39 -20
  5. data/bin/rgettext +1 -1
  6. data/bin/rmsgfmt +1 -1
  7. data/bin/rmsgmerge +1 -1
  8. data/data/locale/cs/LC_MESSAGES/rails.mo +0 -0
  9. data/data/locale/cs/LC_MESSAGES/rgettext.mo +0 -0
  10. data/data/locale/de/LC_MESSAGES/rails.mo +0 -0
  11. data/data/locale/de/LC_MESSAGES/rgettext.mo +0 -0
  12. data/data/locale/el/LC_MESSAGES/rails.mo +0 -0
  13. data/data/locale/el/LC_MESSAGES/rgettext.mo +0 -0
  14. data/data/locale/es/LC_MESSAGES/rails.mo +0 -0
  15. data/data/locale/es/LC_MESSAGES/rgettext.mo +0 -0
  16. data/data/locale/fr/LC_MESSAGES/rails.mo +0 -0
  17. data/data/locale/fr/LC_MESSAGES/rgettext.mo +0 -0
  18. data/data/locale/it/LC_MESSAGES/rgettext.mo +0 -0
  19. data/data/locale/ja/LC_MESSAGES/rails.mo +0 -0
  20. data/data/locale/ja/LC_MESSAGES/rgettext.mo +0 -0
  21. data/data/locale/ko/LC_MESSAGES/rails.mo +0 -0
  22. data/data/locale/ko/LC_MESSAGES/rgettext.mo +0 -0
  23. data/data/locale/nl/LC_MESSAGES/rails.mo +0 -0
  24. data/data/locale/nl/LC_MESSAGES/rgettext.mo +0 -0
  25. data/data/locale/pt_BR/LC_MESSAGES/rails.mo +0 -0
  26. data/data/locale/pt_BR/LC_MESSAGES/rgettext.mo +0 -0
  27. data/data/locale/sv/LC_MESSAGES/rgettext.mo +0 -0
  28. data/ext/gettext/extconf.rb +20 -0
  29. data/ext/gettext/{gettext/_locale.c → locale_system.c} +15 -19
  30. data/lib/gettext.rb +186 -38
  31. data/lib/gettext/cgi.rb +35 -69
  32. data/lib/gettext/container.rb +14 -5
  33. data/lib/gettext/erb.rb +30 -2
  34. data/lib/gettext/iconv.rb +19 -4
  35. data/lib/gettext/locale.rb +188 -39
  36. data/lib/gettext/locale_cgi.rb +102 -0
  37. data/lib/gettext/locale_object.rb +131 -0
  38. data/lib/gettext/locale_posix.rb +50 -0
  39. data/lib/gettext/locale_table_win32.rb +224 -182
  40. data/lib/gettext/locale_win32.rb +59 -35
  41. data/lib/gettext/mo.rb +2 -2
  42. data/lib/gettext/parser/activerecord.rb +19 -5
  43. data/lib/gettext/parser/erb.rb +6 -3
  44. data/lib/gettext/parser/glade.rb +5 -5
  45. data/lib/gettext/parser/ruby.rb +6 -6
  46. data/lib/gettext/poparser.rb +7 -6
  47. data/lib/gettext/rails.rb +122 -44
  48. data/lib/gettext/rgettext.rb +21 -8
  49. data/lib/gettext/rmsgfmt.rb +16 -8
  50. data/lib/gettext/rmsgmerge.rb +172 -50
  51. data/lib/gettext/string.rb +25 -3
  52. data/lib/gettext/textdomain.rb +89 -90
  53. data/lib/gettext/utils.rb +63 -3
  54. data/lib/gettext/version.rb +2 -2
  55. data/pkg/ruby-gettext-package-1.2.0/ext/gettext/extconf.rb +20 -0
  56. data/po/cs/rails.po +28 -28
  57. data/po/cs/rgettext.po +14 -14
  58. data/po/de/rails.po +29 -26
  59. data/po/de/rgettext.po +24 -17
  60. data/po/el/rails.po +26 -26
  61. data/po/el/rgettext.po +18 -15
  62. data/po/es/rails.po +26 -26
  63. data/po/es/rgettext.po +16 -16
  64. data/po/fr/rails.po +27 -27
  65. data/po/fr/rgettext.po +14 -14
  66. data/po/it/rgettext.po +14 -14
  67. data/po/ja/rails.po +24 -24
  68. data/po/ja/rgettext.po +14 -14
  69. data/po/ko/rails.po +24 -24
  70. data/po/ko/rgettext.po +17 -18
  71. data/po/nl/rails.po +27 -27
  72. data/po/nl/rgettext.po +18 -18
  73. data/po/pt_BR/rails.po +26 -26
  74. data/po/pt_BR/rgettext.po +14 -14
  75. data/po/rails.pot +26 -26
  76. data/po/rgettext.pot +14 -14
  77. data/po/sv/rgettext.po +14 -14
  78. data/post-setup.rb +8 -3
  79. data/pre-setup.rb +14 -1
  80. data/samples/cgi/http.rb +2 -1
  81. data/samples/makemo.rb +1 -1
  82. data/samples/rails/app/models/article.rb +15 -1
  83. data/samples/rails/locale/cs/LC_MESSAGES/blog.mo +0 -0
  84. data/samples/rails/locale/cs/LC_MESSAGES/gettext_plugin.mo +0 -0
  85. data/samples/rails/locale/de/LC_MESSAGES/blog.mo +0 -0
  86. data/samples/rails/locale/de/LC_MESSAGES/gettext_plugin.mo +0 -0
  87. data/samples/rails/locale/el/LC_MESSAGES/blog.mo +0 -0
  88. data/samples/rails/locale/el/LC_MESSAGES/gettext_plugin.mo +0 -0
  89. data/samples/rails/locale/en/LC_MESSAGES/blog.mo +0 -0
  90. data/samples/rails/locale/es/LC_MESSAGES/blog.mo +0 -0
  91. data/samples/rails/locale/es/LC_MESSAGES/gettext_plugin.mo +0 -0
  92. data/samples/rails/locale/fr/LC_MESSAGES/blog.mo +0 -0
  93. data/samples/rails/locale/fr/LC_MESSAGES/gettext_plugin.mo +0 -0
  94. data/samples/rails/locale/ja/LC_MESSAGES/blog.mo +0 -0
  95. data/samples/rails/locale/ja/LC_MESSAGES/gettext_plugin.mo +0 -0
  96. data/samples/rails/locale/ko/LC_MESSAGES/blog.mo +0 -0
  97. data/samples/rails/locale/ko/LC_MESSAGES/gettext_plugin.mo +0 -0
  98. data/samples/rails/locale/nl/LC_MESSAGES/blog.mo +0 -0
  99. data/samples/rails/locale/nl/LC_MESSAGES/gettext_plugin.mo +0 -0
  100. data/samples/rails/locale/pt_BR/LC_MESSAGES/blog.mo +0 -0
  101. data/samples/rails/locale/pt_BR/LC_MESSAGES/gettext_plugin.mo +0 -0
  102. data/samples/rails/po/blog.pot +1 -1
  103. data/samples/rails/po/cs/blog.po +1 -2
  104. data/samples/rails/po/cs/gettext_plugin.po +1 -1
  105. data/samples/rails/po/de/blog.po +1 -2
  106. data/samples/rails/po/de/gettext_plugin.po +1 -1
  107. data/samples/rails/po/el/blog.po +1 -1
  108. data/samples/rails/po/el/gettext_plugin.po +1 -1
  109. data/samples/rails/po/en/blog.po +1 -1
  110. data/samples/rails/po/es/blog.po +1 -2
  111. data/samples/rails/po/es/gettext_plugin.po +1 -1
  112. data/samples/rails/po/fr/blog.po +1 -1
  113. data/samples/rails/po/fr/gettext_plugin.po +1 -1
  114. data/samples/rails/po/gettext_plugin.pot +1 -1
  115. data/samples/rails/po/ja/blog.po +2 -1
  116. data/samples/rails/po/ja/gettext_plugin.po +1 -1
  117. data/samples/rails/po/ko/blog.po +1 -2
  118. data/samples/rails/po/ko/gettext_plugin.po +1 -1
  119. data/samples/rails/po/nl/blog.po +1 -3
  120. data/samples/rails/po/nl/gettext_plugin.po +1 -1
  121. data/samples/rails/po/pt_BR/blog.po +1 -1
  122. data/samples/rails/po/pt_BR/gettext_plugin.po +1 -1
  123. data/setup.rb +799 -574
  124. data/src/poparser.ry +6 -5
  125. data/test/gettext_runner.rb +3 -1
  126. data/test/gettext_test.rb +40 -24
  127. data/test/gettext_test_cgi.rb +60 -6
  128. data/test/gettext_test_locale.rb +136 -0
  129. data/test/gettext_test_parser.rb +12 -12
  130. data/test/locale/la/LC_MESSAGES/plural_error.mo +0 -0
  131. data/test/po/la/plural_error.po +21 -0
  132. data/test/test.bat +2 -0
  133. data/test/test.sh +2 -4
  134. data/test/{test_rubyparser_n.rb → test_rubyparser_n_.rb} +0 -0
  135. metadata +17 -12
  136. data/ext/gettext/gettext/MANIFEST +0 -3
  137. data/ext/gettext/gettext/extconf.rb +0 -20
  138. data/lib/gettext/locale_default.rb +0 -35
data/test/test.bat ADDED
@@ -0,0 +1,2 @@
1
+ ruby -I../lib -I../ext/gettext gettext_runner.rb
2
+
data/test/test.sh CHANGED
@@ -1,8 +1,6 @@
1
1
  #!/bin/sh
2
2
 
3
3
  export LC_ALL="ja_JP.eucJP";
4
- export OUTPUT_CHARSET="euc-jp";
5
-
6
- ruby -I../lib gettext_runner.rb $1
7
- ruby -I../lib gettext_test_cgi.rb
4
+ ruby -I../lib -I../ext/gettext gettext_runner.rb $1
5
+ ruby -I../lib -I../ext/gettext gettext_test_cgi.rb
8
6
 
metadata CHANGED
@@ -3,13 +3,13 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: gettext
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.1
7
- date: 2006-01-14 00:00:00 +09:00
8
- summary: Ruby-GetText-Package is Native Language Support Library and Tools which modeled after GNU gettext package.
6
+ version: 1.2.0
7
+ date: 2006-02-24 00:00:00 +09:00
8
+ summary: Ruby-GetText-Package is a libary and tools to localize messages.
9
9
  require_paths:
10
10
  - lib
11
11
  email: mutoh@highway.ne.jp
12
- homepage: http://ponx.s5.xrea.com/hiki/ruby-gettext.html
12
+ homepage: http://www.yotabanana.com/hiki/ruby-gettext.html
13
13
  rubyforge_project: gettext
14
14
  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.
15
15
  autorequire:
@@ -584,10 +584,8 @@ files:
584
584
  - samples/locale/fr/LC_MESSAGES/hello_noop.mo
585
585
  - samples/locale/fr/LC_MESSAGES/hellogtk.mo
586
586
  - ext/gettext
587
- - ext/gettext/gettext
588
- - ext/gettext/gettext/extconf.rb
589
- - ext/gettext/gettext/MANIFEST
590
- - ext/gettext/gettext/_locale.c
587
+ - ext/gettext/extconf.rb
588
+ - ext/gettext/locale_system.c
591
589
  - po/rgettext.pot
592
590
  - po/de
593
591
  - po/ko
@@ -626,16 +624,18 @@ files:
626
624
  - lib/gettext.rb
627
625
  - lib/gettext/locale_win32.rb
628
626
  - lib/gettext/rmsgmerge.rb
629
- - lib/gettext/locale_default.rb
627
+ - lib/gettext/locale_posix.rb
630
628
  - lib/gettext/poparser.rb
631
629
  - lib/gettext/string.rb
632
630
  - lib/gettext/container.rb
633
631
  - lib/gettext/textdomain.rb
632
+ - lib/gettext/locale_cgi.rb
634
633
  - lib/gettext/rgettext.rb
635
634
  - lib/gettext/locale.rb
636
635
  - lib/gettext/locale_table_win32.rb
637
636
  - lib/gettext/iconv.rb
638
637
  - lib/gettext/parser
638
+ - lib/gettext/locale_object.rb
639
639
  - lib/gettext/utils.rb
640
640
  - lib/gettext/mo.rb
641
641
  - lib/gettext/version.rb
@@ -658,8 +658,10 @@ files:
658
658
  - test/test_erb.rhtml
659
659
  - test/test.sh
660
660
  - test/testlib3.rb
661
- - test/test_rubyparser_n.rb
662
661
  - test/test_rubyparser_N.rb
662
+ - test/test.bat
663
+ - test/gettext_test_locale.rb
664
+ - test/test_rubyparser_n_.rb
663
665
  - test/gettext_test_string.rb
664
666
  - test/po
665
667
  - test/test_rubyparser.rb
@@ -676,6 +678,7 @@ files:
676
678
  - test/po/da
677
679
  - test/po/sl
678
680
  - test/po/fr
681
+ - test/po/la/plural_error.po
679
682
  - test/po/la/plural.po
680
683
  - test/po/ja/plural_error.po
681
684
  - test/po/ja/plural.po
@@ -704,6 +707,7 @@ files:
704
707
  - test/locale/sl
705
708
  - test/locale/fr
706
709
  - test/locale/la/LC_MESSAGES
710
+ - test/locale/la/LC_MESSAGES/plural_error.mo
707
711
  - test/locale/la/LC_MESSAGES/plural.mo
708
712
  - test/locale/ja/LC_MESSAGES
709
713
  - test/locale/ja/LC_MESSAGES/test_rubyparser.mo
@@ -744,8 +748,9 @@ executables:
744
748
  - rmsgmerge
745
749
  - rgettext
746
750
  extensions:
747
- - ext/gettext/gettext/extconf.rb
748
- - ext/gettext/gettext/extconf.rb
751
+ - ext/gettext/extconf.rb
752
+ - ext/gettext/extconf.rb
753
+ - pkg/ruby-gettext-package-1.2.0/ext/gettext/extconf.rb
749
754
  requirements: []
750
755
 
751
756
  dependencies: []
@@ -1,3 +0,0 @@
1
- MANIFEST
2
- _locale.c
3
- extconf.rb
@@ -1,20 +0,0 @@
1
- =begin
2
- extconf.rb
3
-
4
- Copyright (C) 2002,2003 Masao Mutoh <mutoh@highway.ne.jp>
5
-
6
- You may redistribute it and/or modify it under the same
7
- license terms as Ruby.
8
-
9
- $Id: extconf.rb,v 1.1.1.1 2005/08/13 02:38:09 mutoh Exp $
10
- =end
11
-
12
- require 'mkmf'
13
-
14
- if RUBY_PLATFORM =~ /cygwin|mingw|mswin32|bccwin32/
15
- have_header 'windows.h'
16
- else
17
- have_func 'setlocale'
18
- have_func 'nl_langinfo'
19
- end
20
- create_makefile '_locale'
@@ -1,35 +0,0 @@
1
- =begin
2
- locale_default.rb - Locale module for Default OS(Unix).
3
-
4
- Copyright (C) 2002-2005 Masao Mutoh <mutoh@highway.ne.jp>
5
-
6
- You may redistribute it and/or modify it under the same
7
- license terms as Ruby.
8
-
9
- $Id: locale_default.rb,v 1.3 2005/09/04 17:47:54 mutoh Exp $
10
- =end
11
-
12
- module Locale
13
- @@locale_initialized = false
14
- alias :__set :set
15
- def __get(lctype = Locale::CTYPE)
16
- # Initialize lctype lazily.
17
- # This isn't called when 'gettext/cgi' is required.
18
- unless @@locale_initialized
19
- Locale.set(lctype, "")
20
- @@locale_initialized = true
21
- end
22
- set(lctype, nil)
23
- end
24
-
25
- def set(lctype, loc)
26
- ret = __set(lctype, loc)
27
- if loc and ! @@locale_initialized
28
- @@locale_initialized = true
29
- end
30
- ret
31
- end
32
-
33
- module_function :__get, :set, :__set
34
- end
35
-