The Bug
Minecraft tries to insert line breaks at whitespaces for long sentences, making it produce awkward layouts for languages that don't use spaces as the word delimiter like Chinese and Japanese.
This article by 3TUSK does an excellent job at explaining and code analyzing the bug and provides potential fixes to the issue.
Original Description
At line breaking rules for not European characters in any version of Minecraft, it is not perform completly.
So I can only menthon Japanese rule because I'm Japanese, these characters must not come at the beginning of lines:
Punctuations: "。" and "、"
Sutegana, small lettered Kanas e.g. "ゃ", "ゅ", "ょ", "っ" or others.
End of brackets. e.g. "」", "】"
reference: https://en.wikipedia.org/wiki/Line_breaking_rules_in_East_Asian_languages
And, maybe only Japanese language, "Full-width" characer will not ruled general line breaking rule.
The issue of line breaking rules can be menthoned in other languages, for examples Chinese(zh_ch, zh_tw).
P.S. Possibly this issue is easy to appear in languages that not use (half-width) space.
[media]
ja_jp - "。" comes at the beginning of a line in Advancement description.
ja-jp - "。" and "、" comes at the beginning of a line in Realm introduction.
zh-tw - "。" comes at the beginning of a line in Distortion effects description.
Linked issues
is duplicated by 1
Attachments
Comments 5
@@unknown No, it is related to how the code handles long text, rather than how the text is translated. The same bug happens when you write non-European text in a book.
As a Chinese user I can confirm this bug. It seems that the algorithm makes new line using rules in English only.
There is someone analyzed this bug in depth and made a Forge mod to patch up. He uses the Java class java.text.BreakIterator which is said to be better than the vanilla implementation.
https://github.com/3TUSK/PanI18n/blob/bleeding/docs/line_break/func_78271_c-en_us.markdown
Plus, the vanilla algorithm cannot break English word in the middle, such as
Super-
market.