Non-breaking spaces in the unit help page
Moderator: Forum Moderators
Non-breaking spaces in the unit help page
Hello translators!
On https://github.com/wesnoth/wesnoth/pull/3256 we're working on fixing a line wrapping bug in the unit description help page. Presently, the translated strings are
On https://github.com/wesnoth/wesnoth/pull/3256 we're working on fixing a line wrapping bug in the unit description help page. Presently, the translated strings are
"Required XP: "
, "Alignment: "
, etc., and for English we want those spaces to become non-breaking spaces. Can we remove the trailing space from the translated string and have the code always append a non-breaking space after the localized string, or would that be wrong for some language?Re: Non-breaking spaces in the unit help page
Chinese script doesn't use spaces - I don't know if it would be a problem in this case though, because I don't speak Chinese.
Re: Non-breaking spaces in the unit help page
Thanks, GunChleoc. Neither do I.
Re: Non-breaking spaces in the unit help page
Maybe you can do a string replace programmatically? theoretical, translations of individual alignments could contain whitespace too and so does "Required XP:", so you might want to repace all whitespace with non-breaking space after fetching the translations.
Also, make sure that the UI is wide enough
Also, make sure that the UI is wide enough
Re: Non-breaking spaces in the unit help page
As the PR is written, the individual translators are responsible for adding non-breaking spaces inside the translated strings as needed. Of course the code could replace all spaces with non-breaking spaces (if that's correct for all languages).
Re: Non-breaking spaces in the unit help page
If a language has a space, it can also have a non-breaking space.
Non-breaking spaces in source strings can be easily missed by translators, leading to mistakes. So, a code solution would probably be better.
Non-breaking spaces in source strings can be easily missed by translators, leading to mistakes. So, a code solution would probably be better.