Non-breaking spaces in the unit help page

Discuss and coordinate development of mainline and user-made content translations.

Moderators: Forum Moderators, Developers

Post Reply
josteph
Posts: 35
Joined: August 19th, 2017, 6:58 pm

Non-breaking spaces in the unit help page

Post by josteph » June 23rd, 2018, 5:50 pm

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 "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?

User avatar
GunChleoc
Translator
Posts: 434
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Non-breaking spaces in the unit help page

Post by GunChleoc » July 8th, 2018, 4:29 pm

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.

josteph
Posts: 35
Joined: August 19th, 2017, 6:58 pm

Re: Non-breaking spaces in the unit help page

Post by josteph » July 8th, 2018, 7:23 pm

Thanks, GunChleoc. Neither do I.

User avatar
GunChleoc
Translator
Posts: 434
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Non-breaking spaces in the unit help page

Post by GunChleoc » July 9th, 2018, 12:27 pm

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 ;)

josteph
Posts: 35
Joined: August 19th, 2017, 6:58 pm

Re: Non-breaking spaces in the unit help page

Post by josteph » July 9th, 2018, 1:38 pm

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).

User avatar
GunChleoc
Translator
Posts: 434
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Non-breaking spaces in the unit help page

Post by GunChleoc » Yesterday, 7:25 pm

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.

Post Reply