poedit icon indicating copy to clipboard operation
poedit copied to clipboard

Ellipsized RTL text in the list is not aligned to the right edge

Open ItielMaN opened this issue 7 years ago • 5 comments

Using Windows 10, Poedit 2.0.7.

Forgive the terrible, non informative title, I just couldn't find a better way to summarize this. A different wording would be appreciated.

STR:

  1. Not sure if this is a PO specific issue, so here is a file for example. index.zip
  2. After loading the file, simply look at the translations that overflow the table. Most of them don't start at the same line as the others that don't overflow.

This is visible also when switching to RTL locale, but for the source text.

default

ItielMaN avatar May 23 '18 18:05 ItielMaN

Confirmed with Poedit's own he.po on long lines.

Doesn't happen on macOS.

Note to self: this is wxDVC rendering issue, it occurs even on strings that are too short to be trimmed in Poedit's own code.

vslavik avatar May 24 '18 08:05 vslavik

Some observations: this wasn't really space being added, but a variable amount of pixels — what was actually going on was that the shortened text was left-aligned instead of right-aligned as it should be. The jumping around when resizing was due to ellipsizing cutting off whole characters and thus changing the space's size.


This bug is caused by this wx commit: https://github.com/wxWidgets/wxWidgets/commit/e2e7d3d3911795153337417a0c5a54ea12be99eb

That was done to fix https://trac.wxwidgets.org/ticket/17363, which itself reacted to some other fix's regression, so fixing it properly in wx is non-obvious and non-trivial. Because Poedit's use is highly unusual in that it needs to render both LTR and RTL columns, it makes sense to apply this as a Poedit-only patch, which is what I did.

vslavik avatar Jun 01 '18 08:06 vslavik

Did you fix this also for LTR text, on the Source Text column, when Poedit's locale is RTL? default

ItielMaN avatar Jun 01 '18 09:06 ItielMaN

Did you fix this also for LTR text, on the Source Text column, when Poedit's locale is RTL?

I thought I did — it's the exact same situation mirrored at rendering level. But it actually isn't, because the source column has markup in it and so is rendered differently. That's a whole other can of RTL worms: #343

vslavik avatar Jun 01 '18 10:06 vslavik

Undoing the source column fix in https://github.com/vslavik/wxWidgets/commit/b474313b8b1e661c31be416c6e0f93d0b6d2f44c — see #489 for why.

At this time, I'm not sure how to fix this or if it can be fixed. The only idea I have is to accurately ellipsize the text directly in Poedit, rather in wxDVC — probably worth a shot.

vslavik avatar Jun 06 '18 15:06 vslavik