Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: grit/clique_unittest.py

Issue 9958067: Fixing a bug in GRIT where messages with substitutions would (Closed) Base URL: https://grit-i18n.googlecode.com/svn/trunk
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « grit/clique.py ('k') | grit/node/base.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/clique_unittest.py
diff --git a/grit/clique_unittest.py b/grit/clique_unittest.py
index 92d9b6ad9e9162076477dfab7ba552ce20743ee2..b868fbc3cae3404ef352a5f7f9317737bb770e85 100644
--- a/grit/clique_unittest.py
+++ b/grit/clique_unittest.py
@@ -189,6 +189,21 @@ class MessageCliqueUnittest(unittest.TestCase):
c.AddTranslation(translation, 'fr')
self.failUnless(c.MessageForLanguage('fr').GetRealContent().startswith('jjj'))
+ def testWhitespaceMessagesAreNontranslateable(self):
+ factory = clique.UberClique()
+
+ message = tclib.Message(text=' \t')
+ c = factory.MakeClique(message, translateable=True)
+ self.failIf(c.IsTranslateable())
+
+ message = tclib.Message(text='\n \n ')
+ c = factory.MakeClique(message, translateable=True)
+ self.failIf(c.IsTranslateable())
+
+ message = tclib.Message(text='\n hello')
+ c = factory.MakeClique(message, translateable=True)
+ self.failUnless(c.IsTranslateable())
+
class DummyCustomType(clique.CustomType):
def Validate(self, message):
« no previous file with comments | « grit/clique.py ('k') | grit/node/base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698