Red Hat Bugzilla – Bug 874342
TM "number of times a translation has been used" is wrong
Last modified: 2013-02-25 22:46:08 EST
Description of problem:
The value in the TM results showing how often a particular TM result has been used must be wrong. When entering a whole new translation, then revisiting that entry, the TM result for that particular new translation appears to have been used 10 times already, which is impossible.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. open any document in editor
2. enter a new translation for a string - use a unique test translation
3. move away from that string, then open it again in the editor
The TM shows as a result the existing translation (that we have only just entered) along with the information that this has been used 10 times.
This new translation can only have been used 0 times, or 1 time if you want to count the original occurance.
And just a question: How is this supposed to be calculated? Do re-uses from copytrans and TMmerge count towards it, or just manual re-use by translators via TM?
*** This bug has been marked as a duplicate of bug 872040 ***
This is a known bug. See https://bugzilla.redhat.com/show_bug.cgi?id=872040
*** Bug 872040 has been marked as a duplicate of this bug. ***
The number is supposed to indicate the number of identical translations in the current locale (from any source, including copytrans and TM merge), for that string, but the problem is that it is actually counting across all languages.
The underlying bug has a more serious effect, because we limit TM matches to 10 in the initial query, then we post-process the results to remove matches for obsolete projects and wrong languages. If the top 10 matches are all taken from different translations of the same string, Zanata will only show one TM match, or perhaps none at all.
It may not be easy to change the initial query to filter out obsolete projects, but we should at least fix the query to make sure the top 10 matches are coming from the correct locale.
Fixed in 2.0 branch and merged to 2.1.
Locale is now included in the query so results should only count translations for the current workspace locale. Pre-aggregation result limit has also been increased to 25, i.e. numbers in the '#' column of TM results can now total up to 25.
Implemented fix and merged into master branch.
Commits are shown (rolled up) here: https://github.com/zanata/zanata/compare/950ed6efbf...rhbz874342
VERIFIED on 2.1-SNAPSHOT (20121128-1048). Please merge the feature branch into 'release' as well.
Deployed to 2.0.3-SNAPSHOT test machine.
*** Bug 877848 has been marked as a duplicate of this bug. ***