gettext 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. data/ChangeLog +113 -0
  2. data/NEWS +17 -1
  3. data/README +56 -46
  4. data/Rakefile +6 -2
  5. data/data/locale/cs/LC_MESSAGES/rails.mo +0 -0
  6. data/data/locale/cs/LC_MESSAGES/rgettext.mo +0 -0
  7. data/data/locale/de/LC_MESSAGES/rails.mo +0 -0
  8. data/data/locale/de/LC_MESSAGES/rgettext.mo +0 -0
  9. data/data/locale/el/LC_MESSAGES/rails.mo +0 -0
  10. data/data/locale/el/LC_MESSAGES/rgettext.mo +0 -0
  11. data/data/locale/es/LC_MESSAGES/rails.mo +0 -0
  12. data/data/locale/es/LC_MESSAGES/rgettext.mo +0 -0
  13. data/data/locale/fr/LC_MESSAGES/rails.mo +0 -0
  14. data/data/locale/fr/LC_MESSAGES/rgettext.mo +0 -0
  15. data/data/locale/it/LC_MESSAGES/rails.mo +0 -0
  16. data/data/locale/it/LC_MESSAGES/rgettext.mo +0 -0
  17. data/data/locale/ja/LC_MESSAGES/rails.mo +0 -0
  18. data/data/locale/ja/LC_MESSAGES/rgettext.mo +0 -0
  19. data/data/locale/ko/LC_MESSAGES/rails.mo +0 -0
  20. data/data/locale/ko/LC_MESSAGES/rgettext.mo +0 -0
  21. data/data/locale/nl/LC_MESSAGES/rails.mo +0 -0
  22. data/data/locale/nl/LC_MESSAGES/rgettext.mo +0 -0
  23. data/data/locale/pt_BR/LC_MESSAGES/rails.mo +0 -0
  24. data/data/locale/pt_BR/LC_MESSAGES/rgettext.mo +0 -0
  25. data/data/locale/ru/LC_MESSAGES/rails.mo +0 -0
  26. data/data/locale/ru/LC_MESSAGES/rgettext.mo +0 -0
  27. data/data/locale/sv/LC_MESSAGES/rgettext.mo +0 -0
  28. data/data/locale/zh/LC_MESSAGES/rails.mo +0 -0
  29. data/data/locale/zh/LC_MESSAGES/rgettext.mo +0 -0
  30. data/ext/gettext/locale_system.c +3 -3
  31. data/lib/gettext.rb +149 -98
  32. data/lib/gettext/container.rb +3 -23
  33. data/lib/gettext/erb.rb +2 -2
  34. data/lib/gettext/locale_posix.rb +37 -5
  35. data/lib/gettext/locale_win32.rb +2 -1
  36. data/lib/gettext/mo.rb +6 -4
  37. data/lib/gettext/parser/activerecord.rb +7 -3
  38. data/lib/gettext/poparser.rb +2 -2
  39. data/lib/gettext/rails.rb +131 -112
  40. data/lib/gettext/rgettext.rb +3 -1
  41. data/lib/gettext/rmsgfmt.rb +3 -1
  42. data/lib/gettext/rmsgmerge.rb +3 -1
  43. data/lib/gettext/textdomain.rb +14 -8
  44. data/lib/gettext/textdomainmanager.rb +103 -0
  45. data/lib/gettext/version.rb +1 -1
  46. data/po/cs/rails.po +16 -16
  47. data/po/cs/rgettext.po +7 -3
  48. data/po/de/rails.po +16 -16
  49. data/po/de/rgettext.po +7 -3
  50. data/po/el/rails.po +16 -16
  51. data/po/el/rgettext.po +7 -3
  52. data/po/es/rails.po +16 -16
  53. data/po/es/rgettext.po +7 -3
  54. data/po/fr/rails.po +16 -16
  55. data/po/fr/rgettext.po +7 -3
  56. data/po/it/rails.po +79 -0
  57. data/po/it/rgettext.po +42 -32
  58. data/po/ja/rails.po +20 -18
  59. data/po/ja/rgettext.po +7 -3
  60. data/po/ko/rails.po +16 -16
  61. data/po/ko/rgettext.po +7 -3
  62. data/po/nl/rails.po +16 -16
  63. data/po/nl/rgettext.po +7 -3
  64. data/po/pt_BR/rails.po +16 -16
  65. data/po/pt_BR/rgettext.po +7 -3
  66. data/po/rails.pot +16 -16
  67. data/po/rgettext.pot +7 -3
  68. data/po/ru/rails.po +18 -18
  69. data/po/ru/rgettext.po +13 -9
  70. data/po/sv/rgettext.po +7 -3
  71. data/po/zh/rails.po +78 -0
  72. data/po/zh/rgettext.po +104 -0
  73. data/pre-setup.rb +1 -4
  74. data/samples/cgi/helloerb.rhtml +1 -0
  75. data/samples/cgi/locale/zh/LC_MESSAGES/helloerb1.mo +0 -0
  76. data/samples/cgi/locale/zh/LC_MESSAGES/helloerb2.mo +0 -0
  77. data/samples/cgi/locale/zh/LC_MESSAGES/hellolib.mo +0 -0
  78. data/samples/cgi/locale/zh/LC_MESSAGES/main.mo +0 -0
  79. data/samples/cgi/po/zh/helloerb1.po +60 -0
  80. data/samples/cgi/po/zh/helloerb2.po +52 -0
  81. data/samples/cgi/po/zh/hellolib.po +24 -0
  82. data/samples/cgi/po/zh/main.po +80 -0
  83. data/samples/hello.rb +28 -5
  84. data/samples/hello2.rb +13 -6
  85. data/samples/hello_noop.rb +20 -8
  86. data/samples/hello_plural.rb +16 -6
  87. data/samples/hello_textdomain.rb +13 -4
  88. data/samples/hellogtk.rb +5 -4
  89. data/samples/hellogtk2.rb +5 -6
  90. data/samples/locale/cs/LC_MESSAGES/hello2.mo +0 -0
  91. data/samples/locale/cs/LC_MESSAGES/hello_plural.mo +0 -0
  92. data/samples/locale/de/LC_MESSAGES/hello2.mo +0 -0
  93. data/samples/locale/de/LC_MESSAGES/hello_plural.mo +0 -0
  94. data/samples/locale/el/LC_MESSAGES/hello2.mo +0 -0
  95. data/samples/locale/el/LC_MESSAGES/hello_plural.mo +0 -0
  96. data/samples/locale/es/LC_MESSAGES/hello2.mo +0 -0
  97. data/samples/locale/es/LC_MESSAGES/hello_plural.mo +0 -0
  98. data/samples/locale/fr/LC_MESSAGES/hello2.mo +0 -0
  99. data/samples/locale/fr/LC_MESSAGES/hello_plural.mo +0 -0
  100. data/samples/locale/it/LC_MESSAGES/hello2.mo +0 -0
  101. data/samples/locale/it/LC_MESSAGES/hello_plural.mo +0 -0
  102. data/samples/locale/ja/LC_MESSAGES/hello2.mo +0 -0
  103. data/samples/locale/ja/LC_MESSAGES/hello_plural.mo +0 -0
  104. data/samples/locale/ko/LC_MESSAGES/hello2.mo +0 -0
  105. data/samples/locale/ko/LC_MESSAGES/hello_plural.mo +0 -0
  106. data/samples/locale/nl/LC_MESSAGES/hello2.mo +0 -0
  107. data/samples/locale/nl/LC_MESSAGES/hello_plural.mo +0 -0
  108. data/samples/locale/pt_BR/LC_MESSAGES/hello2.mo +0 -0
  109. data/samples/locale/pt_BR/LC_MESSAGES/hello_plural.mo +0 -0
  110. data/samples/locale/ru/LC_MESSAGES/hello2.mo +0 -0
  111. data/samples/locale/ru/LC_MESSAGES/hello_plural.mo +0 -0
  112. data/samples/locale/sv/LC_MESSAGES/hello2.mo +0 -0
  113. data/samples/locale/sv/LC_MESSAGES/hello_plural.mo +0 -0
  114. data/samples/locale/zh/LC_MESSAGES/hello.mo +0 -0
  115. data/samples/locale/zh/LC_MESSAGES/hello2.mo +0 -0
  116. data/samples/locale/zh/LC_MESSAGES/hello_noop.mo +0 -0
  117. data/samples/locale/zh/LC_MESSAGES/hello_plural.mo +0 -0
  118. data/samples/locale/zh/LC_MESSAGES/helloglade2.mo +0 -0
  119. data/samples/locale/zh/LC_MESSAGES/hellogtk.mo +0 -0
  120. data/samples/locale/zh/LC_MESSAGES/hellotk.mo +0 -0
  121. data/samples/po/cs/hello2.po +4 -4
  122. data/samples/po/cs/hello_plural.po +5 -5
  123. data/samples/po/de/hello2.po +4 -4
  124. data/samples/po/de/hello_plural.po +9 -6
  125. data/samples/po/el/hello2.po +4 -4
  126. data/samples/po/el/hello_plural.po +3 -3
  127. data/samples/po/es/hello2.po +4 -4
  128. data/samples/po/es/hello_plural.po +6 -6
  129. data/samples/po/fr/hello2.po +4 -4
  130. data/samples/po/fr/hello_plural.po +3 -3
  131. data/samples/po/hello2.pot +2 -2
  132. data/samples/po/hello_plural.pot +1 -1
  133. data/samples/po/it/hello2.po +4 -4
  134. data/samples/po/it/hello_plural.po +4 -5
  135. data/samples/po/ja/hello2.po +4 -4
  136. data/samples/po/ja/hello_plural.po +4 -5
  137. data/samples/po/ko/hello2.po +4 -4
  138. data/samples/po/ko/hello_plural.po +10 -7
  139. data/samples/po/nl/hello2.po +4 -4
  140. data/samples/po/nl/hello_plural.po +6 -7
  141. data/samples/po/pt_BR/hello2.po +4 -4
  142. data/samples/po/pt_BR/hello_plural.po +6 -6
  143. data/samples/po/ru/hello2.po +4 -4
  144. data/samples/po/ru/hello_plural.po +10 -7
  145. data/samples/po/sv/hello2.po +4 -4
  146. data/samples/po/sv/hello_plural.po +4 -4
  147. data/samples/po/zh/hello.po +23 -0
  148. data/samples/po/zh/hello2.po +31 -0
  149. data/samples/po/zh/hello_noop.po +27 -0
  150. data/samples/po/zh/hello_plural.po +25 -0
  151. data/samples/po/zh/helloglade2.po +31 -0
  152. data/samples/po/zh/hellogtk.po +23 -0
  153. data/samples/po/zh/hellotk.po +23 -0
  154. data/samples/rails/README +2 -2
  155. data/samples/rails/lib/tasks/gettext.rake +0 -3
  156. data/samples/rails/locale/cs/LC_MESSAGES/blog.mo +0 -0
  157. data/samples/rails/locale/de/LC_MESSAGES/blog.mo +0 -0
  158. data/samples/rails/locale/el/LC_MESSAGES/blog.mo +0 -0
  159. data/samples/rails/locale/en/LC_MESSAGES/blog.mo +0 -0
  160. data/samples/rails/locale/es/LC_MESSAGES/blog.mo +0 -0
  161. data/samples/rails/locale/fr/LC_MESSAGES/blog.mo +0 -0
  162. data/samples/rails/locale/it/LC_MESSAGES/blog.mo +0 -0
  163. data/samples/rails/locale/ja/LC_MESSAGES/blog.mo +0 -0
  164. data/samples/rails/locale/ko/LC_MESSAGES/blog.mo +0 -0
  165. data/samples/rails/locale/nl/LC_MESSAGES/blog.mo +0 -0
  166. data/samples/rails/locale/pt_BR/LC_MESSAGES/blog.mo +0 -0
  167. data/samples/rails/locale/ru/LC_MESSAGES/blog.mo +0 -0
  168. data/samples/rails/locale/zh/LC_MESSAGES/blog.mo +0 -0
  169. data/samples/rails/po/blog.pot +1 -1
  170. data/samples/rails/po/cs/blog.po +1 -1
  171. data/samples/rails/po/de/blog.po +1 -1
  172. data/samples/rails/po/el/blog.po +1 -1
  173. data/samples/rails/po/en/blog.po +3 -3
  174. data/samples/rails/po/es/blog.po +1 -1
  175. data/samples/rails/po/fr/blog.po +1 -1
  176. data/samples/rails/po/it/blog.po +109 -0
  177. data/samples/rails/po/ja/blog.po +1 -14
  178. data/samples/rails/po/ko/blog.po +2 -2
  179. data/samples/rails/po/nl/blog.po +1 -1
  180. data/samples/rails/po/pt_BR/blog.po +1 -1
  181. data/samples/rails/po/ru/blog.po +1 -2
  182. data/samples/rails/po/zh/blog.po +109 -0
  183. data/samples/rails/vendor/plugins/gettext/README +17 -0
  184. data/samples/rails/vendor/plugins/gettext/Rakefile +17 -0
  185. data/samples/rails/vendor/plugins/gettext/lib/gettext_plugin.rb +16 -35
  186. data/samples/rails/{locale → vendor/plugins/gettext/locale}/cs/LC_MESSAGES/gettext_plugin.mo +0 -0
  187. data/samples/rails/{locale → vendor/plugins/gettext/locale}/de/LC_MESSAGES/gettext_plugin.mo +0 -0
  188. data/samples/rails/{locale → vendor/plugins/gettext/locale}/el/LC_MESSAGES/gettext_plugin.mo +0 -0
  189. data/samples/rails/{locale → vendor/plugins/gettext/locale}/es/LC_MESSAGES/gettext_plugin.mo +0 -0
  190. data/samples/rails/{locale → vendor/plugins/gettext/locale}/fr/LC_MESSAGES/gettext_plugin.mo +0 -0
  191. data/samples/rails/vendor/plugins/gettext/locale/it/LC_MESSAGES/gettext_plugin.mo +0 -0
  192. data/samples/rails/{locale → vendor/plugins/gettext/locale}/ja/LC_MESSAGES/gettext_plugin.mo +0 -0
  193. data/samples/rails/{locale → vendor/plugins/gettext/locale}/ko/LC_MESSAGES/gettext_plugin.mo +0 -0
  194. data/samples/rails/{locale → vendor/plugins/gettext/locale}/nl/LC_MESSAGES/gettext_plugin.mo +0 -0
  195. data/samples/rails/{locale → vendor/plugins/gettext/locale}/pt_BR/LC_MESSAGES/gettext_plugin.mo +0 -0
  196. data/samples/rails/{locale → vendor/plugins/gettext/locale}/ru/LC_MESSAGES/gettext_plugin.mo +0 -0
  197. data/samples/rails/vendor/plugins/gettext/locale/zh/LC_MESSAGES/gettext_plugin.mo +0 -0
  198. data/samples/rails/{po → vendor/plugins/gettext/po}/cs/gettext_plugin.po +4 -4
  199. data/samples/rails/{po → vendor/plugins/gettext/po}/de/gettext_plugin.po +4 -4
  200. data/samples/rails/{po → vendor/plugins/gettext/po}/el/gettext_plugin.po +4 -4
  201. data/samples/rails/{po → vendor/plugins/gettext/po}/es/gettext_plugin.po +4 -4
  202. data/samples/rails/{po → vendor/plugins/gettext/po}/fr/gettext_plugin.po +4 -4
  203. data/samples/rails/{po → vendor/plugins/gettext/po}/gettext_plugin.pot +4 -4
  204. data/samples/rails/vendor/plugins/gettext/po/it/gettext_plugin.po +27 -0
  205. data/samples/rails/{po → vendor/plugins/gettext/po}/ja/gettext_plugin.po +4 -4
  206. data/samples/rails/{po → vendor/plugins/gettext/po}/ko/gettext_plugin.po +4 -4
  207. data/samples/rails/{po → vendor/plugins/gettext/po}/nl/gettext_plugin.po +4 -4
  208. data/samples/rails/{po → vendor/plugins/gettext/po}/pt_BR/gettext_plugin.po +4 -4
  209. data/samples/rails/{po → vendor/plugins/gettext/po}/ru/gettext_plugin.po +4 -5
  210. data/samples/rails/vendor/plugins/gettext/po/zh/gettext_plugin.po +27 -0
  211. data/test/gettext_test.rb +18 -14
  212. data/test/gettext_test_multi_textdomain.rb +49 -0
  213. data/test/locale/fr/LC_MESSAGES/test6.mo +0 -0
  214. data/test/locale/ja/LC_MESSAGES/test6.mo +0 -0
  215. data/test/po/fr/test6.po +23 -0
  216. data/test/po/ja/test6.po +23 -0
  217. data/test/test.sh +3 -1
  218. data/test/testlib1.rb +0 -5
  219. data/test/testlib5.rb +70 -0
  220. data/test/testlib6.rb +19 -0
  221. metadata +128 -26
  222. data/COPYING.ja +0 -51
  223. data/po/it/messages.mo +0 -0
  224. data/samples/cgi/po/it/messages.mo +0 -0
data/ChangeLog CHANGED
@@ -1,3 +1,116 @@
1
+ 2006-06-09 Masao Mutoh <mutoh@highway.ne.jp>
2
+
3
+ * samples/*.rb, samples/po/*: Code cleanup 2.
4
+
5
+ 2006-06-08 Masao Mutoh <mutoh@highway.ne.jp>
6
+
7
+ * lib/gettext/version.rb: Increment minor version.
8
+ * lib/gettext/locale_posix.rb: Code cleanup.
9
+ * test/testlib5.rb: Added.
10
+
11
+ 2006-06-07 Masao Mutoh <mutoh@highway.ne.jp>
12
+
13
+ * lib/gettext.rb: GetText.set_locale accept 2nd parameter.
14
+ * test/testlib6.rb, test/po/{ja|fr}/test6.po: Added previous test.
15
+ * samples/*.rb, samples/po/*: Code cleanup.
16
+
17
+ 2006-06-05 Masao Mutoh <mutoh@highway.ne.jp>
18
+
19
+ * samples/hello.rb: Code cleanup.
20
+ * lib/gettext/rgettext.rb: Show ruby version with -v option.
21
+ * lib/gettext/rmsgfmt.rb: ditto.
22
+ * lib/gettext/rmsgmerge.rb: ditto.
23
+
24
+ 2006-06-04 Masao Mutoh <mutoh@highway.ne.jp>
25
+
26
+ * lib/gettext.rb: Fixed a bug when options is set nil.
27
+ * lib/gettext/locale_posix.rb: Fixed the search order of environment
28
+ variables. Reported by markus koller.
29
+ * ext/gettext/locale_system.c: Returns nil if locale is not set.
30
+ * Rakefile: Added makemo task for samples/rails/vendor/plugins/gettext/po.
31
+ * test/gettext_test_multi_textdomain.rb: Added.
32
+
33
+ 2006-05-31 Masao Mutoh <mutoh@highway.ne.jp>
34
+
35
+ * samples/rails/vendor/plugins/gettext/lib/gettext_plugin.rb: Rewrite
36
+ to support new bindtextdomain.
37
+ * samples/rails/vendor/plugins/gettext/{po|locale}/*: Move gettext_plugin.{po|mo}
38
+ from samples/rails/{po|locale}/*. Now Rails plugins can release their po/mo-files
39
+ under their own directory(/vendor/plugins/plugindir/{po|locale}).
40
+ * samples/rails/vendor/plugins/gettext/Rakefile, README: Added.
41
+ * samples/rails/lib/tasks/gettext.rake. Move gettext_plugin target to
42
+ /vendor/plugins/gettext/Rakefile.
43
+ * samples/rails/README: Updated.
44
+
45
+ 2006-05-30 Masao Mutoh <mutoh@highway.ne.jp>
46
+
47
+ * lib/gettext.rb: The scope of a textdomain becomes a class/module base
48
+ instead of a file base.
49
+ Accept plural textdomains in a class/module.
50
+ Changed bindtextdomain arguments with backward compatibility.
51
+ * lib/gettext/textdomainmanager.rb: Added for manage plural textdomains.
52
+ * lib/gettext/textdomain.rb: Fix wrong DEFAULT_LOCALE_PATHS if ruby is
53
+ installed non-standard path.
54
+ * lib/gettext/rails.rb: Changed arguments of bindtextdomain, init_gettext
55
+ with backward compatibility.
56
+
57
+ 2006-05-29 Masao Mutoh <mutoh@highway.ne.jp>
58
+
59
+ * lib/gettext/rails.rb:
60
+ Remove GetText::Rails.use_localized_templates.
61
+
62
+ 2006-05-24 Masao Mutoh <mutoh@highway.ne.jp>
63
+
64
+ * lib/gettext/locale_win32.rb: Fix to work with environment
65
+ variables.
66
+
67
+ 2006-05-22 Masao Mutoh <mutoh@highway.ne.jp>
68
+
69
+ * lib/gettext.rb, lib/gettext/textdomain.rb: Keep a textdomain
70
+ per a class instead of per a file.
71
+
72
+ 2006-05-21 Masao Mutoh <mutoh@highway.ne.jp>
73
+
74
+ * lib/gettext/rails.rb: Problem when ActionMailer isn't defined.
75
+ Reported by Gudao Luo.
76
+
77
+ 2006-05-20 Masao Mutoh <mutoh@highway.ne.jp>
78
+
79
+ * lib/gettext/mo.rb: Improved to compare the file time stamps.
80
+ by Nobu Nakada.
81
+
82
+ 2006-05-18 Masao Mutoh <mutoh@highway.ne.jp>
83
+
84
+ * lib/gettext/mo.rb: Fix MOFile#update! works on MS Windows.
85
+ * po/it/rails.po, samples/rails/po/it/*.po: Added by Marco Lazzeri.
86
+
87
+ 2006-05-16 Masao Mutoh <mutoh@highway.ne.jp>
88
+
89
+ * Rakefile: Remove dependency - makemo => poparser.
90
+ Reported by Marco Lazzeri.
91
+
92
+ 2006-05-14 Masao Mutoh <mutoh@highway.ne.jp>
93
+
94
+ * README: Updated.
95
+ * **/po/zh/*.po: Added zh_CN locale by Yingfeng.
96
+ * pre-setup.rb: Remove to call "rails setup" now needless.
97
+ Reported by Hiroyuki Iwatsuki.
98
+
99
+ 2006-05-11 Masao Mutoh <mutoh@highway.ne.jp>
100
+
101
+ * Rakefile: Make samples/rails/log if it's not exisited in
102
+ makemo task.
103
+ * lib/gettext/parser/activerecord.rb: Fixed to work
104
+ Gem-less environment.
105
+ Reported by Nobuhiro IMAI.
106
+
107
+ 2006-05-10 Masao Mutoh <mutoh@highway.ne.jp>
108
+
109
+ * lib/gettext/rails.rb: Fixed custom messages was not
110
+ translated of validation_length_of.
111
+ Reported by babie, charlie.
112
+ * po/ja/rails.po: Separate plural/single messages.
113
+
1
114
  2006-05-07 Masao Mutoh <mutoh@highway.ne.jp>
2
115
 
3
116
  * lib/gettext/version.rb: Increment revision number.
data/NEWS CHANGED
@@ -1,10 +1,26 @@
1
+ = Ruby-GetText-Package-1.6.0 (2006-06-09)
2
+
3
+ * Support Chinese(zh_CN), Italian(it).
4
+ * Improve the way to manage textdomains.
5
+ * A class/module can have plural textdomains.
6
+ * A textdomain belong to a class/module.
7
+ * A class/module can have plural textdomains.
8
+ * A message is looked up in its class/module and ancestors.
9
+
10
+ You don't need to call bindtextdomain in each files.
11
+ # A textdomain belong to a file in previous version.
12
+ # And a message is looked up in the file which called
13
+ # GetText functions only.
14
+ * Fix bugs
15
+ * Samples are cleaned up.
16
+
1
17
  = Ruby-GetText-Package-1.5.0 (2006-05-07)
2
18
 
3
19
  * Support Russian.
4
20
  * Fix bugs.
5
21
  * Refresh mo option was added.
6
22
  Check mo files and reload it if it's updated.
7
- ruby -d or GetText::TextDomain#check_mo=(true).
23
+ ruby -d or GetText::TextDomain.check_mo=(true).
8
24
  Or development mode in Ruby on Rails.
9
25
 
10
26
  = Ruby-GetText-Package-1.4.0 (2006-04-15)
data/README CHANGED
@@ -25,12 +25,16 @@ Ruby-Gettext-Package
25
25
  * rmsgfmt creates a mo-file from a po-file.
26
26
  The mo-file is compatible to GNU gettext(msgfmt).
27
27
 
28
- * 2 kind of textdomain's scope
29
- * A file base (default: recommanded)
30
- * A Class/Module base
31
- (GetText::Container, GetText::ErbContainer, GetText::Rails)
28
+ * textdomain's scope is adapt to ruby class/module mechanism.
29
+ * A class/module can have plural textdomains.
30
+ * a message is looked up in its class/module and ancestors.
31
+
32
+ * Locale is retrieved from System variables (ENV['LANG'], POSIX, Win32)
32
33
 
33
34
  * CGI support (gettext/cgi)
35
+ * Locale is retrieved from client informations
36
+ (HTTP_ACCEPT_LANGUAGE, HTTP_ACCEPT_CHARSET, QUERY_STRING(lang),
37
+ Cookies(lang)).
34
38
 
35
39
  * ERB support (gettext/erb)
36
40
 
@@ -49,17 +53,20 @@ Requirements
49
53
  * Racc-1.4.3 or later
50
54
  <http://www.ruby-lang.org/raa/list.rhtml?name=racc>
51
55
  (for compiling src/rmsgfmt.ry only)
52
- * Ruby on Rails 1.0.0 or later (if you use this package with Ruby on Rails)
56
+ * Ruby on Rails 1.1.2 or later (if you use this package with Ruby on Rails)
53
57
  <http://www.rubyonrails.org/>
54
58
 
55
59
  Install
56
60
  -------
61
+ gem:
62
+ ($ su)
63
+ # gem install gettext
57
64
 
58
- De-Compress archive and enter its top directory.
59
- Then type:
60
-
61
- ($ su)
62
- # ruby setup.rb
65
+ tar-ball:
66
+ De-Compress archive and enter its top directory.
67
+ Then type:
68
+ ($ su)
69
+ # ruby setup.rb
63
70
 
64
71
  You can also install files in your favor directory by
65
72
  supplying setup.rb some options. Try "ruby setup.rb --help".
@@ -80,59 +87,62 @@ License
80
87
  (See the file 'COPYING'.)
81
88
 
82
89
  * mo.rb
83
- Copyright (C) 2001-2004 Masao Mutoh <mutoh@highwhay.ne.jp>
84
- Copyright (C) 2001,2002 Masahiro Sakai <s01397ms@sfc.keio.ac.jp>
90
+ Copyright (C) 2001-2006 Masao Mutoh <mutoh at highwhay.ne.jp>
91
+ Copyright (C) 2001,2002 Masahiro Sakai <s01397ms at sfc.keio.ac.jp>
85
92
 
86
93
  * gettext.rb
87
- Copyright (C) 2001-2005 Masao Mutoh <mutoh@highwhay.ne.jp>
88
- Copyright (C) 2001,2002 Masahiro Sakai <s01397ms@sfc.keio.ac.jp>
94
+ Copyright (C) 2001-2006 Masao Mutoh <mutoh at highwhay.ne.jp>
95
+ Copyright (C) 2001,2002 Masahiro Sakai <s01397ms at sfc.keio.ac.jp>
89
96
 
90
97
  * rgettext
91
- Copyright (C) 2001-2005 Masao Mutoh <mutoh@highwhay.ne.jp>
92
- Copyright (C) 2001,2002 Yasushi Shoji <yashi@yashi.com>
98
+ Copyright (C) 2001-2006 Masao Mutoh <mutoh at highwhay.ne.jp>
99
+ Copyright (C) 2001,2002 Yasushi Shoji <yashi at yashi.com>
93
100
 
94
101
  * setup.rb
95
- Copyright (C) 2000-2005 Minero Aoki <aamine@loveruby.net>
102
+ Copyright (C) 2000-2005 Minero Aoki <aamine at loveruby.net>
96
103
  This file is released under LGPL. See the top of the install.rb.
97
104
 
98
105
  * Others
99
- Copyright (C) 2001-2006 Masao Mutoh <mutoh@highwhay.ne.jp>
106
+ Copyright (C) 2001-2006 Masao Mutoh <mutoh at highwhay.ne.jp>
100
107
 
101
108
 
102
109
  Translators
103
110
  -----------
104
- Czech(cs) - Karel Miarka <kajism at yahoo.com>
105
- Dutch(nl) - Menno Jonkers <ruby-gettext at jonkers.com>
106
- French(fr) - Laurent Sansonetti <laurent.sansonetti at gmail.com>
107
- German(de) - Detlef Reichl <detlef.reichl at gmx.org>
108
- Sven Herzberg <herzi at abi02.de>
109
- Sascha Ebach <se at digitale-wertschoepfung.de>
110
- Greek(el) - Damphyr <damphyr at gmx.net>
111
- Italian(it) - Gabriele Renzi <surrender_it at yahoo.it>
112
- Japanese(ja) - Masao Mutoh <mutoh at highway.ne.jp>
113
- Korean(ko) - Gyoung-Yoon Noh <nohmad at gmail.com>
114
- Portuguese(Brazil)(pt_BR) - Joao Pedrosa <joaopedrosa at gmail.com>
115
- Russian(ru) - Yuri Kozlov <kozlov.y at gmail.com>
116
- Spanish(es) - David Espada <davinci at escomposlinux.org> (current)
117
- David Moreno Garza <damog at damog.net>
118
- Swedish(sv) - Nikolai Weibull <mailing-lists.ruby-talk at rawuncut.elitemail.org>
111
+ Chinese(Simplified)(zh_CN) - Yingfeng <blogyingfeng at gmail.com>
112
+ Czech(cs) - Karel Miarka <kajism at yahoo.com>
113
+ Dutch(nl) - Menno Jonkers <ruby-gettext at jonkers.com>
114
+ French(fr) - Laurent Sansonetti <laurent.sansonetti at gmail.com>
115
+ German(de) - Detlef Reichl <detlef.reichl at gmx.org>
116
+ Sven Herzberg <herzi at abi02.de>
117
+ Sascha Ebach <se at digitale-wertschoepfung.de>
118
+ Greek(el) - Damphyr <damphyr at gmx.net>
119
+ Italian(it) - Marco Lazzeri <marco.lazzeri at gmail.com>
120
+ Gabriele Renzi <surrender_it at yahoo.it>
121
+ Japanese(ja) - Masao Mutoh <mutoh at highway.ne.jp>
122
+ Korean(ko) - Gyoung-Yoon Noh <nohmad at gmail.com>
123
+ Portuguese(Brazil)(pt_BR) - Joao Pedrosa <joaopedrosa at gmail.com>
124
+ Russian(ru) - Yuri Kozlov <kozlov.y at gmail.com>
125
+ Spanish(es) - David Espada <davinci at escomposlinux.org> (current)
126
+ David Moreno Garza <damog at damog.net>
127
+ Swedish(sv) - Nikolai Weibull <mailing-lists.ruby-talk at rawuncut.elitemail.org>
119
128
 
120
129
  Status of translations
121
130
  ----------------------
122
- Czech(cs) - 1.5.0
123
- Dutch(nl) - 1.5.0
124
- English(default) - 1.5.0
125
- French(fr) - 1.5.0
126
- German(de) - 1.5.0
127
- Greek(el) - 1.5.0
128
- Spanish(es) - 1.5.0
129
- Italian(it) - 1.0.0 (old)
130
- Japanese(ja) - 1.5.0
131
- Korean(ko) - 1.5.0
132
- Portuguese(Brazil)(pt_BR) - 1.5.0
133
- Russian(ru) - 1.5.0
131
+ Chinese(zh) - 1.6.0
132
+ Czech(cs) - 1.6.0
133
+ Dutch(nl) - 1.6.0
134
+ English(default) - 1.6.0
135
+ French(fr) - 1.6.0
136
+ German(de) - 1.6.0
137
+ Greek(el) - 1.6.0
138
+ Spanish(es) - 1.6.0
139
+ Italian(it) - 1.6.0
140
+ Japanese(ja) - 1.6.0
141
+ Korean(ko) - 1.6.0
142
+ Portuguese(Brazil)(pt_BR) - 1.6.0
143
+ Russian(ru) - 1.6.0
134
144
  Swedish(sv) - 0.8.0 (old)
135
145
 
136
146
  Maintainer
137
147
  ----------
138
- Masao Mutoh <mutoh@highway.ne.jp>
148
+ Masao Mutoh <mutoh at highway.ne.jp>
data/Rakefile CHANGED
@@ -81,9 +81,11 @@ task :makemo_test do
81
81
  end
82
82
 
83
83
  desc "Create *.mo from *.po"
84
- task :makemo => [:poparser, :makemo_test] do
84
+ task :makemo => [:makemo_test] do
85
85
  $stderr.puts "Create rgettext/rmsgfmt mo files."
86
- GetText.create_mofiles(true)
86
+ mkdir_p "samples/rails/log" unless FileTest.exist? "samples/rails/log"
87
+
88
+ GetText.create_mofiles(false)
87
89
 
88
90
  $stderr.puts "Create samples mo files."
89
91
  GetText.create_mofiles(false, "samples/po", "samples/locale")
@@ -94,6 +96,8 @@ task :makemo => [:poparser, :makemo_test] do
94
96
  $stderr.puts "Create samples/rails mo files."
95
97
  GetText.create_mofiles(false, "samples/rails/po", "samples/rails/locale")
96
98
 
99
+ $stderr.puts "Create samples/rails plugin mo files."
100
+ GetText.create_mofiles(false, "samples/rails/vendor/plugins/gettext/po", "samples/rails/vendor/plugins/gettext/locale")
97
101
  end
98
102
 
99
103
  desc "Update pot/po files to match new version."
@@ -5,7 +5,7 @@
5
5
  * You may redistribute it and/or modify it under the same
6
6
  * license terms as Ruby.
7
7
  *
8
- * $Id: locale_system.c,v 1.5 2006/04/15 03:58:52 mutoh Exp $
8
+ * $Id: locale_system.c,v 1.6 2006/06/04 14:43:37 mutoh Exp $
9
9
  */
