Commit 4e298a1a by Ned Batchelder

Add an apostrophe to the Lorem text.

parent 2ad4749a
...@@ -53,10 +53,12 @@ TABLE = { ...@@ -53,10 +53,12 @@ TABLE = {
# The print industry's standard dummy text, in use since the 1500s # The print industry's standard dummy text, in use since the 1500s
# see http://www.lipsum.com/, then fed through a "fancy-text" converter. # see http://www.lipsum.com/, then fed through a "fancy-text" converter.
# The string should start with a space. # The string should start with a space, so that it joins nicely with the text
# that precedes it. The Lorem contains an apostrophe since French often does,
# and translated strings get put into single-quoted strings, which then break.
LOREM = " " + " ".join( # join and split just make the string easier here. LOREM = " " + " ".join( # join and split just make the string easier here.
u""" u"""
Ⱡσяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂ 'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂
тємρσя ιη¢ι∂ι∂υηт υт łαвσяє єт ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм тємρσя ιη¢ι∂ι∂υηт υт łαвσяє єт ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм
νєηιαм, qυιѕ ησѕтяυ∂ єχєя¢ιтαтιση υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα νєηιαм, qυιѕ ησѕтяυ∂ єχєя¢ιтαтιση υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα
¢σммσ∂σ ¢σηѕєqυαт. ∂υιѕ αυтє ιяυяє ∂σłσя ιη яєρяєнєη∂єяιт ιη νσłυρтαтє ¢σммσ∂σ ¢σηѕєqυαт. ∂υιѕ αυтє ιяυяє ∂σłσя ιη яєρяєнєη∂єяιт ιη νσłυρтαтє
...@@ -68,7 +70,7 @@ LOREM = " " + " ".join( # join and split just make the string easier here. ...@@ -68,7 +70,7 @@ LOREM = " " + " ".join( # join and split just make the string easier here.
# To simulate more verbose languages (like German), pad the length of a string # To simulate more verbose languages (like German), pad the length of a string
# by a multiple of PAD_FACTOR # by a multiple of PAD_FACTOR
PAD_FACTOR = 1.3 PAD_FACTOR = 1.33
class Dummy(Converter): class Dummy(Converter):
......
...@@ -34,13 +34,13 @@ class TestDummy(TestCase): ...@@ -34,13 +34,13 @@ class TestDummy(TestCase):
@ddt.data( @ddt.data(
(u"hello my name is Bond, James Bond", (u"hello my name is Bond, James Bond",
u"héllø mý nämé ïs Bønd, Jämés Bønd Ⱡσяєм ι#"), u"héllø mý nämé ïs Bønd, Jämés Bønd Ⱡ'σяєм ι#"),
(u"don't convert <a href='href'>tag ids</a>", (u"don't convert <a href='href'>tag ids</a>",
u"døn't çønvért <a href='href'>täg ïds</a> Ⱡσяєм ιρѕυ#"), u"døn't çønvért <a href='href'>täg ïds</a> Ⱡ'σяєм ιρѕυ#"),
(u"don't convert %(name)s tags on %(date)s", (u"don't convert %(name)s tags on %(date)s",
u"døn't çønvért %(name)s tägs øn %(date)s Ⱡσяєм ιρѕ#"), u"døn't çønvért %(name)s tägs øn %(date)s Ⱡ'σяєм ιρѕ#"),
) )
def test_dummy(self, data): def test_dummy(self, data):
""" """
...@@ -53,17 +53,17 @@ class TestDummy(TestCase): ...@@ -53,17 +53,17 @@ class TestDummy(TestCase):
def test_singular(self): def test_singular(self):
entry = POEntry() entry = POEntry()
entry.msgid = 'A lovely day for a cup of tea.' entry.msgid = "A lovely day for a cup of tea."
expected = u'À løvélý däý før ä çüp øf téä. Ⱡσяєм ι#' expected = u"À løvélý däý før ä çüp øf téä. Ⱡ'σяєм #"
self.converter.convert_msg(entry) self.converter.convert_msg(entry)
self.assertUnicodeEquals(entry.msgstr, expected) self.assertUnicodeEquals(entry.msgstr, expected)
def test_plural(self): def test_plural(self):
entry = POEntry() entry = POEntry()
entry.msgid = 'A lovely day for a cup of tea.' entry.msgid = "A lovely day for a cup of tea."
entry.msgid_plural = 'A lovely day for some cups of tea.' entry.msgid_plural = "A lovely day for some cups of tea."
expected_s = u'À løvélý däý før ä çüp øf téä. Ⱡσяєм ι#' expected_s = u"À løvélý däý før ä çüp øf téä. Ⱡ'σяєм #"
expected_p = u'À løvélý däý før sømé çüps øf téä. Ⱡσяєм ιρ#' expected_p = u"À løvélý däý før sømé çüps øf téä. Ⱡ'σяєм ιρ#"
self.converter.convert_msg(entry) self.converter.convert_msg(entry)
result = entry.msgstr_plural result = entry.msgstr_plural
self.assertUnicodeEquals(result['0'], expected_s) self.assertUnicodeEquals(result['0'], expected_s)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment