gettext 3.0.0 → 3.0.1

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 (441) hide show
  1. data/Rakefile +23 -12
  2. data/doc/text/news.md +31 -0
  3. data/lib/gettext/po.rb +17 -7
  4. data/lib/gettext/po_entry.rb +212 -208
  5. data/lib/gettext/po_format.rb +28 -0
  6. data/lib/gettext/po_parser.rb +25 -25
  7. data/lib/gettext/text_domain.rb +10 -0
  8. data/lib/gettext/tools/msginit.rb +19 -1
  9. data/lib/gettext/tools/msgmerge.rb +122 -68
  10. data/lib/gettext/tools/task.rb +306 -87
  11. data/lib/gettext/tools/xgettext.rb +27 -1
  12. data/lib/gettext/version.rb +1 -1
  13. data/locale/bg/LC_MESSAGES/gettext.mo +0 -0
  14. data/locale/bs/LC_MESSAGES/gettext.mo +0 -0
  15. data/locale/ca/LC_MESSAGES/gettext.mo +0 -0
  16. data/locale/cs/LC_MESSAGES/gettext.mo +0 -0
  17. data/locale/de/LC_MESSAGES/gettext.mo +0 -0
  18. data/locale/el/LC_MESSAGES/gettext.mo +0 -0
  19. data/locale/eo/LC_MESSAGES/gettext.mo +0 -0
  20. data/locale/es/LC_MESSAGES/gettext.mo +0 -0
  21. data/locale/et/LC_MESSAGES/gettext.mo +0 -0
  22. data/locale/fr/LC_MESSAGES/gettext.mo +0 -0
  23. data/locale/hr/LC_MESSAGES/gettext.mo +0 -0
  24. data/locale/hu/LC_MESSAGES/gettext.mo +0 -0
  25. data/locale/it/LC_MESSAGES/gettext.mo +0 -0
  26. data/locale/ja/LC_MESSAGES/gettext.mo +0 -0
  27. data/locale/ko/LC_MESSAGES/gettext.mo +0 -0
  28. data/locale/lv/LC_MESSAGES/gettext.mo +0 -0
  29. data/locale/nb/LC_MESSAGES/gettext.mo +0 -0
  30. data/locale/nl/LC_MESSAGES/gettext.mo +0 -0
  31. data/locale/pt_BR/LC_MESSAGES/gettext.mo +0 -0
  32. data/locale/ru/LC_MESSAGES/gettext.mo +0 -0
  33. data/locale/sr/LC_MESSAGES/gettext.mo +0 -0
  34. data/locale/sv/LC_MESSAGES/gettext.mo +0 -0
  35. data/locale/uk/LC_MESSAGES/gettext.mo +0 -0
  36. data/locale/vi/LC_MESSAGES/gettext.mo +0 -0
  37. data/locale/zh/LC_MESSAGES/gettext.mo +0 -0
  38. data/locale/zh_TW/LC_MESSAGES/gettext.mo +0 -0
  39. data/po/bg/gettext.po +370 -284
  40. data/po/bs/gettext.po +378 -321
  41. data/po/ca/gettext.po +373 -284
  42. data/po/cs/gettext.po +371 -313
  43. data/po/de/gettext.po +380 -282
  44. data/po/el/gettext.po +377 -277
  45. data/po/eo/gettext.po +373 -275
  46. data/po/es/gettext.po +376 -277
  47. data/po/et/gettext.po +374 -274
  48. data/po/fr/gettext.po +380 -279
  49. data/po/gettext.pot +102 -70
  50. data/po/hr/gettext.po +371 -308
  51. data/po/hu/gettext.po +376 -276
  52. data/po/it/gettext.po +362 -269
  53. data/po/ja/gettext.po +338 -216
  54. data/po/ko/gettext.po +392 -266
  55. data/po/lv/gettext.po +377 -310
  56. data/po/nb/gettext.po +377 -278
  57. data/po/nl/gettext.po +371 -274
  58. data/po/pt_BR/gettext.po +376 -277
  59. data/po/ru/gettext.po +380 -311
  60. data/po/sr/gettext.po +378 -310
  61. data/po/sv/gettext.po +331 -258
  62. data/po/uk/gettext.po +380 -311
  63. data/po/vi/gettext.po +374 -275
  64. data/po/zh/gettext.po +397 -266
  65. data/po/zh_TW/gettext.po +397 -266
  66. data/samples/cgi/README +0 -2
  67. data/samples/cgi/locale/bg/LC_MESSAGES/helloerb1.mo +0 -0
  68. data/samples/cgi/locale/bg/LC_MESSAGES/helloerb2.mo +0 -0
  69. data/samples/cgi/locale/bg/LC_MESSAGES/hellolib.mo +0 -0
  70. data/samples/cgi/locale/bg/LC_MESSAGES/main.mo +0 -0
  71. data/samples/cgi/locale/bs/LC_MESSAGES/helloerb1.mo +0 -0
  72. data/samples/cgi/locale/bs/LC_MESSAGES/helloerb2.mo +0 -0
  73. data/samples/cgi/locale/bs/LC_MESSAGES/hellolib.mo +0 -0
  74. data/samples/cgi/locale/bs/LC_MESSAGES/main.mo +0 -0
  75. data/samples/cgi/locale/ca/LC_MESSAGES/helloerb1.mo +0 -0
  76. data/samples/cgi/locale/ca/LC_MESSAGES/helloerb2.mo +0 -0
  77. data/samples/cgi/locale/ca/LC_MESSAGES/hellolib.mo +0 -0
  78. data/samples/cgi/locale/ca/LC_MESSAGES/main.mo +0 -0
  79. data/samples/cgi/locale/cs/LC_MESSAGES/helloerb1.mo +0 -0
  80. data/samples/cgi/locale/cs/LC_MESSAGES/helloerb2.mo +0 -0
  81. data/samples/cgi/locale/cs/LC_MESSAGES/hellolib.mo +0 -0
  82. data/samples/cgi/locale/cs/LC_MESSAGES/main.mo +0 -0
  83. data/samples/cgi/locale/de/LC_MESSAGES/helloerb1.mo +0 -0
  84. data/samples/cgi/locale/de/LC_MESSAGES/helloerb2.mo +0 -0
  85. data/samples/cgi/locale/de/LC_MESSAGES/hellolib.mo +0 -0
  86. data/samples/cgi/locale/de/LC_MESSAGES/main.mo +0 -0
  87. data/samples/cgi/locale/el/LC_MESSAGES/helloerb1.mo +0 -0
  88. data/samples/cgi/locale/el/LC_MESSAGES/helloerb2.mo +0 -0
  89. data/samples/cgi/locale/el/LC_MESSAGES/hellolib.mo +0 -0
  90. data/samples/cgi/locale/el/LC_MESSAGES/main.mo +0 -0
  91. data/samples/cgi/locale/eo/LC_MESSAGES/helloerb1.mo +0 -0
  92. data/samples/cgi/locale/eo/LC_MESSAGES/helloerb2.mo +0 -0
  93. data/samples/cgi/locale/eo/LC_MESSAGES/hellolib.mo +0 -0
  94. data/samples/cgi/locale/eo/LC_MESSAGES/main.mo +0 -0
  95. data/samples/cgi/locale/es/LC_MESSAGES/helloerb1.mo +0 -0
  96. data/samples/cgi/locale/es/LC_MESSAGES/helloerb2.mo +0 -0
  97. data/samples/cgi/locale/es/LC_MESSAGES/hellolib.mo +0 -0
  98. data/samples/cgi/locale/es/LC_MESSAGES/main.mo +0 -0
  99. data/samples/cgi/locale/fr/LC_MESSAGES/helloerb1.mo +0 -0
  100. data/samples/cgi/locale/fr/LC_MESSAGES/helloerb2.mo +0 -0
  101. data/samples/cgi/locale/fr/LC_MESSAGES/hellolib.mo +0 -0
  102. data/samples/cgi/locale/fr/LC_MESSAGES/main.mo +0 -0
  103. data/samples/cgi/locale/hr/LC_MESSAGES/helloerb1.mo +0 -0
  104. data/samples/cgi/locale/hr/LC_MESSAGES/helloerb2.mo +0 -0
  105. data/samples/cgi/locale/hr/LC_MESSAGES/hellolib.mo +0 -0
  106. data/samples/cgi/locale/hr/LC_MESSAGES/main.mo +0 -0
  107. data/samples/cgi/locale/hu/LC_MESSAGES/helloerb1.mo +0 -0
  108. data/samples/cgi/locale/hu/LC_MESSAGES/helloerb2.mo +0 -0
  109. data/samples/cgi/locale/hu/LC_MESSAGES/hellolib.mo +0 -0
  110. data/samples/cgi/locale/hu/LC_MESSAGES/main.mo +0 -0
  111. data/samples/cgi/locale/it/LC_MESSAGES/helloerb1.mo +0 -0
  112. data/samples/cgi/locale/it/LC_MESSAGES/helloerb2.mo +0 -0
  113. data/samples/cgi/locale/it/LC_MESSAGES/hellolib.mo +0 -0
  114. data/samples/cgi/locale/it/LC_MESSAGES/main.mo +0 -0
  115. data/samples/cgi/locale/ja/LC_MESSAGES/helloerb1.mo +0 -0
  116. data/samples/cgi/locale/ja/LC_MESSAGES/helloerb2.mo +0 -0
  117. data/samples/cgi/locale/ja/LC_MESSAGES/hellolib.mo +0 -0
  118. data/samples/cgi/locale/ja/LC_MESSAGES/main.mo +0 -0
  119. data/samples/cgi/locale/ko/LC_MESSAGES/helloerb1.mo +0 -0
  120. data/samples/cgi/locale/ko/LC_MESSAGES/helloerb2.mo +0 -0
  121. data/samples/cgi/locale/ko/LC_MESSAGES/hellolib.mo +0 -0
  122. data/samples/cgi/locale/ko/LC_MESSAGES/main.mo +0 -0
  123. data/samples/cgi/locale/lv/LC_MESSAGES/helloerb1.mo +0 -0
  124. data/samples/cgi/locale/lv/LC_MESSAGES/helloerb2.mo +0 -0
  125. data/samples/cgi/locale/lv/LC_MESSAGES/hellolib.mo +0 -0
  126. data/samples/cgi/locale/lv/LC_MESSAGES/main.mo +0 -0
  127. data/samples/cgi/locale/nb/LC_MESSAGES/helloerb1.mo +0 -0
  128. data/samples/cgi/locale/nb/LC_MESSAGES/helloerb2.mo +0 -0
  129. data/samples/cgi/locale/nb/LC_MESSAGES/hellolib.mo +0 -0
  130. data/samples/cgi/locale/nb/LC_MESSAGES/main.mo +0 -0
  131. data/samples/cgi/locale/nl/LC_MESSAGES/helloerb1.mo +0 -0
  132. data/samples/cgi/locale/nl/LC_MESSAGES/helloerb2.mo +0 -0
  133. data/samples/cgi/locale/nl/LC_MESSAGES/hellolib.mo +0 -0
  134. data/samples/cgi/locale/nl/LC_MESSAGES/main.mo +0 -0
  135. data/samples/cgi/locale/pt_BR/LC_MESSAGES/helloerb1.mo +0 -0
  136. data/samples/cgi/locale/pt_BR/LC_MESSAGES/helloerb2.mo +0 -0
  137. data/samples/cgi/locale/pt_BR/LC_MESSAGES/hellolib.mo +0 -0
  138. data/samples/cgi/locale/pt_BR/LC_MESSAGES/main.mo +0 -0
  139. data/samples/cgi/locale/ru/LC_MESSAGES/helloerb1.mo +0 -0
  140. data/samples/cgi/locale/ru/LC_MESSAGES/helloerb2.mo +0 -0
  141. data/samples/cgi/locale/ru/LC_MESSAGES/hellolib.mo +0 -0
  142. data/samples/cgi/locale/ru/LC_MESSAGES/main.mo +0 -0
  143. data/samples/cgi/locale/sr/LC_MESSAGES/helloerb1.mo +0 -0
  144. data/samples/cgi/locale/sr/LC_MESSAGES/helloerb2.mo +0 -0
  145. data/samples/cgi/locale/sr/LC_MESSAGES/hellolib.mo +0 -0
  146. data/samples/cgi/locale/sr/LC_MESSAGES/main.mo +0 -0
  147. data/samples/cgi/locale/uk/LC_MESSAGES/helloerb1.mo +0 -0
  148. data/samples/cgi/locale/uk/LC_MESSAGES/helloerb2.mo +0 -0
  149. data/samples/cgi/locale/uk/LC_MESSAGES/hellolib.mo +0 -0
  150. data/samples/cgi/locale/uk/LC_MESSAGES/main.mo +0 -0
  151. data/samples/cgi/locale/vi/LC_MESSAGES/helloerb1.mo +0 -0
  152. data/samples/cgi/locale/vi/LC_MESSAGES/helloerb2.mo +0 -0
  153. data/samples/cgi/locale/vi/LC_MESSAGES/hellolib.mo +0 -0
  154. data/samples/cgi/locale/vi/LC_MESSAGES/main.mo +0 -0
  155. data/samples/cgi/locale/zh/LC_MESSAGES/helloerb1.mo +0 -0
  156. data/samples/cgi/locale/zh/LC_MESSAGES/helloerb2.mo +0 -0
  157. data/samples/cgi/locale/zh/LC_MESSAGES/hellolib.mo +0 -0
  158. data/samples/cgi/locale/zh/LC_MESSAGES/main.mo +0 -0
  159. data/samples/cgi/locale/zh_TW/LC_MESSAGES/helloerb1.mo +0 -0
  160. data/samples/cgi/locale/zh_TW/LC_MESSAGES/helloerb2.mo +0 -0
  161. data/samples/cgi/locale/zh_TW/LC_MESSAGES/hellolib.mo +0 -0
  162. data/samples/cgi/locale/zh_TW/LC_MESSAGES/main.mo +0 -0
  163. data/samples/locale/bg/LC_MESSAGES/hello.mo +0 -0
  164. data/samples/locale/bg/LC_MESSAGES/hello2.mo +0 -0
  165. data/samples/locale/bg/LC_MESSAGES/hello_glade2.mo +0 -0
  166. data/samples/locale/bg/LC_MESSAGES/hello_gtk2.mo +0 -0
  167. data/samples/locale/bg/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  168. data/samples/locale/bg/LC_MESSAGES/hello_noop.mo +0 -0
  169. data/samples/locale/bg/LC_MESSAGES/hello_plural.mo +0 -0
  170. data/samples/locale/bg/LC_MESSAGES/hello_tk.mo +0 -0
  171. data/samples/locale/bs/LC_MESSAGES/hello.mo +0 -0
  172. data/samples/locale/bs/LC_MESSAGES/hello2.mo +0 -0
  173. data/samples/locale/bs/LC_MESSAGES/hello_glade2.mo +0 -0
  174. data/samples/locale/bs/LC_MESSAGES/hello_gtk2.mo +0 -0
  175. data/samples/locale/bs/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  176. data/samples/locale/bs/LC_MESSAGES/hello_noop.mo +0 -0
  177. data/samples/locale/bs/LC_MESSAGES/hello_plural.mo +0 -0
  178. data/samples/locale/bs/LC_MESSAGES/hello_tk.mo +0 -0
  179. data/samples/locale/ca/LC_MESSAGES/hello.mo +0 -0
  180. data/samples/locale/ca/LC_MESSAGES/hello2.mo +0 -0
  181. data/samples/locale/ca/LC_MESSAGES/hello_glade2.mo +0 -0
  182. data/samples/locale/ca/LC_MESSAGES/hello_gtk2.mo +0 -0
  183. data/samples/locale/ca/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  184. data/samples/locale/ca/LC_MESSAGES/hello_noop.mo +0 -0
  185. data/samples/locale/ca/LC_MESSAGES/hello_plural.mo +0 -0
  186. data/samples/locale/ca/LC_MESSAGES/hello_tk.mo +0 -0
  187. data/samples/locale/cs/LC_MESSAGES/hello.mo +0 -0
  188. data/samples/locale/cs/LC_MESSAGES/hello2.mo +0 -0
  189. data/samples/locale/cs/LC_MESSAGES/hello_glade2.mo +0 -0
  190. data/samples/locale/cs/LC_MESSAGES/hello_gtk2.mo +0 -0
  191. data/samples/locale/cs/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  192. data/samples/locale/cs/LC_MESSAGES/hello_noop.mo +0 -0
  193. data/samples/locale/cs/LC_MESSAGES/hello_plural.mo +0 -0
  194. data/samples/locale/cs/LC_MESSAGES/hello_tk.mo +0 -0
  195. data/samples/locale/de/LC_MESSAGES/hello.mo +0 -0
  196. data/samples/locale/de/LC_MESSAGES/hello2.mo +0 -0
  197. data/samples/locale/de/LC_MESSAGES/hello_glade2.mo +0 -0
  198. data/samples/locale/de/LC_MESSAGES/hello_gtk2.mo +0 -0
  199. data/samples/locale/de/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  200. data/samples/locale/de/LC_MESSAGES/hello_noop.mo +0 -0
  201. data/samples/locale/de/LC_MESSAGES/hello_plural.mo +0 -0
  202. data/samples/locale/de/LC_MESSAGES/hello_tk.mo +0 -0
  203. data/samples/locale/el/LC_MESSAGES/hello.mo +0 -0
  204. data/samples/locale/el/LC_MESSAGES/hello2.mo +0 -0
  205. data/samples/locale/el/LC_MESSAGES/hello_glade2.mo +0 -0
  206. data/samples/locale/el/LC_MESSAGES/hello_gtk2.mo +0 -0
  207. data/samples/locale/el/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  208. data/samples/locale/el/LC_MESSAGES/hello_noop.mo +0 -0
  209. data/samples/locale/el/LC_MESSAGES/hello_plural.mo +0 -0
  210. data/samples/locale/el/LC_MESSAGES/hello_tk.mo +0 -0
  211. data/samples/locale/eo/LC_MESSAGES/hello.mo +0 -0
  212. data/samples/locale/eo/LC_MESSAGES/hello2.mo +0 -0
  213. data/samples/locale/eo/LC_MESSAGES/hello_glade2.mo +0 -0
  214. data/samples/locale/eo/LC_MESSAGES/hello_gtk2.mo +0 -0
  215. data/samples/locale/eo/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  216. data/samples/locale/eo/LC_MESSAGES/hello_noop.mo +0 -0
  217. data/samples/locale/eo/LC_MESSAGES/hello_plural.mo +0 -0
  218. data/samples/locale/eo/LC_MESSAGES/hello_tk.mo +0 -0
  219. data/samples/locale/es/LC_MESSAGES/hello.mo +0 -0
  220. data/samples/locale/es/LC_MESSAGES/hello2.mo +0 -0
  221. data/samples/locale/es/LC_MESSAGES/hello_glade2.mo +0 -0
  222. data/samples/locale/es/LC_MESSAGES/hello_gtk2.mo +0 -0
  223. data/samples/locale/es/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  224. data/samples/locale/es/LC_MESSAGES/hello_noop.mo +0 -0
  225. data/samples/locale/es/LC_MESSAGES/hello_plural.mo +0 -0
  226. data/samples/locale/es/LC_MESSAGES/hello_tk.mo +0 -0
  227. data/samples/locale/fr/LC_MESSAGES/hello.mo +0 -0
  228. data/samples/locale/fr/LC_MESSAGES/hello2.mo +0 -0
  229. data/samples/locale/fr/LC_MESSAGES/hello_glade2.mo +0 -0
  230. data/samples/locale/fr/LC_MESSAGES/hello_gtk2.mo +0 -0
  231. data/samples/locale/fr/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  232. data/samples/locale/fr/LC_MESSAGES/hello_noop.mo +0 -0
  233. data/samples/locale/fr/LC_MESSAGES/hello_plural.mo +0 -0
  234. data/samples/locale/fr/LC_MESSAGES/hello_tk.mo +0 -0
  235. data/samples/locale/hr/LC_MESSAGES/hello.mo +0 -0
  236. data/samples/locale/hr/LC_MESSAGES/hello2.mo +0 -0
  237. data/samples/locale/hr/LC_MESSAGES/hello_glade2.mo +0 -0
  238. data/samples/locale/hr/LC_MESSAGES/hello_gtk2.mo +0 -0
  239. data/samples/locale/hr/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  240. data/samples/locale/hr/LC_MESSAGES/hello_noop.mo +0 -0
  241. data/samples/locale/hr/LC_MESSAGES/hello_plural.mo +0 -0
  242. data/samples/locale/hr/LC_MESSAGES/hello_tk.mo +0 -0
  243. data/samples/locale/hu/LC_MESSAGES/hello.mo +0 -0
  244. data/samples/locale/hu/LC_MESSAGES/hello2.mo +0 -0
  245. data/samples/locale/hu/LC_MESSAGES/hello_glade2.mo +0 -0
  246. data/samples/locale/hu/LC_MESSAGES/hello_gtk2.mo +0 -0
  247. data/samples/locale/hu/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  248. data/samples/locale/hu/LC_MESSAGES/hello_noop.mo +0 -0
  249. data/samples/locale/hu/LC_MESSAGES/hello_plural.mo +0 -0
  250. data/samples/locale/hu/LC_MESSAGES/hello_tk.mo +0 -0
  251. data/samples/locale/it/LC_MESSAGES/hello.mo +0 -0
  252. data/samples/locale/it/LC_MESSAGES/hello2.mo +0 -0
  253. data/samples/locale/it/LC_MESSAGES/hello_glade2.mo +0 -0
  254. data/samples/locale/it/LC_MESSAGES/hello_gtk2.mo +0 -0
  255. data/samples/locale/it/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  256. data/samples/locale/it/LC_MESSAGES/hello_noop.mo +0 -0
  257. data/samples/locale/it/LC_MESSAGES/hello_plural.mo +0 -0
  258. data/samples/locale/it/LC_MESSAGES/hello_tk.mo +0 -0
  259. data/samples/locale/ja/LC_MESSAGES/hello.mo +0 -0
  260. data/samples/locale/ja/LC_MESSAGES/hello2.mo +0 -0
  261. data/samples/locale/ja/LC_MESSAGES/hello_glade2.mo +0 -0
  262. data/samples/locale/ja/LC_MESSAGES/hello_gtk2.mo +0 -0
  263. data/samples/locale/ja/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  264. data/samples/locale/ja/LC_MESSAGES/hello_noop.mo +0 -0
  265. data/samples/locale/ja/LC_MESSAGES/hello_plural.mo +0 -0
  266. data/samples/locale/ja/LC_MESSAGES/hello_tk.mo +0 -0
  267. data/samples/locale/ko/LC_MESSAGES/hello.mo +0 -0
  268. data/samples/locale/ko/LC_MESSAGES/hello2.mo +0 -0
  269. data/samples/locale/ko/LC_MESSAGES/hello_glade2.mo +0 -0
  270. data/samples/locale/ko/LC_MESSAGES/hello_gtk2.mo +0 -0
  271. data/samples/locale/ko/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  272. data/samples/locale/ko/LC_MESSAGES/hello_noop.mo +0 -0
  273. data/samples/locale/ko/LC_MESSAGES/hello_plural.mo +0 -0
  274. data/samples/locale/ko/LC_MESSAGES/hello_tk.mo +0 -0
  275. data/samples/locale/lv/LC_MESSAGES/hello.mo +0 -0
  276. data/samples/locale/lv/LC_MESSAGES/hello2.mo +0 -0
  277. data/samples/locale/lv/LC_MESSAGES/hello_glade2.mo +0 -0
  278. data/samples/locale/lv/LC_MESSAGES/hello_gtk2.mo +0 -0
  279. data/samples/locale/lv/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  280. data/samples/locale/lv/LC_MESSAGES/hello_noop.mo +0 -0
  281. data/samples/locale/lv/LC_MESSAGES/hello_plural.mo +0 -0
  282. data/samples/locale/lv/LC_MESSAGES/hello_tk.mo +0 -0
  283. data/samples/locale/nb/LC_MESSAGES/hello.mo +0 -0
  284. data/samples/locale/nb/LC_MESSAGES/hello2.mo +0 -0
  285. data/samples/locale/nb/LC_MESSAGES/hello_glade2.mo +0 -0
  286. data/samples/locale/nb/LC_MESSAGES/hello_gtk2.mo +0 -0
  287. data/samples/locale/nb/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  288. data/samples/locale/nb/LC_MESSAGES/hello_noop.mo +0 -0
  289. data/samples/locale/nb/LC_MESSAGES/hello_plural.mo +0 -0
  290. data/samples/locale/nb/LC_MESSAGES/hello_tk.mo +0 -0
  291. data/samples/locale/nl/LC_MESSAGES/hello.mo +0 -0
  292. data/samples/locale/nl/LC_MESSAGES/hello2.mo +0 -0
  293. data/samples/locale/nl/LC_MESSAGES/hello_glade2.mo +0 -0
  294. data/samples/locale/nl/LC_MESSAGES/hello_gtk2.mo +0 -0
  295. data/samples/locale/nl/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  296. data/samples/locale/nl/LC_MESSAGES/hello_noop.mo +0 -0
  297. data/samples/locale/nl/LC_MESSAGES/hello_plural.mo +0 -0
  298. data/samples/locale/nl/LC_MESSAGES/hello_tk.mo +0 -0
  299. data/samples/locale/pt_BR/LC_MESSAGES/hello.mo +0 -0
  300. data/samples/locale/pt_BR/LC_MESSAGES/hello2.mo +0 -0
  301. data/samples/locale/pt_BR/LC_MESSAGES/hello_glade2.mo +0 -0
  302. data/samples/locale/pt_BR/LC_MESSAGES/hello_gtk2.mo +0 -0
  303. data/samples/locale/pt_BR/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  304. data/samples/locale/pt_BR/LC_MESSAGES/hello_noop.mo +0 -0
  305. data/samples/locale/pt_BR/LC_MESSAGES/hello_plural.mo +0 -0
  306. data/samples/locale/pt_BR/LC_MESSAGES/hello_tk.mo +0 -0
  307. data/samples/locale/ru/LC_MESSAGES/hello.mo +0 -0
  308. data/samples/locale/ru/LC_MESSAGES/hello2.mo +0 -0
  309. data/samples/locale/ru/LC_MESSAGES/hello_glade2.mo +0 -0
  310. data/samples/locale/ru/LC_MESSAGES/hello_gtk2.mo +0 -0
  311. data/samples/locale/ru/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  312. data/samples/locale/ru/LC_MESSAGES/hello_noop.mo +0 -0
  313. data/samples/locale/ru/LC_MESSAGES/hello_plural.mo +0 -0
  314. data/samples/locale/ru/LC_MESSAGES/hello_tk.mo +0 -0
  315. data/samples/locale/sr/LC_MESSAGES/hello.mo +0 -0
  316. data/samples/locale/sr/LC_MESSAGES/hello2.mo +0 -0
  317. data/samples/locale/sr/LC_MESSAGES/hello_glade2.mo +0 -0
  318. data/samples/locale/sr/LC_MESSAGES/hello_gtk2.mo +0 -0
  319. data/samples/locale/sr/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  320. data/samples/locale/sr/LC_MESSAGES/hello_noop.mo +0 -0
  321. data/samples/locale/sr/LC_MESSAGES/hello_plural.mo +0 -0
  322. data/samples/locale/sr/LC_MESSAGES/hello_tk.mo +0 -0
  323. data/samples/locale/sv/LC_MESSAGES/hello.mo +0 -0
  324. data/samples/locale/sv/LC_MESSAGES/hello2.mo +0 -0
  325. data/samples/locale/sv/LC_MESSAGES/hello_glade2.mo +0 -0
  326. data/samples/locale/sv/LC_MESSAGES/hello_gtk2.mo +0 -0
  327. data/samples/locale/sv/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  328. data/samples/locale/sv/LC_MESSAGES/hello_noop.mo +0 -0
  329. data/samples/locale/sv/LC_MESSAGES/hello_plural.mo +0 -0
  330. data/samples/locale/sv/LC_MESSAGES/hello_tk.mo +0 -0
  331. data/samples/locale/uk/LC_MESSAGES/hello.mo +0 -0
  332. data/samples/locale/uk/LC_MESSAGES/hello2.mo +0 -0
  333. data/samples/locale/uk/LC_MESSAGES/hello_glade2.mo +0 -0
  334. data/samples/locale/uk/LC_MESSAGES/hello_gtk2.mo +0 -0
  335. data/samples/locale/uk/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  336. data/samples/locale/uk/LC_MESSAGES/hello_noop.mo +0 -0
  337. data/samples/locale/uk/LC_MESSAGES/hello_plural.mo +0 -0
  338. data/samples/locale/uk/LC_MESSAGES/hello_tk.mo +0 -0
  339. data/samples/locale/vi/LC_MESSAGES/hello.mo +0 -0
  340. data/samples/locale/vi/LC_MESSAGES/hello2.mo +0 -0
  341. data/samples/locale/vi/LC_MESSAGES/hello_glade2.mo +0 -0
  342. data/samples/locale/vi/LC_MESSAGES/hello_gtk2.mo +0 -0
  343. data/samples/locale/vi/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  344. data/samples/locale/vi/LC_MESSAGES/hello_noop.mo +0 -0
  345. data/samples/locale/vi/LC_MESSAGES/hello_plural.mo +0 -0
  346. data/samples/locale/vi/LC_MESSAGES/hello_tk.mo +0 -0
  347. data/samples/locale/zh/LC_MESSAGES/hello.mo +0 -0
  348. data/samples/locale/zh/LC_MESSAGES/hello2.mo +0 -0
  349. data/samples/locale/zh/LC_MESSAGES/hello_glade2.mo +0 -0
  350. data/samples/locale/zh/LC_MESSAGES/hello_gtk2.mo +0 -0
  351. data/samples/locale/zh/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  352. data/samples/locale/zh/LC_MESSAGES/hello_noop.mo +0 -0
  353. data/samples/locale/zh/LC_MESSAGES/hello_plural.mo +0 -0
  354. data/samples/locale/zh/LC_MESSAGES/hello_tk.mo +0 -0
  355. data/samples/locale/zh_TW/LC_MESSAGES/hello.mo +0 -0
  356. data/samples/locale/zh_TW/LC_MESSAGES/hello2.mo +0 -0
  357. data/samples/locale/zh_TW/LC_MESSAGES/hello_glade2.mo +0 -0
  358. data/samples/locale/zh_TW/LC_MESSAGES/hello_gtk2.mo +0 -0
  359. data/samples/locale/zh_TW/LC_MESSAGES/hello_gtk_builder.mo +0 -0
  360. data/samples/locale/zh_TW/LC_MESSAGES/hello_noop.mo +0 -0
  361. data/samples/locale/zh_TW/LC_MESSAGES/hello_plural.mo +0 -0
  362. data/samples/locale/zh_TW/LC_MESSAGES/hello_tk.mo +0 -0
  363. data/samples/po/bg/hello_gtk_builder.po +19 -0
  364. data/samples/po/bs/hello_gtk_builder.po +19 -0
  365. data/samples/po/ca/hello_gtk_builder.po +19 -0
  366. data/samples/po/cs/hello_gtk_builder.po +19 -0
  367. data/samples/po/de/hello_gtk_builder.po +19 -0
  368. data/samples/po/el/hello_gtk_builder.po +19 -0
  369. data/samples/po/eo/hello_gtk_builder.po +19 -0
  370. data/samples/po/es/hello_gtk_builder.po +19 -0
  371. data/samples/po/fr/hello_gtk_builder.po +19 -0
  372. data/samples/po/hello.pot +24 -0
  373. data/samples/po/hello2.pot +33 -0
  374. data/samples/po/hello_glade2.pot +31 -0
  375. data/samples/po/hello_gtk2.pot +23 -0
  376. data/samples/po/hello_gtk_builder.pot +20 -0
  377. data/samples/po/hello_noop.pot +27 -0
  378. data/samples/po/hello_plural.pot +27 -0
  379. data/samples/po/hello_tk.pot +23 -0
  380. data/samples/po/hr/hello_gtk_builder.po +19 -0
  381. data/samples/po/hu/hello_gtk_builder.po +19 -0
  382. data/samples/po/it/hello_gtk_builder.po +19 -0
  383. data/samples/po/ja/hello_gtk_builder.po +19 -0
  384. data/samples/po/ko/hello_gtk_builder.po +19 -0
  385. data/samples/po/lv/hello_gtk_builder.po +19 -0
  386. data/samples/po/nb/hello_gtk_builder.po +19 -0
  387. data/samples/po/nl/hello_gtk_builder.po +19 -0
  388. data/samples/po/pt_BR/hello_gtk_builder.po +19 -0
  389. data/samples/po/ru/hello_gtk_builder.po +19 -0
  390. data/samples/po/sr/hello_gtk_builder.po +19 -0
  391. data/samples/po/sv/hello_gtk_builder.po +19 -0
  392. data/samples/po/uk/hello_gtk_builder.po +19 -0
  393. data/samples/po/vi/hello_gtk_builder.po +19 -0
  394. data/samples/po/zh/hello_gtk_builder.po +19 -0
  395. data/samples/po/zh_TW/hello_gtk_builder.po +19 -0
  396. data/src/po_parser.ry +25 -25
  397. data/test/locale/cr/LC_MESSAGES/plural.mo +0 -0
  398. data/test/locale/da/LC_MESSAGES/plural.mo +0 -0
  399. data/test/locale/da/LC_MESSAGES/plural_error.mo +0 -0
  400. data/test/locale/fr/LC_MESSAGES/plural.mo +0 -0
  401. data/test/locale/fr/LC_MESSAGES/plural_error.mo +0 -0
  402. data/test/locale/fr/LC_MESSAGES/test1.mo +0 -0
  403. data/test/locale/fr/LC_MESSAGES/test2.mo +0 -0
  404. data/test/locale/ir/LC_MESSAGES/plural.mo +0 -0
  405. data/test/locale/ja/LC_MESSAGES/_.mo +0 -0
  406. data/test/locale/ja/LC_MESSAGES/backslash.mo +0 -0
  407. data/test/locale/ja/LC_MESSAGES/non_ascii.mo +0 -0
  408. data/test/locale/ja/LC_MESSAGES/np_.mo +0 -0
  409. data/test/locale/ja/LC_MESSAGES/ns_.mo +0 -0
  410. data/test/locale/ja/LC_MESSAGES/p_.mo +0 -0
  411. data/test/locale/ja/LC_MESSAGES/plural.mo +0 -0
  412. data/test/locale/ja/LC_MESSAGES/plural_error.mo +0 -0
  413. data/test/locale/ja/LC_MESSAGES/rubyparser.mo +0 -0
  414. data/test/locale/ja/LC_MESSAGES/s_.mo +0 -0
  415. data/test/locale/ja/LC_MESSAGES/test1.mo +0 -0
  416. data/test/locale/ja/LC_MESSAGES/test2.mo +0 -0
  417. data/test/locale/ja/LC_MESSAGES/test3.mo +0 -0
  418. data/test/locale/ja/LC_MESSAGES/untranslated.mo +0 -0
  419. data/test/locale/la/LC_MESSAGES/plural.mo +0 -0
  420. data/test/locale/la/LC_MESSAGES/plural_error.mo +0 -0
  421. data/test/locale/li/LC_MESSAGES/plural.mo +0 -0
  422. data/test/locale/li/LC_MESSAGES/plural_error.mo +0 -0
  423. data/test/locale/po/LC_MESSAGES/plural.mo +0 -0
  424. data/test/locale/sl/LC_MESSAGES/plural.mo +0 -0
  425. data/test/po/_.pot +162 -0
  426. data/test/po/backslash.pot +23 -0
  427. data/test/po/non_ascii.pot +23 -0
  428. data/test/po/np_.pot +48 -0
  429. data/test/po/ns_.pot +73 -0
  430. data/test/po/p_.pot +50 -0
  431. data/test/po/s_.pot +55 -0
  432. data/test/po/untranslated.pot +23 -0
  433. data/test/test_locale_path.rb +25 -3
  434. data/test/{tools/test_po.rb → test_po.rb} +217 -210
  435. data/test/test_po_entry.rb +107 -53
  436. data/test/test_text_domain.rb +38 -0
  437. data/test/tools/test_msgmerge.rb +206 -5
  438. data/test/tools/test_task.rb +287 -0
  439. data/test/tools/test_xgettext.rb +3 -1
  440. metadata +373 -4
  441. data/samples/cgi/Rakefile +0 -27
