From cce64a7b2f82f2c818a0a8260d9aab6ca10af387 Mon Sep 17 00:00:00 2001 From: proletarius101 Date: Sat, 7 Jan 2023 01:44:40 +0800 Subject: [PATCH] allow separate locale --- com.bitwarden.desktop.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/com.bitwarden.desktop.yaml b/com.bitwarden.desktop.yaml index 340ba6d..d97aad4 100644 --- a/com.bitwarden.desktop.yaml +++ b/com.bitwarden.desktop.yaml @@ -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: