You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

467 lines
18 KiB

  1. import os
  2. import base64
  3. import shutil
  4. import gettext
  5. import unittest
  6. from test import test_support
  7. # TODO:
  8. # - Add new tests, for example for "dgettext"
  9. # - Remove dummy tests, for example testing for single and double quotes
  10. # has no sense, it would have if we were testing a parser (i.e. pygettext)
  11. # - Tests should have only one assert.
  12. GNU_MO_DATA = '''\
  13. 3hIElQAAAAAGAAAAHAAAAEwAAAALAAAAfAAAAAAAAACoAAAAFQAAAKkAAAAjAAAAvwAAAKEAAADj
  14. AAAABwAAAIUBAAALAAAAjQEAAEUBAACZAQAAFgAAAN8CAAAeAAAA9gIAAKEAAAAVAwAABQAAALcD
  15. AAAJAAAAvQMAAAEAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABQAAAAYAAAACAAAAAFJh
  16. eW1vbmQgTHV4dXJ5IFlhY2gtdABUaGVyZSBpcyAlcyBmaWxlAFRoZXJlIGFyZSAlcyBmaWxlcwBU
  17. aGlzIG1vZHVsZSBwcm92aWRlcyBpbnRlcm5hdGlvbmFsaXphdGlvbiBhbmQgbG9jYWxpemF0aW9u
  18. CnN1cHBvcnQgZm9yIHlvdXIgUHl0aG9uIHByb2dyYW1zIGJ5IHByb3ZpZGluZyBhbiBpbnRlcmZh
  19. Y2UgdG8gdGhlIEdOVQpnZXR0ZXh0IG1lc3NhZ2UgY2F0YWxvZyBsaWJyYXJ5LgBtdWxsdXNrAG51
  20. ZGdlIG51ZGdlAFByb2plY3QtSWQtVmVyc2lvbjogMi4wClBPLVJldmlzaW9uLURhdGU6IDIwMDAt
  21. MDgtMjkgMTI6MTktMDQ6MDAKTGFzdC1UcmFuc2xhdG9yOiBKLiBEYXZpZCBJYsOhw7FleiA8ai1k
  22. YXZpZEBub29zLmZyPgpMYW5ndWFnZS1UZWFtOiBYWCA8cHl0aG9uLWRldkBweXRob24ub3JnPgpN
  23. SU1FLVZlcnNpb246IDEuMApDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9aXNvLTg4
  24. NTktMQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBub25lCkdlbmVyYXRlZC1CeTogcHlnZXR0
  25. ZXh0LnB5IDEuMQpQbHVyYWwtRm9ybXM6IG5wbHVyYWxzPTI7IHBsdXJhbD1uIT0xOwoAVGhyb2F0
  26. d29iYmxlciBNYW5ncm92ZQBIYXkgJXMgZmljaGVybwBIYXkgJXMgZmljaGVyb3MAR3V2ZiB6YnFo
  27. eXIgY2ViaXZxcmYgdmFncmVhbmd2YmFueXZtbmd2YmEgbmFxIHlicG55dm1uZ3ZiYQpmaGNjYmVn
  28. IHNiZSBsYmhlIENsZ3ViYSBjZWJ0ZW56ZiBvbCBjZWJpdnF2YXQgbmEgdmFncmVzbnByIGdiIGd1
  29. ciBUQUgKdHJnZ3JrZyB6cmZmbnRyIHBuZ255YnQgeXZvZW5lbC4AYmFjb24Ad2luayB3aW5rAA==
  30. '''
  31. UMO_DATA = '''\
  32. 3hIElQAAAAACAAAAHAAAACwAAAAFAAAAPAAAAAAAAABQAAAABAAAAFEAAAAPAQAAVgAAAAQAAABm
  33. AQAAAQAAAAIAAAAAAAAAAAAAAAAAAAAAYWLDngBQcm9qZWN0LUlkLVZlcnNpb246IDIuMApQTy1S
  34. ZXZpc2lvbi1EYXRlOiAyMDAzLTA0LTExIDEyOjQyLTA0MDAKTGFzdC1UcmFuc2xhdG9yOiBCYXJy
  35. eSBBLiBXQXJzYXcgPGJhcnJ5QHB5dGhvbi5vcmc+Ckxhbmd1YWdlLVRlYW06IFhYIDxweXRob24t
  36. ZGV2QHB5dGhvbi5vcmc+Ck1JTUUtVmVyc2lvbjogMS4wCkNvbnRlbnQtVHlwZTogdGV4dC9wbGFp
  37. bjsgY2hhcnNldD11dGYtOApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiA3Yml0CkdlbmVyYXRl
  38. ZC1CeTogbWFudWFsbHkKAMKkeXoA
  39. '''
  40. MMO_DATA = '''\
  41. 3hIElQAAAAABAAAAHAAAACQAAAADAAAALAAAAAAAAAA4AAAAeAEAADkAAAABAAAAAAAAAAAAAAAA
  42. UHJvamVjdC1JZC1WZXJzaW9uOiBObyBQcm9qZWN0IDAuMApQT1QtQ3JlYXRpb24tRGF0ZTogV2Vk
  43. IERlYyAxMSAwNzo0NDoxNSAyMDAyClBPLVJldmlzaW9uLURhdGU6IDIwMDItMDgtMTQgMDE6MTg6
  44. NTgrMDA6MDAKTGFzdC1UcmFuc2xhdG9yOiBKb2huIERvZSA8amRvZUBleGFtcGxlLmNvbT4KSmFu
  45. ZSBGb29iYXIgPGpmb29iYXJAZXhhbXBsZS5jb20+Ckxhbmd1YWdlLVRlYW06IHh4IDx4eEBleGFt
  46. cGxlLmNvbT4KTUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFy
  47. c2V0PWlzby04ODU5LTE1CkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IHF1b3RlZC1wcmludGFi
  48. bGUKR2VuZXJhdGVkLUJ5OiBweWdldHRleHQucHkgMS4zCgA=
  49. '''
  50. LOCALEDIR = os.path.join('xx', 'LC_MESSAGES')
  51. MOFILE = os.path.join(LOCALEDIR, 'gettext.mo')
  52. UMOFILE = os.path.join(LOCALEDIR, 'ugettext.mo')
  53. MMOFILE = os.path.join(LOCALEDIR, 'metadata.mo')
  54. class GettextBaseTest(unittest.TestCase):
  55. def setUp(self):
  56. if not os.path.isdir(LOCALEDIR):
  57. os.makedirs(LOCALEDIR)
  58. with open(MOFILE, 'wb') as fp:
  59. fp.write(base64.decodestring(GNU_MO_DATA))
  60. with open(UMOFILE, 'wb') as fp:
  61. fp.write(base64.decodestring(UMO_DATA))
  62. with open(MMOFILE, 'wb') as fp:
  63. fp.write(base64.decodestring(MMO_DATA))
  64. self.env = test_support.EnvironmentVarGuard()
  65. self.env['LANGUAGE'] = 'xx'
  66. gettext._translations.clear()
  67. def tearDown(self):
  68. self.env.__exit__()
  69. del self.env
  70. shutil.rmtree(os.path.split(LOCALEDIR)[0])
  71. class GettextTestCase1(GettextBaseTest):
  72. def setUp(self):
  73. GettextBaseTest.setUp(self)
  74. self.localedir = os.curdir
  75. self.mofile = MOFILE
  76. gettext.install('gettext', self.localedir)
  77. def test_some_translations(self):
  78. eq = self.assertEqual
  79. # test some translations
  80. eq(_('albatross'), 'albatross')
  81. eq(_(u'mullusk'), 'bacon')
  82. eq(_(r'Raymond Luxury Yach-t'), 'Throatwobbler Mangrove')
  83. eq(_(ur'nudge nudge'), 'wink wink')
  84. def test_double_quotes(self):
  85. eq = self.assertEqual
  86. # double quotes
  87. eq(_("albatross"), 'albatross')
  88. eq(_(u"mullusk"), 'bacon')
  89. eq(_(r"Raymond Luxury Yach-t"), 'Throatwobbler Mangrove')
  90. eq(_(ur"nudge nudge"), 'wink wink')
  91. def test_triple_single_quotes(self):
  92. eq = self.assertEqual
  93. # triple single quotes
  94. eq(_('''albatross'''), 'albatross')
  95. eq(_(u'''mullusk'''), 'bacon')
  96. eq(_(r'''Raymond Luxury Yach-t'''), 'Throatwobbler Mangrove')
  97. eq(_(ur'''nudge nudge'''), 'wink wink')
  98. def test_triple_double_quotes(self):
  99. eq = self.assertEqual
  100. # triple double quotes
  101. eq(_("""albatross"""), 'albatross')
  102. eq(_(u"""mullusk"""), 'bacon')
  103. eq(_(r"""Raymond Luxury Yach-t"""), 'Throatwobbler Mangrove')
  104. eq(_(ur"""nudge nudge"""), 'wink wink')
  105. def test_multiline_strings(self):
  106. eq = self.assertEqual
  107. # multiline strings
  108. eq(_('''This module provides internationalization and localization
  109. support for your Python programs by providing an interface to the GNU
  110. gettext message catalog library.'''),
  111. '''Guvf zbqhyr cebivqrf vagreangvbanyvmngvba naq ybpnyvmngvba
  112. fhccbeg sbe lbhe Clguba cebtenzf ol cebivqvat na vagresnpr gb gur TAH
  113. trggrkg zrffntr pngnybt yvoenel.''')
  114. def test_the_alternative_interface(self):
  115. eq = self.assertEqual
  116. # test the alternative interface
  117. with open(self.mofile, 'rb') as fp:
  118. t = gettext.GNUTranslations(fp)
  119. # Install the translation object
  120. t.install()
  121. eq(_('nudge nudge'), 'wink wink')
  122. # Try unicode return type
  123. t.install(unicode=True)
  124. eq(_('mullusk'), 'bacon')
  125. # Test installation of other methods
  126. import __builtin__
  127. t.install(unicode=True, names=["gettext", "lgettext"])
  128. eq(_, t.ugettext)
  129. eq(__builtin__.gettext, t.ugettext)
  130. eq(lgettext, t.lgettext)
  131. del __builtin__.gettext
  132. del __builtin__.lgettext
  133. class GettextTestCase2(GettextBaseTest):
  134. def setUp(self):
  135. GettextBaseTest.setUp(self)
  136. self.localedir = os.curdir
  137. # Set up the bindings
  138. gettext.bindtextdomain('gettext', self.localedir)
  139. gettext.textdomain('gettext')
  140. # For convenience
  141. self._ = gettext.gettext
  142. def test_bindtextdomain(self):
  143. self.assertEqual(gettext.bindtextdomain('gettext'), self.localedir)
  144. def test_textdomain(self):
  145. self.assertEqual(gettext.textdomain(), 'gettext')
  146. def test_some_translations(self):
  147. eq = self.assertEqual
  148. # test some translations
  149. eq(self._('albatross'), 'albatross')
  150. eq(self._(u'mullusk'), 'bacon')
  151. eq(self._(r'Raymond Luxury Yach-t'), 'Throatwobbler Mangrove')
  152. eq(self._(ur'nudge nudge'), 'wink wink')
  153. def test_double_quotes(self):
  154. eq = self.assertEqual
  155. # double quotes
  156. eq(self._("albatross"), 'albatross')
  157. eq(self._(u"mullusk"), 'bacon')
  158. eq(self._(r"Raymond Luxury Yach-t"), 'Throatwobbler Mangrove')
  159. eq(self._(ur"nudge nudge"), 'wink wink')
  160. def test_triple_single_quotes(self):
  161. eq = self.assertEqual
  162. # triple single quotes
  163. eq(self._('''albatross'''), 'albatross')
  164. eq(self._(u'''mullusk'''), 'bacon')
  165. eq(self._(r'''Raymond Luxury Yach-t'''), 'Throatwobbler Mangrove')
  166. eq(self._(ur'''nudge nudge'''), 'wink wink')
  167. def test_triple_double_quotes(self):
  168. eq = self.assertEqual
  169. # triple double quotes
  170. eq(self._("""albatross"""), 'albatross')
  171. eq(self._(u"""mullusk"""), 'bacon')
  172. eq(self._(r"""Raymond Luxury Yach-t"""), 'Throatwobbler Mangrove')
  173. eq(self._(ur"""nudge nudge"""), 'wink wink')
  174. def test_multiline_strings(self):
  175. eq = self.assertEqual
  176. # multiline strings
  177. eq(self._('''This module provides internationalization and localization
  178. support for your Python programs by providing an interface to the GNU
  179. gettext message catalog library.'''),
  180. '''Guvf zbqhyr cebivqrf vagreangvbanyvmngvba naq ybpnyvmngvba
  181. fhccbeg sbe lbhe Clguba cebtenzf ol cebivqvat na vagresnpr gb gur TAH
  182. trggrkg zrffntr pngnybt yvoenel.''')
  183. class PluralFormsTestCase(GettextBaseTest):
  184. def setUp(self):
  185. GettextBaseTest.setUp(self)
  186. self.mofile = MOFILE
  187. def test_plural_forms1(self):
  188. eq = self.assertEqual
  189. x = gettext.ngettext('There is %s file', 'There are %s files', 1)
  190. eq(x, 'Hay %s fichero')
  191. x = gettext.ngettext('There is %s file', 'There are %s files', 2)
  192. eq(x, 'Hay %s ficheros')
  193. def test_plural_forms2(self):
  194. eq = self.assertEqual
  195. with open(self.mofile, 'rb') as fp:
  196. t = gettext.GNUTranslations(fp)
  197. x = t.ngettext('There is %s file', 'There are %s files', 1)
  198. eq(x, 'Hay %s fichero')
  199. x = t.ngettext('There is %s file', 'There are %s files', 2)
  200. eq(x, 'Hay %s ficheros')
  201. def test_hu(self):
  202. eq = self.assertEqual
  203. f = gettext.c2py('0')
  204. s = ''.join([ str(f(x)) for x in range(200) ])
  205. eq(s, "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
  206. def test_de(self):
  207. eq = self.assertEqual
  208. f = gettext.c2py('n != 1')
  209. s = ''.join([ str(f(x)) for x in range(200) ])
  210. eq(s, "10111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111")
  211. def test_fr(self):
  212. eq = self.assertEqual
  213. f = gettext.c2py('n>1')
  214. s = ''.join([ str(f(x)) for x in range(200) ])
  215. eq(s, "00111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111")
  216. def test_gd(self):
  217. eq = self.assertEqual
  218. f = gettext.c2py('n==1 ? 0 : n==2 ? 1 : 2')
  219. s = ''.join([ str(f(x)) for x in range(200) ])
  220. eq(s, "20122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222")
  221. def test_gd2(self):
  222. eq = self.assertEqual
  223. # Tests the combination of parentheses and "?:"
  224. f = gettext.c2py('n==1 ? 0 : (n==2 ? 1 : 2)')
  225. s = ''.join([ str(f(x)) for x in range(200) ])
  226. eq(s, "20122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222")
  227. def test_lt(self):
  228. eq = self.assertEqual
  229. f = gettext.c2py('n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2')
  230. s = ''.join([ str(f(x)) for x in range(200) ])
  231. eq(s, "20111111112222222222201111111120111111112011111111201111111120111111112011111111201111111120111111112011111111222222222220111111112011111111201111111120111111112011111111201111111120111111112011111111")
  232. def test_ru(self):
  233. eq = self.assertEqual
  234. f = gettext.c2py('n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2')
  235. s = ''.join([ str(f(x)) for x in range(200) ])
  236. eq(s, "20111222222222222222201112222220111222222011122222201112222220111222222011122222201112222220111222222011122222222222222220111222222011122222201112222220111222222011122222201112222220111222222011122222")
  237. def test_pl(self):
  238. eq = self.assertEqual
  239. f = gettext.c2py('n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2')
  240. s = ''.join([ str(f(x)) for x in range(200) ])
  241. eq(s, "20111222222222222222221112222222111222222211122222221112222222111222222211122222221112222222111222222211122222222222222222111222222211122222221112222222111222222211122222221112222222111222222211122222")
  242. def test_sl(self):
  243. eq = self.assertEqual
  244. f = gettext.c2py('n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3')
  245. s = ''.join([ str(f(x)) for x in range(200) ])
  246. eq(s, "30122333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333012233333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333")
  247. def test_security(self):
  248. raises = self.assertRaises
  249. # Test for a dangerous expression
  250. raises(ValueError, gettext.c2py, "os.chmod('/etc/passwd',0777)")
  251. class UnicodeTranslationsTest(GettextBaseTest):
  252. def setUp(self):
  253. GettextBaseTest.setUp(self)
  254. with open(UMOFILE, 'rb') as fp:
  255. self.t = gettext.GNUTranslations(fp)
  256. self._ = self.t.ugettext
  257. def test_unicode_msgid(self):
  258. unless = self.assertTrue
  259. unless(isinstance(self._(''), unicode))
  260. unless(isinstance(self._(u''), unicode))
  261. def test_unicode_msgstr(self):
  262. eq = self.assertEqual
  263. eq(self._(u'ab\xde'), u'\xa4yz')
  264. class WeirdMetadataTest(GettextBaseTest):
  265. def setUp(self):
  266. GettextBaseTest.setUp(self)
  267. with open(MMOFILE, 'rb') as fp:
  268. try:
  269. self.t = gettext.GNUTranslations(fp)
  270. except:
  271. self.tearDown()
  272. raise
  273. def test_weird_metadata(self):
  274. info = self.t.info()
  275. self.assertEqual(info['last-translator'],
  276. 'John Doe <jdoe@example.com>\nJane Foobar <jfoobar@example.com>')
  277. class DummyGNUTranslations(gettext.GNUTranslations):
  278. def foo(self):
  279. return 'foo'
  280. class GettextCacheTestCase(GettextBaseTest):
  281. def test_cache(self):
  282. self.localedir = os.curdir
  283. self.mofile = MOFILE
  284. self.assertEqual(len(gettext._translations), 0)
  285. t = gettext.translation('gettext', self.localedir)
  286. self.assertEqual(len(gettext._translations), 1)
  287. t = gettext.translation('gettext', self.localedir,
  288. class_=DummyGNUTranslations)
  289. self.assertEqual(len(gettext._translations), 2)
  290. self.assertEqual(t.__class__, DummyGNUTranslations)
  291. # Calling it again doesn't add to the cache
  292. t = gettext.translation('gettext', self.localedir,
  293. class_=DummyGNUTranslations)
  294. self.assertEqual(len(gettext._translations), 2)
  295. self.assertEqual(t.__class__, DummyGNUTranslations)
  296. def test_main():
  297. test_support.run_unittest(__name__)
  298. if __name__ == '__main__':
  299. test_main()
  300. # For reference, here's the .po file used to created the GNU_MO_DATA above.
  301. #
  302. # The original version was automatically generated from the sources with
  303. # pygettext. Later it was manually modified to add plural forms support.
  304. '''
  305. # Dummy translation for the Python test_gettext.py module.
  306. # Copyright (C) 2001 Python Software Foundation
  307. # Barry Warsaw <barry@python.org>, 2000.
  308. #
  309. msgid ""
  310. msgstr ""
  311. "Project-Id-Version: 2.0\n"
  312. "PO-Revision-Date: 2003-04-11 14:32-0400\n"
  313. "Last-Translator: J. David Ibanez <j-david@noos.fr>\n"
  314. "Language-Team: XX <python-dev@python.org>\n"
  315. "MIME-Version: 1.0\n"
  316. "Content-Type: text/plain; charset=iso-8859-1\n"
  317. "Content-Transfer-Encoding: 8bit\n"
  318. "Generated-By: pygettext.py 1.1\n"
  319. "Plural-Forms: nplurals=2; plural=n!=1;\n"
  320. #: test_gettext.py:19 test_gettext.py:25 test_gettext.py:31 test_gettext.py:37
  321. #: test_gettext.py:51 test_gettext.py:80 test_gettext.py:86 test_gettext.py:92
  322. #: test_gettext.py:98
  323. msgid "nudge nudge"
  324. msgstr "wink wink"
  325. #: test_gettext.py:16 test_gettext.py:22 test_gettext.py:28 test_gettext.py:34
  326. #: test_gettext.py:77 test_gettext.py:83 test_gettext.py:89 test_gettext.py:95
  327. msgid "albatross"
  328. msgstr ""
  329. #: test_gettext.py:18 test_gettext.py:24 test_gettext.py:30 test_gettext.py:36
  330. #: test_gettext.py:79 test_gettext.py:85 test_gettext.py:91 test_gettext.py:97
  331. msgid "Raymond Luxury Yach-t"
  332. msgstr "Throatwobbler Mangrove"
  333. #: test_gettext.py:17 test_gettext.py:23 test_gettext.py:29 test_gettext.py:35
  334. #: test_gettext.py:56 test_gettext.py:78 test_gettext.py:84 test_gettext.py:90
  335. #: test_gettext.py:96
  336. msgid "mullusk"
  337. msgstr "bacon"
  338. #: test_gettext.py:40 test_gettext.py:101
  339. msgid ""
  340. "This module provides internationalization and localization\n"
  341. "support for your Python programs by providing an interface to the GNU\n"
  342. "gettext message catalog library."
  343. msgstr ""
  344. "Guvf zbqhyr cebivqrf vagreangvbanyvmngvba naq ybpnyvmngvba\n"
  345. "fhccbeg sbe lbhe Clguba cebtenzf ol cebivqvat na vagresnpr gb gur TAH\n"
  346. "trggrkg zrffntr pngnybt yvoenel."
  347. # Manually added, as neither pygettext nor xgettext support plural forms
  348. # in Python.
  349. msgid "There is %s file"
  350. msgid_plural "There are %s files"
  351. msgstr[0] "Hay %s fichero"
  352. msgstr[1] "Hay %s ficheros"
  353. '''
  354. # Here's the second example po file example, used to generate the UMO_DATA
  355. # containing utf-8 encoded Unicode strings
  356. '''
  357. # Dummy translation for the Python test_gettext.py module.
  358. # Copyright (C) 2001 Python Software Foundation
  359. # Barry Warsaw <barry@python.org>, 2000.
  360. #
  361. msgid ""
  362. msgstr ""
  363. "Project-Id-Version: 2.0\n"
  364. "PO-Revision-Date: 2003-04-11 12:42-0400\n"
  365. "Last-Translator: Barry A. WArsaw <barry@python.org>\n"
  366. "Language-Team: XX <python-dev@python.org>\n"
  367. "MIME-Version: 1.0\n"
  368. "Content-Type: text/plain; charset=utf-8\n"
  369. "Content-Transfer-Encoding: 7bit\n"
  370. "Generated-By: manually\n"
  371. #: nofile:0
  372. msgid "ab\xc3\x9e"
  373. msgstr "\xc2\xa4yz"
  374. '''
  375. # Here's the third example po file, used to generate MMO_DATA
  376. '''
  377. msgid ""
  378. msgstr ""
  379. "Project-Id-Version: No Project 0.0\n"
  380. "POT-Creation-Date: Wed Dec 11 07:44:15 2002\n"
  381. "PO-Revision-Date: 2002-08-14 01:18:58+00:00\n"
  382. "Last-Translator: John Doe <jdoe@example.com>\n"
  383. "Jane Foobar <jfoobar@example.com>\n"
  384. "Language-Team: xx <xx@example.com>\n"
  385. "MIME-Version: 1.0\n"
  386. "Content-Type: text/plain; charset=iso-8859-15\n"
  387. "Content-Transfer-Encoding: quoted-printable\n"
  388. "Generated-By: pygettext.py 1.3\n"
  389. '''