fair-gettext 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (366) hide show
  1. data/COPYING +56 -0
  2. data/ChangeLog-1 +2016 -0
  3. data/NEWS-1 +414 -0
  4. data/benchmark/1.93.0.txt +8 -0
  5. data/benchmark/2.0.0.txt +8 -0
  6. data/benchmark/2.0.4.txt +11 -0
  7. data/benchmark/2.1.0.txt +11 -0
  8. data/benchmark/benchmark.rb +68 -0
  9. data/benchmark/test.rb +28 -0
  10. data/data/locale/bg/LC_MESSAGES/rgettext.mo +0 -0
  11. data/data/locale/bs/LC_MESSAGES/rgettext.mo +0 -0
  12. data/data/locale/ca/LC_MESSAGES/rgettext.mo +0 -0
  13. data/data/locale/cs/LC_MESSAGES/rgettext.mo +0 -0
  14. data/data/locale/de/LC_MESSAGES/rgettext.mo +0 -0
  15. data/data/locale/el/LC_MESSAGES/rgettext.mo +0 -0
  16. data/data/locale/eo/LC_MESSAGES/rgettext.mo +0 -0
  17. data/data/locale/es/LC_MESSAGES/rgettext.mo +0 -0
  18. data/data/locale/et/LC_MESSAGES/rgettext.mo +0 -0
  19. data/data/locale/fr/LC_MESSAGES/rgettext.mo +0 -0
  20. data/data/locale/hr/LC_MESSAGES/rgettext.mo +0 -0
  21. data/data/locale/hu/LC_MESSAGES/rgettext.mo +0 -0
  22. data/data/locale/it/LC_MESSAGES/rgettext.mo +0 -0
  23. data/data/locale/ja/LC_MESSAGES/rgettext.mo +0 -0
  24. data/data/locale/ko/LC_MESSAGES/rgettext.mo +0 -0
  25. data/data/locale/lv/LC_MESSAGES/rgettext.mo +0 -0
  26. data/data/locale/nb/LC_MESSAGES/rgettext.mo +0 -0
  27. data/data/locale/nl/LC_MESSAGES/rgettext.mo +0 -0
  28. data/data/locale/pt_BR/LC_MESSAGES/rgettext.mo +0 -0
  29. data/data/locale/ru/LC_MESSAGES/rgettext.mo +0 -0
  30. data/data/locale/sr/LC_MESSAGES/rgettext.mo +0 -0
  31. data/data/locale/sv/LC_MESSAGES/rgettext.mo +0 -0
  32. data/data/locale/ua/LC_MESSAGES/rgettext.mo +0 -0
  33. data/data/locale/vi/LC_MESSAGES/rgettext.mo +0 -0
  34. data/data/locale/zh/LC_MESSAGES/rgettext.mo +0 -0
  35. data/data/locale/zh_TW/LC_MESSAGES/rgettext.mo +0 -0
  36. data/gettext-2.0.0.gem +0 -0
  37. data/gettext.gemspec +2 -3
  38. data/lib/gettext/runtime/class_info.rb +67 -0
  39. data/lib/gettext/runtime/locale_path.rb +122 -0
  40. data/lib/gettext/runtime/mofile.rb +330 -0
  41. data/lib/gettext/runtime/textdomain.rb +177 -0
  42. data/lib/gettext/runtime/textdomain_group.rb +24 -0
  43. data/lib/gettext/runtime/textdomain_manager.rb +211 -0
  44. data/lib/gettext/tools.rb +38 -31
  45. data/lib/gettext/tools/parser/erb.rb +52 -0
  46. data/lib/gettext/tools/parser/glade.rb +98 -0
  47. data/lib/gettext/tools/parser/ruby.rb +226 -0
  48. data/lib/gettext/tools/pomessage.rb +197 -0
  49. data/lib/gettext/tools/poparser.rb +356 -0
  50. data/lib/gettext/tools/rgettext.rb +55 -33
  51. data/replace.rb +8 -0
  52. data/samples/cgi/locale/bg/LC_MESSAGES/helloerb1.mo +0 -0
  53. data/samples/cgi/locale/bg/LC_MESSAGES/helloerb2.mo +0 -0
  54. data/samples/cgi/locale/bg/LC_MESSAGES/hellolib.mo +0 -0
  55. data/samples/cgi/locale/bg/LC_MESSAGES/main.mo +0 -0
  56. data/samples/cgi/locale/bs/LC_MESSAGES/helloerb1.mo +0 -0
  57. data/samples/cgi/locale/bs/LC_MESSAGES/helloerb2.mo +0 -0
  58. data/samples/cgi/locale/bs/LC_MESSAGES/hellolib.mo +0 -0
  59. data/samples/cgi/locale/bs/LC_MESSAGES/main.mo +0 -0
  60. data/samples/cgi/locale/ca/LC_MESSAGES/helloerb1.mo +0 -0
  61. data/samples/cgi/locale/ca/LC_MESSAGES/helloerb2.mo +0 -0
  62. data/samples/cgi/locale/ca/LC_MESSAGES/hellolib.mo +0 -0
  63. data/samples/cgi/locale/ca/LC_MESSAGES/main.mo +0 -0
  64. data/samples/cgi/locale/cs/LC_MESSAGES/helloerb1.mo +0 -0
  65. data/samples/cgi/locale/cs/LC_MESSAGES/helloerb2.mo +0 -0
  66. data/samples/cgi/locale/cs/LC_MESSAGES/hellolib.mo +0 -0
  67. data/samples/cgi/locale/cs/LC_MESSAGES/main.mo +0 -0
  68. data/samples/cgi/locale/de/LC_MESSAGES/helloerb1.mo +0 -0
  69. data/samples/cgi/locale/de/LC_MESSAGES/helloerb2.mo +0 -0
  70. data/samples/cgi/locale/de/LC_MESSAGES/hellolib.mo +0 -0
  71. data/samples/cgi/locale/de/LC_MESSAGES/main.mo +0 -0
  72. data/samples/cgi/locale/el/LC_MESSAGES/helloerb1.mo +0 -0
  73. data/samples/cgi/locale/el/LC_MESSAGES/helloerb2.mo +0 -0
  74. data/samples/cgi/locale/el/LC_MESSAGES/hellolib.mo +0 -0
  75. data/samples/cgi/locale/el/LC_MESSAGES/main.mo +0 -0
  76. data/samples/cgi/locale/eo/LC_MESSAGES/helloerb1.mo +0 -0
  77. data/samples/cgi/locale/eo/LC_MESSAGES/helloerb2.mo +0 -0
  78. data/samples/cgi/locale/eo/LC_MESSAGES/hellolib.mo +0 -0
  79. data/samples/cgi/locale/eo/LC_MESSAGES/main.mo +0 -0
  80. data/samples/cgi/locale/es/LC_MESSAGES/helloerb1.mo +0 -0
  81. data/samples/cgi/locale/es/LC_MESSAGES/helloerb2.mo +0 -0
  82. data/samples/cgi/locale/es/LC_MESSAGES/hellolib.mo +0 -0
  83. data/samples/cgi/locale/es/LC_MESSAGES/main.mo +0 -0
  84. data/samples/cgi/locale/fr/LC_MESSAGES/helloerb1.mo +0 -0
  85. data/samples/cgi/locale/fr/LC_MESSAGES/helloerb2.mo +0 -0
  86. data/samples/cgi/locale/fr/LC_MESSAGES/hellolib.mo +0 -0
  87. data/samples/cgi/locale/fr/LC_MESSAGES/main.mo +0 -0
  88. data/samples/cgi/locale/hr/LC_MESSAGES/helloerb1.mo +0 -0
  89. data/samples/cgi/locale/hr/LC_MESSAGES/helloerb2.mo +0 -0
  90. data/samples/cgi/locale/hr/LC_MESSAGES/hellolib.mo +0 -0
  91. data/samples/cgi/locale/hr/LC_MESSAGES/main.mo +0 -0
  92. data/samples/cgi/locale/hu/LC_MESSAGES/helloerb1.mo +0 -0
  93. data/samples/cgi/locale/hu/LC_MESSAGES/helloerb2.mo +0 -0
  94. data/samples/cgi/locale/hu/LC_MESSAGES/hellolib.mo +0 -0
  95. data/samples/cgi/locale/hu/LC_MESSAGES/main.mo +0 -0
  96. data/samples/cgi/locale/it/LC_MESSAGES/helloerb1.mo +0 -0
  97. data/samples/cgi/locale/it/LC_MESSAGES/helloerb2.mo +0 -0
  98. data/samples/cgi/locale/it/LC_MESSAGES/hellolib.mo +0 -0
  99. data/samples/cgi/locale/it/LC_MESSAGES/main.mo +0 -0
  100. data/samples/cgi/locale/ja/LC_MESSAGES/helloerb1.mo +0 -0
  101. data/samples/cgi/locale/ja/LC_MESSAGES/helloerb2.mo +0 -0
  102. data/samples/cgi/locale/ja/LC_MESSAGES/hellolib.mo +0 -0
  103. data/samples/cgi/locale/ja/LC_MESSAGES/main.mo +0 -0
  104. data/samples/cgi/locale/ko/LC_MESSAGES/helloerb1.mo +0 -0
  105. data/samples/cgi/locale/ko/LC_MESSAGES/helloerb2.mo +0 -0
  106. data/samples/cgi/locale/ko/LC_MESSAGES/hellolib.mo +0 -0
  107. data/samples/cgi/locale/ko/LC_MESSAGES/main.mo +0 -0
  108. data/samples/cgi/locale/lv/LC_MESSAGES/helloerb1.mo +0 -0
  109. data/samples/cgi/locale/lv/LC_MESSAGES/helloerb2.mo +0 -0
  110. data/samples/cgi/locale/lv/LC_MESSAGES/hellolib.mo +0 -0
  111. data/samples/cgi/locale/lv/LC_MESSAGES/main.mo +0 -0
  112. data/samples/cgi/locale/nb/LC_MESSAGES/helloerb1.mo +0 -0
  113. data/samples/cgi/locale/nb/LC_MESSAGES/helloerb2.mo +0 -0
  114. data/samples/cgi/locale/nb/LC_MESSAGES/hellolib.mo +0 -0
  115. data/samples/cgi/locale/nb/LC_MESSAGES/main.mo +0 -0
  116. data/samples/cgi/locale/nl/LC_MESSAGES/helloerb1.mo +0 -0
  117. data/samples/cgi/locale/nl/LC_MESSAGES/helloerb2.mo +0 -0
  118. data/samples/cgi/locale/nl/LC_MESSAGES/hellolib.mo +0 -0
  119. data/samples/cgi/locale/nl/LC_MESSAGES/main.mo +0 -0
  120. data/samples/cgi/locale/pt_BR/LC_MESSAGES/helloerb1.mo +0 -0
  121. data/samples/cgi/locale/pt_BR/LC_MESSAGES/helloerb2.mo +0 -0
  122. data/samples/cgi/locale/pt_BR/LC_MESSAGES/hellolib.mo +0 -0
  123. data/samples/cgi/locale/pt_BR/LC_MESSAGES/main.mo +0 -0
  124. data/samples/cgi/locale/ru/LC_MESSAGES/helloerb1.mo +0 -0
  125. data/samples/cgi/locale/ru/LC_MESSAGES/helloerb2.mo +0 -0
  126. data/samples/cgi/locale/ru/LC_MESSAGES/hellolib.mo +0 -0
  127. data/samples/cgi/locale/ru/LC_MESSAGES/main.mo +0 -0
  128. data/samples/cgi/locale/sr/LC_MESSAGES/helloerb1.mo +0 -0
  129. data/samples/cgi/locale/sr/LC_MESSAGES/helloerb2.mo +0 -0
  130. data/samples/cgi/locale/sr/LC_MESSAGES/hellolib.mo +0 -0
  131. data/samples/cgi/locale/sr/LC_MESSAGES/main.mo +0 -0
  132. data/samples/cgi/locale/ua/LC_MESSAGES/helloerb1.mo +0 -0
  133. data/samples/cgi/locale/ua/LC_MESSAGES/helloerb2.mo +0 -0
  134. data/samples/cgi/locale/ua/LC_MESSAGES/hellolib.mo +0 -0
  135. data/samples/cgi/locale/ua/LC_MESSAGES/main.mo +0 -0
  136. data/samples/cgi/locale/vi/LC_MESSAGES/helloerb1.mo +0 -0
  137. data/samples/cgi/locale/vi/LC_MESSAGES/helloerb2.mo +0 -0
  138. data/samples/cgi/locale/vi/LC_MESSAGES/hellolib.mo +0 -0
  139. data/samples/cgi/locale/vi/LC_MESSAGES/main.mo +0 -0
  140. data/samples/cgi/locale/zh/LC_MESSAGES/helloerb1.mo +0 -0
  141. data/samples/cgi/locale/zh/LC_MESSAGES/helloerb2.mo +0 -0
  142. data/samples/cgi/locale/zh/LC_MESSAGES/hellolib.mo +0 -0
  143. data/samples/cgi/locale/zh/LC_MESSAGES/main.mo +0 -0
  144. data/samples/cgi/locale/zh_TW/LC_MESSAGES/helloerb1.mo +0 -0
  145. data/samples/cgi/locale/zh_TW/LC_MESSAGES/helloerb2.mo +0 -0
  146. data/samples/cgi/locale/zh_TW/LC_MESSAGES/hellolib.mo +0 -0
  147. data/samples/cgi/locale/zh_TW/LC_MESSAGES/main.mo +0 -0
  148. data/samples/cgi/po/bg/#main.po# +84 -0
  149. data/samples/locale/bg/LC_MESSAGES/hello.mo +0 -0
  150. data/samples/locale/bg/LC_MESSAGES/hello2.mo +0 -0
  151. data/samples/locale/bg/LC_MESSAGES/hello_glade2.mo +0 -0
  152. data/samples/locale/bg/LC_MESSAGES/hello_gtk.mo +0 -0
  153. data/samples/locale/bg/LC_MESSAGES/hello_noop.mo +0 -0
  154. data/samples/locale/bg/LC_MESSAGES/hello_plural.mo +0 -0
  155. data/samples/locale/bg/LC_MESSAGES/hello_tk.mo +0 -0
  156. data/samples/locale/bs/LC_MESSAGES/hello.mo +0 -0
  157. data/samples/locale/bs/LC_MESSAGES/hello2.mo +0 -0
  158. data/samples/locale/bs/LC_MESSAGES/hello_glade2.mo +0 -0
  159. data/samples/locale/bs/LC_MESSAGES/hello_gtk.mo +0 -0
  160. data/samples/locale/bs/LC_MESSAGES/hello_noop.mo +0 -0
  161. data/samples/locale/bs/LC_MESSAGES/hello_plural.mo +0 -0
  162. data/samples/locale/bs/LC_MESSAGES/hello_tk.mo +0 -0
  163. data/samples/locale/ca/LC_MESSAGES/hello.mo +0 -0
  164. data/samples/locale/ca/LC_MESSAGES/hello2.mo +0 -0
  165. data/samples/locale/ca/LC_MESSAGES/hello_glade2.mo +0 -0
  166. data/samples/locale/ca/LC_MESSAGES/hello_gtk.mo +0 -0
  167. data/samples/locale/ca/LC_MESSAGES/hello_noop.mo +0 -0
  168. data/samples/locale/ca/LC_MESSAGES/hello_plural.mo +0 -0
  169. data/samples/locale/ca/LC_MESSAGES/hello_tk.mo +0 -0
  170. data/samples/locale/cs/LC_MESSAGES/hello.mo +0 -0
  171. data/samples/locale/cs/LC_MESSAGES/hello2.mo +0 -0
  172. data/samples/locale/cs/LC_MESSAGES/hello_glade2.mo +0 -0
  173. data/samples/locale/cs/LC_MESSAGES/hello_gtk.mo +0 -0
  174. data/samples/locale/cs/LC_MESSAGES/hello_noop.mo +0 -0
  175. data/samples/locale/cs/LC_MESSAGES/hello_plural.mo +0 -0
  176. data/samples/locale/cs/LC_MESSAGES/hello_tk.mo +0 -0
  177. data/samples/locale/de/LC_MESSAGES/hello.mo +0 -0
  178. data/samples/locale/de/LC_MESSAGES/hello2.mo +0 -0
  179. data/samples/locale/de/LC_MESSAGES/hello_glade2.mo +0 -0
  180. data/samples/locale/de/LC_MESSAGES/hello_gtk.mo +0 -0
  181. data/samples/locale/de/LC_MESSAGES/hello_noop.mo +0 -0
  182. data/samples/locale/de/LC_MESSAGES/hello_plural.mo +0 -0
  183. data/samples/locale/de/LC_MESSAGES/hello_tk.mo +0 -0
  184. data/samples/locale/el/LC_MESSAGES/hello.mo +0 -0
  185. data/samples/locale/el/LC_MESSAGES/hello2.mo +0 -0
  186. data/samples/locale/el/LC_MESSAGES/hello_glade2.mo +0 -0
  187. data/samples/locale/el/LC_MESSAGES/hello_gtk.mo +0 -0
  188. data/samples/locale/el/LC_MESSAGES/hello_noop.mo +0 -0
  189. data/samples/locale/el/LC_MESSAGES/hello_plural.mo +0 -0
  190. data/samples/locale/el/LC_MESSAGES/hello_tk.mo +0 -0
  191. data/samples/locale/eo/LC_MESSAGES/hello.mo +0 -0
  192. data/samples/locale/eo/LC_MESSAGES/hello2.mo +0 -0
  193. data/samples/locale/eo/LC_MESSAGES/hello_glade2.mo +0 -0
  194. data/samples/locale/eo/LC_MESSAGES/hello_gtk.mo +0 -0
  195. data/samples/locale/eo/LC_MESSAGES/hello_noop.mo +0 -0
  196. data/samples/locale/eo/LC_MESSAGES/hello_plural.mo +0 -0
  197. data/samples/locale/eo/LC_MESSAGES/hello_tk.mo +0 -0
  198. data/samples/locale/es/LC_MESSAGES/hello.mo +0 -0
  199. data/samples/locale/es/LC_MESSAGES/hello2.mo +0 -0
  200. data/samples/locale/es/LC_MESSAGES/hello_glade2.mo +0 -0
  201. data/samples/locale/es/LC_MESSAGES/hello_gtk.mo +0 -0
  202. data/samples/locale/es/LC_MESSAGES/hello_noop.mo +0 -0
  203. data/samples/locale/es/LC_MESSAGES/hello_plural.mo +0 -0
  204. data/samples/locale/es/LC_MESSAGES/hello_tk.mo +0 -0
  205. data/samples/locale/fr/LC_MESSAGES/hello.mo +0 -0
  206. data/samples/locale/fr/LC_MESSAGES/hello2.mo +0 -0
  207. data/samples/locale/fr/LC_MESSAGES/hello_glade2.mo +0 -0
  208. data/samples/locale/fr/LC_MESSAGES/hello_gtk.mo +0 -0
  209. data/samples/locale/fr/LC_MESSAGES/hello_noop.mo +0 -0
  210. data/samples/locale/fr/LC_MESSAGES/hello_plural.mo +0 -0
  211. data/samples/locale/fr/LC_MESSAGES/hello_tk.mo +0 -0
  212. data/samples/locale/hr/LC_MESSAGES/hello.mo +0 -0
  213. data/samples/locale/hr/LC_MESSAGES/hello2.mo +0 -0
  214. data/samples/locale/hr/LC_MESSAGES/hello_glade2.mo +0 -0
  215. data/samples/locale/hr/LC_MESSAGES/hello_gtk.mo +0 -0
  216. data/samples/locale/hr/LC_MESSAGES/hello_noop.mo +0 -0
  217. data/samples/locale/hr/LC_MESSAGES/hello_plural.mo +0 -0
  218. data/samples/locale/hr/LC_MESSAGES/hello_tk.mo +0 -0
  219. data/samples/locale/hu/LC_MESSAGES/hello.mo +0 -0
  220. data/samples/locale/hu/LC_MESSAGES/hello2.mo +0 -0
  221. data/samples/locale/hu/LC_MESSAGES/hello_glade2.mo +0 -0
  222. data/samples/locale/hu/LC_MESSAGES/hello_gtk.mo +0 -0
  223. data/samples/locale/hu/LC_MESSAGES/hello_noop.mo +0 -0
  224. data/samples/locale/hu/LC_MESSAGES/hello_plural.mo +0 -0
  225. data/samples/locale/hu/LC_MESSAGES/hello_tk.mo +0 -0
  226. data/samples/locale/it/LC_MESSAGES/hello.mo +0 -0
  227. data/samples/locale/it/LC_MESSAGES/hello2.mo +0 -0
  228. data/samples/locale/it/LC_MESSAGES/hello_glade2.mo +0 -0
  229. data/samples/locale/it/LC_MESSAGES/hello_gtk.mo +0 -0
  230. data/samples/locale/it/LC_MESSAGES/hello_noop.mo +0 -0
  231. data/samples/locale/it/LC_MESSAGES/hello_plural.mo +0 -0
  232. data/samples/locale/it/LC_MESSAGES/hello_tk.mo +0 -0
  233. data/samples/locale/ja/LC_MESSAGES/hello.mo +0 -0
  234. data/samples/locale/ja/LC_MESSAGES/hello2.mo +0 -0
  235. data/samples/locale/ja/LC_MESSAGES/hello_glade2.mo +0 -0
  236. data/samples/locale/ja/LC_MESSAGES/hello_gtk.mo +0 -0
  237. data/samples/locale/ja/LC_MESSAGES/hello_noop.mo +0 -0
  238. data/samples/locale/ja/LC_MESSAGES/hello_plural.mo +0 -0
  239. data/samples/locale/ja/LC_MESSAGES/hello_tk.mo +0 -0
  240. data/samples/locale/ko/LC_MESSAGES/hello.mo +0 -0
  241. data/samples/locale/ko/LC_MESSAGES/hello2.mo +0 -0
  242. data/samples/locale/ko/LC_MESSAGES/hello_glade2.mo +0 -0
  243. data/samples/locale/ko/LC_MESSAGES/hello_gtk.mo +0 -0
  244. data/samples/locale/ko/LC_MESSAGES/hello_noop.mo +0 -0
  245. data/samples/locale/ko/LC_MESSAGES/hello_plural.mo +0 -0
  246. data/samples/locale/ko/LC_MESSAGES/hello_tk.mo +0 -0
  247. data/samples/locale/lv/LC_MESSAGES/hello.mo +0 -0
  248. data/samples/locale/lv/LC_MESSAGES/hello2.mo +0 -0
  249. data/samples/locale/lv/LC_MESSAGES/hello_glade2.mo +0 -0
  250. data/samples/locale/lv/LC_MESSAGES/hello_gtk.mo +0 -0
  251. data/samples/locale/lv/LC_MESSAGES/hello_noop.mo +0 -0
  252. data/samples/locale/lv/LC_MESSAGES/hello_plural.mo +0 -0
  253. data/samples/locale/lv/LC_MESSAGES/hello_tk.mo +0 -0
  254. data/samples/locale/nb/LC_MESSAGES/hello.mo +0 -0
  255. data/samples/locale/nb/LC_MESSAGES/hello2.mo +0 -0
  256. data/samples/locale/nb/LC_MESSAGES/hello_glade2.mo +0 -0
  257. data/samples/locale/nb/LC_MESSAGES/hello_gtk.mo +0 -0
  258. data/samples/locale/nb/LC_MESSAGES/hello_noop.mo +0 -0
  259. data/samples/locale/nb/LC_MESSAGES/hello_plural.mo +0 -0
  260. data/samples/locale/nb/LC_MESSAGES/hello_tk.mo +0 -0
  261. data/samples/locale/nl/LC_MESSAGES/hello.mo +0 -0
  262. data/samples/locale/nl/LC_MESSAGES/hello2.mo +0 -0
  263. data/samples/locale/nl/LC_MESSAGES/hello_glade2.mo +0 -0
  264. data/samples/locale/nl/LC_MESSAGES/hello_gtk.mo +0 -0
  265. data/samples/locale/nl/LC_MESSAGES/hello_noop.mo +0 -0
  266. data/samples/locale/nl/LC_MESSAGES/hello_plural.mo +0 -0
  267. data/samples/locale/nl/LC_MESSAGES/hello_tk.mo +0 -0
  268. data/samples/locale/pt_BR/LC_MESSAGES/hello.mo +0 -0
  269. data/samples/locale/pt_BR/LC_MESSAGES/hello2.mo +0 -0
  270. data/samples/locale/pt_BR/LC_MESSAGES/hello_glade2.mo +0 -0
  271. data/samples/locale/pt_BR/LC_MESSAGES/hello_gtk.mo +0 -0
  272. data/samples/locale/pt_BR/LC_MESSAGES/hello_noop.mo +0 -0
  273. data/samples/locale/pt_BR/LC_MESSAGES/hello_plural.mo +0 -0
  274. data/samples/locale/pt_BR/LC_MESSAGES/hello_tk.mo +0 -0
  275. data/samples/locale/ru/LC_MESSAGES/hello.mo +0 -0
  276. data/samples/locale/ru/LC_MESSAGES/hello2.mo +0 -0
  277. data/samples/locale/ru/LC_MESSAGES/hello_glade2.mo +0 -0
  278. data/samples/locale/ru/LC_MESSAGES/hello_gtk.mo +0 -0
  279. data/samples/locale/ru/LC_MESSAGES/hello_noop.mo +0 -0
  280. data/samples/locale/ru/LC_MESSAGES/hello_plural.mo +0 -0
  281. data/samples/locale/ru/LC_MESSAGES/hello_tk.mo +0 -0
  282. data/samples/locale/sr/LC_MESSAGES/hello.mo +0 -0
  283. data/samples/locale/sr/LC_MESSAGES/hello2.mo +0 -0
  284. data/samples/locale/sr/LC_MESSAGES/hello_glade2.mo +0 -0
  285. data/samples/locale/sr/LC_MESSAGES/hello_gtk.mo +0 -0
  286. data/samples/locale/sr/LC_MESSAGES/hello_noop.mo +0 -0
  287. data/samples/locale/sr/LC_MESSAGES/hello_plural.mo +0 -0
  288. data/samples/locale/sr/LC_MESSAGES/hello_tk.mo +0 -0
  289. data/samples/locale/sv/LC_MESSAGES/hello.mo +0 -0
  290. data/samples/locale/sv/LC_MESSAGES/hello2.mo +0 -0
  291. data/samples/locale/sv/LC_MESSAGES/hello_glade2.mo +0 -0
  292. data/samples/locale/sv/LC_MESSAGES/hello_gtk.mo +0 -0
  293. data/samples/locale/sv/LC_MESSAGES/hello_noop.mo +0 -0
  294. data/samples/locale/sv/LC_MESSAGES/hello_plural.mo +0 -0
  295. data/samples/locale/sv/LC_MESSAGES/hello_tk.mo +0 -0
  296. data/samples/locale/ua/LC_MESSAGES/hello.mo +0 -0
  297. data/samples/locale/ua/LC_MESSAGES/hello2.mo +0 -0
  298. data/samples/locale/ua/LC_MESSAGES/hello_glade2.mo +0 -0
  299. data/samples/locale/ua/LC_MESSAGES/hello_gtk.mo +0 -0
  300. data/samples/locale/ua/LC_MESSAGES/hello_noop.mo +0 -0
  301. data/samples/locale/ua/LC_MESSAGES/hello_plural.mo +0 -0
  302. data/samples/locale/ua/LC_MESSAGES/hello_tk.mo +0 -0
  303. data/samples/locale/vi/LC_MESSAGES/hello.mo +0 -0
  304. data/samples/locale/vi/LC_MESSAGES/hello2.mo +0 -0
  305. data/samples/locale/vi/LC_MESSAGES/hello_glade2.mo +0 -0
  306. data/samples/locale/vi/LC_MESSAGES/hello_gtk.mo +0 -0
  307. data/samples/locale/vi/LC_MESSAGES/hello_noop.mo +0 -0
  308. data/samples/locale/vi/LC_MESSAGES/hello_plural.mo +0 -0
  309. data/samples/locale/vi/LC_MESSAGES/hello_tk.mo +0 -0
  310. data/samples/locale/zh/LC_MESSAGES/hello.mo +0 -0
  311. data/samples/locale/zh/LC_MESSAGES/hello2.mo +0 -0
  312. data/samples/locale/zh/LC_MESSAGES/hello_glade2.mo +0 -0
  313. data/samples/locale/zh/LC_MESSAGES/hello_gtk.mo +0 -0
  314. data/samples/locale/zh/LC_MESSAGES/hello_noop.mo +0 -0
  315. data/samples/locale/zh/LC_MESSAGES/hello_plural.mo +0 -0
  316. data/samples/locale/zh/LC_MESSAGES/hello_tk.mo +0 -0
  317. data/samples/locale/zh_TW/LC_MESSAGES/hello.mo +0 -0
  318. data/samples/locale/zh_TW/LC_MESSAGES/hello2.mo +0 -0
  319. data/samples/locale/zh_TW/LC_MESSAGES/hello_glade2.mo +0 -0
  320. data/samples/locale/zh_TW/LC_MESSAGES/hello_gtk.mo +0 -0
  321. data/samples/locale/zh_TW/LC_MESSAGES/hello_noop.mo +0 -0
  322. data/samples/locale/zh_TW/LC_MESSAGES/hello_plural.mo +0 -0
  323. data/samples/locale/zh_TW/LC_MESSAGES/hello_tk.mo +0 -0
  324. data/test.rb +33 -0
  325. data/test/locale/cr/LC_MESSAGES/plural.mo +0 -0
  326. data/test/locale/da/LC_MESSAGES/plural.mo +0 -0
  327. data/test/locale/da/LC_MESSAGES/plural_error.mo +0 -0
  328. data/test/locale/fr/LC_MESSAGES/plural.mo +0 -0
  329. data/test/locale/fr/LC_MESSAGES/plural_error.mo +0 -0
  330. data/test/locale/fr/LC_MESSAGES/test1.mo +0 -0
  331. data/test/locale/fr/LC_MESSAGES/test2.mo +0 -0
  332. data/test/locale/ir/LC_MESSAGES/plural.mo +0 -0
  333. data/test/locale/ja/LC_MESSAGES/npgettext.mo +0 -0
  334. data/test/locale/ja/LC_MESSAGES/nsgettext.mo +0 -0
  335. data/test/locale/ja/LC_MESSAGES/pgettext.mo +0 -0
  336. data/test/locale/ja/LC_MESSAGES/plural.mo +0 -0
  337. data/test/locale/ja/LC_MESSAGES/plural_error.mo +0 -0
  338. data/test/locale/ja/LC_MESSAGES/rubyparser.mo +0 -0
  339. data/test/locale/ja/LC_MESSAGES/sgettext.mo +0 -0
  340. data/test/locale/ja/LC_MESSAGES/test1.mo +0 -0
  341. data/test/locale/ja/LC_MESSAGES/test2.mo +0 -0
  342. data/test/locale/ja/LC_MESSAGES/test3.mo +0 -0
  343. data/test/locale/la/LC_MESSAGES/plural.mo +0 -0
  344. data/test/locale/la/LC_MESSAGES/plural_error.mo +0 -0
  345. data/test/locale/li/LC_MESSAGES/plural.mo +0 -0
  346. data/test/locale/li/LC_MESSAGES/plural_error.mo +0 -0
  347. data/test/locale/po/LC_MESSAGES/plural.mo +0 -0
  348. data/test/locale/sl/LC_MESSAGES/plural.mo +0 -0
  349. data/test/po/ja/test3.po +19 -0
  350. data/test/po/li/plural_error.po +27 -0
  351. data/test/test_locale_path.rb +50 -0
  352. data/test/test_po_generation.rb +20 -0
  353. data/test/test_pomessage.rb +99 -0
  354. data/test/test_textdomain_bind.rb +37 -0
  355. data/test/test_thread.rb +41 -0
  356. data/test/tools/files/app.pot +0 -0
  357. data/test/tools/files/de/app.po +0 -0
  358. data/test/tools/files/en/app.po +0 -0
  359. data/test/tools/files/en/test.po +21 -0
  360. data/test/tools/files/simple_1.po +2 -0
  361. data/test/tools/files/simple_2.po +2 -0
  362. data/test/tools/files/simple_translation.rb +1 -0
  363. data/test/tools/files/version.po +7 -0
  364. data/test/tools/test.pot +21 -0
  365. data/test/tools/test_tools.rb +61 -0
  366. metadata +710 -348
