breakLine method breaks CJK translation wrapping
deluxghost opened this issue · 3 comments
earth2java/common/src/main/java/slexom/earthtojava/utils/Utils.java
Lines 52 to 60 in f66015d
This method breaks long item descriptions into short lines with a max of 40 chars per line, which is not working on (at least) CJK translations.
CJK: Chinese/Japanese/Korean (zh_cn
, zh_tw
, ja_jp
, ko_kr
)
Let's try zh_tw
as an example, here is an item description:
Check it in game:
It says:
幾年前,一群遠征的探險家發現了一種稀有的怪雞,這種雞的身上長滿了蘑菇,因
。這是一種非常奇怪的雞。但是好不好吃?我們只能等時間來證明了。
And a piece of text is gone:
幾年前,一群遠征的探險家發現了一種稀有的怪雞,這種雞的身上長滿了蘑菇,因
此命名為咕咕菇 <---------------- THIS
。這是一種非常奇怪的雞。但是好不好吃?我們只能等時間來證明了。
IMO, since Korean also uses spaces to separate words, it might be ok to use the same rule as latin languages, but with less max line length.
And for Chinese / Japanese, they don't have any word separator, it's already good to break lines from anywhere in a sentence, with less line length too.
e.g. This is good
幾年前,一群遠征的探險家發現了一種稀有的怪
雞,這種雞的身上長滿了蘑菇,因此命名為咕咕
菇。這是一種非常奇怪的雞。但是好不好吃?我
們只能等時間來證明了。
if you want to make it better, just don't let any line start with punctuation
e.g. This is not so good (second line)
幾年前,一群遠征的探險家發現了一種稀有的怪雞
,這種雞的身上長滿了蘑菇,因此命名為咕咕菇。
這是一種非常奇怪的雞。但是好不好吃?我們只能
等時間來證明了。
another valid workaround is, we don't wrap text ourselves, and let mods like this handle all these mess