Bug 393693 - You must press Page Down twice to go to the next translation unit on a file opened by Pology
Summary: You must press Page Down twice to go to the next translation unit on a file o...
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Nick Shaforostoff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-30 18:43 UTC by Adrián Chaves (Gallaecio)
Modified: 2018-06-02 06:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrián Chaves (Gallaecio) 2018-04-30 18:43:20 UTC
tl;dr: Get translation units selected on the Translation Unit pane as soon as they are opened by Pology.

Tested with a built from sources of commit ae53fdd92a55bddf355146d2fe3626951c5026eb

No translation unit is selected on the Translation Unit pane when a file is opened by Pology.

This causes an slightly unpleasant experience: You have to press the Page Down key twice to go to the next unit, the first press simply marks the first unit of the Translation Unit pane as selected, and the second press is the one that actually moves to the next translation unit.

There is something good in the current behavior, however, that may break when this issue is fixed. If instead of Page Down you use Page Up, you are immediately taken to the last translation unit.

I believe this is a good behavior because I think that it makes sense for the last message to have the focus on Lokalize to begin with. Just as the last file that Pology opens has the focus, the last message of each file that Pology opens should have the focus as well.

Also, the order in which you would work on the opened files and their translation units if you start from the first translation unit of each file (instead of the last) and go down would not match the order in which you would read the Pology output (not even in opposite order, given the different behavior for opening files and their translation units). And since Lokalize cannot currently highlight the parts of the message that caused Pology to open the message in the first place, you may need to look into the Pology output to locate the target parts of messages.
Comment 1 Adrián Chaves (Gallaecio) 2018-06-02 06:48:57 UTC
Fixed in Pology: https://websvn.kde.org/?view=revision&revision=1517054