fix git support for v1.5.3 (or higher) by setting "--work-tree"
[translate_toolkit.git] / lang / test_zh.py
blob4e0ffeacb746451653db0a3d5b88d57b4675b714
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
4 from translate.lang import factory
6 def test_punctranslate():
7 """Tests that we can translate punctuation."""
8 language = factory.getlanguage('zh')
9 assert language.punctranslate(u"abc efg") == u"abc efg"
10 assert language.punctranslate(u"abc efg.") == u"abc efg。"
12 def test_sentences():
13 """Tests basic functionality of sentence segmentation."""
14 language = factory.getlanguage('zh')
15 sentences = language.sentences(u"這個用戶名稱已經存在。現在會寄一封信給已登記的電郵地址。\n")
16 assert sentences == [u"這個用戶名稱已經存在。", u"現在會寄一封信給已登記的電郵地址。"]