Red Hat Bugzilla – Bug 831067
[Project-wide search and replace] replace count should be the number of strings replaced
Last modified: 2012-09-12 20:00:48 EDT
Description of problem:
In "project-wide search/replace", the replace count should be the number of strings replaced, not the number of search result.
This bug is easier to spot if search filter is set as either "Search Both" or "Search Source".
Version-Release number of selected component (if applicable):
Zanata version 1.6.1-SNAPSHOT (20120608-0019)
Steps to Reproduce:
1. Visit a document with few or no translation (such as Fedora Security Guide)
2. Press "copy from source" in row 1, then remove a term from the translation, save as approved. Suppose the term is "Security"
3. Click "Search and replace"
4. Set the search filter to "Search Both", then search "Security". Row 1 should be contained in the search results.
5. Assume it returns 1 results. Select all search results.
6. Use "Safety" as replace string and perform replace.
Message appears: Replaced "Security" with "Safety" in 1 text flows
Message appears: None of the targets have "Security".
Request for technical evaluation for 1.7.
Updating the message about replacements to show how many text flows had actual replacements, and how many were not changed by the replace operation, is technically straightforward.
Note about the replace count:
The number used at the moment is the number of text flows that are selected and have not yet had a replacement made since the last search, so is only equal to the number of results if all results are selected and no replacements have yet been made.
This could be improved by adding distinctive (e.g. green) highlighting to replaced parts of target strings, so that the 'already replaced' state is visible to the user, allowing users to see why replacements are not performed on these text flows even if they are selected.
Updated so that only targets that have actually changed contribute to the reported number of text flows with replacements.
VERIFIED with Zanata version 1.7-SNAPSHOT (20120720-0026)