Closed sbzlzh closed 9 months ago
I seem to have found the reason, it's because of the punctuation. For example, if you use a Chinese period and space it in the desired position, then it breaks the line. The fastest way is to use all English punctuation.
I found the reason. It's the punctuation. For example, if you use a Chinese period and space it in the desired position, then it breaks the line. The fastest way is to use all English punctuation.
that's true, but words without spaces should be broken up as well - so this is still a bug
It seems that Japanese does the same thing, since it uses Chinese symbols
I remember the translation changes I made last time, needed to change the number of lines myself within [[text]] to achieve a line break.
If this is a bug, fixing it might result in better translation format consistency, rather than forcing line breaks within [[text]] to avoid this outcome.
I found the reason. It's the punctuation. For example, if you use a Chinese period and space it in the desired position, then it breaks the line. The fastest way is to use all English punctuation.
that's true, but words without spaces should be broken up as well - so this is still a bug
Should I use the English punctuation now, or do I go find them one by one and add spaces :), now that I have time to do that.
I found the reason. It's the punctuation. For example, if you use a Chinese period and space it in the desired position, then it breaks the line. The fastest way is to use all English punctuation.
that's true, but words without spaces should be broken up as well - so this is still a bug
Should I use the English punctuation now, or do I go find them one by one and add spaces :), now that I have time to do that.
nah, we will fix it soon
I found the reason. It's the punctuation. For example, if you use a Chinese period and space it in the desired position, then it breaks the line. The fastest way is to use all English punctuation.
that's true, but words without spaces should be broken up as well - so this is still a bug
Should I use the English punctuation now, or do I go find them one by one and add spaces :), now that I have time to do that.
nah, we will fix it soon
That's good.
I tried to fix it. The problem is that chinese characters are not counted as characters. E.g. 该
has a length of 3. I don't know how to handle it, because I tried to get individual characters.
@sbzlzh do you know by chance if every chinese character consists of three characters?
I tested a few and they all have three:
Phew, I don't think I can solve this issue for now. If I were sure that all characters are chinese, I could just assume that every character uses 3 chars. But as soon as you mix latin characters into the text, it completely breaks. I don't know if there is a nice solution for that.
Phew, I don't think I can solve this issue for now. If I were sure that all characters are chinese, I could just assume that every character uses 3 chars. But as soon as you mix latin characters into the text, it completely breaks. I don't know if there is a nice solution for that.
In utf-8, it is true that a Chinese character uses 3 characters. Another way is to replace commas, periods and other such punctuation marks with English ones first, without using Chinese ones.
So I'm used to using English punctuation in my own plugins, and have to use Chinese conformity in addition to other reasons.
Phew, I don't think I can solve this issue for now. If I were sure that all characters are chinese, I could just assume that every character uses 3 chars. But as soon as you mix latin characters into the text, it completely breaks. I don't know if there is a nice solution for that.
In utf-8, it is true that a Chinese character uses 3 characters. Another way is to replace commas, periods and other such punctuation marks with English ones first, without using Chinese ones.
but this is only a hacky solution that still doesn't work if there are no commas/periods etc
I'd love to have a nice working solution, but the combination of english + chinese in a single string makes it really hard
@saibotk found a solution. I'm probably able to implement it
For reference:
string.len
only handles byte sequences and we just need to use the utf8
library for this:
Fixed in dev, thanks for the report!
Wouldn't that close the issue?
as soon as the PR is finished and merged, this issue is closed
Okay, then I'll close this.
Okay, then I'll close this.
no, this is close us as soon as it is done
Okay :)
How is this progressing, is there something missing.
How is this progressing, is there something missing.
Yes. @saibotk wants me to implement these kinds of line breaks for other languages as well. But I don't have the time to implement that right now
How is this progressing, is there something missing.
Yes. @saibotk wants me to implement these kinds of line breaks for other languages as well. But I don't have the time to implement that right now
ok
Is the problem in the body search screen the same problem as in F1.
yes, we will ship the fix with the 0.12 release in the coming few days. It will fix the issue for all UIs
That's great.
Why does it look a little different to you? It's weird.
@saibotk This is indeed still broken. It was working on my last iteration before you took over. Do you know what caused it?
Why this looks perfectly fine on your screenshot
Ah nvm had to zoom in
no, the linebreak is missing
Same effect. Mine's basically the same as his.
Well I guess it is not missing, but too late. I had a tolerance of 20% where it started checking for every chararacter. How do you do it?
Will look at that later
@sbzlzh Just to be clear, because I can't read Chinese: There is a linebreak there that wasn't there before this PR. It is just too late and a few characters are missing?
@sbzlzh Just to be clear, because I can't read Chinese: There is a linebreak there that wasn't there before this PR. It is just too late and a few characters are missing?
There are other Chinese characters that are not shown in the picture.
no, the linebreak is missing
For example, your first circle in the picture. The arrow in the picture I sent jumps straight to several words.
Alright, thank you, this is really helpful!
Yeah i messed up, this looks alright
Is this correct @sbzlzh ?
Ignore missing chars, seems to be a gmod linux font issue
Yeah i messed up, this looks alright
Is this correct @sbzlzh ?
Ignore missing chars, seems to be a gmod linux font issue
Here's the thing, the graphic shows no missing or omitted strings.
Yeah i messed up, this looks alright Is this correct @sbzlzh ? Ignore missing chars, seems to be a gmod linux font issue
Here's the thing, it shows no missing.
on the left, there are the missing chars
How come there's gibberish on the left side though.
What is this mess though.
likely a linux issue I will test it on my windows machine in a moment
What is this mess though.
likely a linux issue I will test it on my windows machine in a moment
thank you
Is it a problem with the linux system? I see some of the fonts are different sizes yeah
Yes just ignore this
works on windows, just ignore it
works on windows, just ignore it
It works great. It's great. So if you are using Debian or ubuntu can you show the same as in the picture
It's solved, and it works well.
It's in English: This is in simplified Chinese: