# HG changeset patch # User cmlenz # Date 1270625753 0 # Node ID 8acf91ff87e51966462994c452456be44b472310 # Parent e6fe36240c6ff9313ddbf57d847ef40fe345b8ab Ported r505 to 0.9.x stable branch. diff --git a/0.9.x/babel/messages/tests/data/mapping.cfg b/0.9.x/babel/messages/tests/data/mapping.cfg --- a/0.9.x/babel/messages/tests/data/mapping.cfg +++ b/0.9.x/babel/messages/tests/data/mapping.cfg @@ -1,5 +1,5 @@ -# Ignore CVS Dirs -[ignore: **/CVS/**.*] +# Ignore directory +[ignore: **/ignored/**.*] # Extraction from Python source files [python: **.py] diff --git a/0.9.x/babel/messages/tests/data/project/CVS/a_test_file.txt b/0.9.x/babel/messages/tests/data/project/CVS/a_test_file.txt deleted file mode 100644 --- a/0.9.x/babel/messages/tests/data/project/CVS/a_test_file.txt +++ /dev/null @@ -1,1 +0,0 @@ -Just a test file. diff --git a/0.9.x/babel/messages/tests/data/project/CVS/an_example.txt b/0.9.x/babel/messages/tests/data/project/CVS/an_example.txt deleted file mode 100644 diff --git a/0.9.x/babel/messages/tests/data/project/CVS/this_wont_normally_be_here.py b/0.9.x/babel/messages/tests/data/project/CVS/this_wont_normally_be_here.py deleted file mode 100644 --- a/0.9.x/babel/messages/tests/data/project/CVS/this_wont_normally_be_here.py +++ /dev/null @@ -1,11 +0,0 @@ -# -*- 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) diff --git a/0.9.x/babel/messages/tests/data/project/ignored/a_test_file.txt b/0.9.x/babel/messages/tests/data/project/ignored/a_test_file.txt new file mode 100644 --- /dev/null +++ b/0.9.x/babel/messages/tests/data/project/ignored/a_test_file.txt @@ -0,0 +1,1 @@ +Just a test file. diff --git a/0.9.x/babel/messages/tests/data/project/ignored/an_example.txt b/0.9.x/babel/messages/tests/data/project/ignored/an_example.txt new file mode 100644 diff --git a/0.9.x/babel/messages/tests/data/project/ignored/this_wont_normally_be_here.py b/0.9.x/babel/messages/tests/data/project/ignored/this_wont_normally_be_here.py new file mode 100644 --- /dev/null +++ b/0.9.x/babel/messages/tests/data/project/ignored/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) diff --git a/0.9.x/babel/messages/tests/frontend.py b/0.9.x/babel/messages/tests/frontend.py --- a/0.9.x/babel/messages/tests/frontend.py +++ b/0.9.x/babel/messages/tests/frontend.py @@ -141,7 +141,7 @@ msgstr[0] "" msgstr[1] "" -#: project/CVS/this_wont_normally_be_here.py:11 +#: project/ignored/this_wont_normally_be_here.py:11 msgid "FooBar" msgid_plural "FooBars" msgstr[0] "" @@ -208,8 +208,8 @@ def test_extraction_with_mapping_dict(self): self.dist.message_extractors = { 'project': [ - ('**/CVS/**.*', 'ignore', None), - ('**.py', 'python', None), + ('**/ignored/**.*', 'ignore', None), + ('**.py', 'python', None), ] } self.cmd.copyright_holder = 'FooBar, Inc.' @@ -599,7 +599,7 @@ msgstr[0] "" msgstr[1] "" -#: project/CVS/this_wont_normally_be_here.py:11 +#: project/ignored/this_wont_normally_be_here.py:11 msgid "FooBar" msgid_plural "FooBars" msgstr[0] ""