10
10
 
11
11
  #include "ruby.h"
@@ -39,9 +39,9 @@ gt_setlocale(self, type, locale)
39
39
  # if defined HAVE_SETLOCALE
40
40
  char* ret = setlocale(NUM2INT(type),
41
41
  NIL_P(locale) ? NULL : StringValuePtr(locale));
42
- return ret == NULL ? rb_str_new2("C") : rb_str_new2(ret);
42
+ return ret == NULL ? Qnil : rb_str_new2(ret);
43
43
  # else
44
- return rb_str_new2("C");
44
+ return Qnil;
45
45
  # endif
46
46
  }
47
47
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  gettext.rb - GetText module
3
3
 
4
- Copyright (C) 2001-2005 Masao Mutoh
4
+ Copyright (C) 2001-2006 Masao Mutoh
5
5
  Copyright (C) 2001-2003 Masahiro Sakai
6
6
 
7
7
  Masao Mutoh <mutoh@highway.ne.jp>
@@ -10,14 +10,14 @@
10
10
  You may redistribute it and/or modify it under the same
11
11
  license terms as Ruby.
12
12
 
13
- $Id: gettext.rb,v 1.11 2006/03/15 16:34:05 mutoh Exp $
13
+ $Id: gettext.rb,v 1.14 2006/06/07 15:56:04 mutoh Exp $
14
14
  =end
15
15
 
16
16
  require 'rbconfig'
17
17
  require 'gettext/version'
18
18
  require 'gettext/mo'
19
19
  require 'gettext/locale'
20
- require 'gettext/textdomain'
20
+ require 'gettext/textdomainmanager'
21
21
  require 'gettext/string'
22
22
 
23
23
  module GetText
@@ -25,10 +25,11 @@ module GetText
25
25
  class NoboundTextDomainError < RuntimeError
26
26
  end
27
27
 
28
- @@__textdomain = Hash.new
29
- @@__textdomain_key = Hash.new
28
+ def self.included(mod) #:nodoc:
29
+ mod.extend self
30
+ end
30
31
 
31
- @@__output_charset = nil
32
+ @@__textdomainmanagers = Hash.new
32
33
 
33
34
  # Bind a textdomain(%{path}/%{locale}/LC_MESSAGES/%{domainname}.mo) to your program.
34
35
  # Normally, the texdomain scope becomes a ruby-script-file.
@@ -37,47 +38,44 @@ module GetText
37
38
  #(gettext/container, gettext/erb, gettext/rails), the textdomain scope becomes a Class/Module.
38
39
  #
39
40
  # * domainname: the textdomain name.
40
- # * path: the path to the mo-files. When the value is nil, it will search default paths such as
41
- # /usr/share/locale, /usr/local/share/locale)
42
- # * locale: the locale string such as "ja_JP.UTF-8". Generally, you should use GetText.set_locale instead.
43
- # the value is searched order by:
41
+ # * options: options as an Hash.
42
+ # * :path - the path to the mo-files. When the value is nil, it will search default paths such as
43
+ # /usr/share/locale, /usr/local/share/locale)
44
+ # * :locale - the locale string such as "ja_JP.UTF-8". Generally, you should use GetText.set_locale instead.
45
+ # The value is searched order by:
44
46
  #
