Closed Bug 1413240 Opened 3 years ago Closed 2 years ago
Support webext language packs in Fennec
59 bytes, text/x-review-board-request
In bug 1395363 we switched Firefox to use webextension based language packs. They also seem to work in Thunderbird and Seamonkey. Next step is to make them work in Fennec. The steps to build a German language pack on desktop: 1) ./mach build 2) ./mach build langpack-de 3) The result file is in `objdir/dist/platform/xpi/` Installing: 1) Select the file (drag&drop or File>Open) 2) Install the langpack 3) In browser console type `Services.locale.setRequestedLocales(['de']);` From that moment every new window will use German string. I don't know where this breaks on Fennec and how far are we from this working on Fennec.
Depends on: 1395363
Priority: -- → P3
Nevin, this is I believe the first step. If you don't get to play with it, I'll look into this over the next weeks. I believe that once we figure that out, next steps will be to build code to install langpacks into Fennec on demand, and then hook it into the language picker in Fennec.
I got below message and the build stops. nechen@nechen-30058:~/Desktop/mozilla-central$ ./mach build langpack-de 0:00.25 /usr/bin/make -C /Users/nechen/Desktop/mozilla-central/objdir-frontend -j8 -s backend 0:00.40 /usr/bin/make -j8 -s langpack-de 0:00.48 make: *** No rule to make target `langpack-de'. Stop. Not sure if it related to artifact build. I'll use full build tomorrow.
Yes, artifact builds are not supported by l10n repacks, that's tracked in bug 1387485.
Depends on: 1416058
I got some build error and trying it fix it bug 1416058
Assignee: nobody → cnevinchen
I can now do full build. But I got this error 0:00.34 /usr/bin/make -C /Users/nechen/Desktop/mozilla-central/objdir-full-b04669e98 -j8 -s backend 0:00.48 /usr/bin/make -j8 -s langpack-de 0:00.57 make: *** No rule to make target `langpack-de'. Stop. After I look at the code, I found this https://hg.mozilla.org/mozilla-central/annotate/0ef6d21da190/mobile/android/build.mk#l54 with bug 1412983 May I know how can I help to make langpack-% work on Fennec?
Nick, you know more about mobile build system. Can you help us figure out what we need to make langpack-de work for mobile?
Nick is a better person to ask about this than me.
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #6) > Nick, you know more about mobile build system. Can you help us figure out > what we need to make langpack-de work for mobile? I can try to help, but I can't commit to any schedule since I'm technically on leave until January. I think you want to start by understanding https://searchfox.org/mozilla-central/source/mobile/android/build.mk#59, and in particular what happens if you make that look like https://searchfox.org/mozilla-central/source/browser/build.mk#43. But I haven't tried this myself, so I don't know where the rabbit hole leads. In principle, there's nothing exciting happening in Android land that should make this challenging. In reality, I expect there to be crufty Desktop l10n code that needs to be extracted into toolkit/ or similar.
Thank you Nick! I opened bug 1425689 to move the searchplugins resource entry out of locale package (same as we did for browser in bug 1393848), and will test it on my android setup over the next days, but visually the patch looks great :)
Comment on attachment 8937215 [details] Bug 1413240 - Build webext langpack for mobile/android. https://reviewboard.mozilla.org/r/207934/#review213836 Verified that it produces a langpack that can be then installed into Fennec and gives the localized (Gecko) UI! :) I'm slightly surprised that in the result .xpi file we have the ./chrome/ab_CD/locale/ab_CD/browser/* directories and files - I expected the ./browser resources not to be loaded here, but maybe they're needed?
Attachment #8937215 - Flags: review?(gandalf) → review+
Comment on attachment 8937215 [details] Bug 1413240 - Build webext langpack for mobile/android. https://reviewboard.mozilla.org/r/207934/#review214068 ::: python/mozbuild/mozbuild/action/langpack_manifest.py:25 (Diff revision 1) > import mozversioncontrol > import mozpack.path as mozpath > from mozpack.chrome.manifest import ( > Manifest, > ManifestLocale, > + ManifestResource, I believe you can now remove that part :)
Comment on attachment 8937215 [details] Bug 1413240 - Build webext langpack for mobile/android. https://reviewboard.mozilla.org/r/207934/#review214068 > I believe you can now remove that part :) Done :)
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/d2c11314f956 Build webext langpack for mobile/android. r=gandalf
You need to log in before you can comment on or make changes to this bug.