Non-breaking spaces in the unit help page

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

Moderator: Forum Moderators

Post Reply
User avatar
josteph
Inactive Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Non-breaking spaces in the unit help page

Post by josteph »

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: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Non-breaking spaces in the unit help page

Post by GunChleoc »

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.
User avatar
josteph
Inactive Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Non-breaking spaces in the unit help page

Post by josteph »

Thanks, GunChleoc. Neither do I.
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Non-breaking spaces in the unit help page

Post by GunChleoc »

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 ;)
User avatar
josteph
Inactive Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Non-breaking spaces in the unit help page

Post by josteph »

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: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Non-breaking spaces in the unit help page

Post by GunChleoc »

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