Target language is reset if user clicks outside the translations panel
Categories
(Firefox :: Translations, defect, P3)
Tracking
()
People
(Reporter: acornestean, Assigned: haoran.tang.personal, Mentored)
References
Details
(Keywords: good-first-bug)
Attachments
(2 files, 2 obsolete files)
Affected versions:
- Nightly 116.0a1/20230613152538
- Beta 115.0b5/20230613195413
Description:
If the user manually selects a target language in the translations panel and clicks outside the panel (or clicks the Cancel button), which causes the panel to close, the previously selected target language will be reset to the default language.
The issue occurs from the translations panel opened via the main menu “Translate page…” option as well.
Steps to reproduce:
- Access https://es.wikipedia.org/wiki/Wikipedia:Portada
- Open the Translations panel by clicking the Translations icon in the URL bar
- Select a different target language other than the default one
- Click outside the panel to close it
- Reopen the panel
- Notice the previously selected target language has been reset to the default language
Actual:
Selecting a target different language in the Translations panel and then closing the panel results in the target language being reset to default.
Expected:
The user selected target language should persist when closing and reopening the Translations panel.
Comment 1•2 years ago
|
||
This would be a nice piece of polish work to do.
Updated•2 years ago
|
Comment 2•1 year ago
|
||
This would be a great first bug.
A contributor would need to find the code associated with the target language in the Translations Panel here:
https://searchfox.org/mozilla-central/source/browser/components/translations/content/translationsPanel.js
They would then need to add a way to determine if the selected to-language has been manually changed and prevent that from being overwritten by the defaults again if so.
A contributor would also need to add tests for this behavior here:
https://searchfox.org/mozilla-central/source/browser/components/translations/tests/browser
e.g.
- Load a page
- Open the panel
- Check that the target language is the expected language
- Change the target language
- Close the panel
- Open the panel
- Check that the target language is still changed
- Close the panel
- Navigate to a different page on a different domain
- Open the panel
- Check that the target language is still changed
Updated•1 year ago
|
Updated•1 year ago
|
Comment 6•1 year ago
|
||
Hi manoah
It looks like you've got two patches posted here for the same thing.
Could you please consolidate them into one?
Locally, you'll want to merge all of your changes into just a single commit and then only keep re-submitting that same commit to phabricator.
Secondly, you'll want to choose the Phabricator patch that you no longer want and abandon it by scrolling all the way to the bottom and choosing "Add Action" to abandon the revision.
Lastly, it looks like your two revisions are linked as parent/child revisions. You will need to unlink them at the top of the page on the right side by clicking Edit Related Revisions and removing the other from being a parent/child revision.
Comment 8•1 year ago
|
||
The pending need-info on this patch has been open for a month at this point, so I would say go ahead and take it if you want to work on it, nzai.
Comment 9•1 year ago
|
||
This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit BugBot documentation.
Assignee | ||
Comment 10•4 months ago
|
||
Updated•4 months ago
|
Comment 11•4 months ago
|
||
I have fixed the issue where the selected target language in the translations panel was reset when closing and reopening the panel.
Changes made:
- Ensured that the user-selected target language persists by storing the manually selected language and reapplying it when the panel is reopened.
- Added a test case to verify that the target language remains consistent after the panel is reopened.
This is my first time contributing to open source. If any additional steps are needed or if further changes are required, I will respond immediately. Thank you!
Comment 12•4 months ago
|
||
Reporter | ||
Comment 13•4 months ago
|
||
I checked the fix on the latest Nightly (133.0a1/20240930191214 from https://treeherder.mozilla.org/jobs?repo=autoland&revision=e703aa5051b5e87eed7dd9af0f33b4b9543cc626) under Windows 10 x64 and macOS 11.3.1
The chosen target language now persists when closing and reopening the Translations panel, confirming the fix.
I noticed that the bug still has Assigned as status so I will not change that to Verified until the bug has been set to Resolved (so I don’t interfere with the order of things). However, do note that the bug has been fixed in the Autoland builds linked in Comment 12.
Assignee | ||
Comment 14•4 months ago
|
||
Hi, The issue has been verified Comment 13. However, I do not have the option to set the status to "FIXED" in RESOLVED. Could someone with the necessary permissions update the status accordingly?
Updated•4 months ago
|
Updated•4 months ago
|
Comment 15•4 months ago
•
|
||
I've never seen this happen before.
Perhaps it has to do with the two revisions from nearly a year ago that were still under "Needs Review" status.
I've abandoned the outstanding revisions, and I will mark this a resolved as per comment 13
Updated•4 months ago
|
Updated•4 months ago
|
Comment 16•4 months ago
|
||
bugherder |
Reporter | ||
Comment 17•4 months ago
|
||
As the fix landed on mozilla-central, I re-checked on the latest Nightly (133.0a1/20241001155138) under Windows 10 x64, Ubuntu 22.04 LTS and macOS 11.3.1.
The chosen target language persists when closing and reopening the Translations panel, re-confirming the fix.
Setting the bug report as Verified Fixed.
Updated•4 months ago
|
Description
•