45
- # the value of this value > System default language.
47
+ # the value of this value > System default language.
46
48
  #
47
- # * charset: output charset. This affect the current textdomain only. Generally, you should use GetText.set_output_charset instead.
48
- # the value is searched order by:
49
+ # * :charset - output charset. This affect the current textdomain only. Generally, you should use GetText.set_output_charset instead.
50
+ # The value is searched order by:
49
51
  #
50
- # the value of Locale.set_output_charset > ENV["OUTPUT_CHARSET"] > this value > System default charset.
52
+ # the value of Locale.set_output_charset > ENV["OUTPUT_CHARSET"] > this value > System default charset.
51
53
  # * Returns: the GetText::TextDomain.
52
54
  #
53
- def bindtextdomain(domainname, path = nil, locale_ = nil, charset = nil)
54
- locale = locale_ ? Locale::Object.new(locale_) : Locale.get
55
- if @@__output_charset
56
- # Set global setting forcely.
57
- charset = @@__output_charset
58
- else
59
- charset = ENV["OUTPUT_CHARSET"] if ENV["OUTPUT_CHARSET"]
60
- @@__output_charset = charset
61
- end
62
- locale.charset = charset if charset
63
- Locale.set_current(locale)
64
-
65
- src = callersrc
66
- $stderr.print "bind the domain '#{domainname}' to '#{src}'. locale is #{locale.inspect}\n" if $DEBUG
67
- textdomain = @@__textdomain[src]
68
- unless textdomain
69
- textdomain = @@__textdomain_key[domainname]
70
- @@__textdomain[src] = textdomain
55
+ # Note: Don't use locale_, charset argument(not in options).
56
+ # They are remained for backward compatibility.
57
+ #
58
+ def bindtextdomain(domainname, options = {}, locale_ = nil, charset = nil)
59
+ opt = {}
60
+ if options.kind_of? String
61
+ # For backward compatibility
62
+ opt = {:path => options, :locale => locale_, :charset => charset}
63
+ elsif options
64
+ opt = options
71
65
  end
72
-
73
- textdomain.set_locale(locale) if textdomain
74
-
75
- if ! textdomain or ! textdomain.same_property?(domainname, path, locale)
76
- textdomain = TextDomain.new(domainname, path, locale)
77
- @@__textdomain_key[domainname] = textdomain
78
- @@__textdomain[src] = textdomain
66
+ opt[:locale] = opt[:locale] ? Locale::Object.new(opt[:locale]) : Locale.get
67
+ opt[:charset] = output_charset if output_charset
68
+ locale.charset = opt[:charset] if opt[:charset]
69
+ Locale.set_current(opt[:locale])
70
+ manager = @@__textdomainmanagers[bound_target]
71
+ if manager
72
+ manager.set_locale(opt[:locale])
73
+ else
74
+ manager = TextDomainManager.new(bound_target, opt[:locale])
75
+ @@__textdomainmanagers[bound_target] = manager
79
76
  end
80
- @@__textdomain[src]
77
+ manager.add_textdomain(domainname, opt)
78
+ manager
81
79
  end
82
80
 
83
81
  # Binds a existed textdomain to your program.
@@ -87,13 +85,49 @@ module GetText
87
85
  # * domainname: a textdomain name.
88
86
  # * Returns: the GetText::TextDomain.
89
87
  def textdomain(domainname)
