Bug 358414 - Show number of hits in translation memory pane
Summary: Show number of hits in translation memory pane
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: translation memory (other bugs)
Version First Reported In: 2.0
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Simon Depiets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-23 10:46 UTC by Karl Ove Hufthammer
Modified: 2018-09-12 08:55 UTC (History)
1 user (show)

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


Attachments
Translation Memory number of times the entry was found (20.71 KB, image/png)
2018-09-12 08:55 UTC, Simon Depiets
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2016-01-23 10:46:01 UTC
It would be nice if the results in the translation memory pane also included information on *how many* instances there are of each hit. Example: The translation memory pane lists the following suggestions for the string ‘&Update’:

/100%/ &Update
[Ctrl+1] &Oppdater

/100%/ &Update
[Ctrl+2] O&ppdater

/99%/ Update
[Ctrl+3] Oppdatering

Both of the first two suggestions are a 100% match, and would be OK to use, but which of them to use (partly) depends on how *common* they are. If 3 files use ‘&Oppdater’ and 15 files use ‘O&ppdater’, I would choose the latter, for consistency. (And the reason the first letter is not used as a shortcut key is probably that this string commonly appears together with a different string that uses the ‘O’ shortcut and is more important.)

My suggestion is therefore to also show the number of ’hits’ for each string. And *within* each percentage match, the strings should be sorted with the one(s) with most hits first. Example:

/100% (15 hits)/ &Update
[Ctrl+1] O&ppdater

/100% (3 hits)/ &Update
[Ctrl+2] &Oppdater

/99% (27 hits)/ Update
[Ctrl+3] Oppdatering

Note that the third string is shown last, even though it has more hits. This is because it has a lower percentage match. But within each percentage match, e.g. the first two 100% strings, the strings are sorted by the number of hits.

Reproducible: Always
Comment 1 Simon Depiets 2018-09-12 08:53:57 UTC
Done, however I kept the current order which gives a boost to the entry if it's found in the same file (it was already sorted by hits).
https://phabricator.kde.org/R456:914efe1fb657b5564e699abcef0cae385c0b3f60
Comment 2 Simon Depiets 2018-09-12 08:55:35 UTC
Created attachment 114912 [details]
Translation Memory number of times the entry was found