Closed hchiam closed 4 years ago
@hchiam how accurate is the auto-translation?
@alan-mj-lin Google translate isn't perfect, but it's getting better since it started using a different model, especially on the sentence level. (EDIT: here's a link https://www.blog.google/products/chrome/even-better-translations-chrome-one-tap/)
But I'm just thinking of saving on typing. You hit a button to "confirm to use suggestion", and then edit just one or two characters. Might come in handy if you're waiting for a translator.
You can test out sentences here: https://codepen.io/hchiam/pen/eYNgQNV
(EDIT:) Todo:
@alan-mj-lin ready for you to review/merge
So I've noticed that it doesn't adjust the translation if I edit the english; you apparently have to fully erase the chinese for it to do an updated translation. Is there a way that can improve?
So I've noticed that it doesn't adjust the translation if I edit the english; you apparently have to fully erase the chinese for it to do an updated translation. Is there a way that can improve?
Yes! Here's what I think:
(Given that the user is inputting English:)
if user didn't edit Chinese already:
- Replace Chinese textarea.
else user already edited Chinese (let's avoid frustrating deletions):
- Show a separate display: "(...new suggestion...)". The user can copy-paste parts they want.
- Show a new button to let user to completely replace suggestion: "Use suggestion".
And if the user is inputting Chinese, it should work the other way around. The code in translation-helper.js is already designed to work "vice-versa".
WIP: thinking about the "user can copy-paste parts they want
" part of my previous comment.
Feel free to try it out now though.
@alan-mj-lin ok i think this is ready for you to review and merge. Let me know if you want me to add test cases for this.
@hchiam i don't see the suggestion buttons
You have to be editing both sides to see the buttons. The buttons show up to avoid replacing the entire text, especially when you've already corrected previous lines.
Notice how I type a little in the Chinese (to simulate editing/correcting that line), and the text turned black. This looping gif is about 28 seconds long:
@alan-mj-lin I've added a test that shows how the announcement translation suggestions work.
https://github.com/alan-mj-lin/Sporeas/issues/51#issuecomment-584394703
Note: Still WIP as of right now. I had to add code to use delays and avoid getting blocked. I need to retest once I get unblocked.