minetest.github.io icon indicating copy to clipboard operation
minetest.github.io copied to clipboard

Bad linebreak in German word "Dokumentation" (and other languages)

Open Wuzzy2 opened this issue 2 months ago • 9 comments

If you go to https://www.luanti.org/de/get-involved/ and set the language to German, the word "Dokumentation" is badly broken into two lines:

Dokumenta tion

Doesn't look good, and is grammatically false (missing dash).

Possible solutions:

Either a hyphen must be added after "Dokumenta", or the font scales automatically for the word to fit, or the translation is shortened to "Doku".

Wuzzy2 avatar Nov 08 '25 22:11 Wuzzy2

Same in Italian

Zughy avatar Nov 09 '25 15:11 Zughy

German translation in Weblate now shortened to "Doku".

Wuzzy2 avatar Nov 10 '25 11:11 Wuzzy2

I'm pretty sure browsers can natively do world breaking, we really shouldn't be applying stupid translation workarounds for this.

sfan5 avatar Nov 10 '25 13:11 sfan5

+1 we should let the browser handle word wrapping.

Yet, in this particular case, Doku is appropriate, everything else is ugly. You wouldn't want to write out documentation in English either.

appgurueu avatar Nov 10 '25 14:11 appgurueu

I have to disagree with @sfan5 here: Breaking lines within words automatically is surprisingly hard because the word-breaking rules differ from language from langauge and tend to be very complex and even then there are many special cases. There is no simple algorithm you can just hack into the app in a few minutes and it just works. What one could do is that authors manually insert optional line breaks into words, e.g. with a soft hypen for example.

That having said, I believe just using a shorter word in the translation like I did is probably the best solution in this case. I wonder if that can be fixed in a similar fashion in Italian, @Zughy. I agree that we should not overcomplicate this.

If this issue is fixed on the live version for both German and Italian, you can consider this issue fixed.

Wuzzy2 avatar Nov 10 '25 17:11 Wuzzy2

No, there's no easy fix in Italian

Zughy avatar Nov 10 '25 18:11 Zughy

There's no shortened version that can be used in Swedish either (even though our word is the same as in German, "Doku" would read as nonsense). Manually wordbreaking it like "Dokument- ation" makes sense however, but since the same string appears in the navbar putting the hyphen into the translated string doesn't work.

rollerozxa avatar Nov 10 '25 18:11 rollerozxa

I'd recommend the use of a softhyphen - ­ to control where it breaks

Or you could update the layout to allow the text to fit without breaking

rubenwardy avatar Nov 10 '25 18:11 rubenwardy

I'd recommend the use of a softhyphen - ­ to control where it breaks

Ah, using ­. Makes sense.

Image

Layout would still need to be adjusted in some way, either to make icons in line with each other and make the labels vertically aligned at the top, or increasing the width to make it not break at all.

rollerozxa avatar Nov 10 '25 19:11 rollerozxa