-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Title of the cutscenes book is badly broken #777
Comments
We could try making the size of that font style smaller when the language is set to German. This would be done by adding
after this line in |
Adding a special case only for German is not a good solution, as it is not generic at all and will likely fail for various other languages. |
I don't think there is a "generic" solution...
Localization issues like this are so tricky that I think it's best to handle them on a case-by-case basis. |
I still think resizing is the simplest and most straight-forward solution.
Are you sure? At least Gettext supports context (Look up “context” in your Gettext manual.). |
We wrote our own GetText engine, so we'd have to implement support for Between resizing and hyphens, I'd prefer the latter. Both would require a way to flag to enable/disable handling of long "words" on a per-language basis. I don't think there's a standard way to define that in PO files, so we could extend In the specific case of this specific book, I think I made the font size too big in general. I wouldn't mind decreasing the default size of this text for all languages. |
Ouch.
That's why I suggested resizing, because it's more reliable and less of a clusterfuck.
Not for resizing. Just measure how long the rendered text would become in pixels. It it fits, take it. If not, shrink it. No need for any special treatment.
That's also a valid solution. Yes, the default font size is indeed very large. I would suggest to make it so large that at least three times the word length of the original string “Cutscenes” would snugly fit in. Then it should be relatively safe. |
If this can work without reducing the text quality, I'll vote for this solution. |
OR: |
That wouldn't be a fix but a deprecation of a feature though. From what I can see, it seems that we can pre-calculate the width if we consider the font is monospace which IMHO is a good idea since there will be additional spacing at both ends of the page. Not related, but I'm a little worried about CJK languages: does the current font provide the same style? |
@Wuzzy2 I agree with your point about hyphenation being complicated. But resizing shouldn't be applied to all languages in this manner. Consider a sentence in Japanese which contains no spaces. To the engine, the sentence is considered one token, but it can be split at the character level for wrapping. We don't want to shrink the sentence so it can fit on one line. If we want to resize long tokens, we'd need to implement:
I'm fine with the idea of resizing. It could even lead to a fix for this. |
The name of the book “Cutscenes” is currently translated “Zwischensequenzen” in German. This is correct.
However, if you look inside the book, the word is broken up poorly because of a linebreak:
https://i.imgur.com/W3onCyA.png
German does not permit a word to be broken up like this, it is ungrammatical. I am betting this is not a problem exclusive to German, probably any language with long words will fail.
Possible solution 1: Make the word “cutscenes” translatable twice, depending on context: One for the tooltip, and one for the title inside the book.
This will allow translators to deal with the line-breaking correctly, if one is needed.
As a translator, I would translate this:
\n
= newline)Possible solution 2: Automatically shrink the text as needed, avoiding the newline altogether.
The text was updated successfully, but these errors were encountered: