SubtitleEdit / subtitleedit

the subtitle editor :)
http://www.nikse.dk/SubtitleEdit/Help
GNU General Public License v3.0
8.91k stars 916 forks source link

Fix RTL via Unicode control characters doesn't also fix LTR #3205

Closed darnn closed 2 years ago

darnn commented 6 years ago

Hey. 3.5.7 build 118, but this is old behavior. So, while what I wrote in the subject sort of goes without saying, the issue is this: If you write a sentence in a RTL language (e.g. Hebrew) in LTR mode, and then use "Fix RTL via Unicode control characters", the sentence will look as it should in list view. But my problem is that in RTL mode, the Hebrew looks fine but the English doesn't. And as you said here (https://github.com/SubtitleEdit/subtitleedit/issues/2132#issuecomment-284264941), you can't apply RTL to just a single column. But, this is also easy enough to solve with Unicode control characters: For LTR languages in RTL mode, you need to insert one LTR mark at the start of the subtitle and one LTR mark at the end of it. So, could you implement a way of doing it through an option similar to "fix RTL via Unicode control characters"?

OmrSi commented 6 years ago

When you use RTL mode, English looks ok in the textbox, only the list view doesn't, so If he added Unicode control characters, the list would look ok but the textbox wouldn't. Except if there is a way to make a list column look different.

darnn commented 6 years ago

It looks okay in the textbox if you use left-ctrl+left-shift to align it left, since you can do that individually to the source and translation textboxes.

OmrSi commented 6 years ago

Oh, It looks ok here because I use center alignment... So, If he did that, textbox when using center alignment would look reversed...

darnn commented 6 years ago

I suppose, though I'm not sure because I don't know how to align the textbox to the center.

OmrSi commented 6 years ago

It looks much better in my opinion... screenshot 752

darnn commented 6 years ago

Ah, of course. At any rate, it actually looks fine centered, it remains aligned to the left, just like it does if you don't add the LTR marks. You can try it yourself, just write a sentence in English ending with a punctuation mark and add LTR marks at the start and at the end of it.

OmrSi commented 6 years ago

Yeah, that's why I meant but, "English looks ok in the text box, only the list view doesn't", I meant centered. :D

That's why If he used Unicode control characters, the list would look ok but the textbox wouldn't...

darnn commented 6 years ago

No no, that's what I'm saying, if the text in the textbox is centered, it looks the same in list view, whether it contains LTR marks or no. Here's centered text without LTR marks: se-centered-rtl-01

Here's the same text with LTR marks: se-centered-rtl-02

OmrSi commented 6 years ago

the text box in RTL mode depends on what language you write in it. In the same file you're testing, close SE and open it again, you'll notice that difference. Look: screenshot 755

It all depends on the language written, the text box is always right, only the list has a problem, and since it can't show two different alignments, I don't think anything can be done...

darnn commented 6 years ago

I see what you're saying. Still, though, I think it would be nice to have the option to automatically add LTR marks at the beginning and end of subtitles like with "fix RTL via Unicode control characters", since, again, it would fix LTR languages in RTL mode in list view, and you can always align the text box to the right (which, granted, isn't as aesthetically pleasing, but is more practical in this case). I've actually only realized you can do this effectively with LTR marks at the start and end today. Before now, for some years, I was using a series of elaborate and not always accurate regular expressions, which took me days to write and troubleshoot, and which essentially screwed up the text. (But the plus side was that I could just apply them automatically). So the addition of such an option would make my life a lot easier, at least. And it would also make it easier for me to show SE's effectiveness to others who translate from English or Russian into Hebrew, since they could work in RTL mode but preserve the proper alignment of the original LTR subtitles. So far, since I've only been using my elaborate regular expressions, I was hesitant to tell people how to do that, as they're usually less tech savvy than I am, and it's hard enough for them to get used to a new program as it is.

darnn commented 4 years ago

@niksedk Any chance you could look into this? It would function just like "fix RTL via Unicode control characters", except adding an LTR mark at the start and at the end of the text of each subtitle (i.e. the start of the first line and the end of the second line).