Description of problem: The content in translation editor cell should be saved when: 1) Move to other cells by either keyboard short cut or mouse click. 2) Click on fuzzy 3) Close browser tab 4) Perhaps browser tab lost focus? Version-Release number of selected component (if applicable): 1.4-SNAPSHOT
2) Click on fuzzy I think this is a bit of tricky, since we move the fuzzy button to the middle column, so if translation editor is opened and we click fuzzy button, definitely we don't want implicit save and close the editor, we need to active "Save" button. In other circumstance, if the translation editor is closed and we click fuzzy button, maybe we could save the content to database directly, or we ask user to open editor to click the save button? I think maybe we can discuss it when Sean back. 3) Close browser tab I prefer not to save just abandon the content of editing. 4) browser tab lost focus I try it on firefox 3.6.17, if i switch to other tabs in FireFox and switch back, the translation editor still open, so i guess we don't need to save?
2) should be more intuitive when we replace Fuzzy with Approved. If the user is editing and clicks Approved, we close the editor, perform the implicit save and mark as approved (or not approved). As long as the end result is that the message gets saved and the change to the Approved flag is saved too, it's fine. 3) well, it would be better to perform the implicit save if we can detect the browser close event easily, but if not it doesn't matter too much, since we provide an explicit save button. 4) if the browser is not generating an event for tab switching, then I don't think we need implicit save to happen.
Is this ready for testing?
Yes, the implicit save is performed: 1) Move to other cells by either keyboard short cut or mouse click, if content is changed, we do the implicit save and save as approved. 2) Click on 'Save as Fuzzy', it will save as fuzzy and change the colour of vertical bar. 3) Click source cell of table, it will also do the implicit save.
Test Objective: 1. If user update the cell with new text a. Ensure it is "Save as Approved", regardless its previous approve status. b. Ensure "Cancel" will revert the changes. 2. If user clear the cell a. Ensure it is clear as "New" b. Ensure "Cancel" will revert the changes. 3. Unchanged does not trigger the save. Subjects: Mouse clicks: Click on current cell Click on other cell Change to previous page/next page Click on link that leave the translation editor Relevant Keyboard short cuts: Alt+J and Alt-Up: Prev cell Alt+K and Alt-Down: Next Cell Alt+PgUp: Prev fuzzy/untranslated Alt+PgDn: Next fuzzy/untranslated Precondition: Row 1: Empty Row 2: NeedReview, with text "hi" Row 3: Approved, with text "hi" Row 4: Empty Row 5: NeedReview, with text "hi" Row 6: Approved, with text "hi" Row 7: Empty Row 8: NeedReview, with text "hi" Row 9: Approved, with text "hi" Row 10: Empty Row 11: NeedReview, with text "hi" Row 12: Approved, with text "hi" Row 13: Empty Row 14: NeedReview, with text "hi" Row 15: Approved, with text "hi" Row 16: Empty Row 17: NeedReview, with text "hi" Row 18: Approved, with text "hi" Test Cases: 1. Click on 1st row, then press Alt-k all the way down. 2. Press Alt-J all the way up. 3. Press Alt-Down all the way down 4. Press Alt-Up all the way up 5. Press Alt-PgDn all the way down 6. Press Alt-PgUn all the way up 7. On row 1, type "yo1", press Alt-k, 8. On row 2, type "yo1", press Alt-k, 9. On row 3, type "yo1", press Alt-k 10. On row 4, type "yo1", press Alt-Down 11. On row 5, type "yo1", press Alt-Down 12. On row 6, type "yo1", press Alt-Down 13. On row 7, type "yo1", click on the "Next entry" button 14. On row 12, type "yo2", press Alt-Up 15. On row 11, type "yo2", press Alt-Up 16. On row 10, type "yo2", press Alt-Up 17. On row 9, type "yo2", press Alt-j 18. On row 8, type "yo2", press Alt-j 19. On row 7, type "yo2", press Alt-j 20. On row 7, type "yo1", click on the "Prev entry" button 21. On row 6, type "yo3", press Alt-PgDn 22. On row 13, type "yo3", press Alt-PgDn 23. On row 14, type "yo3", press Alt-PgDn 24. On row 15, type "yo3", click on the "Next Fuzzy entry" button 25. On row 18, type "yo3", press Alt-PgUp 26. On row 17, type "yo3", press Alt-PgUp 27. On row 16, type "yo3", press Alt-PgUp 28. On row 15, type "yo3", click on the "Prev Fuzzy entry" button 29. On row 10, clear the cell, press Alt-Down 30. On row 11, clear the cell, press Alt-K 31. On row 8, clear the cell, press Alt-Up 32. On row 7, clear the cell, press Alt-J 33. On row 13, clear the cell, press Alt-PgDn 34. On row 16, clear the cell, press Alt-PgUp 35. On row 19, type "yo4", click on row 1 36. On row 1, type "yo4", click on row 3 37. On row 4, type "yo4", click on "next page" 38. On page 2, row 1, type "yo4", click on "prev page"
Failed tests: 1. Unsaved translation is lost when receiving prev/next fuzzy/untranslated events (by keyboard shortcut alt-PgUp, alt-PgDn, prev fuzzy/untranslated button, next fuzzy/untranslated button) 2. Unsaved translation is lost when user change page, which might be triggered by: a. Clicking on previous/next page button; b. Clicking on first/last page button; c. Pressing the alt-down on last entry of a page. d. Pressing the alt-up on first entry of a page.
See also bug
Problem resolved. Refer to https://bugzilla.redhat.com/show_bug.cgi?id=739422 for outstanding issue.
I think this is finished, with the exception of failed test #2, which is now bug 739422. Dean, what the situation with failed test #1, in comment 7?
VERIFIED with Zanata version 1.4.2-SNAPSHOT (20111014-1658).