poedit icon indicating copy to clipboard operation
poedit copied to clipboard

Incorrect text displayed with custom text fields font (Burmese)

Open minhn opened this issue 5 years ago • 2 comments

We are working with Burmese translation. Myanmar uses 'Zawgyi-One' font.

https://github.com/yathit/waitzar/blob/master/release_1.5/Zawgyi-One.ttf

I change preference to use this font.

font-setting

Burmese text is displayed correctly in the list. But translation text field shows incorrect text (different characters). Please see red box highlights below:

editor

If then in the translation text box, I type 2 spaces then move the cursor back one space (it's in the middle of the 2 newly typed spaces) then I paste the same text, it will display correctly.

editor2

So the Highlight function somehow renders the font correct but it's not at the first load, when typing or selecting on the list view.

I tried to SetStyle to the whole text field (-1,-1, ) in textbox control but it doesn't work.

Here is the zip file with mm.po and the Zawgyi-One font.

mm.zip

minhn avatar Jul 29 '18 03:07 minhn

We are working with Burmese translation. Myanmar uses 'Zawgyi-One' font.

Why do you call this out? Did you try with other fonts? Did you try without custom font? What's the relevance? You don't actually say…

If you didn't check these things, please do.

So the Highlight function somehow renders the font correct but it's not at the first load, when typing or selecting on the list view.

I don't know what you mean here.

I tried to SetStyle to the whole text field (-1,-1, ) in textbox control but it doesn't work.

…or here, or what is the relevance of any of that. But since you're a developer, well, debug in a debugger and see what you find out…

Moreover, the file you attached is very obviously not the one in your screenshots (the very translation you point to is different) and the text actually present in the file is what you claim is "incorrect" — but is rendered exactly that way in other text editors. The text you claim is correct is not even present in the file, so this doesn't make much sense to me...

(By the way: you set the file to claim the translation language is English, when it isn't. This is an incredibly bad idea. So is, apparently, replacing text in an English file, instead of starting a new translation file. Just don't, there's a reason you have File → New or a button for creating a translation from POT.)

vslavik avatar Jul 29 '18 16:07 vslavik

Thank you for the swift reply.

Why do you call this out? Did you try with other fonts? Did you try without custom font? What's the relevance? You don't actually say…

I tried other latin fonts without problems. I think the issue is relevant only to this type of Devanagari font. Everyone in Myanmar uses this font and it shows different text than Unicode font even in other software such as Microsoft Word. Please see below:

sample-words

Burmese sample.docx

I don't know what you mean here.

When you first open the po file, when you click on each row on the edit list or when you typing into the translation text field is not display text correctly. But when I do 'type 2 spaces then move the cursor back one space (it's in the middle of the 2 newly typed spaces) then I paste the same text, it will display correctly'.

…or here, or what is the relevance of any of that. But since you're a developer, well, debug in a debugger and see what you find out…

I looked into the code and try to debug using VS 2015 by SetStyle (in the text control file) to the whole text field in a few other places but it does not work.

Moreover, the file you attached is very obviously not the one in your screenshots (the very translation you point to is different) and the text actually present in the file is what you claim is "incorrect" — but is rendered exactly that way in other text editors. The text you claim is correct is not even present in the file, so this doesn't make much sense to me...

Please you need to set the font to 'Zawgyi-One' to see the different (see MS Word screenshot above). Zawgyi-One is definitely not Unicode font, but it's the standard currently used in Myanmar.

(By the way: you set the file to claim the translation language is English, when it isn't. This is an incredibly bad idea. So is, apparently, replacing text in an English file, instead of starting a new translation file. Just don't, there's a reason you have File → New or a button for creating a translation from POT.)

I am sorry. The po file was exported from Odoo:

https://www.odoo.com

https://github.com/odoo/odoo

which we are working on. It does not set translation language properly.

I do set the translation language in Poedit but it does not solve the problem. Please see attached below the new po file.

my_MM_OK.zip

minhn avatar Jul 30 '18 00:07 minhn