projects
/
zzz-pokedex.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moved priority out of the move_effects table.
[zzz-pokedex.git]
/
pokedex
/
roomaji.py
diff --git
a/pokedex/roomaji.py
b/pokedex/roomaji.py
index
9db6b07
..
e91c960
100644
(file)
--- a/
pokedex/roomaji.py
+++ b/
pokedex/roomaji.py
@@
-60,7
+60,7
@@
_roomaji_small_kana_combos = {
# particularly weird, but it seems to be what GF intends
# Simple vowel replacement
# particularly weird, but it seems to be what GF intends
# Simple vowel replacement
- u'ウィ': 'wi', u'ウゥ': 'wu', u'ウェ': 'we',
+ u'ウィ': 'wi', u'ウゥ': 'wu', u'ウェ': 'we',
u'ウォ': 'wo',
u'ヴァ': 'va', u'ヴィ': 'vi', u'ヴェ': 've', u'ヴォ': 'vo',
u'チェ': 'che',
u'シェ': 'she',
u'ヴァ': 'va', u'ヴィ': 'vi', u'ヴェ': 've', u'ヴォ': 'vo',
u'チェ': 'che',
u'シェ': 'she',
@@
-71,6
+71,7
@@
_roomaji_small_kana_combos = {
# Not so much
u'シィ': 'sy',
# Not so much
u'シィ': 'sy',
+ u'ミィ': 'my',
u'ビィ': 'by',
u'ピィ': 'py',
}
u'ビィ': 'by',
u'ピィ': 'py',
}
@@
-85,11
+86,12
@@
def romanize(string):
last_char = None # Used for small kana combos
for char in string:
# Full-width Latin
last_char = None # Used for small kana combos
for char in string:
# Full-width Latin
- if
ord(char) >= 0xff11 and
ord(char) <= 0xff5e:
+ if
0xff01 <=
ord(char) <= 0xff5e:
if last_kana == 'sokuon':
raise ValueError("Sokuon cannot precede Latin characters.")
if last_kana == 'sokuon':
raise ValueError("Sokuon cannot precede Latin characters.")
- char = chr(ord(char) - 0xff11 + 0x31)
+ # XXX Real Unicode decomposition would be nicer
+ char = chr(ord(char) - 0xff01 + 0x21)
characters.append(char)
last_kana = None
characters.append(char)
last_kana = None