Closed
Bug 1190271
Opened 11 years ago
Closed 10 years ago
[translate] Automatically go to the next string to translate
Categories
(Webtools Graveyard :: Pontoon, defect, P3)
Webtools Graveyard
Pontoon
Tracking
(firefox42 affected)
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox42 | --- | affected |
People
(Reporter: amir.aharoni, Assigned: ShellHacker, Mentored)
References
Details
Attachments
(1 external file)
I translate Pontoon's home page itself to Hebrew in Pontoon at https://pontoon.mozilla.org/ . The side bar shows a list of strings to translate. When I translate one and save it, the sidebar with the list reappears. I'd feel much more efficient if the next translatable string would appear instead. I couldn't find how to do it in the preferences.
| Reporter | ||
Updated•11 years ago
|
Summary: automatically go to the next string to translate → Automatically go to the next string to translate
| Reporter | ||
Comment 1•11 years ago
|
||
To be more precise, this works well when you see both the column with the list of messages and the column where you have the textarea for typing the translation - it goes automatically to the next translation, and everything is efficient and as expected.
But when only the column with the textarea is seen, then it slides back.
To avoid this, I can drag its border to increase its width to I see both columns. So it's probably a low-priority issue, but maybe some design work could be done to make it work efficiently in both modes.
Updated•11 years ago
|
Mentor: m
Updated•11 years ago
|
Summary: Automatically go to the next string to translate → [translate] Automatically go to the next string to translate
Updated•11 years ago
|
Priority: -- → P3
| Assignee | ||
Comment 3•10 years ago
|
||
I understand that I have to look into this in the base/static/js/translate.js using the
switchToEntity()
and in the save translation function
// Save translation
$('#save, #save-anyway').click(function (e) {
e.stopPropagation();
e.preventDefault();
var entity = $('#editor')[0].entity,
source = $('#translation').val();
if (source === '' &&
['properties', 'ini', 'dtd'].indexOf(entity.format) === -1) {
self.endLoader('Empty translations cannot be submitted.', 'error');
return;
}
self.updateOnServer(entity, source, false, true);
});
I'd have to find the next entity and invoke the switchToEntity function. I seem to be stuck here, can someone guide me on where I can retrieve the entityList previously from ? Here the only entity available is the one whose text area is visible.
I am getting started with the codebase, thanks a lot.
Flags: needinfo?(m)
Comment 4•10 years ago
|
||
Hi Sudheesh!
Thanks for working on this. The place to start looking is translate.js:gotoEntityListOrNextEntity(), which is called in Pontoon.updateOnServer(). You should change it to always go to next entity.
Flags: needinfo?(m)
| Assignee | ||
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
Comment on attachment 8693927 [details] [review]
Pull Request 294
Added a comment on GitHub:
https://github.com/mozilla/pontoon/pull/294
We use GitHub pull requests for review process.
Attachment #8693927 -
Flags: review?(m)
Comment 7•10 years ago
|
||
Commits pushed to master at https://github.com/mozilla/pontoon
https://github.com/mozilla/pontoon/commit/bccca374b1281f0f8b4e61c3e3b81f7b73ef9478
Fix bug 1190271: Automatically goes to next string to translate
https://github.com/mozilla/pontoon/commit/57796ea8db51e7f3fdcc43afa82b66b43897c8a8
Merge pull request #294 from sudheesh001/Patch_1190271
Fix bug 1190271: Automatically goes to next string to translate
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•