@@ -0,0 +1,23 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the gettext package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: gettext 3.0.1\n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2013-09-03 21:25+0900\n"
12
+ "PO-Revision-Date: 2013-09-03 21:25+0900\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
20
+
21
+ #: ../fixtures/non_ascii.rb:10
22
+ msgid "こんにちは"
23
+ msgstr ""
data/test/po/np_.pot ADDED
@@ -0,0 +1,48 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the gettext package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: gettext 3.0.1\n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2013-09-03 21:25+0900\n"
12
+ "PO-Revision-Date: 2013-09-03 21:25+0900\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
20
+
21
+ #: ../fixtures/np_.rb:28 ../fixtures/np_.rb:29 ../fixtures/np_.rb:33
22
+ #: ../fixtures/np_.rb:34
23
+ msgctxt "Magazine"
24
+ msgid "a book"
25
+ msgid_plural "%{num} books"
26
+ msgstr[0] ""
27
+ msgstr[1] ""
28
+
29
+ #: ../fixtures/np_.rb:38 ../fixtures/np_.rb:39
30
+ msgctxt "Hardcover"
31
+ msgid "a book"
32
+ msgid_plural "%{num} books"
33
+ msgstr[0] ""
34
+ msgstr[1] ""
35
+
36
+ #: ../fixtures/np_.rb:43 ../fixtures/np_.rb:44
37
+ msgctxt "Magaine"
38
+ msgid "I have a magazine"
39
+ msgid_plural "I have %{num} magazines"
40
+ msgstr[0] ""
41
+ msgstr[1] ""
42
+
43
+ #: ../fixtures/np_.rb:48 ../fixtures/np_.rb:49
44
+ msgctxt "Hardcover"
45
+ msgid "a picture"
46
+ msgid_plural "%{num} pictures"
47
+ msgstr[0] ""
48
+ msgstr[1] ""
data/test/po/ns_.pot ADDED
@@ -0,0 +1,73 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the gettext package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: gettext 3.0.1\n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2013-09-03 21:25+0900\n"
12
+ "PO-Revision-Date: 2013-09-03 21:25+0900\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
20
+
21
+ #: ../fixtures/ns_.rb:28 ../fixtures/ns_.rb:32
22
+ msgid "AAA|BBB"
23
+ msgid_plural "CCC"
24
+ msgstr[0] ""
25
+ msgstr[1] ""
26
+
27
+ #: ../fixtures/ns_.rb:36
28
+ msgid "AAA"
29
+ msgid_plural "BBB"
30
+ msgstr[0] ""
31
+ msgstr[1] ""
32
+
33
+ #: ../fixtures/ns_.rb:40
34
+ msgid "AAA|CCC"
35
+ msgid_plural "DDD"
36
+ msgstr[0] ""
37
+ msgstr[1] ""
38
+
39
+ #: ../fixtures/ns_.rb:44
40
+ msgid "AAA|BBB|CCC"
41
+ msgid_plural "DDD"
42
+ msgstr[0] ""
43
+ msgstr[1] ""
44
+
45
+ #: ../fixtures/ns_.rb:48
46
+ msgid "AAA$BBB"
47
+ msgid_plural "CCC"
48
+ msgstr[0] ""
49
+ msgstr[1] ""
50
+
51
+ #: ../fixtures/ns_.rb:52
52
+ msgid "AAA$B|BB"
53
+ msgid_plural "CCC"
54
+ msgstr[0] ""
55
+ msgstr[1] ""
56
+
57
+ #: ../fixtures/ns_.rb:56
58
+ msgid "AAA$B|CC"
59
+ msgid_plural "DDD"
60
+ msgstr[0] ""
61
+ msgstr[1] ""
62
+
63
+ #: ../fixtures/ns_.rb:60
64
+ msgid "AAA|CCC|BBB"
65
+ msgid_plural "DDD"
66
+ msgstr[0] ""
67
+ msgstr[1] ""
68
+
69
+ #: ../fixtures/ns_/custom.rb:28
70
+ msgid "context|context$message"
71
+ msgid_plural "context|context$messages"
72
+ msgstr[0] ""
73
+ msgstr[1] ""
data/test/po/p_.pot ADDED
@@ -0,0 +1,50 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the gettext package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: gettext 3.0.1\n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2013-09-03 21:25+0900\n"
12
+ "PO-Revision-Date: 2013-09-03 21:25+0900\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
20
+
21
+ #: ../fixtures/p_.rb:29 ../fixtures/p_.rb:33
22
+ msgctxt "AAA"
23
+ msgid "BBB"
24
+ msgstr ""
25
+
26
+ #: ../fixtures/p_.rb:37
27
+ msgctxt "AAA|BBB"
28
+ msgid "CCC"
29
+ msgstr ""
30
+
31
+ #: ../fixtures/p_.rb:41
32
+ msgctxt "AAA"
33
+ msgid "CCC"
34
+ msgstr ""
35
+
36
+ #: ../fixtures/p_.rb:45
37
+ msgctxt "CCC"
38
+ msgid "BBB"
39
+ msgstr ""
40
+
41
+ #: ../fixtures/p_.rb:49
42
+ msgid "BBB"
43
+ msgstr ""
44
+
45
+ #. TRANSLATORS:please translate 'name' in the context of 'program'.
46
+ #. Hint: the translation should NOT contain the translation of 'program'.
47
+ #: ../fixtures/p_.rb:55
48
+ msgctxt "program"
49
+ msgid "name"
50
+ msgstr ""
data/test/po/s_.pot ADDED
@@ -0,0 +1,55 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the gettext package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: gettext 3.0.1\n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2013-09-03 21:25+0900\n"
12
+ "PO-Revision-Date: 2013-09-03 21:25+0900\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
20
+
21
+ #: ../fixtures/s_.rb:28 ../fixtures/s_.rb:32
22
+ msgid "AAA|BBB"
23
+ msgstr ""
24
+
25
+ #: ../fixtures/s_.rb:36
26
+ msgid "AAA"
27
+ msgstr ""
28
+
29
+ #: ../fixtures/s_.rb:40
30
+ msgid "AAA|CCC"
31
+ msgstr ""
32
+
33
+ #: ../fixtures/s_.rb:44
34
+ msgid "AAA|BBB|CCC"
35
+ msgstr ""
36
+
37
+ #: ../fixtures/s_.rb:48
38
+ msgid "AAA$BBB"
39
+ msgstr ""
40
+
41
+ #: ../fixtures/s_.rb:52
42
+ msgid "AAA$B|BB"
43
+ msgstr ""
44
+
45
+ #: ../fixtures/s_.rb:56
46
+ msgid "AAA$B|CC"
47
+ msgstr ""
48
+
49
+ #: ../fixtures/s_.rb:60
50
+ msgid "AAA|CCC|BBB"
51
+ msgstr ""
52
+
53
+ #: ../fixtures/s_/custom.rb:28
54
+ msgid "context|context$message"
55
+ msgstr ""
@@ -0,0 +1,23 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the gettext package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: gettext 3.0.1\n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2013-09-03 21:25+0900\n"
12
+ "PO-Revision-Date: 2013-09-03 21:25+0900\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
20
+
21
+ #: ../fixtures/untranslated.rb:10
22
+ msgid "untranslated"
23
+ msgstr ""
@@ -1,3 +1,25 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2013 Haruka Yoshihara <yoshihara@clear-code.com>
4
+ # Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
5
+ # Copyright (C) 2010 masone (Christian Felder) <ema@rh-productions.ch>
6
+ # Copyright (C) 2009-2010 Masao Mutoh
7
+ #
8
+ # License: Ruby's or LGPL
9
+ #
10
+ # This library is free software: you can redistribute it and/or modify
11
+ # it under the terms of the GNU Lesser General Public License as published by
12
+ # the Free Software Foundation, either version 3 of the License, or
13
+ # (at your option) any later version.
14
+ #
15
+ # This library is distributed in the hope that it will be useful,
16
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ # GNU Lesser General Public License for more details.
19
+ #
20
+ # You should have received a copy of the GNU Lesser General Public License
21
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
22
+
1
23
  require 'fixtures/simple'
2
24
 
3
25
  class TestLocalePath < Test::Unit::TestCase
@@ -59,13 +81,13 @@ class TestLocalePath < Test::Unit::TestCase
59
81
  GetText::LocalePath.memoize_clear
60
82
  ENV["GETTEXT_PATH"] = path1
61
83
  default_path_rules = GetText::LocalePath.default_path_rules
62
- assert(Regexp.compile(path1) =~ default_path_rules[0])
84
+ assert_match(Regexp.compile(path1), default_path_rules[0])
63
85
 
64
86
  GetText::LocalePath.memoize_clear
65
87
  ENV["GETTEXT_PATH"] = "#{path1},#{path2}"
66
88
  default_path_rules = GetText::LocalePath.default_path_rules
67
- assert(Regexp.compile(path1) =~ default_path_rules[0])
68
- assert(Regexp.compile(path2) =~ default_path_rules[1])
89
+ assert_match(Regexp.compile(path1), default_path_rules[0])
90
+ assert_match(Regexp.compile(path2), default_path_rules[1])
69
91
  end
70
92
 
71
93
  class TestDefaultPathRules < self
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # Copyright (C) 2012 Haruka Yoshihara <yoshihara@clear-code.com>
4
- # Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
4
+ # Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
5
5
  #
6
6
  # License: Ruby's or LGPL
7
7
  #
@@ -204,104 +204,144 @@ class TestPO < Test::Unit::TestCase
204
204
  end
205
205
  end
206
206
 
207
- class TestToS < self
207
+ class TestOrder < self
208
208
  def setup
209
209
  @po = GetText::PO.new
210
- @po[""] = header
211
- @po[""].translator_comment = header_comment
212
- end
213
-
214
- def test_same_filename
215
- hello = "hello"
216
- hello_translation = "こんにちは"
217
- hello_references = ["file.rb:10"]
218
- hello_comment = "#: file.rb:10"
219
- bye = "bye"
220
- bye_translation = "さようなら"
221
- bye_references = ["file.rb:20"]
222
- bye_comment = "#: file.rb:20"
210
+ parser = GetText::POParser.new
211
+ parser.parse(<<-PO, @po)
212
+ #: hello.rb:2
213
+ msgid "World"
214
+ msgstr ""
223
215
 
224
- @po[hello] = hello_translation
225
- @po[hello].references = hello_references
216
+ #: hello.rb:1
217
+ msgid "Hello"
218
+ msgstr ""
226
219
 
227
- @po[bye] = bye_translation
228
- @po[bye].references = bye_references
220
+ #: hello.rb:3
221
+ msgid "Hello World"
222
+ msgstr ""
223
+ PO
224
+ end
229
225
 
230
- expected_po =<<EOP
231
- #{expected_header_comment}
232
- #
233
- msgid ""
226
+ def test_nil
227
+ @po.order = nil
228
+ assert_equal(<<-PO, @po.to_s)
229
+ #: hello.rb:2
230
+ msgid "World"
234
231
  msgstr ""
235
- #{expected_header}
236
232
 
237
- #{hello_comment}
238
- msgid "#{hello}"
239
- msgstr "#{hello_translation}"
233
+ #: hello.rb:1
234
+ msgid "Hello"
235
+ msgstr ""
240
236
 
241
- #{bye_comment}
242
- msgid "#{bye}"
243
- msgstr "#{bye_translation}"
244
- EOP
245
- assert_equal(expected_po, @po.to_s)
237
+ #: hello.rb:3
238
+ msgid "Hello World"
239
+ msgstr ""
240
+ PO
246
241
  end
247
242
 
248
- def test_different_filename
249
- hello = "hello"
250
- hello_translation = "こんにちは"
251
- hello_references = ["file.rb:10"]
252
- hello_comment = "#: file.rb:10"
253
- bye = "bye"
254
- bye_translation = "さようなら"
255
- bye_references = ["test.rb:10"]
256
- bye_comment = "#: test.rb:10"
243
+ def test_msgid
244
+ @po.order = :msgid
245
+ assert_equal(<<-PO, @po.to_s)
246
+ #: hello.rb:1
247
+ msgid "Hello"
248
+ msgstr ""
257
249
 
258
- @po[hello] = hello_translation
259
- @po[hello].references = hello_references
250
+ #: hello.rb:3
251
+ msgid "Hello World"
252
+ msgstr ""
260
253
 
261
- @po[bye] = bye_translation
262
- @po[bye].references = bye_references
254
+ #: hello.rb:2
255
+ msgid "World"
256
+ msgstr ""
257
+ PO
258
+ end
263
259
 
264
- expected_po =<<EOP
265
- #{expected_header_comment}
266
- #
267
- msgid ""
260
+ def test_references
261
+ @po.order = :references
262
+ assert_equal(<<-PO, @po.to_s)
263
+ #: hello.rb:1
264
+ msgid "Hello"
268
265
  msgstr ""
269
- #{expected_header}
270
266
 
271
- #{hello_comment}
272
- msgid "#{hello}"
273
- msgstr "#{hello_translation}"
267
+ #: hello.rb:2
268
+ msgid "World"
269
+ msgstr ""
274
270
 
275
- #{bye_comment}
276
- msgid "#{bye}"
277
- msgstr "#{bye_translation}"
278
- EOP
279
- assert_equal(expected_po, @po.to_s)
271
+ #: hello.rb:3
272
+ msgid "Hello World"
273
+ msgstr ""
274
+ PO
280
275
  end
