turn off space wrap on chinese
Moderator: ickputzdirwech
turn off space wrap on chinese
TL;DR: space wrap not suitable for chinese.
Chinese normally [do not have spaces] and [wrapped char by char]. Current space wrap cleaves the sentence causing bad display when there are format spaces like the one between chinese and numbers and latin letters, between text and reference.
The following image shows a sentence cutted on " T ".
An ideal display will be like this (without space wrap):
(Chinese text: ζ T ζεΌη§ζι’ζΏεΌε§ζ°η§ζηη εγ
Correspond english text in game: Press T to start a new research.
Direct translation: Press T to open science technology panel to start new science technologies' research and development.)
As I know, japanese have no spaces as well.
Chinese normally [do not have spaces] and [wrapped char by char]. Current space wrap cleaves the sentence causing bad display when there are format spaces like the one between chinese and numbers and latin letters, between text and reference.
The following image shows a sentence cutted on " T ".
An ideal display will be like this (without space wrap):
(Chinese text: ζ T ζεΌη§ζι’ζΏεΌε§ζ°η§ζηη εγ
Correspond english text in game: Press T to start a new research.
Direct translation: Press T to open science technology panel to start new science technologies' research and development.)
As I know, japanese have no spaces as well.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: turn off space wrap on chinese
+1
Looking at core.cfg i think this might be considered a translation bug? The chinese translation actually has two spaces while the japanese one has none. Though i have to admit that a single half-width letter looks ugly when pressed against full-width japanese text without space. And the lack of space(ing) in the japense locale is probably just a hackfix for exactly this even more ugly wrapping issue.
Correct. Though at least your example works fine:
Looking at core.cfg i think this might be considered a translation bug? The chinese translation actually has two spaces while the japanese one has none. Though i have to admit that a single half-width letter looks ugly when pressed against full-width japanese text without space. And the lack of space(ing) in the japense locale is probably just a hackfix for exactly this even more ugly wrapping issue.
Code: Select all
not-researching=ζ __CONTROL__open-technology-gui__ ζεΌη§ζι’ζΏεΌε§ζ°η§ζηη εγ
Code: Select all
not-researching=__CONTROL__open-technology-gui__γζΌγγ¦γζ°γγη η©Άγιε§γγΎγγγοΌ
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: turn off space wrap on chinese
On further thought + testing this can be solved by using non-breaking space in the chinese core.cfg:
Code: Select all
not-researching=ζΒ __CONTROL__open-technology-gui__Β ζεΌη§ζι’ζΏεΌε§ζ°η§ζηη εγ
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: turn off space wrap on chinese
On further thought + testing this can be solved by using non-breaking space in the chinese core.cfg:
Edit 1: Hrng! Looks like the forum softeware replaces non-breaking spaces with normal ones so i can't actually post that correctly.
Edit 2: I made a quick demo mod
Edit 3: @moderation This thus may or may not have to be moved to the translation forum?
Code: Select all
not-researching=ζΒ __CONTROL__open-technology-gui__Β ζεΌη§ζι’ζΏεΌε§ζ°η§ζηη εγ
Edit 2: I made a quick demo mod
Edit 3: @moderation This thus may or may not have to be moved to the translation forum?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: turn off space wrap on chinese
Yes, NBSP, the most semantic correct solution. Hard to apply myself though.
I will go to translation forum to request a QA, just leave this post here.
Hopefully, a specify line breaking rule could be applied in game, not default english wrap-on-space and explicit NBSP.
I will go to translation forum to request a QA, just leave this post here.
Hopefully, a specify line breaking rule could be applied in game, not default english wrap-on-space and explicit NBSP.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: turn off space wrap on chinese
As far as i understand everybody can contribute on the crowdin translation project. Not sure how the proof readers react to "invisible" changes. But the people in the translation forum will know more.
Yea, fixing the default wouldn't hurt i guess.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: turn off space wrap on chinese
Traditional Chinese (zh-tw) also suffers from this issue. The tech button is fine because of the short text, but the issue still occurs on another instance.
The zh-tw community members had discussed about whether to put spaces between Chinese and Latin texts. There are no clear conclusions because of the text displaying limits.
I am afraid that Factorio developers are not going to implement the rules because of the complexity.
I have notified the Simplified Chinese proofreader of this post. And thanks @473BFF6D for triggering a notification to me. I had subscribed the translation forum only.
Edit: Removed the link to Line Breaking Rules because it seems not directly related to this topic.
There are at least two ways to solve the issue. The first is to let Factorio developers implement line breaking rules according to a valid standard, and the second way is using special characters like NBSP to manually control the line breakings. I considered that the second way is a workaround because it's not perfect.The zh-tw community members had discussed about whether to put spaces between Chinese and Latin texts. There are no clear conclusions because of the text displaying limits.
I am afraid that Factorio developers are not going to implement the rules because of the complexity.
I have notified the Simplified Chinese proofreader of this post. And thanks @473BFF6D for triggering a notification to me. I had subscribed the translation forum only.
Edit: Removed the link to Line Breaking Rules because it seems not directly related to this topic.
Last edited by wjy on Sun Feb 28, 2021 3:02 pm, edited 1 time in total.
Traditional Chinese proofreader of Factorio.
Crowdin profile: https://crowdin.com/profile/willy04wu69
Crowdin profile: https://crowdin.com/profile/willy04wu69
Re: turn off space wrap on chinese
I just tried no space, SP, NBSP, ZWSP, ENSP, ZWJ, "", ββ, they all cause wrap !?
Re: turn off space wrap on chinese
I have heard factorio is written wth Allegro whose source code shows line breaks only appear on SP and tab which do not respect almost any of the Unicode Annex #14 who indicates line breaking algorithm including ones of ideographics and punctuations. But my test result above just confused me.
Re: turn off space wrap on chinese
I tested with NBSP and got a good result. Don't know how did you try it? When I trying to type a NBSP I found that if you copy NBSP from a web page, the NBSP will be converted to a normal space character.
Traditional Chinese proofreader of Factorio.
Crowdin profile: https://crowdin.com/profile/willy04wu69
Crowdin profile: https://crowdin.com/profile/willy04wu69
Re: turn off space wrap on chinese
Maybe the key reference equals to a space.
And I got this on my computer!
Full color setting in zh_TW looks well on my computer.
And I got this on my computer!
Full color setting in zh_TW looks well on my computer.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: turn off space wrap on chinese
Interesting and definetly broken. Also assuming that is from 1.1.25 and knowing that my screenshot is from 1.0.0, that means something changed, and like it looks not just the font/layout. Maybe someone changed the locale to break "conveniently" in the new layout.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: turn off space wrap on chinese
I'm curious about what did you see. Could you please share the screenshot?
According to the Crowdin activity history, someone added "\n" to the translation to force a line wrapping.eradicator wrote: βSat Feb 27, 2021 6:15 am Interesting and definetly broken. Also assuming that is from 1.1.25 and knowing that my screenshot is from 1.0.0, that means something changed, and like it looks not just the font/layout. Maybe someone changed the locale to break "conveniently" in the new layout.
https://crowdin.com/project/factorio/ac ... on_id=7752
Traditional Chinese proofreader of Factorio.
Crowdin profile: https://crowdin.com/profile/willy04wu69
Crowdin profile: https://crowdin.com/profile/willy04wu69
Re: turn off space wrap on chinese
Here I assumed that you were out of luck from trying using NBSP.
Here I assumed that you were successfully using NBSP. It's confusing to me and I'm not sure which one did you mean. I posted two screenshots before. The first one for using normal space after "16" and the second one for using NBSP after "16."
BTW, using NBSP or using no spaces is a double-edged sword.
I tested another configuration and found another issue when using NBSP or using no spaces. Given the following example translation:
Code: Select all
δΎζε16δΎζεδΎζεδΎζεδΎζεOpenGLδΎζεδΎζεγ
Code: Select all
δΎζε16δΎζεδΎζεδΎζεδΎζεOpe
nGLδΎζεδΎζεγ
- Break a English word in default configs.
- Break a English word when using a different UI scale.
- Break a English word when a player modded the font of the game.
- Break a English word when the translation included a variable and changed the length dynamically.
Traditional Chinese proofreader of Factorio.
Crowdin profile: https://crowdin.com/profile/willy04wu69
Crowdin profile: https://crowdin.com/profile/willy04wu69
Re: turn off space wrap on chinese
No, I confirm they're all correctly inputed. My editor can show the code point under the caret.
Please try that translation under zh_CN. The colored T key may be a line breaking point.
"NBSP behavior" just means when NBSP is used.
Re: turn off space wrap on chinese
Thanks for clarifying. I am surprised that we were talking about two different issues:
- Formatted text (the colored "T" key) is like having spaces after it and behaving as a line breaking point.
- Current line breaking rules is not ideal for CJK (Chinese/Japanese/Korean) text and often lead to break a line at a improper position.
Code: Select all
not-researching=ζ__CONTROL__open-technology-gui__ζεΌη§ζι’ζΏεΌε§ζ°η§ζηη εγ
Code: Select all
not-researching=ζTζεΌη§ζι’ζΏεΌε§ζ°η§ζηη εγ
For the second issue, the first line in the tooltip is improperly broke after "16." Thus a large blank is left after the first line.
Traditional Chinese proofreader of Factorio.
Crowdin profile: https://crowdin.com/profile/willy04wu69
Crowdin profile: https://crowdin.com/profile/willy04wu69
Re: turn off space wrap on chinese
Well, break point at key belongs to non-ideal CJK line beraking, I think. It just causes NBSP fix won't work.