gettext 1.1.1-mswin32 → 1.2.0-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. data/ChangeLog +128 -0
  2. data/NEWS +10 -0
  3. data/README +21 -23
  4. data/Rakefile +40 -21
  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/{gettext/Makefile → Makefile} +3 -3
  29. data/ext/gettext/extconf.rb +20 -0
  30. data/ext/gettext/locale_system-i386-mswin32.def +2 -0
  31. data/ext/gettext/{gettext/_locale.c → locale_system.c} +15 -19
  32. data/ext/gettext/locale_system.exp +0 -0
  33. data/ext/gettext/locale_system.lib +0 -0
  34. data/ext/gettext/locale_system.obj +0 -0
  35. data/ext/gettext/{gettext/_locale.pdb → locale_system.pdb} +0 -0
  36. data/ext/gettext/locale_system.so +0 -0
  37. data/ext/gettext/mkmf.log +10 -0
  38. data/ext/gettext/{gettext/vc70.pdb → vc70.pdb} +0 -0
  39. data/lib/gettext.rb +186 -38
  40. data/lib/gettext/cgi.rb +35 -69
  41. data/lib/gettext/container.rb +14 -5
  42. data/lib/gettext/erb.rb +30 -2
  43. data/lib/gettext/iconv.rb +19 -4
  44. data/lib/gettext/locale.rb +188 -39
  45. data/lib/gettext/locale_cgi.rb +102 -0
  46. data/lib/gettext/locale_object.rb +131 -0
  47. data/lib/gettext/locale_posix.rb +50 -0
  48. data/lib/gettext/locale_table_win32.rb +224 -182
  49. data/lib/gettext/locale_win32.rb +59 -35
  50. data/lib/gettext/mo.rb +2 -2
  51. data/lib/gettext/parser/activerecord.rb +19 -5
  52. data/lib/gettext/parser/erb.rb +6 -3
  53. data/lib/gettext/parser/glade.rb +5 -5
  54. data/lib/gettext/parser/ruby.rb +6 -6
  55. data/lib/gettext/poparser.rb +298 -297
  56. data/lib/gettext/rails.rb +122 -44
  57. data/lib/gettext/rgettext.rb +21 -8
  58. data/lib/gettext/rmsgfmt.rb +16 -8
  59. data/lib/gettext/rmsgmerge.rb +172 -50
  60. data/lib/gettext/string.rb +25 -3
  61. data/lib/gettext/textdomain.rb +89 -90
  62. data/lib/gettext/utils.rb +63 -3
  63. data/lib/gettext/version.rb +2 -2
  64. data/lib/locale_system.so +0 -0
  65. data/po/cs/rails.po +28 -28
  66. data/po/cs/rgettext.po +14 -14
  67. data/po/de/rails.po +29 -26
  68. data/po/de/rgettext.po +24 -17
  69. data/po/el/rails.po +26 -26
  70. data/po/el/rgettext.po +18 -15
  71. data/po/es/rails.po +26 -26
  72. data/po/es/rgettext.po +16 -16
  73. data/po/fr/rails.po +27 -27
  74. data/po/fr/rgettext.po +14 -14
  75. data/po/it/rgettext.po +14 -14
  76. data/po/ja/rails.po +24 -24
  77. data/po/ja/rgettext.po +14 -14
  78. data/po/ko/rails.po +24 -24
  79. data/po/ko/rgettext.po +17 -18
  80. data/po/nl/rails.po +27 -27
  81. data/po/nl/rgettext.po +18 -18
  82. data/po/pt_BR/rails.po +26 -26
  83. data/po/pt_BR/rgettext.po +14 -14
  84. data/po/rails.pot +26 -26
  85. data/po/rgettext.pot +14 -14
  86. data/po/sv/rgettext.po +14 -14
  87. data/post-setup.rb +8 -3
  88. data/pre-setup.rb +14 -1
  89. data/samples/cgi/http.rb +2 -1
  90. data/samples/makemo.rb +1 -1
  91. data/samples/rails/app/models/article.rb +15 -1
  92. data/samples/rails/config/database.yml +1 -1
  93. data/samples/rails/locale/cs/LC_MESSAGES/blog.mo +0 -0
  94. data/samples/rails/locale/cs/LC_MESSAGES/gettext_plugin.mo +0 -0
  95. data/samples/rails/locale/de/LC_MESSAGES/blog.mo +0 -0
  96. data/samples/rails/locale/de/LC_MESSAGES/gettext_plugin.mo +0 -0
  97. data/samples/rails/locale/el/LC_MESSAGES/blog.mo +0 -0
  98. data/samples/rails/locale/el/LC_MESSAGES/gettext_plugin.mo +0 -0
  99. data/samples/rails/locale/en/LC_MESSAGES/blog.mo +0 -0
  100. data/samples/rails/locale/es/LC_MESSAGES/blog.mo +0 -0
  101. data/samples/rails/locale/es/LC_MESSAGES/gettext_plugin.mo +0 -0
  102. data/samples/rails/locale/fr/LC_MESSAGES/blog.mo +0 -0
  103. data/samples/rails/locale/fr/LC_MESSAGES/gettext_plugin.mo +0 -0
  104. data/samples/rails/locale/ja/LC_MESSAGES/blog.mo +0 -0
  105. data/samples/rails/locale/ja/LC_MESSAGES/gettext_plugin.mo +0 -0
  106. data/samples/rails/locale/ko/LC_MESSAGES/blog.mo +0 -0
  107. data/samples/rails/locale/ko/LC_MESSAGES/gettext_plugin.mo +0 -0
  108. data/samples/rails/locale/nl/LC_MESSAGES/blog.mo +0 -0
  109. data/samples/rails/locale/nl/LC_MESSAGES/gettext_plugin.mo +0 -0
  110. data/samples/rails/locale/pt_BR/LC_MESSAGES/blog.mo +0 -0
  111. data/samples/rails/locale/pt_BR/LC_MESSAGES/gettext_plugin.mo +0 -0
  112. data/samples/rails/po/blog.pot +1 -1
  113. data/samples/rails/po/cs/blog.po +1 -2
  114. data/samples/rails/po/cs/gettext_plugin.po +1 -1
  115. data/samples/rails/po/de/blog.po +1 -2
  116. data/samples/rails/po/de/gettext_plugin.po +1 -1
  117. data/samples/rails/po/el/blog.po +1 -1
  118. data/samples/rails/po/el/gettext_plugin.po +1 -1
  119. data/samples/rails/po/en/blog.po +1 -1
  120. data/samples/rails/po/es/blog.po +1 -2
  121. data/samples/rails/po/es/gettext_plugin.po +1 -1
  122. data/samples/rails/po/fr/blog.po +1 -1
  123. data/samples/rails/po/fr/gettext_plugin.po +1 -1
  124. data/samples/rails/po/gettext_plugin.pot +1 -1
  125. data/samples/rails/po/ja/blog.po +2 -1
  126. data/samples/rails/po/ja/gettext_plugin.po +1 -1
  127. data/samples/rails/po/ko/blog.po +1 -2
  128. data/samples/rails/po/ko/gettext_plugin.po +1 -1
  129. data/samples/rails/po/nl/blog.po +1 -3
  130. data/samples/rails/po/nl/gettext_plugin.po +1 -1
  131. data/samples/rails/po/pt_BR/blog.po +1 -1
  132. data/samples/rails/po/pt_BR/gettext_plugin.po +1 -1
  133. data/setup.rb +799 -574
  134. data/src/poparser.ry +6 -5
  135. data/test/gettext_runner.rb +3 -1
  136. data/test/gettext_test.rb +40 -24
  137. data/test/gettext_test_cgi.rb +60 -6
  138. data/test/gettext_test_locale.rb +136 -0
  139. data/test/gettext_test_parser.rb +12 -12
  140. data/test/locale/la/LC_MESSAGES/plural_error.mo +0 -0
  141. data/test/po/la/plural_error.po +21 -0
  142. data/test/test.bat +2 -0
  143. data/test/test.sh +2 -4
  144. data/test/test_rubyparser_n_.rb +64 -0
  145. metadata +24 -21
  146. data/ext/gettext/gettext/MANIFEST +0 -3
  147. data/ext/gettext/gettext/_locale-i386-mswin32.def +0 -2
  148. data/ext/gettext/gettext/_locale.exp +0 -0
  149. data/ext/gettext/gettext/_locale.lib +0 -0
  150. data/ext/gettext/gettext/_locale.obj +0 -0
  151. data/ext/gettext/gettext/_locale.so +0 -0
  152. data/ext/gettext/gettext/extconf.rb +0 -20
  153. data/ext/gettext/gettext/mkmf.log +0 -16
  154. data/lib/_locale.so +0 -0
  155. data/lib/gettext/locale_default.rb +0 -35
  156. data/po/it/messages.mo +0 -0
  157. data/samples/cgi/po/it/messages.mo +0 -0
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
 
@@ -0,0 +1,64 @@
1
+ require 'gettext'
2
+ include GetText
3
+
4
+ class TestRubyParser_n
5
+ bindtextdomain("test_rubyparser", "locale", "ja")
6
+
7
+ def test_1
8
+ n_("aaa","aaa2",1)
9
+ end
10
+
11
+ def test_2
12
+ n_("bbb\n", "ccc2\nccc2", 1)
13
+ end
14
+
15
+ def test_3_1
16
+ n_("ddd\nddd",
17
+ "ddd2\nddd2",
18
+ 1)
19
+ end
20
+ def test_3_2
21
+ n_("eee\neee\n" ,
22
+ "eee2\neee2\n" ,
23
+ 1)
24
+ end
25
+
26
+ def test_4
27
+ n_("ddd
28
+ eee
29
+ ", "ddd
30
+ eee2", 1)
31
+ end
32
+
33
+ def test_5_1
34
+ n_("fff", "fff2", 1)
35
+ end
36
+
37
+ def test_5_2
38
+ n_("fff", "fff2", 1) + "foo" + n_("ggg", "ggg2", 1)
39
+ end
40
+
41
+ def test_6
42
+ n_("ggg"\
43
+ "hhh"\
44
+ "iii",
45
+ "jjj"\
46
+ "kkk"\
47
+ "lll", 1)
48
+ end
49
+
50
+ def test_7
51
+ n_('a"b"c"', 'a"b"c"2', 1)
52
+ end
53
+
54
+ def test_8
55
+ n_("d\"e\"f\"", "d\"e\"f\"2", 1)
56
+ end
57
+
58
+ def test_9
59
+ n_("mmm" + "mmm","mmm2" + "mmm2",1) +
60
+ n_("nnn" ,"nnn2" ,1)
61
+ end
62
+
63
+ end
64
+
metadata CHANGED
@@ -3,13 +3,13 @@ rubygems_version: 0.8.10
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
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
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:
@@ -91,28 +91,28 @@ files:
91
91
  - data/locale/sv/LC_MESSAGES
92
92
  - data/locale/sv/LC_MESSAGES/rgettext.mo
93
93
  - ext/gettext
94
- - ext/gettext/gettext
95
- - ext/gettext/gettext/extconf.rb
96
- - ext/gettext/gettext/Makefile
97
- - ext/gettext/gettext/MANIFEST
98
- - ext/gettext/gettext/mkmf.log
99
- - ext/gettext/gettext/vc70.pdb
100
- - ext/gettext/gettext/_locale-i386-mswin32.def
101
- - ext/gettext/gettext/_locale.c
102
- - ext/gettext/gettext/_locale.exp
103
- - ext/gettext/gettext/_locale.lib
104
- - ext/gettext/gettext/_locale.obj
105
- - ext/gettext/gettext/_locale.pdb
106
- - ext/gettext/gettext/_locale.so
94
+ - ext/gettext/extconf.rb
95
+ - ext/gettext/locale_system-i386-mswin32.def
96
+ - ext/gettext/locale_system.c
97
+ - ext/gettext/locale_system.exp
98
+ - ext/gettext/locale_system.lib
99
+ - ext/gettext/locale_system.obj
100
+ - ext/gettext/locale_system.pdb
101
+ - ext/gettext/locale_system.so
102
+ - ext/gettext/Makefile
103
+ - ext/gettext/mkmf.log
104
+ - ext/gettext/vc70.pdb
107
105
  - lib/gettext
108
106
  - lib/gettext.rb
109
- - lib/_locale.so
107
+ - lib/locale_system.so
110
108
  - lib/gettext/cgi.rb
111
109
  - lib/gettext/container.rb
112
110
  - lib/gettext/erb.rb
113
111
  - lib/gettext/iconv.rb
114
112
  - lib/gettext/locale.rb
115
- - lib/gettext/locale_default.rb
113
+ - lib/gettext/locale_cgi.rb
114
+ - lib/gettext/locale_object.rb
115
+ - lib/gettext/locale_posix.rb
116
116
  - lib/gettext/locale_table_win32.rb
117
117
  - lib/gettext/locale_win32.rb
118
118
  - lib/gettext/mo.rb
@@ -153,7 +153,6 @@ files:
153
153
  - po/es/rgettext.po
154
154
  - po/fr/rails.po
155
155
  - po/fr/rgettext.po
156
- - po/it/messages.mo
157
156
  - po/it/rgettext.po
158
157
  - po/ja/rails.po
159
158
  - po/ja/rgettext.po
@@ -292,7 +291,6 @@ files:
292
291
  - samples/cgi/po/it/helloerb2.po
293
292
  - samples/cgi/po/it/hellolib.po
294
293
  - samples/cgi/po/it/main.po
295
- - samples/cgi/po/it/messages.mo
296
294
  - samples/cgi/po/ja/helloerb1.po
297
295
  - samples/cgi/po/ja/helloerb2.po
298
296
  - samples/cgi/po/ja/hellolib.po
@@ -662,11 +660,13 @@ files:
662
660
  - test/gettext_runner.rb
663
661
  - test/gettext_test.rb
664
662
  - test/gettext_test_cgi.rb
663
+ - test/gettext_test_locale.rb
665
664
  - test/gettext_test_parser.rb
666
665
  - test/gettext_test_string.rb
667
666
  - test/locale
668
667
  - test/po
669
668
  - test/README
669
+ - test/test.bat
670
670
  - test/test.sh
671
671
  - test/testlib1.rb
672
672
  - test/testlib2.rb
@@ -677,6 +677,7 @@ files:
677
677
  - test/test_gladeparser.glade
678
678
  - test/test_rubyparser.rb
679
679
  - test/test_rubyparser_N.rb
680
+ - test/test_rubyparser_n_.rb
680
681
  - test/test_sgettext.rb
681
682
  - test/locale/cr
682
683
  - test/locale/da
@@ -708,6 +709,7 @@ files:
708
709
  - test/locale/ja/LC_MESSAGES/test_sgettext.mo
709
710
  - test/locale/la/LC_MESSAGES
710
711
  - test/locale/la/LC_MESSAGES/plural.mo
712
+ - test/locale/la/LC_MESSAGES/plural_error.mo
711
713
  - test/locale/li/LC_MESSAGES
712
714
  - test/locale/li/LC_MESSAGES/plural.mo
713
715
  - test/locale/po/LC_MESSAGES
@@ -738,6 +740,7 @@ files:
738
740
  - test/po/ja/test_rubyparser.po
739
741
  - test/po/ja/test_sgettext.po
740
742
  - test/po/la/plural.po
743
+ - test/po/la/plural_error.po
741
744
  - test/po/li/plural.po
742
745
  - test/po/po/plural.po
743
746
  - test/po/sl/plural.po
@@ -1,3 +0,0 @@
1
- MANIFEST
2
- _locale.c
3
- extconf.rb
@@ -1,2 +0,0 @@
1
- EXPORTS
2
- Init__locale
Binary file
Binary file
Binary file
Binary file
@@ -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,16 +0,0 @@
1
- have_header: checking for windows.h... -------------------- yes
2
-
3
- "cl -IE:/ruby-gettext-package-1.1.1/ext/gettext/gettext -Ie:/ruby/lib/ruby/1.8/i386-mswin32 -I. -I./.. -I./../missing -MD -Zi -O2b2xg- -G6 conftest.c -P"
4
- Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.10.3077 for 80x86
5
- Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
6
-
7
- cl : Command line warning D4029 : optimization is not available in the standard edition compiler
8
- cl : Command line warning D4002 : ignoring unknown option '-Og-'
9
- conftest.c
10
- checked program was:
11
- /* begin */
12
- #include <windows.h>
13
- /* end */
14
-
15
- --------------------
16
-
data/lib/_locale.so DELETED
Binary file
@@ -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
-
data/po/it/messages.mo DELETED
Binary file
Binary file