Closed Bug 1277464 Opened 4 years ago Closed 3 years ago

Floating text selection: after changing locale, need to restart browser for floating UI's locale to switch

Categories

(Firefox for Android :: Locale switching and selection, defect, P3)

defect

Tracking

()

VERIFIED FIXED
Firefox 54
Tracking Status
fennec + ---
firefox54 --- verified

People

(Reporter: Grisha, Assigned: Shan11812, Mentored)

Details

(Whiteboard: [TPE-1][lang=js][good next bug])

Attachments

(2 files)

Steps to reproduce:
- say your current language is English. Long-press on some text on some page, observe UI in English ("copy", etc).
- switch locale to another language
- long press on some text - options are still in English!

Restarting the browser seems to be the only thing that switches local in that UI.
tracking-fennec: --- → ?
Grisha clarified in person that this is changing the locale on the Firefox for Android settings UI. Not the Android locale settings.
tracking-fennec: ? → +
Text selection actions are constants and therefore the string does not change:
https://dxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/ActionBarHandler.js#326

Some are dynamic and instead of a static string use a function:
https://dxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/ActionBarHandler.js#498-499

I assume that if we make all of them functions that this will work as expected.
Priority: -- → P3
Could be a "good first bug" but this needs some validation that the approach works.
Mentor: s.kaspari
Whiteboard: [lang=js][good next bug]
Whiteboard: [lang=js][good next bug] → [TPE-1][lang=js][good next bug]
@sebastian I've modified the labels of all the actions. How do I test it?
Fennece doesn't show languages list and even though System Default is selected, it doesn't reflect in the app (not only in options but entire app)
Flags: needinfo?(s.kaspari)
1. Can you upload the patch? If it is fairly simple and just replaces the static string with a function then I'm almost okay with landing it and testing language switching in Nightly. We already know that this won't break because some strings are already functions.

2. You can create a multilocale build and test with that. This is a bit more complicated and requires a full back-end build. Ahunt: Can you link the updated, working doc for multilocale builds?
Flags: needinfo?(s.kaspari) → needinfo?(ahunt)
(In reply to Sebastian Kaspari (:sebastian) from comment #5)
> 2. You can create a multilocale build and test with that. This is a bit more
> complicated and requires a full back-end build. Ahunt: Can you link the
> updated, working doc for multilocale builds?

Here is the guide:
https://wiki.mozilla.org/index.php?title=Mobile/Fennec/Android/Multilocale_Builds

Feel free to ping/needinfo me if anything is unclear, it's a somewhat long guide.
Flags: needinfo?(ahunt)
@Shan: Do you want to try the multilocale builds?
Assignee: nobody → 11812r
Status: NEW → ASSIGNED
Comment on attachment 8820227 [details]
Bug 1277464 - Fixed Localization in text selection Context Menus;

https://reviewboard.mozilla.org/r/99756/#review101270

LGTM.
Attachment #8820227 - Flags: review?(s.kaspari) → review+
@sebastian I'm downloading the sources, will probably take a while
anyone knows why it's not landed yet ?
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f264c2f5af60
Fixed Localization in text selection Context Menus; r=sebastian
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f264c2f5af60
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
Verified as fixed on Nightly 54.0a1(2017-02-16), on Motorola Nexus 6 (Android 7.0).
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.