Current behavior is that the segment number is only visible for the current segment. This is a request to add an option in the View menu, namely, "Display segment numbers for all segments".
Being able to see segment numbers for all segments would make more sense for the use of an already implemented feature, namely, "Go To Segment Number". The user must know the segment number beforehand in order to use that feature.
If this feature request is implemented, it would make more sense to move segment numbers to the start of the segment from their current position at the end of the segment.
The typical use case with current functionality would be as follows*:
1) The user scrolls up/down away from the currently active segment (either using the mouse or Page Up/Down keys)
2) S/he finds a segment of interest
3) S/he right-clicks the segment and selects "Go To Segment" from the pop-up menu.
OR
4) S/he double-clicks the segment.
5) The selected segment becomes active.
*Steps 2 through 4 can only be achieved using the mouse.
The new use case would be as follows*:
1) The user scrolls up/down away from the currently active segment
2) S/he finds a segment of interest
3) S/he presses the ctrl-J combination to call the "Go to Segment Number" feature
4) S/he inputs the selected segment's number in the box
5) The selected segments becomes active.
*The beauty of the new use case is that it can be achieved without moving the hands out of the keyboard and the time/effort used in the five steps is significantly reduced.
It was in the front in the past, and it was changed because it hampered comparing the source and the target text, as it created a visual shift.
Didier
I kind of remember that. What about letting the numbers in their current position and making it possible to see them for all segments anyways?
If that makes the editor window too cluttered, it could be activated only when the user hits Ctrl+J or hits "Go To - Segment Number", so they can see where they're going. After the cursor moves to the desired segment, segment numbers in other segments would not be visible anymore, until the user repeats the operation.
Now, this is just a thought, but maybe a more elegant solution would be to change the editor window to a table with two columns (one for segment numbers, the other for segment texts) and as many rows as needed:
I understand that would require quite a redevelopment, though.
Last edit: Héctor Cartagena 2014-11-19
Probably it is easy to implement making "Go to Segment Number" dialog accepts any characters.
If non-numeric characters are entered, it switches to "find the keyword in Editor" mode.
Just a thought.
Such a search may have multiple results, though. Segment numbers, on the other hand, are unique within a project.
How about this one?
When "Go to Segment Number" dialog appears, also segment shortcut call-outs appears too.
You could input segment number OR segment shortcut char in the box.
Proof-of-Concept script is here.
https://gist.github.com/yu-tang/7a5007c4d05ffbeada33
Run this and see what happens.
Great! Very nicely done, Yu! Having to type just a single letter is even better than a four digit number, thanks!
I will definitely start using Ctrl+J quite often from now on!
Last edit: Héctor Cartagena 2014-12-30
@Didier, feel free assign this to me if the concept is fine for you too.
Commit r6916 introduces an NPE every time the Go To Segment Number dialog is opened on OS X. The following patch fixes it, and the feature still seems to work, but I'm posting this here in the hopes that Yu Tang can solve the issue appropriately.
Hi Aaron,
Good catch!
I think that basically I must subclass JDialog for the workaround but I feel it's too much.
Your patch seems fine to me for avoiding NPE. I just have commited the fix to /trunk.
Sorry for inconvenience. It's so hard to make sure about UI-thing without the right platform, so you've been very helpful.
Let me buy you a drink in Shibuya next week. :)
Closed in the released version 3.1.9 of OmegaT.
Didier