mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Add unidecode for translating slugs in asian languages
This commit is contained in:
parent
18019efd38
commit
6f40e452e1
3 changed files with 6 additions and 2 deletions
|
|
@ -41,7 +41,9 @@ class TestUtils(unittest.TestCase):
|
|||
samples = (('this is a test', 'this-is-a-test'),
|
||||
('this is a test', 'this-is-a-test'),
|
||||
(u'this → is ← a ↑ test', 'this-is-a-test'),
|
||||
('this--is---a test', 'this-is-a-test'))
|
||||
('this--is---a test', 'this-is-a-test'),
|
||||
(u'unicode測試許功蓋,你看到了嗎?', 'unicodece-shi-xu-gong-gai-ni-kan-dao-liao-ma'),
|
||||
(u'大飯原発4号機、18日夜起動へ', 'da-fan-yuan-fa-4hao-ji-18ri-ye-qi-dong-he'),)
|
||||
|
||||
for value, expected in samples:
|
||||
self.assertEquals(utils.slugify(value), expected)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue