gettext 1.9.0-mswin32 → 1.10.0-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (333) hide show
  1. data/ChangeLog +122 -1
  2. data/NEWS +21 -0
  3. data/README +30 -22
  4. data/data/locale/bs/LC_MESSAGES/rails.mo +0 -0
  5. data/data/locale/bs/LC_MESSAGES/rgettext.mo +0 -0
  6. data/data/locale/ca/LC_MESSAGES/rails.mo +0 -0
  7. data/data/locale/ca/LC_MESSAGES/rgettext.mo +0 -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/el/LC_MESSAGES/rails.mo +0 -0
  13. data/data/locale/el/LC_MESSAGES/rgettext.mo +0 -0
  14. data/data/locale/eo/LC_MESSAGES/rails.mo +0 -0
  15. data/data/locale/eo/LC_MESSAGES/rgettext.mo +0 -0
  16. data/data/locale/es/LC_MESSAGES/rails.mo +0 -0
  17. data/data/locale/es/LC_MESSAGES/rgettext.mo +0 -0
  18. data/data/locale/et/LC_MESSAGES/rails.mo +0 -0
  19. data/data/locale/fr/LC_MESSAGES/rails.mo +0 -0
  20. data/data/locale/fr/LC_MESSAGES/rgettext.mo +0 -0
  21. data/data/locale/hr/LC_MESSAGES/rails.mo +0 -0
  22. data/data/locale/hr/LC_MESSAGES/rgettext.mo +0 -0
  23. data/data/locale/it/LC_MESSAGES/rails.mo +0 -0
  24. data/data/locale/it/LC_MESSAGES/rgettext.mo +0 -0
  25. data/data/locale/ja/LC_MESSAGES/rails.mo +0 -0
  26. data/data/locale/ja/LC_MESSAGES/rgettext.mo +0 -0
  27. data/data/locale/ko/LC_MESSAGES/rails.mo +0 -0
  28. data/data/locale/ko/LC_MESSAGES/rgettext.mo +0 -0
  29. data/data/locale/nb/LC_MESSAGES/rails.mo +0 -0
  30. data/data/locale/nb/LC_MESSAGES/rgettext.mo +0 -0
  31. data/data/locale/nl/LC_MESSAGES/rails.mo +0 -0
  32. data/data/locale/nl/LC_MESSAGES/rgettext.mo +0 -0
  33. data/data/locale/pt_BR/LC_MESSAGES/rails.mo +0 -0
  34. data/data/locale/pt_BR/LC_MESSAGES/rgettext.mo +0 -0
  35. data/data/locale/ru/LC_MESSAGES/rails.mo +0 -0
  36. data/data/locale/ru/LC_MESSAGES/rgettext.mo +0 -0
  37. data/data/locale/sv/LC_MESSAGES/rgettext.mo +0 -0
  38. data/data/locale/vi/LC_MESSAGES/rails.mo +0 -0
  39. data/data/locale/vi/LC_MESSAGES/rgettext.mo +0 -0
  40. data/data/locale/zh/LC_MESSAGES/rails.mo +0 -0
  41. data/data/locale/zh/LC_MESSAGES/rgettext.mo +0 -0
  42. data/data/locale/zh_TW/LC_MESSAGES/rails.mo +0 -0
  43. data/data/locale/zh_TW/LC_MESSAGES/rgettext.mo +0 -0
  44. data/ext/gettext/Makefile +2 -2
  45. data/ext/gettext/locale_system.o +0 -0
  46. data/ext/gettext/locale_system.so +0 -0
  47. data/lib/gettext/active_record.rb +51 -31
  48. data/lib/gettext/locale_win32.rb +2 -1
  49. data/lib/gettext/parser/active_record.rb +2 -2
  50. data/lib/gettext/parser/ruby.rb +2 -2
  51. data/lib/gettext/poparser.rb +303 -298
  52. data/lib/gettext/rails.rb +104 -50
  53. data/lib/gettext/rails_compat.rb +16 -0
  54. data/lib/gettext/rgettext.rb +37 -3
  55. data/lib/gettext/textdomain.rb +45 -6
  56. data/lib/gettext/utils.rb +7 -0
  57. data/lib/gettext/version.rb +1 -1
  58. data/lib/gettext.rb +119 -37
  59. data/lib/locale_system.so +0 -0
  60. data/po/bs/rails.po +148 -0
  61. data/po/bs/rgettext.po +131 -0
  62. data/po/ca/rails.po +45 -26
  63. data/po/ca/rgettext.po +21 -21
  64. data/po/cs/rails.po +46 -24
  65. data/po/cs/rgettext.po +21 -21
  66. data/po/de/rails.po +46 -27
  67. data/po/de/rgettext.po +21 -21
  68. data/po/el/rails.po +46 -25
  69. data/po/el/rgettext.po +22 -22
  70. data/po/eo/rails.po +49 -30
  71. data/po/eo/rgettext.po +21 -21
  72. data/po/es/rails.po +45 -24
  73. data/po/es/rgettext.po +21 -21
  74. data/po/et/rails.po +49 -30
  75. data/po/fr/rails.po +47 -28
  76. data/po/fr/rgettext.po +31 -29
  77. data/po/hr/rails.po +148 -0
  78. data/po/hr/rgettext.po +131 -0
  79. data/po/it/rails.po +42 -24
  80. data/po/it/rgettext.po +21 -21
  81. data/po/ja/rails.po +43 -25
  82. data/po/ja/rgettext.po +21 -21
  83. data/po/ko/rails.po +44 -24
  84. data/po/ko/rgettext.po +21 -21
  85. data/po/nb/rails.po +140 -0
  86. data/po/nb/rgettext.po +127 -0
  87. data/po/nl/rails.po +50 -30
  88. data/po/nl/rgettext.po +21 -21
  89. data/po/pt_BR/rails.po +48 -29
  90. data/po/pt_BR/rgettext.po +21 -21
  91. data/po/rails.pot +42 -24
  92. data/po/rgettext.pot +21 -21
  93. data/po/ru/rails.po +50 -31
  94. data/po/ru/rgettext.po +21 -21
  95. data/po/sv/rgettext.po +21 -21
  96. data/po/vi/rails.po +141 -0
  97. data/po/vi/rgettext.po +126 -0
  98. data/po/zh/rails.po +60 -43
  99. data/po/zh/rgettext.po +22 -22
  100. data/po/zh_TW/rails.po +61 -43
  101. data/po/zh_TW/rgettext.po +22 -22
  102. data/samples/cgi/locale/bs/LC_MESSAGES/helloerb1.mo +0 -0
  103. data/samples/cgi/locale/bs/LC_MESSAGES/helloerb2.mo +0 -0
  104. data/samples/cgi/locale/bs/LC_MESSAGES/hellolib.mo +0 -0
  105. data/samples/cgi/locale/bs/LC_MESSAGES/main.mo +0 -0
  106. data/samples/cgi/locale/hr/LC_MESSAGES/helloerb1.mo +0 -0
  107. data/samples/cgi/locale/hr/LC_MESSAGES/helloerb2.mo +0 -0
  108. data/samples/cgi/locale/hr/LC_MESSAGES/hellolib.mo +0 -0
  109. data/samples/cgi/locale/hr/LC_MESSAGES/main.mo +0 -0
  110. data/samples/cgi/locale/nb/LC_MESSAGES/helloerb1.mo +0 -0
  111. data/samples/cgi/locale/nb/LC_MESSAGES/helloerb2.mo +0 -0
  112. data/samples/cgi/locale/nb/LC_MESSAGES/hellolib.mo +0 -0
  113. data/samples/cgi/locale/nb/LC_MESSAGES/main.mo +0 -0
  114. data/samples/cgi/locale/vi/LC_MESSAGES/helloerb1.mo +0 -0
  115. data/samples/cgi/locale/vi/LC_MESSAGES/helloerb2.mo +0 -0
  116. data/samples/cgi/locale/vi/LC_MESSAGES/hellolib.mo +0 -0
  117. data/samples/cgi/locale/vi/LC_MESSAGES/main.mo +0 -0
  118. data/samples/cgi/po/bs/helloerb1.po +59 -0
  119. data/samples/cgi/po/bs/helloerb2.po +51 -0
  120. data/samples/cgi/po/bs/hellolib.po +23 -0
  121. data/samples/cgi/po/bs/main.po +83 -0
  122. data/samples/cgi/po/hr/helloerb1.po +59 -0
  123. data/samples/cgi/po/hr/helloerb2.po +51 -0
  124. data/samples/cgi/po/hr/hellolib.po +23 -0
  125. data/samples/cgi/po/hr/main.po +83 -0
  126. data/samples/cgi/po/nb/helloerb1.po +58 -0
  127. data/samples/cgi/po/nb/helloerb2.po +50 -0
  128. data/samples/cgi/po/nb/hellolib.po +22 -0
  129. data/samples/cgi/po/nb/main.po +82 -0
  130. data/samples/cgi/po/vi/helloerb1.po +65 -0
  131. data/samples/cgi/po/vi/helloerb2.po +52 -0
  132. data/samples/cgi/po/vi/hellolib.po +24 -0
  133. data/samples/cgi/po/vi/main.po +77 -0
  134. data/samples/locale/bs/LC_MESSAGES/hello.mo +0 -0
  135. data/samples/locale/bs/LC_MESSAGES/hello2.mo +0 -0
  136. data/samples/locale/bs/LC_MESSAGES/hello_noop.mo +0 -0
  137. data/samples/locale/bs/LC_MESSAGES/hello_plural.mo +0 -0
  138. data/samples/locale/bs/LC_MESSAGES/helloglade2.mo +0 -0
  139. data/samples/locale/bs/LC_MESSAGES/hellogtk.mo +0 -0
  140. data/samples/locale/bs/LC_MESSAGES/hellotk.mo +0 -0
  141. data/samples/locale/hr/LC_MESSAGES/hello.mo +0 -0
  142. data/samples/locale/hr/LC_MESSAGES/hello2.mo +0 -0
  143. data/samples/locale/hr/LC_MESSAGES/hello_noop.mo +0 -0
  144. data/samples/locale/hr/LC_MESSAGES/hello_plural.mo +0 -0
  145. data/samples/locale/hr/LC_MESSAGES/helloglade2.mo +0 -0
  146. data/samples/locale/hr/LC_MESSAGES/hellogtk.mo +0 -0
  147. data/samples/locale/hr/LC_MESSAGES/hellotk.mo +0 -0
  148. data/samples/locale/ja/LC_MESSAGES/hello_plural.mo +0 -0
  149. data/samples/locale/nb/LC_MESSAGES/hello.mo +0 -0
  150. data/samples/locale/nb/LC_MESSAGES/hello2.mo +0 -0
  151. data/samples/locale/nb/LC_MESSAGES/hello_noop.mo +0 -0
  152. data/samples/locale/nb/LC_MESSAGES/hello_plural.mo +0 -0
  153. data/samples/locale/nb/LC_MESSAGES/helloglade2.mo +0 -0
  154. data/samples/locale/nb/LC_MESSAGES/hellogtk.mo +0 -0
  155. data/samples/locale/nb/LC_MESSAGES/hellotk.mo +0 -0
  156. data/samples/locale/vi/LC_MESSAGES/hello.mo +0 -0
  157. data/samples/locale/vi/LC_MESSAGES/hello2.mo +0 -0
  158. data/samples/locale/vi/LC_MESSAGES/hello_noop.mo +0 -0
  159. data/samples/locale/vi/LC_MESSAGES/hello_plural.mo +0 -0
  160. data/samples/locale/vi/LC_MESSAGES/helloglade2.mo +0 -0
  161. data/samples/locale/vi/LC_MESSAGES/hellogtk.mo +0 -0
  162. data/samples/locale/vi/LC_MESSAGES/hellotk.mo +0 -0
  163. data/samples/po/bs/hello.po +23 -0
  164. data/samples/po/bs/hello2.po +31 -0
  165. data/samples/po/bs/hello_noop.po +27 -0
  166. data/samples/po/bs/hello_plural.po +26 -0
  167. data/samples/po/bs/helloglade2.po +31 -0
  168. data/samples/po/bs/hellogtk.po +23 -0
  169. data/samples/po/bs/hellotk.po +23 -0
  170. data/samples/po/hr/hello.po +23 -0
  171. data/samples/po/hr/hello2.po +31 -0
  172. data/samples/po/hr/hello_noop.po +27 -0
  173. data/samples/po/hr/hello_plural.po +26 -0
  174. data/samples/po/hr/helloglade2.po +31 -0
  175. data/samples/po/hr/hellogtk.po +23 -0
  176. data/samples/po/hr/hellotk.po +23 -0
  177. data/samples/po/ja/hello_plural.po +1 -1
  178. data/samples/po/nb/hello.po +22 -0
  179. data/samples/po/nb/hello2.po +31 -0
  180. data/samples/po/nb/hello_noop.po +26 -0
  181. data/samples/po/nb/hello_plural.po +24 -0
  182. data/samples/po/nb/helloglade2.po +30 -0
  183. data/samples/po/nb/hellogtk.po +22 -0
  184. data/samples/po/nb/hellotk.po +22 -0
  185. data/samples/po/vi/hello.po +23 -0
  186. data/samples/po/vi/hello2.po +31 -0
  187. data/samples/po/vi/hello_noop.po +27 -0
  188. data/samples/po/vi/hello_plural.po +26 -0
  189. data/samples/po/vi/helloglade2.po +38 -0
  190. data/samples/po/vi/hellogtk.po +23 -0
  191. data/samples/po/vi/hellotk.po +24 -0
  192. data/samples/rails/locale/bs/LC_MESSAGES/blog.mo +0 -0
  193. data/samples/rails/locale/hr/LC_MESSAGES/blog.mo +0 -0
  194. data/samples/rails/locale/nb/LC_MESSAGES/blog.mo +0 -0
  195. data/samples/rails/locale/vi/LC_MESSAGES/blog.mo +0 -0
  196. data/samples/rails/po/bs/blog.po +106 -0
  197. data/samples/rails/po/hr/blog.po +106 -0
  198. data/samples/rails/po/nb/blog.po +104 -0
  199. data/samples/rails/po/vi/blog.po +110 -0
  200. data/samples/rails/vendor/plugins/gettext/locale/bs/LC_MESSAGES/gettext_plugin.mo +0 -0
  201. data/samples/rails/vendor/plugins/gettext/locale/hr/LC_MESSAGES/gettext_plugin.mo +0 -0
  202. data/samples/rails/vendor/plugins/gettext/locale/nb/LC_MESSAGES/gettext_plugin.mo +0 -0
  203. data/samples/rails/vendor/plugins/gettext/locale/vi/LC_MESSAGES/gettext_plugin.mo +0 -0
  204. data/samples/rails/vendor/plugins/gettext/po/bs/gettext_plugin.po +27 -0
  205. data/samples/rails/vendor/plugins/gettext/po/hr/gettext_plugin.po +27 -0
  206. data/samples/rails/vendor/plugins/gettext/po/nb/gettext_plugin.po +27 -0
  207. data/samples/rails/vendor/plugins/gettext/po/vi/gettext_plugin.po +28 -0
  208. data/src/poparser.ry +9 -4
  209. data/test/README +2 -0
  210. data/test/Rakefile +2 -0
  211. data/test/gettext_test.rb +51 -13
  212. data/test/gettext_test_active_record.rb +33 -0
  213. data/test/gettext_test_parser.rb +5 -0
  214. data/test/gettext_test_rails_caching.rb +211 -0
  215. data/test/locale/da/LC_MESSAGES/plural_error.mo +0 -0
  216. data/test/locale/fr/LC_MESSAGES/plural.mo +0 -0
  217. data/test/locale/fr/LC_MESSAGES/plural_error.mo +0 -0
  218. data/test/locale/ja/LC_MESSAGES/plural.mo +0 -0
  219. data/test/locale/ja/LC_MESSAGES/plural_error.mo +0 -0
  220. data/test/locale/ja/LC_MESSAGES/test_nsgettext.mo +0 -0
  221. data/test/locale/la/LC_MESSAGES/plural_error.mo +0 -0
  222. data/test/po/da/plural_error.po +3 -3
  223. data/test/po/fr/plural.po +6 -0
  224. data/test/po/fr/plural_error.po +3 -3
  225. data/test/po/ja/plural.po +6 -0
  226. data/test/po/ja/plural_error.po +2 -2
  227. data/test/po/ja/test_nsgettext.po +65 -0
  228. data/test/po/la/plural_error.po +3 -3
  229. data/test/rails/README +5 -0
  230. data/test/rails/Rakefile +35 -0
  231. data/test/rails/app/controllers/application.rb +8 -0
  232. data/test/rails/app/controllers/articles_controller.rb +61 -0
  233. data/test/rails/app/controllers/mailer_controller.rb +19 -0
  234. data/test/rails/app/helpers/application_helper.rb +3 -0
  235. data/test/rails/app/helpers/articles_helper.rb +2 -0
  236. data/test/rails/app/helpers/mailer_helper.rb +2 -0
  237. data/test/rails/app/models/article.rb +5 -0
  238. data/test/rails/app/models/mailer.rb +38 -0
  239. data/test/rails/app/models/user.rb +3 -0
  240. data/test/rails/app/views/articles/_form.rhtml +13 -0
  241. data/test/rails/app/views/articles/edit.rhtml +9 -0
  242. data/test/rails/app/views/articles/list.rhtml +30 -0
  243. data/test/rails/app/views/articles/list_fr.rhtml +1 -0
  244. data/test/rails/app/views/articles/multi_error_messages_for.rhtml +19 -0
  245. data/test/rails/app/views/articles/new.rhtml +8 -0
  246. data/test/rails/app/views/articles/show.rhtml +28 -0
  247. data/test/rails/app/views/layouts/application.rhtml +14 -0
  248. data/test/rails/app/views/layouts/mailer.rhtml +20 -0
  249. data/test/rails/app/views/mailer/coverpage.rhtml +6 -0
  250. data/test/rails/app/views/mailer/coverpage_fr.rhtml +6 -0
  251. data/test/rails/app/views/mailer/singlepart.rhtml +3 -0
  252. data/test/rails/app/views/mailer/singlepart_fr.rhtml +3 -0
  253. data/test/rails/config/boot.rb +45 -0
  254. data/test/rails/config/database.yml +36 -0
  255. data/test/rails/config/environment.rb +64 -0
  256. data/test/rails/config/environments/development.rb +21 -0
  257. data/test/rails/config/environments/production.rb +18 -0
  258. data/test/rails/config/environments/test.rb +19 -0
  259. data/test/rails/config/routes.rb +23 -0
  260. data/test/rails/db/schema.rb +27 -0
  261. data/test/rails/po/ja/rails_test.po +142 -0
  262. data/test/rails/po/rails_test.pot +147 -0
  263. data/test/rails/public/404.html +30 -0
  264. data/test/rails/public/500.html +30 -0
  265. data/test/rails/public/dispatch.cgi +10 -0
  266. data/test/rails/public/dispatch.fcgi +24 -0
  267. data/test/rails/public/dispatch.rb +10 -0
  268. data/test/rails/public/favicon.ico +0 -0
  269. data/test/rails/public/images/rails.png +0 -0
  270. data/test/rails/public/index.html +277 -0
  271. data/test/rails/public/javascripts/application.js +2 -0
  272. data/test/rails/public/javascripts/controls.js +833 -0
  273. data/test/rails/public/javascripts/dragdrop.js +942 -0
  274. data/test/rails/public/javascripts/effects.js +1088 -0
  275. data/test/rails/public/javascripts/prototype.js +2515 -0
  276. data/test/rails/public/robots.txt +1 -0
  277. data/test/rails/public/stylesheets/scaffold.css +74 -0
  278. data/test/rails/script/about +3 -0
  279. data/test/rails/script/breakpointer +3 -0
  280. data/test/rails/script/console +3 -0
  281. data/test/rails/script/destroy +3 -0
  282. data/test/rails/script/generate +3 -0
  283. data/test/rails/script/performance/benchmarker +3 -0
  284. data/test/rails/script/performance/profiler +3 -0
  285. data/test/rails/script/plugin +3 -0
  286. data/test/rails/script/process/inspector +3 -0
  287. data/test/rails/script/process/reaper +3 -0
  288. data/test/rails/script/process/spawner +3 -0
  289. data/test/rails/script/runner +3 -0
  290. data/test/rails/script/server +3 -0
  291. data/test/rails/test/fixtures/articles.yml +11 -0
  292. data/test/rails/test/functional/articles_controller_test.rb +109 -0
  293. data/test/rails/test/functional/mailer_controller_test.rb +93 -0
  294. data/test/rails/test/integration/general_stories_test.rb +58 -0
  295. data/test/rails/test/result/en/create_error.html +95 -0
  296. data/test/rails/test/result/en/list.html +65 -0
  297. data/test/rails/test/result/en/multi_error_messages_for.html +153 -0
  298. data/test/rails/test/result/en/multipart.html +67 -0
  299. data/test/rails/test/result/en/new.html +95 -0
  300. data/test/rails/test/result/en/show.html +50 -0
  301. data/test/rails/test/result/en/singlepart.html +10 -0
  302. data/test/rails/test/result/fr/list.html +15 -0
  303. data/test/rails/test/result/fr/multipart.html +67 -0
  304. data/test/rails/test/result/fr/singlepart.html +10 -0
  305. data/test/rails/test/result/ja/create_error.html +95 -0
  306. data/test/rails/test/result/ja/list.html +65 -0
  307. data/test/rails/test/result/ja/multi_error_messages_for.html +153 -0
  308. data/test/rails/test/result/ja/multipart.html +67 -0
  309. data/test/rails/test/result/ja/new.html +95 -0
  310. data/test/rails/test/result/ja/show.html +50 -0
  311. data/test/rails/test/result/ja/singlepart.html +10 -0
  312. data/test/rails/test/test_helper.rb +28 -0
  313. data/test/rails/test/unit/article_test.rb +18 -0
  314. data/test/test.sh +4 -0
  315. data/test/test_nsgettext.rb +44 -0
  316. data/test/test_rubyparser_n_.rb +10 -0
  317. metadata +317 -20
  318. data/ext/gettext/locale_system-i386-mswin32.def +0 -2
  319. data/ext/gettext/locale_system-i386-mswin32.exp +0 -0
  320. data/ext/gettext/locale_system-i386-mswin32.lib +0 -0
  321. data/ext/gettext/locale_system-i386-mswin32.pdb +0 -0
  322. data/ext/gettext/locale_system.obj +0 -0
  323. data/ext/gettext/vc70.pdb +0 -0
  324. data/samples/rails/locale/cs/LC_MESSAGES/gettext_plugin.mo +0 -0
  325. data/samples/rails/locale/de/LC_MESSAGES/gettext_plugin.mo +0 -0
  326. data/samples/rails/locale/el/LC_MESSAGES/gettext_plugin.mo +0 -0
  327. data/samples/rails/locale/es/LC_MESSAGES/gettext_plugin.mo +0 -0
  328. data/samples/rails/locale/fr/LC_MESSAGES/gettext_plugin.mo +0 -0
  329. data/samples/rails/locale/ja/LC_MESSAGES/gettext_plugin.mo +0 -0
  330. data/samples/rails/locale/ko/LC_MESSAGES/gettext_plugin.mo +0 -0
  331. data/samples/rails/locale/nl/LC_MESSAGES/gettext_plugin.mo +0 -0
  332. data/samples/rails/locale/pt_BR/LC_MESSAGES/gettext_plugin.mo +0 -0
  333. data/samples/rails/locale/ru/LC_MESSAGES/gettext_plugin.mo +0 -0
@@ -0,0 +1 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
@@ -0,0 +1,74 @@
1
+ body { background-color: #fff; color: #333; }
2
+
3
+ body, p, ol, ul, td {
4
+ font-family: verdana, arial, helvetica, sans-serif;
5
+ font-size: 13px;
6
+ line-height: 18px;
7
+ }
8
+
9
+ pre {
10
+ background-color: #eee;
11
+ padding: 10px;
12
+ font-size: 11px;
13
+ }
14
+
15
+ a { color: #000; }
16
+ a:visited { color: #666; }
17
+ a:hover { color: #fff; background-color:#000; }
18
+
19
+ .fieldWithErrors {
20
+ padding: 2px;
21
+ background-color: red;
22
+ display: table;
23
+ }
24
+
25
+ #errorExplanation {
26
+ width: 400px;
27
+ border: 2px solid red;
28
+ padding: 7px;
29
+ padding-bottom: 12px;
30
+ margin-bottom: 20px;
31
+ background-color: #f0f0f0;
32
+ }
33
+
34
+ #errorExplanation h2 {
35
+ text-align: left;
36
+ font-weight: bold;
37
+ padding: 5px 5px 5px 15px;
38
+ font-size: 12px;
39
+ margin: -7px;
40
+ background-color: #c00;
41
+ color: #fff;
42
+ }
43
+
44
+ #errorExplanation p {
45
+ color: #333;
46
+ margin-bottom: 0;
47
+ padding: 5px;
48
+ }
49
+
50
+ #errorExplanation ul li {
51
+ font-size: 12px;
52
+ list-style: square;
53
+ }
54
+
55
+ div.uploadStatus {
56
+ margin: 5px;
57
+ }
58
+
59
+ div.progressBar {
60
+ margin: 5px;
61
+ }
62
+
63
+ div.progressBar div.border {
64
+ background-color: #fff;
65
+ border: 1px solid grey;
66
+ width: 100%;
67
+ }
68
+
69
+ div.progressBar div.background {
70
+ background-color: #333;
71
+ height: 18px;
72
+ width: 0%;
73
+ }
74
+
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/about'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/breakpointer'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/console'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/destroy'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/generate'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/performance/benchmarker'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/performance/profiler'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/plugin'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/process/inspector'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/process/reaper'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/process/spawner'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/runner'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/server'
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
+ first:
3
+ id: 1
4
+ title: タイトル1
5
+ description: 内容1
6
+ lastupdate: 2007-01-01
7
+ second:
8
+ id: 2
9
+ title: タイトル2
10
+ description: 内容2
11
+ lastupdate: 2007-01-02
@@ -0,0 +1,109 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ require 'articles_controller'
3
+
4
+ RESULT_DIR = File.dirname(__FILE__) + "/../../test/result/"
5
+
6
+ # Re-raise errors caught by the controller.
7
+ class ArticlesController; def rescue_action(e) raise e end; end
8
+
9
+ class ArticlesControllerTest < Test::Unit::TestCase
10
+ fixtures :articles
11
+
12
+ def setup
13
+ @controller = ArticlesController.new
14
+ @request = ActionController::TestRequest.new
15
+ @response = ActionController::TestResponse.new
16
+
17
+ @first_id = articles(:first).id
18
+ end
19
+
20
+ def save_html(path)
21
+ open(RESULT_DIR + path, "w"){|io| io.write @response.body}
22
+ end
23
+
24
+ def assert_html(path)
25
+ ary = IO.readlines(RESULT_DIR + path)
26
+ i = 0
27
+ @response.body.each_line{|line|
28
+ assert_equal ary[i], line
29
+ i += 1
30
+ }
31
+ end
32
+
33
+ def test_list
34
+ get :list, :lang => "ja"
35
+ assert_html("ja/list.html")
36
+ assert_response :success
37
+
38
+ get :list, :lang => "en"
39
+ assert_html("en/list.html")
40
+
41
+ # not match
42
+ get :list, :lang => "kr"
43
+ assert_html("en/list.html")
44
+
45
+ # list_fr.rhtml
46
+ get :list, :lang => "fr"
47
+ assert_html("fr/list.html")
48
+ end
49
+
50
+ def test_show
51
+ get :show, :id => @first_id, :lang => "ja"
52
+
53
+ assert_html("ja/show.html")
54
+ assert_response :success
55
+ assert_not_nil assigns(:article)
56
+ assert assigns(:article).valid?
57
+
58
+ get :show, :id => @first_id, :lang => "en"
59
+ assert_html("en/show.html")
60
+ end
61
+
62
+ def test_new
63
+ get :new, :lang => "ja"
64
+ assert_html("ja/new.html")
65
+ assert_response :success
66
+ assert_not_nil assigns(:article)
67
+
68
+ get :new, :lang => "en"
69
+ assert_html("en/new.html")
70
+ assert_response :success
71
+ assert_not_nil assigns(:article)
72
+ end
73
+
74
+ def test_create_error
75
+ post :create, :article => {:title => "", :description => "", :lastupdate => Date.new(2007, 4, 1)}, :lang => "ja"
76
+ assert_html("ja/create_error.html")
77
+
78
+ post :create, :article => {:title => "", :description => "", :lastupdate => Date.new(2007, 4, 1)}, :lang => "en"
79
+ assert_html("en/create_error.html")
80
+ end
81
+
82
+ def test_multi_error_messages_for
83
+ post :multi_error_messages_for, :article => {:article_title => "", :article_description => "", :user_name => ""}, :lang => "ja"
84
+ assert_html("ja/multi_error_messages_for.html")
85
+
86
+ post :multi_error_messages_for, :article => {:article_title => "", :article_description => "", :user_name => ""}, :lang => "en"
87
+ assert_html("en/multi_error_messages_for.html")
88
+ end
89
+
90
+ def test_update
91
+ post :update, :id => @first_id
92
+ assert_response :redirect
93
+ assert_redirected_to :action => 'show', :id => @first_id
94
+ end
95
+
96
+ def test_destroy
97
+ assert_nothing_raised {
98
+ Article.find(@first_id)
99
+ }
100
+
101
+ post :destroy, :id => @first_id
102
+ assert_response :redirect
103
+ assert_redirected_to :action => 'list'
104
+
105
+ assert_raise(ActiveRecord::RecordNotFound) {
106
+ Article.find(@first_id)
107
+ }
108
+ end
109
+ end
@@ -0,0 +1,93 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ require 'mailer_controller'
3
+
4
+ RESULT_DIR = File.dirname(__FILE__) + "/../../test/result/"
5
+
6
+ # Re-raise errors caught by the controller.
7
+ class MailerController; def rescue_action(e) raise e end; end
8
+
9
+ class MailerControllerTest < Test::Unit::TestCase
10
+ def setup
11
+ ActionMailer::Base.delivery_method = :test
12
+ ActionMailer::Base.perform_deliveries = true
13
+ ActionMailer::Base.deliveries = []
14
+
15
+ @controller = MailerController.new
16
+ @request = ActionController::TestRequest.new
17
+ @response = ActionController::TestResponse.new
18
+ end
19
+
20
+ def save_html(path, data)
21
+ open(RESULT_DIR + path, "w"){|io| io.write data}
22
+ end
23
+
24
+ def assert_mail(path, data)
25
+ assert_equal IO.read(RESULT_DIR + path), data
26
+ end
27
+
28
+ def mimepart(data)
29
+ data.gsub(/^--mimepart_.*$/, "--mimepart").
30
+ gsub(/boundary\=mimepart_(.*)$/, "boundary=mimepart")
31
+ end
32
+
33
+ def assert_multipart(path, data)
34
+ target = mimepart(IO.read(RESULT_DIR + path))
35
+ data = mimepart(data)
36
+ assert_equal target, data
37
+ end
38
+
39
+ def assert_html(path, data)
40
+ target = mimepart(IO.read(RESULT_DIR + path)).split("\n").collect{|n| n << "\n"}
41
+ data = mimepart(data)
42
+
43
+ i = 0
44
+ data.each_line{|line|
45
+ assert_equal target[i], line
46
+ i += 1
47
+ }
48
+ end
49
+
50
+ def test_singlepart
51
+ # Japanese
52
+ get :singlepart, :lang => "ja"
53
+ data = ActionMailer::Base.deliveries[0].decoded
54
+ assert_mail("ja/singlepart.html", data)
55
+
56
+ # English
57
+ get :singlepart, :lang => "en"
58
+ data = ActionMailer::Base.deliveries[1].decoded
59
+ assert_mail("en/singlepart.html", data)
60
+
61
+ # not match -> English
62
+ get :singlepart, :lang => "kr"
63
+ data = ActionMailer::Base.deliveries[2].decoded
64
+ assert_mail("en/singlepart.html", data)
65
+
66
+ # singlepart_fr.rhtml
67
+ get :singlepart, :lang => "fr"
68
+ data = ActionMailer::Base.deliveries[3].decoded
69
+ assert_mail("fr/singlepart.html", data)
70
+ end
71
+
72
+ def test_multipart
73
+ # Japanese
74
+ get :multipart, :lang => "ja"
75
+ data = ActionMailer::Base.deliveries[0].decoded
76
+ assert_multipart("ja/multipart.html", data)
77
+
78
+ # English
79
+ get :multipart, :lang => "en"
80
+ data = ActionMailer::Base.deliveries[1].decoded
81
+ assert_multipart("en/multipart.html", data)
82
+
83
+ # not match -> English
84
+ get :multipart, :lang => "kr"
85
+ data = ActionMailer::Base.deliveries[2].decoded
86
+ assert_multipart("en/multipart.html", data)
87
+
88
+ # multipart_fr.rhtml
89
+ get :multipart, :lang => "fr"
90
+ data = ActionMailer::Base.deliveries[3].decoded
91
+ assert_multipart("fr/multipart.html", data)
92
+ end
93
+ end
@@ -0,0 +1,58 @@
1
+ require "#{File.dirname(__FILE__)}/../test_helper"
2
+
3
+ RESULT_DIR = File.dirname(__FILE__) + "/../../test/result/"
4
+
5
+ class GeneralStoriesTest < ActionController::IntegrationTest
6
+ fixtures :articles
7
+
8
+ def assert_html(path)
9
+ open(RESULT_DIR + path) {|io|
10
+ data = io.read
11
+ assert_equal data, @response.body
12
+ }
13
+ end
14
+ def setup
15
+ @first_id = articles(:first).id
16
+ end
17
+
18
+ def test_list
19
+ get "/articles/list", nil, :accept_language => "ja"
20
+ assert_html("ja/list.html")
21
+ assert_response :success
22
+
23
+ get "/articles/list", nil, :accept_language => "en"
24
+ assert_html("en/list.html")
25
+ end
26
+
27
+ def test_show
28
+ get "/articles/show/1", nil, :accept_language => "ja"
29
+ assert_html("ja/show.html")
30
+ assert_response :success
31
+ assert_not_nil assigns(:article)
32
+ assert assigns(:article).valid?
33
+
34
+ get "/articles/show/1", nil, :accept_language => "en"
35
+ assert_html("en/show.html")
36
+ end
37
+
38
+ def test_new
39
+ get "/articles/new", nil, :accept_language => "ja"
40
+ assert_html("ja/new.html")
41
+ assert_response :success
42
+ assert_not_nil assigns(:article)
43
+
44
+ get "/articles/new", nil, :accept_language => "en"
45
+ assert_html("en/new.html")
46
+ assert_response :success
47
+ assert_not_nil assigns(:article)
48
+ end
49
+
50
+ def test_create_error
51
+ num_articles = Article.count
52
+ post "/articles/create", {:article => {:title => "", :description => "", :lastupdate => Date.new(2007, 4, 1)}}, :accept_language => "ja"
53
+ assert_html("ja/create_error.html")
54
+
55
+ post "/articles/create", {:article => {:title => "", :description => "", :lastupdate => Date.new(2007, 4, 1)}}, :accept_language => "en"
56
+ assert_html("en/create_error.html")
57
+ end
58
+ end
@@ -0,0 +1,95 @@
1
+ <html>
2
+ <head>
3
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
4
+ <title>Ruby-GetText-Package Test Application</title>
5
+ <link href="/stylesheets/scaffold.css" media="screen" rel="Stylesheet" type="text/css" />
6
+ </head>
7
+ <body>
8
+
9
+ <p style="color: green"></p>
10
+
11
+ <h1>New article</h1>
12
+
13
+ <form action="/articles/create" method="post">
14
+ <div class="errorExplanation" id="errorExplanation"><h2>2 errors prohibited this article from being saved</h2><p>There were problems with the following fields:</p><ul><li>Title can't be blank</li><li>Description is too short (minimum is 3 characters)</li></ul></div>
15
+
16
+ <!--[form:article]-->
17
+ <p><label for="article_title">Title</label><br/>
18
+ <div class="fieldWithErrors"><input id="article_title" name="article[title]" size="30" type="text" value="" /></div></p>
19
+
20
+ <p><label for="article_description">Description</label><br/>
21
+ <div class="fieldWithErrors"><textarea cols="40" id="article_description" name="article[description]" rows="20"></textarea></div></p>
22
+
23
+ <p><label for="article_lastupdate">Lastupdate</label><br/>
24
+ <select id="article_lastupdate_1i" name="article[lastupdate(1i)]">
25
+ <option value="2002">2002</option>
26
+ <option value="2003">2003</option>
27
+ <option value="2004">2004</option>
28
+ <option value="2005">2005</option>
29
+ <option value="2006">2006</option>
30
+ <option value="2007" selected="selected">2007</option>
31
+ <option value="2008">2008</option>
32
+ <option value="2009">2009</option>
33
+ <option value="2010">2010</option>
34
+ <option value="2011">2011</option>
35
+ <option value="2012">2012</option>
36
+ </select>
37
+ <select id="article_lastupdate_2i" name="article[lastupdate(2i)]">
38
+ <option value="1">January</option>
39
+ <option value="2">February</option>
40
+ <option value="3">March</option>
41
+ <option value="4" selected="selected">April</option>
42
+ <option value="5">May</option>
43
+ <option value="6">June</option>
44
+ <option value="7">July</option>
45
+ <option value="8">August</option>
46
+ <option value="9">September</option>
47
+ <option value="10">October</option>
48
+ <option value="11">November</option>
49
+ <option value="12">December</option>
50
+ </select>
51
+ <select id="article_lastupdate_3i" name="article[lastupdate(3i)]">
52
+ <option value="1" selected="selected">1</option>
53
+ <option value="2">2</option>
54
+ <option value="3">3</option>
55
+ <option value="4">4</option>
56
+ <option value="5">5</option>
57
+ <option value="6">6</option>
58
+ <option value="7">7</option>
59
+ <option value="8">8</option>
60
+ <option value="9">9</option>
61
+ <option value="10">10</option>
62
+ <option value="11">11</option>
63
+ <option value="12">12</option>
64
+ <option value="13">13</option>
65
+ <option value="14">14</option>
66
+ <option value="15">15</option>
67
+ <option value="16">16</option>
68
+ <option value="17">17</option>
69
+ <option value="18">18</option>
70
+ <option value="19">19</option>
71
+ <option value="20">20</option>
72
+ <option value="21">21</option>
73
+ <option value="22">22</option>
74
+ <option value="23">23</option>
75
+ <option value="24">24</option>
76
+ <option value="25">25</option>
77
+ <option value="26">26</option>
78
+ <option value="27">27</option>
79
+ <option value="28">28</option>
80
+ <option value="29">29</option>
81
+ <option value="30">30</option>
82
+ <option value="31">31</option>
83
+ </select>
84
+ </p>
85
+ <!--[eoform:article]-->
86
+
87
+
88
+ <input name="commit" type="submit" value="Create" />
89
+ </form>
90
+
91
+ <a href="/articles/list">Back</a>
92
+
93
+
94
+ </body>
95
+ </html>
@@ -0,0 +1,65 @@
1
+ <html>
2
+ <head>
3
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
4
+ <title>Ruby-GetText-Package Test Application</title>
5
+ <link href="/stylesheets/scaffold.css" media="screen" rel="Stylesheet" type="text/css" />
6
+ </head>
7
+ <body>
8
+
9
+ <p style="color: green"></p>
10
+
11
+ <h1>Listing articles</h1>
12
+
13
+ <table>
14
+ <tr>
15
+
16
+ <th>Title</th>
17
+
18
+ <th>Description</th>
19
+
20
+ <th>Lastupdate</th>
21
+
22
+ </tr>
23
+
24
+
25
+ <tr>
26
+
27
+ <td>タイトル1</td>
28
+
29
+ <td>内容1</td>
30
+
31
+ <td>2007-01-01</td>
32
+
33
+ <td><a href="/articles/show/1">Show</a></td>
34
+ <td><a href="/articles/edit/1">Edit</a></td>
35
+ <td><a href="/articles/destroy/1" onclick="if (confirm('Are you sure?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;f.submit(); };return false;">Destroy</a></td>
36
+ </tr>
37
+
38
+ <tr>
39
+
40
+ <td>タイトル2</td>
41
+
42
+ <td>内容2</td>
43
+
44
+ <td>2007-01-02</td>
45
+
46
+ <td><a href="/articles/show/2">Show</a></td>
47
+ <td><a href="/articles/edit/2">Edit</a></td>
48
+ <td><a href="/articles/destroy/2" onclick="if (confirm('Are you sure?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;f.submit(); };return false;">Destroy</a></td>
49
+ </tr>
50
+
51
+ </table>
52
+
53
+
54
+
55
+
56
+ <br />
57
+
58
+ <a href="/articles/new">New article</a>
59
+ <br />
60
+ <br />
61
+ <a href="/articles/multi_error_messages_for">error_messages_for Test</a>
62
+
63
+
64
+ </body>
65
+ </html>