Protected hyphens?
Moderator: Forum Moderators
Protected hyphens?
Is it possible to have protected hyphens in po files? If so, how do they work?
For example, I have this string on the game screen:
For example, I have this string on the game screen:
But it should look like this:Lean sinn oirbh fad air falbh bho ar dachaighean is dh’fhàg sinn gun dìon iad. Nise, càite an lorg sinn an t-
eòlach ud aig a bheil sàr-fhiosrachadh mun choille a deas?
It's not the end of the world, but it would make the text more legible.Lean sinn oirbh fad air falbh bho ar dachaighean is dh’fhàg sinn gun dìon iad. Nise, càite an lorg sinn an
t-eòlach ud aig a bheil sàr-fhiosrachadh mun choille a deas?
Re: Protected hyphens?
The usual term is "non-breaking hyphen" (in case you want to search for the term), and Unicode provides one at U+2011 (‑). If that does not work, it is probably a bug.
Re: Protected hyphens?
Thanks, this explains why I didn't get any useful search results!
I still don't know how to get these parsed though, Wesnoth simply displays the codes instead if the character. I tested
I still don't know how to get these parsed though, Wesnoth simply displays the codes instead if the character. I tested
U+2011 ‑ \u2011
and pasting a non-breaking hyphen from Word. A google search gives me a lot of programmer's info about Unicode, but nothing on how to enter a unicode character in a PO file. Re: Protected hyphens?
Where does the string you’re translating appear in-game? “‑” does work, but only in GUI2 elements (like the campaign selection menu, dialogue bands, story screens, ...). I don’t think GUI1 elements can make use of things like escape sequences and entities unless Pango was enabled for them (the sidebar and its tooltips are the only ones that come to mind), which is not the case for most of them.GunChleoc wrote: I still don't know how to get these parsed though, Wesnoth simply displays the codes instead if the character. I testedU+2011 ‑ \u2011
and pasting a non-breaking hyphen from Word. A google search gives me a lot of programmer's info about Unicode, but nothing on how to enter a unicode character in a PO file.
Re: Protected hyphens?
Thanks, that worked for the story screen and campaing dialogue, as well as the caimpaign description!
It does not work in campaign titles, scenario objectives or in the help files. Campaign titles don't have line breaks anyway, but it would be a good thing to have in the help files if possible, and maybe the scenario objectives as well (they sometimes contain multi-line hints).
It does not work in campaign titles, scenario objectives or in the help files. Campaign titles don't have line breaks anyway, but it would be a good thing to have in the help files if possible, and maybe the scenario objectives as well (they sometimes contain multi-line hints).
Re: Protected hyphens?
Converting them to GUI2 will take a lot of work, and I’m not sure what needs to be done to GUI1 elements to get them to use Pango. For now, you can just use the character (‑) directly and just make note where they’re used.GunChleoc wrote: It does not work in campaign titles, scenario objectives or in the help files. Campaign titles don't have line breaks anyway, but it would be a good thing to have in the help files if possible, and maybe the scenario objectives as well (they sometimes contain multi-line hints).
Re: Protected hyphens?
Will do.
If it's a lot of work, it makes sense that reprogramming itsn't high on the list.
If it's a lot of work, it makes sense that reprogramming itsn't high on the list.