changeset 115:f7aa8105e5a8

Adding a test project to play with :)
author palgarvio
date Thu, 14 Jun 2007 21:17:14 +0000
parents eeed857fa3d5
children c6214115e4da
files babel/messages/tests/data/project/CVS/a_test_file.txt babel/messages/tests/data/project/CVS/an_example.txt babel/messages/tests/data/project/CVS/this_wont_normally_be_here.py babel/messages/tests/data/project/__init__.py babel/messages/tests/data/project/file1.py babel/messages/tests/data/project/file2.py babel/messages/tests/data/project/mapping.cfg babel/messages/tests/data/project/templates/index.html babel/messages/tests/data/project/templates/index.xhtml babel/messages/tests/data/project/templates/layout.html babel/messages/tests/data/project/templates/layout.xhtml babel/messages/tests/data/setup.cfg babel/messages/tests/data/setup.py
diffstat 13 files changed, 125 insertions(+), 0 deletions(-) [+]
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
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
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(),
+)
Copyright (C) 2012-2017 Edgewall Software