kanetaka Posted May 8, 2014 Report Share Posted May 8, 2014 A translation file "longword.public.po" contains as follows:#: gui/pregame/mainmenu.xml:498msgid "Alpha XVI: Patañjali"msgstr "123456789012345678901234567890Alpha XVI: Patañjali"And you select this language from main menu, The result is: Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted May 8, 2014 Report Share Posted May 8, 2014 We should fix the UI where possible, do you have specific examples? Or are you asking we make a "longword" po next to the "longstrings" po? Quote Link to comment Share on other sites More sharing options...
kanetaka Posted May 8, 2014 Author Report Share Posted May 8, 2014 My point is different. The problem is not narrow UI space. In Japanese, single word can be much longer than European language.For example, the translation of "Marcus Claudius Marcellus" is "マルクス・クラウディウス・マルケッルス", and this is treated as single word although the original contains 3 words.We need breaking line in the middle of word if the word is too much long. Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted May 8, 2014 Report Share Posted May 8, 2014 The word boundaries we use are defined here: http://trac.wildfiregames.com/browser/ps/trunk/source/gui/GUItext.cpp#L37 So that's space and hyphen in the normal range, but also the complete Chinese block. If you tell me what characters are used in Japanese, I can add them too. Quote Link to comment Share on other sites More sharing options...
kanetaka Posted May 9, 2014 Author Report Share Posted May 9, 2014 OK. I list up them.You can break line after characters below:, ) ] } 、 〕 〉 》 」 』 】 〙 〗 〟 ’ ” ⦆ » ‐ ゠ – 〜 ? ! ‼ ⁇ ⁈ ⁉ ・ : ; 。 . Don't foget last one, U+3000 ideographic space.and you can break line before characters below:( [ { 〔 〈 《 「 『 【 〘 〖 〝 ‘ “ ⦅ « ヽ ヾ ー ァ ィ ゥ ェ ォ ッ ャ ュ ョ ヮ ヵ ヶ ぁ ぃ ぅ ぇ ぉ っ ゃ ゅ ょ ゎ ゕ ゖ ㇰ ㇱ ㇳ ㇲ ㇳ ㇴ ㇵ ㇶ ㇷ ㇸ ㇹ ㇺ ㇻ ㇼ ㇽ ㇾ ㇿ 々 〻If you are intersted in formatting Japanese text, the following might be useful.http://www.w3.org/TR/jlreq/ Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted May 9, 2014 Report Share Posted May 9, 2014 We don't support breaking before a char. As normally, brackets are preceded with a space, so we break after that space. I guess it will look good enough for release if we break after the "after" list you gave, and also after ヽ ヾ ー ァ ィ ゥ ェ ォ ッ ャ ュ ョ ヮ ヵ ヶ ぁ ぃ ぅ ぇ ぉ っ ゃ ゅ ょ ゎ ゕ ゖ ㇰ ㇱ ㇳ ㇲ ㇳ ㇴ ㇵ ㇶ ㇷ ㇸ ㇹ ㇺ ㇻ ㇼ ㇽ ㇾ. Can't do a lot more now. We will have to switch to a decent text renderer at some point in the future anyway. Instead of just having our own hacked together piece of code. Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted May 9, 2014 Report Share Posted May 9, 2014 Ok, I ended up enlarging the ranges a bit, but I didn't include the brackets and braces you listed. (as that's quite annoyingly split, one by one, and it would only work for the right brackets anyway). So it will reflow better now, and lets hope it doesn't look too bad when it comes across a bracket thing. Quote Link to comment Share on other sites More sharing options...
kanetaka Posted May 9, 2014 Author Report Share Posted May 9, 2014 It looks acceptable, yet I haven't seen on the UI, only the source code. By the way, I made mistakes in my previous post.and you can break line before characters below:( [ { 〔 〈 《 「 『 【 〘 〖 〝 ‘ “ ⦅ « ヽ ヾ ー ァ ィ ゥ ェ ォ ッ ャ ュ ョ ヮ ヵ ヶ ぁ ぃ ぅ ぇ ぉ っ ゃ ゅ ょ ゎ ゕ ゖ ㇰ ㇱ ㇳ ㇲ ㇳ ㇴ ㇵ ㇶ ㇷ ㇸ ㇹ ㇺ ㇻ ㇼ ㇽ ㇾ ㇿ 々 〻 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.