Merge pull request #130 from proletarius101/enable-separate-locales

allow separate locale
This commit is contained in:
Ghislain Vaillant 2023-01-07 13:00:02 +01:00 committed by GitHub
commit c459629cfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,6 @@ sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '22.08'
command: bitwarden
separate-locales: false
finish-args:
- --share=ipc
- --share=network
@ -36,6 +35,16 @@ modules:
- install -D -m 644 -t $FLATPAK_DEST/share/metainfo $FLATPAK_ID.metainfo.xml
- desktop-file-edit --set-key=Exec --set-value="bitwarden %U" $FLATPAK_DEST/share/applications/bitwarden.desktop
- rm -rf "${FLATPAK_DEST}/share/icons/hicolor/1024x1024/"
# To allow separate locales
# https://searchfox.org/mozilla-central/rev/8a4f55bc09ffc5c25dcb4586c51ae4a9fee77b4c/taskcluster/docker/firefox-flatpak/runme.sh#131-133
- |
for lang in ${FLATPAK_DEST}/Bitwarden/locales/*.pak
do
locale="$(basename -s .pak $lang)"
install -Dm644 -t "${FLATPAK_DEST}/share/runtime/locale/${locale%%-*}/" "$lang"
ln -sf "${FLATPAK_DEST}/share/runtime/locale/${locale%%-*}/$(basename $lang)" "${FLATPAK_DEST}/Bitwarden/locales/$(basename $lang)"
done
sources:
- type: file
only-arches: