machinewrapped / gpt-subtrans

Open Source project using LLMs to translate SRT subtitles
Other
311 stars 36 forks source link

Original and translated lines are not scrolling together when formatting is a bit different #114

Closed Neoony closed 4 months ago

Neoony commented 5 months ago

As sometimes the original and translated lines are formatted differently It does not really scroll together. And often, it even goes off the window on the other side.

I can tell that this is because for example original has 2 lines and GPT turns it into 1 line (or subtrans removes new lines?) And when there is a lot of that, it starts to misalign e.g. image

I would say the solution could be that the translated lines should always scale to the same as the original? Even if its smaller. Or just somehow fix it to always have the line numbers together with gaps if needed.

This happens pretty much every time, sometimes its not so bad, other times it goes off the screen. Mainly just when there is some issue with translation, this makes it harder to find out where the translation got misaligned, as you have to also fight with this.

Neoony commented 5 months ago

Or I guess sometimes it can be the other way around and original might be smaller

Then probably it should just take the scale from the bigger one and use it on both

machinewrapped commented 5 months ago

Yeah, the original and translated lines are rendered separately so alignment is haphazard at best... it would be better to have them properly aligned.

machinewrapped commented 5 months ago

In v0.5.7 I've unified the original and translated text display, so they will always be aligned with each other. Please give it a try and let me know what you think.

https://github.com/machinewrapped/gpt-subtrans/releases/tag/v0.5.7

Neoony commented 5 months ago

Yep seems to work nice Didnt notice any issues or misalignments, but only gave it a quick look on some project and didnt see any real issues. Dont have a ton of time now, but I will be using it more over the next week.

Just one visual thing maybe I think it would look better if there was some line/box between each subtitles line also when its not selected. Similar to how it was before, more of a grid. But its quite a detail. Not sure what is possible/limitations/pain with QT :D

But of course it needs to be distinct between what is selected and what is not.

example: image (I dont mean any specific colors, just any kind of split)

But if its too much pain to do or something, then its no big deal

machinewrapped commented 5 months ago

I've made some tweaks to the styling to better delineate the lines, and to improve the consistency of size/spacing. image

Just download the zip file again.

machinewrapped commented 4 months ago

This has now been incorporated into the latest official release, along with a further visual overhaul.

https://github.com/machinewrapped/gpt-subtrans/releases/tag/v0.5.8

image

Let me know what you think in the discussion for the release. https://github.com/machinewrapped/gpt-subtrans/discussions/119