data/test.rb ADDED
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/ruby
2
+ ## hello_gtk2.rb - sample for Ruby/GTK2
3
+ ##
4
+ ## Copyright (C) 2001-2006 Masao Mutoh
5
+ ## This file is distributed under the same license as Ruby-GetText-Package.
6
+
7
+ require 'rubygems'
8
+ require 'gettext'
9
+ require 'gtk2'
10
+
11
+ class LocalizedWindow < Gtk::Window
12
+ include GetText
13
+
14
+ bindtextdomain("hello_gtk", :path => "locale", :output_charset => "utf-8")
15
+
16
+ def initialize
17
+ super
18
+ signal_connect('delete-event') do
19
+ Gtk.main_quit
20
+ end
21
+
22
+ add(Gtk::Label.new( "sdaf" )
23
+ np_("Special", "An apple", "%{num} Apples", num)
24
+ p_("File", "New")
25
+ s_("File|New")
26
+ n_("Special|An apple", "%{num} Apples", num)
27
+ end
28
+ end
29
+
30
+ LocalizedWindow.new.show_all
31
+ Gtk.main
32
+
33
+
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,19 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR ORGANIZATION
3
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4
+ #
5
+ #, fuzzy
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: PACKAGE VERSION\n"
9
+ "POT-Creation-Date: 2001-10-28 01:39:53+0900\n"
10
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12
+ "Language-Team: LANGUAGE <LL@li.org>\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=utf-8\n"
15
+ "Content-Transfer-Encoding: ENCODING\n"
16
+
17
+ #: test.rb:9 test.rb:11
18
+ msgid "language"
19
+ msgstr "JAPANESE"
@@ -0,0 +1,27 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR ORGANIZATION
3
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4
+ #
5
+ #, fuzzy
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: PACKAGE VERSION\n"
9
+ "POT-Creation-Date: 2002-10-21 15:32:15+0900\n"
10
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12
+ "Language-Team: LANGUAGE <LL@li.org>\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=US-ASCII\n"
15
+ "Content-Transfer-Encoding: ENCODING\n"
16
+ "Plural-Forms: nplurals=0; plural=EXPRESSION;\n"
17
+
18
+ #: hello_plural.rb:11
19
+ msgid "first"
20
+ msgid_plural "second"
21
+ msgstr[0] "li_first"
22
+
23
+ #: hello_plural.rb:13
24
+ msgid "one"
25
+ msgid_plural "two"
26
+ msgstr[0] "li_one"
27
+ msgstr[1] "li_two"
@@ -0,0 +1,50 @@
1
+ require 'testlib/helper.rb'
2
+ require 'testlib/simple'
3
+
4
+ class TestLocalePath < Test::Unit::TestCase
5
+ def setup
6
+ GetText.locale = "ja_JP.eucJP"
7
+ GetText::LocalePath.clear
8
+ end
9
+
10
+ def test_locale_path
11
+ test = Simple.new
12
+ assert_equal("japanese", test.test)
13
+ prefix = GetText::LocalePath::CONFIG_PREFIX
14
+ default_locale_dirs = [
15
+ "./locale/%{lang}/LC_MESSAGES/%{name}.mo",
16
+ "./locale/%{lang}/%{name}.mo",
17
+ "#{Config::CONFIG['datadir']}/locale/%{lang}/LC_MESSAGES/%{name}.mo",
18
+ "#{Config::CONFIG['datadir'].gsub(/\/local/, "")}/locale/%{lang}/LC_MESSAGES/%{name}.mo",
19
+ "#{prefix}/share/locale/%{lang}/LC_MESSAGES/%{name}.mo",
20
+ "#{prefix}/local/share/locale/%{lang}/LC_MESSAGES/%{name}.mo"
21
+ ].uniq
22
+ assert_equal(default_locale_dirs, GetText::LocalePath::DEFAULT_RULES)
23
+ new_path = "/foo/%{lang}/%{name}.mo"
24
+ GetText::LocalePath.add_default_rule(new_path)
25
+ assert_equal([new_path] + default_locale_dirs, GetText::LocalePath::DEFAULT_RULES)
26
+ end
27
+
28
+ def test_initialize_with_topdir
29
+ testdir = File.dirname(File.expand_path(__FILE__))
30
+ path = GetText::LocalePath.new("test1", "#{testdir}/locale")
31
+ assert_equal path.locale_paths, { "ja" => "#{testdir}/locale/ja/LC_MESSAGES/test1.mo",
32
+ "fr" => "#{testdir}/locale/fr/LC_MESSAGES/test1.mo"}
33
+ assert_equal path.current_path(Locale::Tag.parse("ja")), "#{testdir}/locale/ja/LC_MESSAGES/test1.mo"
34
+ assert_equal path.current_path(Locale::Tag.parse("ja-JP")), "#{testdir}/locale/ja/LC_MESSAGES/test1.mo"
35
+ assert_equal path.current_path(Locale::Tag.parse("ja_JP.UTF-8")), "#{testdir}/locale/ja/LC_MESSAGES/test1.mo"
36
+ assert_equal path.current_path(Locale::Tag.parse("en")), nil
37
+ end
38
+
39
+ def test_supported_locales
40
+ testdir = File.dirname(File.expand_path(__FILE__))
41
+ path = GetText::LocalePath.new("test1", "#{testdir}/locale")
42
+ assert_equal ["fr", "ja"], path.supported_locales
43
+
44
+ path = GetText::LocalePath.new("plural", "#{testdir}/locale")
45
+ assert_equal ["cr", "da", "fr", "ir", "ja", "la", "li", "po", "sl"], path.supported_locales
46
+
47
+ path = GetText::LocalePath.new("nodomain", "#{testdir}/locale")
48
+ assert_equal [], path.supported_locales
49
+ end
50
+ end