gettext 1.0.0 → 1.1.0

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.
Files changed (288) hide show
  1. data/ChangeLog +194 -0
  2. data/NEWS +49 -0
  3. data/README +28 -9
  4. data/Rakefile +54 -41
  5. data/bin/rgettext +2 -0
  6. data/bin/rmsgfmt +2 -0
  7. data/bin/rmsgmerge +24 -0
  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/es/LC_MESSAGES/rails.mo +0 -0
  13. data/data/locale/es/LC_MESSAGES/rgettext.mo +0 -0
  14. data/data/locale/fr/LC_MESSAGES/rails.mo +0 -0
  15. data/data/locale/fr/LC_MESSAGES/rgettext.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/sv/LC_MESSAGES/rgettext.mo +0 -0
  26. data/lib/gettext.rb +17 -4
  27. data/lib/gettext/cgi.rb +34 -19
  28. data/lib/gettext/locale.rb +3 -13
  29. data/lib/gettext/locale_default.rb +2 -2
  30. data/lib/gettext/locale_win32.rb +27 -7
  31. data/lib/gettext/mo.rb +6 -1
  32. data/lib/gettext/parser/activerecord.rb +115 -0
  33. data/lib/gettext/parser/glade.rb +3 -1
  34. data/lib/gettext/parser/ruby.rb +56 -57
  35. data/lib/gettext/poparser.rb +297 -0
  36. data/lib/gettext/rails.rb +161 -3
  37. data/lib/gettext/rgettext.rb +19 -9
  38. data/lib/gettext/rmsgfmt.rb +7 -275
  39. data/lib/gettext/rmsgmerge.rb +381 -0
  40. data/lib/gettext/string.rb +26 -0
  41. data/lib/gettext/textdomain.rb +21 -18
  42. data/lib/gettext/utils.rb +55 -0
  43. data/lib/gettext/version.rb +1 -1
  44. data/po/cs/rails.po +83 -0
  45. data/po/cs/rgettext.po +104 -0
  46. data/po/de/rails.po +79 -0
  47. data/po/de/rgettext.po +72 -21
  48. data/po/es/rails.po +80 -0
  49. data/po/es/rgettext.po +75 -19
  50. data/po/fr/rails.po +81 -0
  51. data/po/fr/rgettext.po +75 -19
  52. data/po/it/rgettext.po +68 -17
  53. data/po/ja/rails.po +78 -0
  54. data/po/ja/rgettext.po +71 -20
  55. data/po/ko/rails.po +77 -0
  56. data/po/ko/rgettext.po +74 -22
  57. data/po/nl/rails.po +80 -0
  58. data/po/nl/rgettext.po +102 -0
  59. data/po/pt_BR/rails.po +79 -0
  60. data/po/pt_BR/rgettext.po +77 -24
  61. data/po/rails.pot +80 -0
  62. data/po/rgettext.pot +63 -13
  63. data/po/sv/rgettext.po +63 -15
  64. data/samples/cgi/cookie.cgi +5 -0
  65. data/samples/cgi/helloerb1.cgi +4 -0
  66. data/samples/cgi/helloerb2.cgi +5 -0
  67. data/samples/cgi/index.cgi +5 -0
  68. data/samples/cgi/locale/cs/LC_MESSAGES/helloerb1.mo +0 -0
  69. data/samples/cgi/locale/cs/LC_MESSAGES/helloerb2.mo +0 -0
  70. data/samples/cgi/locale/cs/LC_MESSAGES/hellolib.mo +0 -0
  71. data/samples/cgi/locale/cs/LC_MESSAGES/main.mo +0 -0
  72. data/samples/cgi/locale/fr/LC_MESSAGES/main.mo +0 -0
  73. data/samples/cgi/locale/ko/LC_MESSAGES/helloerb1.mo +0 -0
  74. data/samples/cgi/locale/ko/LC_MESSAGES/helloerb2.mo +0 -0
  75. data/samples/cgi/locale/ko/LC_MESSAGES/hellolib.mo +0 -0
  76. data/samples/cgi/locale/ko/LC_MESSAGES/main.mo +0 -0
  77. data/samples/cgi/locale/nl/LC_MESSAGES/helloerb1.mo +0 -0
  78. data/samples/cgi/locale/nl/LC_MESSAGES/helloerb2.mo +0 -0
  79. data/samples/cgi/locale/nl/LC_MESSAGES/hellolib.mo +0 -0
  80. data/samples/cgi/locale/nl/LC_MESSAGES/main.mo +0 -0
  81. data/samples/cgi/locale/pt_BR/LC_MESSAGES/helloerb1.mo +0 -0
  82. data/samples/cgi/locale/pt_BR/LC_MESSAGES/helloerb2.mo +0 -0
  83. data/samples/cgi/locale/pt_BR/LC_MESSAGES/hellolib.mo +0 -0
  84. data/samples/cgi/locale/pt_BR/LC_MESSAGES/main.mo +0 -0
  85. data/samples/cgi/po/cs/helloerb1.po +66 -0
  86. data/samples/cgi/po/cs/helloerb2.po +52 -0
  87. data/samples/cgi/po/cs/hellolib.po +25 -0
  88. data/samples/cgi/po/cs/main.po +78 -0
  89. data/samples/cgi/po/fr/main.po +8 -8
  90. data/samples/cgi/po/ko/helloerb1.po +2 -3
  91. data/samples/cgi/po/ko/helloerb2.po +1 -2
  92. data/samples/cgi/po/ko/hellolib.po +1 -2
  93. data/samples/cgi/po/ko/main.po +2 -3
  94. data/samples/cgi/po/nl/helloerb1.po +60 -0
  95. data/samples/cgi/po/nl/helloerb2.po +52 -0
  96. data/samples/cgi/po/nl/hellolib.po +24 -0
  97. data/samples/cgi/po/nl/main.po +76 -0
  98. data/samples/cgi/po/pt_BR/helloerb1.po +59 -0
  99. data/samples/cgi/po/pt_BR/helloerb2.po +51 -0
  100. data/samples/cgi/po/pt_BR/hellolib.po +22 -0
  101. data/samples/cgi/po/pt_BR/main.po +75 -0
  102. data/samples/locale/cs/LC_MESSAGES/hello.mo +0 -0
  103. data/samples/locale/cs/LC_MESSAGES/hello2.mo +0 -0
  104. data/samples/locale/cs/LC_MESSAGES/hello_noop.mo +0 -0
  105. data/samples/locale/cs/LC_MESSAGES/hello_plural.mo +0 -0
  106. data/samples/locale/cs/LC_MESSAGES/helloglade2.mo +0 -0
  107. data/samples/locale/cs/LC_MESSAGES/hellogtk.mo +0 -0
  108. data/samples/locale/cs/LC_MESSAGES/hellotk.mo +0 -0
  109. data/samples/locale/fr/LC_MESSAGES/helloglade2.mo +0 -0
  110. data/samples/locale/ko/LC_MESSAGES/hello.mo +0 -0
  111. data/samples/locale/ko/LC_MESSAGES/hello2.mo +0 -0
  112. data/samples/locale/ko/LC_MESSAGES/hello_noop.mo +0 -0
  113. data/samples/locale/ko/LC_MESSAGES/hello_plural.mo +0 -0
  114. data/samples/locale/ko/LC_MESSAGES/helloglade2.mo +0 -0
  115. data/samples/locale/ko/LC_MESSAGES/hellogtk.mo +0 -0
  116. data/samples/locale/ko/LC_MESSAGES/hellotk.mo +0 -0
  117. data/samples/locale/nl/LC_MESSAGES/hello.mo +0 -0
  118. data/samples/locale/nl/LC_MESSAGES/hello2.mo +0 -0
  119. data/samples/locale/nl/LC_MESSAGES/hello_noop.mo +0 -0
  120. data/samples/locale/nl/LC_MESSAGES/hello_plural.mo +0 -0
  121. data/samples/locale/nl/LC_MESSAGES/helloglade2.mo +0 -0
  122. data/samples/locale/nl/LC_MESSAGES/hellogtk.mo +0 -0
  123. data/samples/locale/nl/LC_MESSAGES/hellotk.mo +0 -0
  124. data/samples/locale/pt_BR/LC_MESSAGES/hello.mo +0 -0
  125. data/samples/locale/pt_BR/LC_MESSAGES/hello2.mo +0 -0
  126. data/samples/locale/pt_BR/LC_MESSAGES/hello_noop.mo +0 -0
  127. data/samples/locale/pt_BR/LC_MESSAGES/hello_plural.mo +0 -0
  128. data/samples/locale/pt_BR/LC_MESSAGES/helloglade2.mo +0 -0
  129. data/samples/locale/pt_BR/LC_MESSAGES/hellogtk.mo +0 -0
  130. data/samples/locale/pt_BR/LC_MESSAGES/hellotk.mo +0 -0
  131. data/samples/po/cs/hello.po +23 -0
  132. data/samples/po/cs/hello2.po +31 -0
  133. data/samples/po/cs/hello_noop.po +27 -0
  134. data/samples/po/cs/hello_plural.po +26 -0
  135. data/samples/po/cs/helloglade2.po +37 -0
  136. data/samples/po/cs/hellogtk.po +23 -0
  137. data/samples/po/cs/hellotk.po +23 -0
  138. data/samples/po/fr/helloglade2.po +2 -2
  139. data/samples/po/hello.pot +1 -0
  140. data/samples/po/hello2.pot +1 -0
  141. data/samples/po/hello_noop.pot +2 -1
  142. data/samples/po/hello_plural.pot +6 -2
  143. data/samples/po/helloglade2.pot +8 -3
  144. data/samples/po/hellotk.pot +4 -0
  145. data/samples/po/ko/hello.po +1 -2
  146. data/samples/po/ko/hello2.po +1 -2
  147. data/samples/po/ko/hello_noop.po +1 -2
  148. data/samples/po/ko/hello_plural.po +1 -2
  149. data/samples/po/ko/helloglade2.po +2 -2
  150. data/samples/po/ko/hellogtk.po +1 -2
  151. data/samples/po/ko/hellotk.po +1 -2
  152. data/samples/po/nl/hello.po +24 -0
  153. data/samples/po/nl/hello2.po +32 -0
  154. data/samples/po/nl/hello_noop.po +28 -0
  155. data/samples/po/nl/hello_plural.po +26 -0
  156. data/samples/po/nl/helloglade2.po +31 -0
  157. data/samples/po/nl/hellogtk.po +24 -0
  158. data/samples/po/nl/hellotk.po +24 -0
  159. data/samples/po/pt_BR/hello.po +6 -5
  160. data/samples/po/pt_BR/hello2.po +6 -5
  161. data/samples/po/pt_BR/hello_noop.po +6 -5
  162. data/samples/po/pt_BR/hello_plural.po +6 -6
  163. data/samples/po/pt_BR/helloglade2.po +6 -5
  164. data/samples/po/pt_BR/hellogtk.po +6 -5
  165. data/samples/po/pt_BR/hellotk.po +6 -5
  166. data/samples/rails/README +21 -15
  167. data/samples/rails/Rakefile +10 -1
  168. data/samples/rails/app/controllers/application.rb +10 -18
  169. data/samples/rails/app/controllers/blog_controller.rb +1 -5
  170. data/samples/rails/app/helpers/blog_helper.rb +1 -1
  171. data/samples/rails/app/models/article.rb +15 -0
  172. data/samples/rails/app/views/blog/_form.rhtml +2 -2
  173. data/samples/rails/config/boot.rb +17 -0
  174. data/samples/rails/config/database.yml +5 -3
  175. data/samples/rails/config/environment.rb +40 -75
  176. data/samples/rails/config/environments/development.rb +12 -7
  177. data/samples/rails/config/environments/production.rb +17 -6
  178. data/samples/rails/config/environments/test.rb +8 -6
  179. data/samples/rails/locale/cs/LC_MESSAGES/blog.mo +0 -0
  180. data/samples/rails/locale/cs/LC_MESSAGES/gettext_plugin.mo +0 -0
  181. data/samples/rails/locale/de/LC_MESSAGES/blog.mo +0 -0
  182. data/samples/rails/locale/de/LC_MESSAGES/gettext_plugin.mo +0 -0
  183. data/samples/rails/locale/en/LC_MESSAGES/blog.mo +0 -0
  184. data/samples/rails/locale/es/LC_MESSAGES/blog.mo +0 -0
  185. data/samples/rails/locale/es/LC_MESSAGES/gettext_plugin.mo +0 -0
  186. data/samples/rails/locale/fr/LC_MESSAGES/blog.mo +0 -0
  187. data/samples/rails/locale/fr/LC_MESSAGES/{lang_helper.mo → gettext_plugin.mo} +0 -0
  188. data/samples/rails/locale/ja/LC_MESSAGES/blog.mo +0 -0
  189. data/samples/rails/locale/ja/LC_MESSAGES/{lang_helper.mo → gettext_plugin.mo} +0 -0
  190. data/samples/rails/locale/ko/LC_MESSAGES/blog.mo +0 -0
  191. data/samples/rails/locale/ko/LC_MESSAGES/gettext_plugin.mo +0 -0
  192. data/samples/rails/locale/nl/LC_MESSAGES/blog.mo +0 -0
  193. data/samples/rails/locale/nl/LC_MESSAGES/gettext_plugin.mo +0 -0
  194. data/samples/rails/locale/pt_BR/LC_MESSAGES/blog.mo +0 -0
  195. data/samples/rails/locale/pt_BR/LC_MESSAGES/gettext_plugin.mo +0 -0
  196. data/samples/rails/po/blog.pot +57 -37
  197. data/samples/rails/po/cs/blog.po +116 -0
  198. data/samples/rails/po/cs/gettext_plugin.po +29 -0
  199. data/samples/rails/po/de/blog.po +70 -51
  200. data/samples/rails/po/de/{lang_helper.po → gettext_plugin.po} +4 -5
  201. data/samples/rails/po/en/blog.po +111 -0
  202. data/samples/rails/po/es/blog.po +67 -47
  203. data/samples/rails/po/es/{lang_helper.po → gettext_plugin.po} +5 -5
  204. data/samples/rails/po/fr/blog.po +65 -45
  205. data/samples/rails/po/fr/{lang_helper.po → gettext_plugin.po} +4 -4
  206. data/samples/rails/po/{lang_helper.pot → gettext_plugin.pot} +4 -4
  207. data/samples/rails/po/ja/blog.po +64 -44
  208. data/samples/rails/po/ja/{lang_helper.po → gettext_plugin.po} +4 -4
  209. data/samples/rails/po/ko/blog.po +65 -46
  210. data/samples/rails/po/ko/{lang_helper.po → gettext_plugin.po} +5 -6
  211. data/samples/rails/po/nl/blog.po +115 -0
  212. data/samples/rails/po/nl/gettext_plugin.po +28 -0
  213. data/samples/rails/po/pt_BR/blog.po +109 -0
  214. data/samples/rails/po/pt_BR/gettext_plugin.po +27 -0
  215. data/samples/rails/public/images/rails.png +0 -0
  216. data/samples/rails/public/index.html +272 -71
  217. data/samples/rails/public/javascripts/controls.js +441 -166
  218. data/samples/rails/public/javascripts/dragdrop.js +261 -279
  219. data/samples/rails/public/javascripts/effects.js +657 -277
  220. data/samples/rails/public/javascripts/prototype.js +911 -223
  221. data/samples/rails/public/robots.txt +1 -0
  222. data/samples/rails/public/stylesheets/scaffold.css +1 -1
  223. data/samples/rails/script/about +3 -0
  224. data/samples/rails/script/breakpointer +3 -4
  225. data/samples/rails/script/console +3 -23
  226. data/samples/rails/script/destroy +3 -7
  227. data/samples/rails/script/generate +3 -7
  228. data/samples/rails/script/performance/benchmarker +3 -0
  229. data/samples/rails/script/performance/profiler +3 -0
  230. data/samples/rails/script/plugin +3 -0
  231. data/samples/rails/script/process/reaper +3 -0
  232. data/samples/rails/script/process/spawner +3 -0
  233. data/samples/rails/script/process/spinner +3 -0
  234. data/samples/rails/script/runner +3 -29
  235. data/samples/rails/script/server +3 -49
  236. data/samples/rails/vendor/plugins/gettext/init.rb +19 -0
  237. data/samples/rails/vendor/{lang_helper.rb → plugins/gettext/lib/gettext_plugin.rb} +15 -11
  238. data/src/poparser.ry +171 -0
  239. data/test/gettext_runner.rb +3 -1
  240. data/test/gettext_test.rb +56 -31
  241. data/test/gettext_test_cgi.rb +12 -0
  242. data/test/gettext_test_parser.rb +3 -0
  243. data/test/gettext_test_string.rb +14 -0
  244. data/test/locale/cr/LC_MESSAGES/plural.mo +0 -0
  245. data/test/locale/da/LC_MESSAGES/plural.mo +0 -0
  246. data/test/locale/da/LC_MESSAGES/plural_error.mo +0 -0
  247. data/test/locale/fr/LC_MESSAGES/plural.mo +0 -0
  248. data/test/locale/fr/LC_MESSAGES/plural_error.mo +0 -0
  249. data/test/locale/ir/LC_MESSAGES/plural.mo +0 -0
  250. data/test/locale/la/LC_MESSAGES/plural.mo +0 -0
  251. data/test/locale/li/LC_MESSAGES/plural.mo +0 -0
  252. data/test/locale/po/LC_MESSAGES/plural.mo +0 -0
  253. data/test/locale/sl/LC_MESSAGES/plural.mo +0 -0
  254. data/test/po/cr/plural.po +3 -3
  255. data/test/po/da/plural.po +2 -2
  256. data/test/po/da/plural_error.po +2 -1
  257. data/test/po/fr/plural.po +2 -2
  258. data/test/po/fr/plural_error.po +2 -1
  259. data/test/po/ir/plural.po +3 -3
  260. data/test/po/la/plural.po +3 -3
  261. data/test/po/li/plural.po +3 -3
  262. data/test/po/po/plural.po +3 -3
  263. data/test/po/sl/plural.po +4 -4
  264. data/test/test.sh +1 -0
  265. data/test/test_rubyparser.rb +20 -0
  266. metadata +678 -551
  267. data/README.ja +0 -115
  268. data/data/locale/de/LC_MESSAGES/rmsgfmt.mo +0 -0
  269. data/data/locale/es/LC_MESSAGES/rmsgfmt.mo +0 -0
  270. data/data/locale/fr/LC_MESSAGES/rmsgfmt.mo +0 -0
  271. data/data/locale/it/LC_MESSAGES/rmsgfmt.mo +0 -0
  272. data/data/locale/ja/LC_MESSAGES/rmsgfmt.mo +0 -0
  273. data/data/locale/ko/LC_MESSAGES/rmsgfmt.mo +0 -0
  274. data/data/locale/pt_BR/LC_MESSAGES/rmsgfmt.mo +0 -0
  275. data/data/locale/sv/LC_MESSAGES/rmsgfmt.mo +0 -0
  276. data/po/de/rmsgfmt.po +0 -45
  277. data/po/es/rmsgfmt.po +0 -43
  278. data/po/fr/rmsgfmt.po +0 -43
  279. data/po/it/rmsgfmt.po +0 -44
  280. data/po/ja/rmsgfmt.po +0 -43
  281. data/po/ko/rmsgfmt.po +0 -40
  282. data/po/pt_BR/rmsgfmt.po +0 -42
  283. data/po/rmsgfmt.pot +0 -40
  284. data/po/sv/rmsgfmt.po +0 -43
  285. data/samples/rails/locale/de/LC_MESSAGES/lang_helper.mo +0 -0
  286. data/samples/rails/locale/es/LC_MESSAGES/lang_helper.mo +0 -0
  287. data/samples/rails/locale/ko/LC_MESSAGES/lang_helper.mo +0 -0
  288. data/src/rmsgfmt.ry +0 -233
