mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Allow small ッ before a vowel
This is a nonstandard use of ッ and it doesn't really have a defined romanization, but we need to support it for Cramorant (ウッウ, U'u).
This commit is contained in:
parent
b09929dfb6
commit
a91a7d95b3
2 changed files with 5 additions and 3 deletions
|
@ -98,9 +98,9 @@ class Romanizer(object):
|
|||
|
||||
if last_kana == 'sokuon':
|
||||
if kana[0] in vowels:
|
||||
raise ValueError("Sokuon cannot precede a vowel.")
|
||||
|
||||
characters.append(kana[0])
|
||||
characters.append("'")
|
||||
else:
|
||||
characters.append(kana[0])
|
||||
elif last_kana == 'n' and kana[0] in vowels:
|
||||
characters.append("'")
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import pokedex.roomaji
|
|||
(u'ラティアス', 'ratiasu'),
|
||||
(u'ウィー', 'wii'),
|
||||
(u'セレビィ', 'sereby'),
|
||||
(u'ウッウ', u"u'u"),
|
||||
]
|
||||
)
|
||||
def test_roomaji(kana, roomaji):
|
||||
|
@ -52,6 +53,7 @@ def test_roomaji(kana, roomaji):
|
|||
(u'ラティアス', u'ratiasu'),
|
||||
(u'ウィー', u'wí'),
|
||||
(u'セレビィ', u'serebí'),
|
||||
(u'ウッウ', u"u'u"),
|
||||
]
|
||||
)
|
||||
def test_roomaji_cs(kana, roomaji):
|
||||
|
|
Loading…
Reference in a new issue