Multi-languages support #3
Comments
|
Off hand I don't know how to tackle this issue, I imagine Thunderbird might have to be compiled with multiple locales? |
|
@ramcq could help |
|
You need to fetch language packs (.xpi files) from https://download-origin.cdn.mozilla.net/pub/thunderbird during the build and include them with the Flatpak. Take a look at how Debian does it - http://http.debian.net/debian/pool/main/t/thunderbird/thunderbird_52.7.0-1.debian.tar.xz |
|
So are we just going to grab every language pack at build time? |
|
Right, at build time. That will mean you have all the files included in your Flatpak which will make it much larger, but you can fix this with a Locale extension. What you do is split the translations up again into subdirectories of /app/share/runtime/locale/. Then you symlink back from wherever your app expects them to these path, then this folder will form your .Locale extension, and will be installed with just the languages are selected by the user / system / configuration of flatpak. |
|
How would I even begin to do this? |
|
Wouldn't it just be more efficient for people to install the language pack extension they need from the add-on store and not add complexity/size to the flatpak? |
|
It would be simpler for the flatpak author, but much less simple for the user. But overall, I don't expect it would actually be that hard to put a few shell commands into a |
Don't know if I was looking at the right thing, but it seems to do this for Thunderbird and lightning is over 600 lines of shell-script, and far from "simple". The files I'm looking at are:
|
|
Does this help: |
|
@ovari So, if I understand correctly, that script does some symlink locale magic, and then fetches some language packs for libreoffice? |
|
Looked like LibreOffice solved your situation. Not sure how exactly it works. Perhaps someone else can give better advise? |
|
Flatpak manifest and patches to build Firefox |
|
Firefox Nightly Has No Locale |
|
It probably does have a locale, BUT, you don't have the locale extension(s) that Firefox/Thunderbird has avilable. |
|
How is the progress of the correction? |
|
I had forgotten about it, I'll post to the Thunderbird development mailing-list for help on this issue. |
|
@AdrianKoshka https://github.com/endlessm/firefox-flatpak/blob/master/org.mozilla.Firefox.json.in
|
|
So, if I understand what you're showing me, I should just add the |
|
Yes |
|
cd51af6 should fix this issue, hopefully. |
|
That won't quite do it. You also need the apply_extra script which runs on the extra data: https://github.com/endlessm/firefox-flatpak/blob/master/apply_extra to install those extensions (you probably don't want the preferences override that is used elsewhere) Also, I'd strongly suggest moving to the more modern extra-data format as seen in apps like Spotify, it's much more readable and easy to update. |
|
Thanks, will look into and do, that is much easier to work with. |
|
So would a script like this work? THUNDERBIRD_DIR=$(pwd)/thunderbird
EXTENSIONS_DIR=${Thunderbird_DIR}/distribution/extensions
mkdir -p ${EXTENSIONS_DIR}
for addon in $(ls *.xpi); do
mv "${addon}" "${EXTENSIONS_DIR}/$(get_extension_id ${addon}).xpi"
done
# Override preferences
PREFERENCES_DIR=${THUNDERBIRD_DIR}/browser/defaults/preferences
mkdir -p ${PREFERENCES_DIR}
ln -s /app/cache/mozilla/endless-default-prefs.js ${PREFERENCES_DIR} |
|
I'd remove the 'override preferences' part - because that's not something you want. And you need something like:
as well. I'll ping @ramcq here as well because he's looked at this before. |
|
So something like:
|
|
I'd suggest to dig into how we build snaps for Firefox, https://dxr.mozilla.org/mozilla-central/source/taskcluster/docker/firefox-snap. flatpack for Firefox seems to be work-in-progress, though: https://bugzilla.mozilla.org/show_bug.cgi?id=1278719 |
|
Didn't really see anything useful there, can't exactly figure out how I'm supposed to apply this fix for |
|
Well, I've sorta found a fix (Just using
|
|
How is the progress of the correction? |
|
|
|
How is the progress of the correction? |
|
Recently been in contact with the libxlst mailnglist to try and debug things. They say the issue I'm encountering was fixed in a specific commit, which it seems to be, but now I have another build error...waiting for feedback on that. |
|
How is the progress of the correction? |
1 similar comment
|
How is the progress of the correction? |
any progress? |
|
thanks |
|
This is now fixed and will be published to flathub within couple of hours. For details see https://github.com/flathub/org.mozilla.Thunderbird#language-support |
Lingua PT-BR does not work
The text was updated successfully, but these errors were encountered: