Notice that the tooltip pop up has the word “code” at end. That isn’t mentioned in the translation file though.
I verified it on github, where the word “code” is indeed not mentioned in the translation file. So I am wondering how does the welcome app show it?
I have translated all strings. But the label on button shows in English only (the string was not in translations file). Also the tooltip has hindi text followed by the word ‘code’ which magically appears out of nowhere. See screenshot below.
My guess is that these two things are hardcoded in the app, which if I’m understanding right, can be treated as a bug. No bug here. Its a form of super advance AI.
@manuel could you please look into this, or request someone else who must be knowing about it. I have completed the translation, and I’ll wait for clarity on this bug before creating a pull request.
Ps. There is no output in the terminal after launching Welcome app, so it is not seeing any ‘errors’.
By default, that variable contains a list of programs, and one of them is code.
Welcome looks at the values in the listed order and uses the first program found in your system. In your case it is code.
So if you want to use another program, for example meld, you must install it, and make sure meld is listed before any other currently installed program.
Then you’ll see that the tool tip (and the button label) will change accordingly.
If Welcome app appends the application name, then a Hindi translation wont be possible since according to Hindi grammar, “code” (or whatever appication name is configured) should come in between the sentence, not at the end.
Is it possible to replace that text with a generic hard coded string just for Hindi translation? If not, then I’ll have to leave that in English only. (Kinda spoils the look since all button text is center aligned, but English button text is left aligned)
Devanagari is written left-to-right (the “normal” direction), so it shouldn’t do this… In languages like Arabic and Hebrew (and Egyptian hieroglyphic, but good luck with that) it should probably align everything to the right.
Although it’s not really a universal solution, maybe there’s some hidden (or semi-hidden like some dot or stuff like that) character in Hindi fonts which can be placed in front of this pure english button, to force it centering?
Possibly yes. Hindi has “matra” which are drawn over already typed characters and they could be causing problem. Just a speculation.
Thai translation seems to have three kinda of these “unknown problem” First button is left aligned. In second column, 2nd and 3rd button have some extra left padding. Two buttons have center aligned text.
There’s probably some special character which is causing this.
Edit: In Japanese - the basic Japanese I’ve studied - there are no character which are drawn on top of already printed characters. The Japanese text I tested with did not have the alignment problem. While in Thai and Hindi (and probably more languages), there are characters that need to be drawn over. We cannot really get rid of these characters while writing, so I think we need to live with the fancy aligned text.
It’s probably a bug with whatever widget toolkit is used for the Welcome app, that it treats “matra” characters as aligning text.
Somebody should file a bug report about it, as it looks really awful. Which is a pity, because Devanagari is otherwise a gorgeous, exotic-looking script (at least to the eyes of a Westerner), which deserves to be treated properly.
There’s more to the button label alignment issue than just yad, although yad is the original source to this problem.
Yad itself provides no option to left align button texts. So Welcome is actually using non-proportinal font for the text, and calculates the maximum length of all button labels under one tab. Then Welcome pads button labels with adequate number of space characters on the right side. This should make button labels appear as left aligned, but as we see, it is not working for every language.
Everything would be so simple if only yad could provide a left alignment option for the button labels.
However, there might be a way to do something, for example by using the HTML code values for the visible characters. This is of course a more laborous way.