90
- src = callersrc
91
- textdomain = @@__textdomain_key[domainname]
92
- raise NoboundTextDomainError, "#{domainname} is not bound." unless textdomain
93
- textdomain.set_locale(Locale.current)
94
- @@__textdomain[src] = textdomain
95
- $stderr.print "Use the domain '#{domainname}' to '#{src}'. locale is #{textdomain.current_locale.inspect}\n" if $DEBUG
96
- @@__textdomain[src]
88
+ domain = TextDomainManager.textdomain(domainname)
89
+ raise NoboundTextDomainError, "#{domainname} is not bound." unless domain
90
+ manager = @@__textdomainmanagers[bound_target]
91
+ unless manager
92
+ manager = TextDomainManager.new(bound_target, Locale.get)
93
+ @@__textdomainmanagers[bound_target] = manager
94
+ end
95
+ manager.add_textdomain(domainname)
96
+ manager.set_locale(Locale.get)
97
+ end
98
+
99
+ TARGET_REGEXP = /\:\:/ # :nodoc:
100
+
101
+ # Iterates bound textdomains.
102
+ # * klass: a class/module to find. Default is the class of self.
103
+ # * ignore_targets: Ignore tragets.
104
+ # * Returns: a bound GetText::TextDomain or nil.
105
+ def each_textdomain(klass = bound_target, ignore_targets = [])
106
+ (klass.ancestors + [GetText]).each do |target|
107
+ unless ignore_targets.include? target
108
+ ignore_targets << target
109
+ manager = @@__textdomainmanagers[target]
110
+ if manager
111
+ manager.each{ |textdomain|
112
+ yield textdomain
113
+ }
114
+ end
115
+ if target.to_s =~ TARGET_REGEXP
116
+ each_textdomain(Module.const_get($`), ignore_targets){|domain|
117
+ yield domain
118
+ }
119
+ end
120
+ end
121
+ end
122
+ self
123
+ end
124
+
125
+ def bound_target # :nodoc:
126
+ if self.kind_of? Class or self.kind_of? Module
127
+ self
128
+ else
129
+ self.class
130
+ end
97
131
  end
98
132
 
99
133
  # call-seq:
@@ -104,8 +138,12 @@ module GetText
104
138
  # * msgid: the message id.
105
139
  # * Returns: localized text by msgid. If there are not binded mo-file, it will return msgid.
106
140
  def gettext(msgid)
107
- textdomain = @@__textdomain[callersrc]
108
- textdomain ? textdomain.gettext(msgid) : msgid
141
+ ret = nil
142
+ each_textdomain {|textdomain|
143
+ ret = textdomain.gettext(msgid)
144
+ break if ret
145
+ }
146
+ ret ? ret : msgid
109
147
  end
110
148
 
111
149
  # call-seq:
@@ -132,8 +170,12 @@ module GetText
132
170
  msgid_plural = arg2
133
171
  n = arg3
134
172
  end
135
- textdomain = @@__textdomain[callersrc]
136
- textdomain.ngettext(msgid, msgid_plural, n)
173
+ ret = nil
174
+ each_textdomain {|textdomain|
175
+ ret = textdomain.ngettext(msgid, msgid_plural, n)
176
+ break if ret
177
+ }
178
+ ret ? ret : (n == 1 ? msgid : msgid_plural)
137
179
  end
138
180
 
139
181
  # This function does nothing. But it is required in order to recognize the msgid by rgettext.
@@ -164,12 +206,7 @@ module GetText
164
206
  # it returns a last part of msgid separeted "div".
165
207
  # See: http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#SEC151
166
208
  def sgettext(msgid, div = '|')
167
- textdomain = @@__textdomain[callersrc]
168
- if textdomain
169
- msg = textdomain.gettext(msgid)
170
- else
171
- msg = msgid
172
- end
209
+ msg = gettext(msgid)
173
210
  if msg == msgid
174
211
  if index = msg.rindex(div)
175
212
  msg = msg[(index + 1)..-1]
@@ -178,32 +215,63 @@ module GetText
178
215
  msg
179
216
  end
180
217
 
181
- def callersrc # :nodoc:
182
- caller(2)[0].sub(/:\d+(?::in \`\S+\')?\Z/, '')
218
+ # Sets locale to the current class/module
219
+ #
220
+ # Notice that you shouldn't use this for your own Libraries.
221
+ # * locale: a locale string or Locale::Object.
222
+ # * this_target_only: true if you want to change the current class/module only.
223
+ # Otherwise, this changes the locale of the current class/module and its ancestors.
224
+ # Default is false.
225
+ # * Returns: self
226
+ def set_locale(locale, this_target_only = false)
227
+ ret = nil
228
+ if locale
229
+ if locale.kind_of? Locale::Object
230
+ ret = locale
231
+ else
232
+ ret = Locale::Object.new(locale.to_s)
233
+ end
234
+ ret.charset = output_charset if output_charset
235
+ Locale.set(ret)
236
+ else
237
+ Locale.clear
238
+ ret = Locale.get
239
+ end
240
+ if this_target_only
241
+ manager = @@__textdomainmanagers[bound_target]
242
+ if manager
243
+ manager.set_locale(ret)
244
+ end
245
+ else
246
+ each_textdomain {|textdomain|
247
+ textdomain.set_locale(ret)
248
+ }
249
+ end
250
+ self
183
251
  end
184
252
 
185
- # Sets locale such as "de", "fr", "it", "ko", "ja_JP.eucJP", "zh_CN.EUC" ...
253
+ # Sets locale to the all textdomains.
186
254
  #
187
255
  # Notice that you shouldn't use this for your own Libraries.
188
256
  # * locale: a locale string or Locale::Object.
189
- # * src: internal usage only. You shouldn't use this.
190
257
  # * Returns: self
191
- def set_locale(locale, src = callersrc)
258
+ def set_locale_all(locale)
259
+ ret = nil
192
260
  if locale
193
261
  if locale.kind_of? Locale::Object
194
262
  ret = locale
195
263
  else
196
264
  ret = Locale::Object.new(locale.to_s)
197
265
  end
198
- ret.charset = @@__output_charset if @@__output_charset
266
+ ret.charset = output_charset if output_charset
267
+ Locale.set(ret)
199
268
  else
200
- ret = nil
269
+ Locale.set(nil)
270
+ ret = Locale.get
201
271
  end
202
- Locale.set(ret)
203
-
204
- textdomain = @@__textdomain[src]
205
- textdomain.set_locale(ret, true) if textdomain
206
-
272
+ TextDomainManager.each_all {|textdomain|
273
+ textdomain.set_locale(ret)
274
+ }
207
275
  self
208
276
  end
209
277
 
@@ -212,7 +280,7 @@ module GetText
212
280
  # * src: internal usage only. You shouldn't use this.
213
281
  # * Returns: a locale string
214
282
  def locale=(locale)
215
- set_locale(locale, callersrc)
283
+ set_locale(locale)
216
284
  locale
217
285
  end
218
286
 
@@ -221,7 +289,7 @@ module GetText
221
289
  # * charset: an output_charset
222
290
  # * Returns: charset
223
291
  def set_output_charset(charset)
224
- @@__output_charset = charset
292
+ TextDomainManager.output_charset = charset
225
293
  self
226
294
  end
227
295
 
@@ -229,13 +297,13 @@ module GetText
229
297
  # * charset: an output_charset
230
298
  # * Returns: charset
231
299
  def output_charset=(charset)
232
- @@__output_charset = charset
300
+ TextDomainManager.output_charset = charset
233
301
  end
234
302
 
235
303
  # Gets the current output_charset which is set using GetText.set_output_charset.
236
304
  # * Returns: output_charset.
237
305
  def output_charset
238
- @@__output_charset
306
+ TextDomainManager.output_charset
239
307
  end
240
308
 
241
309
  # Gets the current locale.
@@ -244,30 +312,14 @@ module GetText
244
312
  Locale.current
245
313
  end
246
314
 
247
- # Sets a charset(String) such as "euc-jp", "sjis", "CP932", "utf-8", ...
248
- # This affect he current textdomain only.
249
- # Generaly you should use GetText.output_charset= instead.
250
- # And you shouldn't use this in your own Libraries.
251
- # * charset: an charset
252
- # * src: internal usage only. You shouldn't use this.
253
- # * Returns: self
254
- def set_charset(cs, src = callersrc)
255
- textdomain = @@__textdomain[src]
256
- if textdomain
257
- locale = textdomain.current_locale
258
- locale ||= Locale.current
259
- locale.charset = cs if locale
260
- textdomain.set_locale(locale, true)
261
- Locale.set_current(locale)
262
- end
315
+ # Deprecated. Now this function do nothing. Use GetText.output_charset= instead.
316
+ def set_charset(cs)
317
+ $stderr.puts "Deprecated. Now this function do nothing. Use GetText.output_charset= instead." if $DEBUG
263
318
  self
264
319
  end
265
320
 
266
- # Same as GetText.set_charset.
267
- # * charset: an charset
268
- # * Returns: charset
269
- def charset=(cs)
270
- set_charset(cs, callersrc)
321
+ def charset=(cs) #:nodoc:
322
+ set_charset(cs)
271
323
  cs
272
324
  end
273
325
 
@@ -284,9 +336,8 @@ module GetText
284
336
  alias :n_ :ngettext #:nodoc:
285
337
  alias :s_ :sgettext #:nodoc:
286
338
 
287
- module_function :bindtextdomain, :textdomain,
288
- :N_, :gettext, :_, :ngettext, :n_,
289
- :sgettext, :s_, :callersrc,
290
- :setlocale, :set_locale, :locale=, :locale, :charset=, :set_charset,
339
+ module_function :bindtextdomain, :textdomain, :each_textdomain,
340
+ :N_, :gettext, :_, :ngettext, :n_, :sgettext, :s_, :bound_target,
341
+ :setlocale, :set_locale, :locale=, :set_locale_all, :locale, :charset=, :set_charset,
291
342
  :set_output_charset, :output_charset=, :output_charset
292
343
  end