data/ChangeLog CHANGED
@@ -1,3 +1,197 @@
1
+ 2005-12-29 Masao Mutoh <mutoh@highway.ne.jp>
2
+
3
+ * lib/gettext/locale_win32.rb: Fixed a syntax error.
4
+ * po/{it,sv}/rgettext.po: Updated.
5
+ * samples/rails/po/ja/blog.po: Fixed a fuzzy message.
6
+ * po/de/rgettext.po: Fixed a compilingproblem.
7
+ * README, NEWS: Updated.
8
+ * lib/gettext/rails.rb: Fix a problem when
9
+ http://localhost:3000/rails_info/properties is called.
10
+ Pointed out by Kazuhiro NISHIYAMA.
11
+ * po/de/rails.po: Added by Sasa Ebach.
12
+ * po/de/rgettext.po, samples/rails/po/de/*.po:
13
+ Updated by Sasa Ebach.
14
+
15
+ 2005-12-28 Masao Mutoh <mutoh@highway.ne.jp>
16
+
17
+ * NEWS: Updated.
18
+ * README: Updated.
19
+ * po/es/rails.po: Added by David Espada.
20
+ * po/es/rgettext.po, samples/rails/po/es/*.po:
21
+ Updated by David Espada.
22
+
23
+ 2005-12-27 Masao Mutoh <mutoh@highway.ne.jp>
24
+
25
+ * test/gettext_test_string.rb: Add a test.
26
+
27
+ 2005-12-26 Masao Mutoh <mutoh@highway.ne.jp>
28
+
29
+ * samples/rails/app/controllers/blog_controller.rb: Updated.
30
+
31
+ 2005-12-25 Masao Mutoh <mutoh@highway.ne.jp>
32
+
33
+ * NEWS: Updated.
34
+ * README: Updated.
35
+ * lib/gettext/parser/activerecord.rb: Don't show the messages
36
+ when ActiveRecord and its subclasses are not found.
37
+ * po/ja/rgettext.po: Updated.
38
+
39
+ 2005-12-24 Masao Mutoh <mutoh@highway.ne.jp>
40
+
41
+ * samples/po/nl/*.po, samples/cgi/po/nl/*.po,
42
+ samples/rails/po/nl/*.po, po/nl/rgettext.po,
43
+ rails.po: Added Dutch locale by Menno Jonkers.
44
+
45
+ 2005-12-23 Masao Mutoh <mutoh@highway.ne.jp>
46
+
47
+ * README: Updated.
48
+ * README.ja: Removed.
49
+ * po/ko/rails.po: Added by Gyoung-Yoon Noh.
50
+ * po/ko/rgettext.po, samples/po/ko/*.po, samples/cgi/po/ko/*.po,
51
+ samples/rails/po/ko/*.po: Updated by Gyoung-Yoon Noh.
52
+ * lib/gettext/textdomain.rb: Fixed a bug when mo-files are not found.
53
+ * samples/rails/po/en/blog.po: Added for English.
54
+ You can change the table names, field names of ActiveRecord even you use English.
55
+ * lib/gettext/textdomain.rb: Code cleanup.
56
+ * samples/rails/vendor/plugins/gettext/lib/gettext_plugin.rb: begin a new line
57
+ each 6 language.
58
+ * samples/rails/vendor/plugins/gettext/po/*: Update version info.
59
+
60
+ 2005-12-21 Masao Mutoh <mutoh@highway.ne.jp>
61
+
62
+ * samples/rails/README: Updated.
63
+ * lib/gettext/utils.rb: Added. GetText.update_pofiles.
64
+ * Rakefile, samples/rails/Rakefile: Use GetText.update_pofiles.
65
+
66
+ 2005-12-20 Masao Mutoh <mutoh@highway.ne.jp>
67
+
68
+ * lib/gettext/utils.rb: Added. Implement GetText.updatepo.
69
+ * Rakefile:
70
+
71
+ 2005-12-19 Masao Mutoh <mutoh@highway.ne.jp>
72
+
73
+ * samples/po/cs/*.po, samples/cgi/po/cs/*.po,
74
+ samples/rails/po/cs/*.po, po/cs/rgettext.po,
75
+ rails.po: Added Czech locale by Karel Miarka.
76
+
77
+ 2005-12-18 Masao Mutoh <mutoh@highway.ne.jp>
78
+
79
+ * po/fr/rgettext.po, samples/cgi/po/fr/main.po:
80
+ Updated by Laurent Sansonetti.
81
+ * po/fr/rails.po: Added by Laurent Sansonetti.
82
+ * po/pt_BR/rails.po, samples/cgi/po/pt_BR/*.po,
83
+ samples/rails/po/pt_BR/*.po:
84
+ Added by Joao Pedrosa.
85
+ * po/pt_BR/rgettext.po, samples/po/pt_BR/*.po:
86
+ Updated by Joao Pedrosa.
87
+
88
+ 2005-12-17 Masao Mutoh <mutoh@highway.ne.jp>
89
+
90
+ * po/rails.pot, po/ja/rails.po: Added.
91
+ * test/gettext_test_string.rb: Added.
92
+
93
+ 2005-12-12 Masao Mutoh <mutoh@highway.ne.jp>
94
+
95
+ * samples/rails/Rakefile: Added "updatepo" task.
96
+ * lib/gettext/parser/activerecord.rb: Added a parser for
97
+ ActiveRecord.
98
+
99
+ 2005-12-10 Masao Mutoh <mutoh@highway.ne.jp>
100
+
101
+ * lib/gettext/rails.rb: Added GetText information to
102
+ Rails::Info.
103
+
104
+ 2005-12-08 Masao Mutoh <mutoh@highway.ne.jp>
105
+
106
+ * test/gettext_test_cgi.rb: Added tests for Locale.normalize.
107
+ * lib/gettext/cgi.rb: Fix a problem of Locale.normalize.
108
+
109
+ 2005-12-07 Masao Mutoh <mutoh@highway.ne.jp>
110
+
111
+ * lib/gettext/cgi.rb: Separate Locale.normalize.
112
+
113
+ 2005-12-06 Masao Mutoh <mutoh@highway.ne.jp>
114
+
115
+ * test/gettext_test.rb, test/po/{da,fr}/plural_error.po:
116
+ Fix test_plural_format_invalid.
117
+
118
+ 2005-12-05 Masao Mutoh <mutoh@highway.ne.jp>
119
+
120
+ * test/gettext_test.rb, test/po/*/plural.po: Fix test case.
121
+
122
+ 2005-12-04 Masao Mutoh <mutoh@highway.ne.jp>
123
+
124
+ * samples/rails/vendor/plugins/gettext/lib/gettext_plugin.rb: Revised comments.
125
+
126
+ 2005-12-01 Masao Mutoh <mutoh@highway.ne.jp>
127
+
128
+ * lib/gettext/rails.rb: Improved to support L10n for ActiveRecord::Errors.
129
+ Improve ActionController::Base.init_gettext(_main).
130
+ * samples/rails/app/controller/application.rb: Improved comments.
131
+ * samples/rails/app/views/blog/_form.rhtml: Add information to validate.
132
+
133
+ 2005-11-27 Masao Mutoh <mutoh@highway.ne.jp>
134
+
135
+ * lib/gettext/string.rb: Added. New syntax ":{foo} is bar." % {:foo => "foo"}
136
+ is supported.
137
+ * lib/gettext/rmsgmerge.rb: Added.
138
+ * lib/gettext.rb, lib/gettext/textdomain.rb: Fix a bug of GetText.ngettext.
139
+
140
+ 2005-11-25 Masao Mutoh <mutoh@highway.ne.jp>
141
+
142
+ * samples/rails/app/*: Rewrite for RoR 0.14.x.
143
+ * lib/gettext/rails.rb: Added ActionController::Base.init_gettext.
144
+ * samples/rails/app/controllers/application.rb: ditto.
145
+
146
+ 2005-11-23 Masao Mutoh <mutoh@highway.ne.jp>
147
+
148
+ * samples/rails/app/controllers/application.rb: Use
149
+ GetText.output_charset to set the Content-Type.
150
+ * lib/gettext/rails.rb: Call bindtextdomain in models(ActiveRecord)
151
+ when bindtextdomain is called in before_filter of ActionController.
152
+ Inspired from Simon Santoro.
153
+ * samples/rails/app/models/article.rb: Added to validate description
154
+ with localized message.
155
+
156
+ 2005-10-22 Masao Mutoh <mutoh@highway.ne.jp>
157
+
158
+ * po/*: Merge rmsgfmt to rgettext.
159
+ * po/**/rmsgfmt.po[t]: Removed(merge to rgettext.po[t]).
160
+ * lib/gettext/rmsgmerge.rb: Added by speakillof.
161
+ * bin/rmsgmerge: Added.
162
+ * src/poparser.ry: Renamed rmsgfmt.ry to poparser.ry.
163
+ * lib/gettext/rmsgfmt.rb: Added. Separate code from rmsgfmt.ry.
164
+ * Rakefile: Check racc is existed or not.
165
+ * lib/gettext/mo.rb: Follow poparser.ry changes.
166
+
167
+ 2005-09-16 Masao Mutoh <mutoh@highway.ne.jp>
168
+
169
+ * lib/gettext/rgettext.rb: Fixed a header of time strings.
170
+ Reported by Karel Miarka.
171
+
172
+ 2005-09-12 speakillof <speakillof@yahoo.co.jp>
173
+
174
+ * lib/gettext/parser/ruby.rb: Added "here document" support.
175
+
176
+ 2005-09-05 Masao Mutoh <mutoh@highway.ne.jp>
177
+
178
+ * lib/gettext.rb: Added GetText.locale. Both of GetText.locale= and
179
+ GetText.locale behaves "global". If you set this once, follow bindtextdomain(s)
180
+ use this value.
181
+ * lib/gettext/cgi.rb: Added Locale.set.
182
+ * lib/gettext/locale_win32.rb: ENV value is prior to native locale.
183
+ Added Locale.set.
184
+ * test/gettext_test.rb: Follow above changes.
185
+
186
+ 2005-09-04 Masao Mutoh <mutoh@highway.ne.jp>
187
+
188
+ * Rakefile: move test task to testunit task.
189
+ * samples/cgi/*.cgi: Support rubygems.
190
+ * lib/gettext/rails.rb: The default of "charset" parameter becomes nil
191
+ instead of "UTF-8". You need to call GetText.output_charset=() first.
192
+ * samples/rails/app/controllers/application.rb:
193
+ Call GetText.output_charset = "UTF-8" first.
194
+
1
195
  2005-09-03 Masao Mutoh <mutoh@highway.ne.jp>
2
196
 
3
197
  * src/rmsgfmt.ry: Fixed VERSION info.
data/NEWS CHANGED
@@ -1,3 +1,52 @@
1
+ = Ruby-GetText-Package-1.1.0 (2005-12-29)
2
+
3
+ * Added some functions which managed po/mo files easily.
4
+ * GetText.update_pofiles creates/updates pot/po files.
5
+ The idea is from Sascha Ebach.
6
+
7
+ * String% is extended to accept named argument.
8
+ "%{file} is selected." % {:file => "foo.rb"}
9
+ Proposed by Sascha Ebach and Kazuhiro NISHIYAMA.
10
+
11
+ * Enhanced Ruby on Rails support.
12
+ * ActiveRecord support. Inspired from Simon Santoro(rgtrans).
13
+ * the error messages are localized.
14
+ Also, you can add your own messages with _("").
15
+ * You can use gettext methods in the models unless
16
+ preparing anything.
17
+
18
+ * rgettext extracts the table names/field names
19
+ of the subclass of ActiveRecord::Base as the msgid.
20
+
21
+ Even for the English developers who don't need
22
+ to localize their application, this function is
23
+ useful because the developer can rename
24
+ the table/field names using "en" locale.
25
+
26
+ * More simple to set up ApplicationController.
27
+ Now, you need to call just init_gettext only.
28
+
29
+ class ApplicationController < ActionController::Base
30
+ init_gettext "myapp" #Easy!
31
+ end
32
+
33
+ This "myapp" domain affects all of the controllers/views/models.
34
+
35
+ * Sample "blog" application with rails.
36
+ Improved the sample application on RoR. See: samples/rails/*.
37
+
38
+ * New/Updated translations:
39
+ Czech - Karel Miarka (NEW)
40
+ Dutch - Menno Jonkers (NEW)
41
+ French - Laurent Sansonetti
42
+ German - Sasa Ebach
43
+ Japanese - Masao Mutoh
44
+ Korean - Gyoung-Yoon Noh
45
+ Portuguese(Brazil) - Joao Pedrosa
46
+ Spanish - David Espada
47
+
48
+ * bugfixes.
49
+
1
50
  = Ruby-GetText-Package-1.0.0 (2005-09-03)
2
51
 
3
52
  * Ruby on Rails is supported.
data/README CHANGED
@@ -39,6 +39,8 @@ Requirements
39
39
  * Racc-1.4.3 or later
40
40
  <http://www.ruby-lang.org/raa/list.rhtml?name=racc>
41
41
  (for compiling src/rmsgfmt.ry only)
42
+ * Ruby on Rails 1.0.0 or later (if you use this package with Ruby on Rails)
43
+ <http://www.rubyonrails.org/>
42
44
 
43
45
  Install
44
46
  -------
@@ -97,15 +99,32 @@ License
97
99
 
98
100
  Translators
99
101
  -----------
100
- French - Laurent Sansonetti
101
- German - Detlef Reichl, Sven Herzberg
102
- Italian - Gabriele Renzi
103
- Japanese - Masao Mutoh
104
- Korean - Gyoung-Yoon Noh
105
- Portuguese(Brazil) - Joao Pedrosa
106
- Spanish - David Espada, David Moreno Garza
107
- Swedish - Nikolai Weibull
108
-
102
+ Czech - Karel Miarka <kajism at yahoo.com>
103
+ Dutch - Menno Jonkers <ruby-gettext at jonkers.com>
104
+ French - Laurent Sansonetti <laurent.sansonetti at gmail.com>
105
+ German - Detlef Reichl <detlef.reichl at gmx.org>
106
+ Sven Herzberg <herzi at abi02.de>
107
+ Sascha Ebach <se at digitale-wertschoepfung.de>
108
+ Italian - Gabriele Renzi <surrender_it at yahoo.it>
109
+ Japanese - Masao Mutoh <mutoh at highway.ne.jp>
110
+ Korean - Gyoung-Yoon Noh <nohmad at gmail.com>
111
+ Portuguese(Brazil) - Joao Pedrosa <joaopedrosa at gmail.com>
112
+ Spanish - David Espada <davinci at escomposlinux.org> (current)
113
+ David Moreno Garza <damog at damog.net>
114
+ Swedish - Nikolai Weibull <mailing-lists.ruby-talk at rawuncut.elitemail.org>
115
+
116
+ Status of translations
117
+ ----------------------
118
+ cs - 1.1.0
119
+ fr - 1.1.0
120
+ de - 1.1.0
121
+ es - 1.1.0
122
+ it - 1.0.0
123
+ ja - 1.1.0
124
+ ko - 1.1.0
125
+ nl - 1.1.0
126
+ pt_BR - 1.1.0
127
+ sv - 0.8.0
109
128
 
110
129
  Maintainer
111
130
  ----------
data/Rakefile CHANGED
@@ -16,27 +16,34 @@ require 'rubygems'
16
16
  require 'rake'
17
17
  require 'rake/packagetask'
18
18
  require 'rake/gempackagetask'
19
+ require 'gettext/version'
19
20
 
20
21
  RUBYBIN = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) + " "
21
22
 
23
+ PKG_VERSION = GetText::VERSION
24
+
22
25
  task :default => [:makemo]
23
26
 
24
27
  ############################################################
25
28
  # GetText tasks
26
29
  ############################################################
27
- desc "Create lib/gettext/rmsgfmt.rb"
28
- task :rmsgfmt do
30
+ desc "Create lib/gettext/poparser.rb"
31
+ task :poparser do
32
+ poparser_path = "lib/gettext/poparser.rb"
29
33
  racc = File.join(Config::CONFIG['bindir'], "racc")
30
- if FileTest.exist?(racc)
31
- cmd = "#{RUBYBIN} #{racc} -g src/rmsgfmt.ry -o src/rmsgfmt.tmp.rb"
34
+ if ! FileTest.exist?(racc)
35
+ puts "racc was not found: #{racc}"
36
+ exit 1
37
+ else FileTest.exist?(racc)
38
+ cmd = "#{RUBYBIN} #{racc} -g src/poparser.ry -o src/poparser.tmp.rb"
32
39
  system(cmd)
33
40
  $stderr.puts cmd
34
41
 
35
- file = open("lib/gettext/rmsgfmt.rb", "w")
42
+ file = open(poparser_path, "w")
36
43
 
37
44
  file.print "=begin\n"
38
45
  file.print <<-EOS
39
- rmsgfmt.rb - Generate a .mo
46
+ poparser.rb - Generate a .mo
40
47
 
41
48
  Copyright (C) 2003-2005 Masao Mutoh <mutoh@highway.ne.jp>
42
49
 
@@ -45,26 +52,29 @@ task :rmsgfmt do
45
52
  EOS
46
53
  file.print "=end\n\n"
47
54
 
48
- tmpfile = open("src/rmsgfmt.tmp.rb")
55
+ tmpfile = open("src/poparser.tmp.rb")
49
56
  file.print tmpfile.read
50
57
  file.close
51
58
  tmpfile.close
52
- File.delete("src/rmsgfmt.tmp.rb")
59
+ File.delete("src/poparser.tmp.rb")
60
+ $stderr.puts "Create #{poparser_path}."
53
61
  end
54
62
  end
55
63
 
64
+ ############################################################
65
+ # Manage po/mo files
66
+ ############################################################
67
+ require 'gettext/utils'
68
+
56
69
  task :makemo_test do
57
- require 'gettext/rmsgfmt'
58
70
  $stderr.puts "Create test mo files."
59
71
  GetText.create_mofiles(false, "test/po", "test/locale")
60
72
  end
61
73
 
62
74
  desc "Create *.mo from *.po"
63
- task :makemo => [:rmsgfmt, :makemo_test] do
64
- require 'gettext/rmsgfmt'
65
-
75
+ task :makemo => [:poparser, :makemo_test] do
66
76
  $stderr.puts "Create rgettext/rmsgfmt mo files."
67
- GetText.create_mofiles(false)
77
+ GetText.create_mofiles(true)
68
78
 
69
79
  $stderr.puts "Create samples mo files."
70
80
  GetText.create_mofiles(false, "samples/po", "samples/locale")
@@ -77,42 +87,45 @@ task :makemo => [:rmsgfmt, :makemo_test] do
77
87
 
78
88
  end
79
89
 
80
- def msgmerge(name, po_root, tmp_file = "tmp.pot")
81
- system("msgmerge #{po_root}/#{name}.pot #{tmp_file} -o #{po_root}/#{name}.pot")
82
-
83
- Dir.glob("#{po_root}/*/#{name}.po"){ |f|
84
- lang = /#{po_root}\/(.*)\//.match(f).to_a[1]
85
- system("msgmerge #{po_root}/#{lang}/#{name}.po #{tmp_file} -o #{po_root}/#{lang}/#{name}.po")
86
- cont =IO.read(f)
87
- cont.sub!(/(Project-Id-Version\:.*)(\d\.\d\.\d)/, "\\1#{GetText::VERSION}")
88
- File.open(f, "w") do |out|
89
- out.write(cont)
90
- end
91
- }
92
- end
93
-
94
- desc "Update *po files to match new version.(for me)"
90
+ desc "Update pot/po files to match new version."
95
91
  task :updatepo do
96
- require 'gettext/rgettext'
97
- # Update rgettext po files.
98
- GetText.rgettext("lib/gettext/rgettext.rb", "tmp.pot")
99
- msgmerge("rgettext", "po")
100
-
101
- # Update rmsgfmt po files.
102
- GetText.rgettext("lib/gettext/rmsgfmt.rb", "tmp.pot")
103
- msgmerge("rmsgfmt", "po")
104
- File.delete("tmp.pot")
92
+ #lib/gettext/*.rb -> rgettext.po
93
+ GetText.update_pofiles("rgettext",
94
+ Dir.glob("lib/**/*.rb") - ["lib/gettext/rails.rb"],
95
+ "ruby-gettext #{GetText::VERSION}")
96
+
97
+ #lib/gettext/rails.rb -> rails.po
98
+ GetText.update_pofiles("rails", ["lib/gettext/rails.rb"],
99
+ "ruby-gettext #{GetText::VERSION}")
105
100
  end
106
101
 
107
102
  desc "Setup Ruby-GetText-Package. (for setup.rb)"
108
103
  task :setup => [:makemo]
109
104
 
105
+ desc "Gather the newest po files. (for me)"
106
+ task :gatherpo => [:updatepo] do
107
+ mkdir_p "pofiles/original" unless FileTest.exist? "pofiles/original"
108
+ Dir.glob("**/*.pot").each do |f|
109
+ unless /^(pofiles|test)/ =~ f
110
+ copy f, "pofiles/original/"
111
+ end
112
+ end
113
+ Dir.glob("**/*.po").each do |f|
114
+ unless /^(pofiles|test)/ =~ f
115
+ lang = /po\/([^\/]*)\/(.*.po)/.match(f).to_a[1]
116
+ mkdir_p "pofiles/#{lang}" unless FileTest.exist? "pofiles/#{lang}"
117
+ copy f, "pofiles/#{lang}/"
118
+ Dir.glob("pofiles/original/*.pot").each do |f|
119
+ newpo = "pofiles/#{lang}/#{File.basename(f, ".pot")}.po"
120
+ copy f, newpo unless FileTest.exist? newpo
121
+ end
122
+ end
123
+ end
124
+ end
125
+
110
126
  ############################################################
111
127
  # Package tasks
112
128
  ############################################################
113
- require 'gettext/version'
114
-
115
- PKG_VERSION = GetText::VERSION
116
129
  desc "Create gem and tar.gz"
117
130
  spec = Gem::Specification.new do |s|
118
131
  s.name = 'gettext'
@@ -163,7 +176,7 @@ end
163
176
  # Misc tasks
164
177
  ############################################################
165
178
  desc "Test task (for shell environment only)"
166
- task :test => [:makemo_test] do
179
+ task :testunit => [:makemo_test] do
167
180
  unless /mswin32/ =~ RUBY_PLATFORM
168
181
  sh 'cd test; sh test.sh'
169
182
  end