Korean has a postposition.
If it's a fixed sentence, it doesn't matter, but
If a variable like [xxx.name] is included, there is a problem setting the postposition.
Since We don't know the preceding word, We can only process the postposition as '(은)는', which is not very readable.
ex)[xxx.name](은)는
There should be a function to handle this separately, so I've created the JOSA function and it's working fine. But I'm not sure I've done it right.
I need some technical advice on this.
Renpy 7.4.11
\renpy\text\text.py
Code: Select all
def tokenize(self, text):
"""
Convert the text into a list of tokens.
"""
tokens = [ ]
for i in text:
if isinstance(i, str):
tokens.extend(textsupport.tokenize(pyjosa.replace_josa(i))) ##### ADDED - KOREAN JOSA
elif isinstance(i, basestring):
tokens.extend(textsupport.tokenize(pyjosa.replace_josa(str(i)))) ##### ADDED - KOREAN JOSA
elif isinstance(i, renpy.display.core.Displayable):
tokens.append((DISPLAYABLE, i))
else:
raise Exception("Can't display {0!r} as Text.".format(i))
return tokens