Mercurial > babel > old > mirror
changeset 115:f7aa8105e5a8
Adding a test project to play with :)
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/babel/messages/tests/data/project/CVS/a_test_file.txt @@ -0,0 +1,1 @@ +Just a test file.
new file mode 100644 --- /dev/null +++ b/babel/messages/tests/data/project/CVS/this_wont_normally_be_here.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +# This file won't normally be in this directory. +# It IS only for tests + +from gettext import ngettext + +def foo(): + # Note: This will have the TRANSLATOR: tag but shouldn't + # be included on the extracted stuff + print ngettext('FooBar', 'FooBars', 1)
new file mode 100644 --- /dev/null +++ b/babel/messages/tests/data/project/file1.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# file1.py for tests + +from gettext import gettext as _ +def foo(): + # TRANSLATOR: This will be a translator coment, + # that will include several lines + print _('bar')
new file mode 100644 --- /dev/null +++ b/babel/messages/tests/data/project/file2.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +# file2.py for tests + +from gettext import ngettext + +def foo(): + # Note: This will have the TRANSLATOR: tag but shouldn't + # be included on the extracted stuff + print ngettext('foobar', 'foobars', 1)
new file mode 100644 --- /dev/null +++ b/babel/messages/tests/data/project/mapping.cfg @@ -0,0 +1,6 @@ +# Extraction from Python source files +[python: project/**.py] + +# Ignore extraction from HTML and XHTML templates +[ignore: foobar/**/templates/**.html] +[ignore: foobar/**/templates/**.xhtml] \ No newline at end of file
new file mode 100644 --- /dev/null +++ b/babel/messages/tests/data/project/templates/index.html @@ -0,0 +1,14 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:py="http://genshi.edgewall.org/" + xmlns:xi="http://www.w3.org/2001/XInclude"> + <head> + <title>Just a Tests Test</title> + </head> + + <body> + </body> +</html> +
new file mode 100644 --- /dev/null +++ b/babel/messages/tests/data/project/templates/index.xhtml @@ -0,0 +1,14 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:py="http://genshi.edgewall.org/" + xmlns:xi="http://www.w3.org/2001/XInclude"> + <head> + <title>Just a Tests Test</title> + </head> + + <body> + </body> +</html> +
new file mode 100644 --- /dev/null +++ b/babel/messages/tests/data/project/templates/layout.html @@ -0,0 +1,14 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:py="http://genshi.edgewall.org/" + xmlns:xi="http://www.w3.org/2001/XInclude"> + <head> + <title>Just a Tests Test</title> + </head> + + <body> + </body> +</html> +
new file mode 100644 --- /dev/null +++ b/babel/messages/tests/data/project/templates/layout.xhtml @@ -0,0 +1,14 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:py="http://genshi.edgewall.org/" + xmlns:xi="http://www.w3.org/2001/XInclude"> + <head> + <title>Just a Tests Test</title> + </head> + + <body> + </body> +</html> +
new file mode 100644 --- /dev/null +++ b/babel/messages/tests/data/setup.cfg @@ -0,0 +1,6 @@ +[extract_messages] +msgid_bugs_address = bugs.address@email.tld +copyright_holder = FooBar, TM +add_comments = TRANSLATOR:,TRANSLATORS: +output_file = project/i18n/project.pot +
new file mode 100755 --- /dev/null +++ b/babel/messages/tests/data/setup.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# vim: sw=4 ts=4 fenc=utf-8 +# ============================================================================= +# $Id$ +# ============================================================================= +# $URL$ +# $LastChangedDate$ +# $Rev$ +# $LastChangedBy$ +# ============================================================================= +# Copyright (C) 2006 Ufsoft.org - Pedro Algarvio <ufs@ufsoft.org> +# +# Please view LICENSE for additional licensing information. +# ============================================================================= + +# THIS IS A BOGUS PROJECT + +from setuptools import setup, find_packages + +setup( + name = 'TestProject', + version = '0.1', + license = 'BSD', + author = 'Foo Bar', + author_email = 'foo@bar.tld', + packages = find_packages(), +)