vslavik / poedit

Translations editor for Mac, Windows and Unix
https://poedit.net
MIT License
1.8k stars 279 forks source link

Yiddish (yi) locale displaying left-aligned and with bidi issues #751

Closed yankl closed 2 years ago

yankl commented 2 years ago

I'm on Poedit 3.0.1 on Windows 10 Pro 21H2.

When in the yi locale (but not yi_001!), text in the translation column and in the translation field is left-aligned and with bidi issues.

Compare the following, where the only thing I did was switch in the translation properties the language from Yiddish (yi) to Yiddish (World), which shows up as "Language: yi_001\n" when saved in the PO file. In the former in addition to the incorrect alignment there's something strange going on where the two characters of %d, for instance, are separated across several words. It's not exactly LTR because if there's only punctuation, like a period at the end of a sentence, it appears correctly to the left of the text. yi: image

yi_001: In the below image the same line looks much better, though the characters %d would really look better if they stayed in that order instead of being switched.. maybe that would be worth opening as a separate issue. image

I tried opening a fresh POT file (https://github.com/vslavik/poedit/blob/master/locales/poedit.pot) and the same thing happened so it doesn't seem to depend on the PO file.

As an aside, I have no idea what "Yiddish (World)" is supposed to be a locale or who came up with that.

vslavik commented 2 years ago

When in the yi locale (but not yi_001!),

Meaning what, exactly? The screenshots don't seem to indicate you are using Poedit in Yiddish locale…

I tried opening a fresh POT file (https://github.com/vslavik/poedit/blob/master/locales/poedit.pot) and the same thing happened so it doesn't seem to depend on the PO file.

Nevertheless, please do follow the instructions and attach example files to reproduce. This eliminates misunderstandings and ambiguities, of which there are some already. And at the very least the %d thing very much does depend on your file.

Please also provide detailed steps to reproduce, including spelling out what the actual and correct output are and what the difference between them is. This isn't immediately obvious to people who don't speak (well, write) the language. It is also unclear if any of the screenshots show correct behavior (you say "much better", which is vague; spelling it out in detail would be much better).

TIA!

As an aside, I have no idea what "Yiddish (World)" is supposed to be a locale or who came up with that.

ICU and ISO did. It designates actual locale (which you seem to use interchangeable with, but is a different thing from, a language). 001 is worldwide region specification.

yankl commented 2 years ago

I apologize for being unclear.

You're right, I'm not in the locale. What I meant is the setting for the language of the translation, which can be set here (sorry, my language interface is in Spanish and I was having trouble switching it to English for this report): image

Github is not allowing me to attach the file here (saying they don't support that file type), but it can be downloaded here: https://test.yugntruf.org/wp-content/plugins/yiddish-vokh-reg/yv-reg-yi.po

The steps to reproduce are to open the .po file and switch the language setting of the translation to Yiddish. Put the following text into a translation field: אאאאא %s בבבבבב — גגגגגג {0} דדדדדד When the language of the translation is set as Yiddish, it looks to me like this: image When I switch the language to Yiddish (World), it looks correct: image

It's true, I originally said that the order of the % and the letter ('s' or 'd') should ideally not be switched. I meant that since %s is a variable name, it should like identical in RTL text. Meaning it would look best to me like this: image But I see that the same switch also happens in other programs, so I assume it's correct bidi behavior, even if in this case it looks funny to me. It seems that the rule is that numerals around a % sign maintain their LTR order, but letters don't.

I hope I was able to clarify the ambiguity of my original message. If not please let me know. Many thanks!

PS Sorry for using the words locale and language imprecisely. I don't know what the correct terminology is to refer to a combination of language and place like yi_001, or to distinguish between, say, yi and yi_001.

vslavik commented 2 years ago

I am not seeing what you say you do (albeit on Win 11). This is quite possibly due to differences in copying & pasting (there's room for interpretation there, and for different behavior of e.g. different browsers), which is why it's always better to attach actual files. You can do it, using e.g. ZIP archive.

What I can see is wrong basic RTL orientation, which is almost certainly related. This is because ICU reports the script as Hebrew for yi_001, but as nonsensical "SCRIPT_YI" for yi. See https://unicode-org.atlassian.net/browse/ICU-11217

Poedit should probably use uloc_getCharacterOrientation() instead.

vslavik commented 2 years ago

I don't know what the correct terminology is to refer to a combination of language and place like yi_001, or to distinguish between, say, yi and yi_001.

"Locale" :)

vslavik commented 2 years ago

After writing the above commit, I'm reasonably sure that it is the same issue, just manifesting different for you and me, so closing as fixed. Thanks!