276
+ end
281
277
 
282
- def test_including_colon_filename
283
- hello = "hello"
284
- hello_translation = "こんにちは"
285
- hello_references = ["file.rb:10"]
286
- hello_comment = "#: file.rb:10"
287
- bye = "bye"
288
- bye_translation = "さようなら"
289
- bye_references = ["file:2.rb:10"]
290
- bye_comment = "#: file:2.rb:10"
278
+ class TestToS < self
279
+ def setup
280
+ @po = GetText::PO.new
281
+ end
291
282
 
292
- @po[hello] = hello_translation
293
- @po[hello].references = hello_references
283
+ class TestHeader < self
284
+ def test_no_entry
285
+ @po[""] = <<-HEADER
286
+ Project-Id-Version: test 1.0.0
287
+ POT-Creation-Date: 2012-10-31 12:40+0900
288
+ PO-Revision-Date: 2012-11-01 17:46+0900
289
+ Last-Translator: FULLNAME <MAIL@ADDRESS>
290
+ Language-Team: Japanese
291
+ Language:
292
+ MIME-Version: 1.0
293
+ Content-Type: text/plain; charset=UTF-8
294
+ Content-Transfer-Encoding: 8bit
295
+ Plural-Forms: nplurals=2; plural=(n != 1)
296
+ HEADER
297
+ @po[""].translator_comment = <<-HEADER_COMMENT
298
+ Japanese translations for test package.
299
+ Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
300
+ This file is distributed under the same license as the PACKAGE package.
301
+ FULLNAME <MAIL@ADDRESS>, 2012.
294
302
 
295
- @po[bye] = bye_translation
296
- @po[bye].references = bye_references
303
+ HEADER_COMMENT
297
304
 
298
- expected_po =<<EOP
299
- #{expected_header_comment}
305
+ assert_equal(<<-PO, @po.to_s)
306
+ # Japanese translations for test package.
307
+ # Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
308
+ # This file is distributed under the same license as the PACKAGE package.
309
+ # FULLNAME <MAIL@ADDRESS>, 2012.
300
310
  #
301
311
  msgid ""
302
312
  msgstr ""
303
- #{expected_header}
313
+ "Project-Id-Version: test 1.0.0\\n"
314
+ "POT-Creation-Date: 2012-10-31 12:40+0900\\n"
315
+ "PO-Revision-Date: 2012-11-01 17:46+0900\\n"
316
+ "Last-Translator: FULLNAME <MAIL@ADDRESS>\\n"
317
+ "Language-Team: Japanese\\n"
318
+ "Language: \\n"
319
+ "MIME-Version: 1.0\\n"
320
+ "Content-Type: text/plain; charset=UTF-8\\n"
321
+ "Content-Transfer-Encoding: 8bit\\n"
322
+ "Plural-Forms: nplurals=2; plural=(n != 1)\\n"
323
+ PO
324
+ end
325
+ end
326
+
327
+ class TestReferenceComment < self
328
+ def test_same_filename
329
+ hello = "hello"
330
+ hello_translation = "こんにちは"
331
+ hello_references = ["file.rb:10"]
332
+ hello_comment = "#: file.rb:10"
333
+ bye = "bye"
334
+ bye_translation = "さようなら"
335
+ bye_references = ["file.rb:20"]
336
+ bye_comment = "#: file.rb:20"
337
+
338
+ @po[hello] = hello_translation
339
+ @po[hello].references = hello_references
340
+
341
+ @po[bye] = bye_translation
342
+ @po[bye].references = bye_references
304
343
 
344
+ expected_po =<<EOP
305
345
  #{hello_comment}
306
346
  msgid "#{hello}"
307
347
  msgstr "#{hello_translation}"
@@ -310,32 +350,26 @@ msgstr "#{hello_translation}"
310
350
  msgid "#{bye}"
311
351
  msgstr "#{bye_translation}"
312
352
  EOP
313
- assert_equal(expected_po, @po.to_s)
314
- end
353
+ assert_equal(expected_po, @po.to_s)
354
+ end
315
355
 
316
- def test_no_file_number
317
- hello = "hello"
318
- hello_translation = "こんにちは"
319
- hello_references = ["file.rb"]
320
- hello_comment = "#: file.rb"
321
- bye = "bye"
322
- bye_translation = "さようなら"
323
- bye_references = ["test.rb"]
324
- bye_comment = "#: test.rb"
356
+ def test_different_filename
357
+ hello = "hello"
358
+ hello_translation = "こんにちは"
359
+ hello_references = ["file.rb:10"]
360
+ hello_comment = "#: file.rb:10"
361
+ bye = "bye"
362
+ bye_translation = "さようなら"
363
+ bye_references = ["test.rb:10"]
364
+ bye_comment = "#: test.rb:10"
325
365
 
326
- @po[hello] = hello_translation
327
- @po[hello].references = hello_references
366
+ @po[hello] = hello_translation
367
+ @po[hello].references = hello_references
328
368
 
329
- @po[bye] = bye_translation
330
- @po[bye].references = bye_references
331
-
332
- expected_po =<<EOP
333
- #{expected_header_comment}
334
- #
335
- msgid ""
336
- msgstr ""
337
- #{expected_header}
369
+ @po[bye] = bye_translation
370
+ @po[bye].references = bye_references
338
371
 
372
+ expected_po =<<EOP
339
373
  #{hello_comment}
340
374
  msgid "#{hello}"
341
375
  msgstr "#{hello_translation}"
@@ -344,32 +378,26 @@ msgstr "#{hello_translation}"
344
378
  msgid "#{bye}"
345
379
  msgstr "#{bye_translation}"
346
380
  EOP
347
- assert_equal(expected_po, @po.to_s)
348
- end
381
+ assert_equal(expected_po, @po.to_s)
382
+ end
349
383
 
350
- def test_multiple_filename
351
- hello = "hello"
352
- hello_translation = "こんにちは"
353
- hello_references = ["file.rb:10"]
354
- hello_comment = "#: file.rb:10"
355
- bye = "bye"
356
- bye_translation = "さようなら"
357
- bye_references = ["test.rb:10", "file.rb:110", "file.rb:20"]
358
- bye_comment = "#: file.rb:20 file.rb:110 test.rb:10"
384
+ def test_including_colon_filename
385
+ hello = "hello"
386
+ hello_translation = "こんにちは"
387
+ hello_references = ["file.rb:10"]
388
+ hello_comment = "#: file.rb:10"
389
+ bye = "bye"
390
+ bye_translation = "さようなら"
391
+ bye_references = ["file:2.rb:10"]
392
+ bye_comment = "#: file:2.rb:10"
359
393
 
360
- @po[hello] = hello_translation
361
- @po[hello].references = hello_references
394
+ @po[hello] = hello_translation
395
+ @po[hello].references = hello_references
362
396
 
363
- @po[bye] = bye_translation
364
- @po[bye].references = bye_references
365
-
366
- expected_po =<<EOP
367
- #{expected_header_comment}
368
- #
369
- msgid ""
370
- msgstr ""
371
- #{expected_header}
397
+ @po[bye] = bye_translation
398
+ @po[bye].references = bye_references
372
399
 
400
+ expected_po =<<EOP
373
401
  #{hello_comment}
374
402
  msgid "#{hello}"
375
403
  msgstr "#{hello_translation}"
@@ -378,123 +406,102 @@ msgstr "#{hello_translation}"
378
406
  msgid "#{bye}"
379
407
  msgstr "#{bye_translation}"
380
408
  EOP
381
- assert_equal(expected_po, @po.to_s)
382
- end
383
-
384
- def test_obsolete_comment
385
- hello = "hello"
386
- hello_translation = "こんにちは"
387
- hello_references = ["file.rb:10"]
409
+ assert_equal(expected_po, @po.to_s)
410
+ end
388
411
 
389
- @po[hello] = hello_translation
390
- @po[hello].references = hello_references
412
+ def test_no_file_number
413
+ hello = "hello"
414
+ hello_translation = "こんにちは"
415
+ hello_references = ["file.rb"]
416
+ hello_comment = "#: file.rb"
417
+ bye = "bye"
418
+ bye_translation = "さようなら"
419
+ bye_references = ["test.rb"]
420
+ bye_comment = "#: test.rb"
391
421
 
392
- @po.set_comment(:last, obsolete_comment)
422
+ @po[hello] = hello_translation
423
+ @po[hello].references = hello_references
393
424
 
394
- hello_comment = "#: file.rb:10"
395
- expected_po =<<EOP
396
- #{expected_header_comment}
397
- #
398
- msgid ""
399
- msgstr ""
400
- #{expected_header}
425
+ @po[bye] = bye_translation
426
+ @po[bye].references = bye_references
401
427
 
428
+ expected_po =<<EOP
402
429
  #{hello_comment}
403
430
  msgid "#{hello}"
404
431
  msgstr "#{hello_translation}"
405
432
 
406
- #{expected_obsolete_comment}
433
+ #{bye_comment}
434
+ msgid "#{bye}"
435
+ msgstr "#{bye_translation}"
407
436
  EOP
408
- assert_equal(expected_po, @po.to_s)
409
- end
410
-
411
- def test_obsolete_comment_without_header
412
- @po = GetText::PO.new
413
-
414
- hello = "hello"
415
- hello_translation = "こんにちは"
416
- hello_references = ["file.rb:10"]
437
+ assert_equal(expected_po, @po.to_s)
438
+ end
417
439
 
418
- @po[hello] = hello_translation
419
- @po[hello].references = hello_references
440
+ def test_multiple_filename
441
+ hello = "hello"
442
+ hello_translation = "こんにちは"
443
+ hello_references = ["file.rb:10"]
444
+ hello_comment = "#: file.rb:10"
445
+ bye = "bye"
446
+ bye_translation = "さようなら"
447
+ bye_references = ["test.rb:10", "file.rb:110", "file.rb:20"]
448
+ bye_comment = "#: file.rb:20 file.rb:110 test.rb:10"
420
449
 
421
- @po.set_comment(:last, obsolete_comment)
450
+ @po[hello] = hello_translation
451
+ @po[hello].references = hello_references
422
452
 
423
- hello_comment = "#: file.rb:10"
424
- expected_po =<<EOP
453
+ @po[bye] = bye_translation
454
+ @po[bye].references = bye_references
425
455
 
456
+ expected_po =<<EOP
426
457
  #{hello_comment}
427
458
  msgid "#{hello}"
428
459
  msgstr "#{hello_translation}"
429
460
 
430
- #{expected_obsolete_comment}
461
+ #{bye_comment}
462
+ msgid "#{bye}"
463
+ msgstr "#{bye_translation}"
431
464
  EOP
432
- assert_equal(expected_po, @po.to_s)
433
- end
434
-
435
- private
436
- def header
437
- <<EOH
438
- Project-Id-Version: test 1.0.0
439
- POT-Creation-Date: 2012-10-31 12:40+0900
440
- PO-Revision-Date: 2012-11-01 17:46+0900
441
- Last-Translator: FULLNAME <MAIL@ADDRESS>
442
- Language-Team: Japanese
443
- Language:
444
- MIME-Version: 1.0
445
- Content-Type: text/plain; charset=UTF-8
446
- Content-Transfer-Encoding: 8bit
447
- Plural-Forms: nplurals=2; plural=(n != 1)
448
- EOH
449
- end
450
-
451
- def header_comment
452
- <<EOC
453
- Japanese translations for test package.
454
- Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
455
- This file is distributed under the same license as the PACKAGE package.
456
- FULLNAME <MAIL@ADDRESS>, 2012.
457
-
458
- EOC
459
- end
460
-
461
- def expected_header
462
- expected_header = header.split("\n").collect do |line|
463
- "\"#{line}\\n\""
465
+ assert_equal(expected_po, @po.to_s)
464
466
  end
465
- expected_header.join("\n")
466
- end
467
467
 
468
- def expected_header_comment
469
- expected_header_comment = header_comment.split("\n").collect do |line|
470
- "# #{line}"
468
+ class TestIncludeReferenceComment < self
469
+ def setup
470
+ super
471
+ @po["Hi"] = "Bonjour"
472
+ @po["Hi"].references = ["hi.rb:29"]
473
+ end
474
+
475
+ def test_false
476
+ assert_equal(<<-PO, @po.to_s(:include_reference_comment => false))
477
+ msgid "Hi"
478
+ msgstr "Bonjour"
479
+ PO
480
+ end
471
481
  end
472
- expected_header_comment.join("\n")
473
482
  end
474
483
 
475
- def obsolete_comment
476
- <<EOC
477
- # test.rb:10
478
- msgid \"hello\"
479
- msgstr \"Salut\"
484
+ class TestObsoleteComment < self
485
+ def setup
486
+ @po = GetText::PO.new
487
+ @po["hello"] = ""
488
+ @po.set_comment(:last, <<-OBSOLETE_COMMENT)
489
+ # hello.rb:20
490
+ msgid "hi"
491
+ msgstr "Bonjour"
492
+ OBSOLETE_COMMENT
493
+ end
480
494
 
481
- # test.rb:20
482
- msgid \"hi\"
483
- msgstr \"Bonjour\"
484
- EOC
485
- end
495
+ def test_default
496
+ assert_equal(<<-PO, @po.to_s)
497
+ msgid "hello"
498
+ msgstr ""
486
499
 
487
- def expected_obsolete_comment
488
- comment = <<EOC
489
- # test.rb:10
490
- #~ msgid \"hello\"
491
- #~ msgstr \"Salut\"
492
-
493
- # test.rb:20
494
- #~ msgid \"hi\"
495
- #~ msgstr \"Bonjour\"
496
- EOC
497
- comment.chomp
500
+ # hello.rb:20
501
+ #~ msgid "hi"
502
+ #~ msgstr "Bonjour"
503
+ PO
504
+ end
498
505
  end
499
506
  end
500
507
  end