A local-first personal finance app
Fix electron translations (#4317)
Michael Clarkf5b9a5b23dba
diff --git a/bin/package-electron b/bin/package-electronindex 8203cc99df..74c0e87e29 100755--- a/bin/package-electron+++ b/bin/package-electron@@ -36,6 +36,16 @@ fiyarn workspace loot-core build:node+# Get translations+echo "Updating translations..."+if ! [ -d packages/desktop-client/locale ]; then+ git clone https://github.com/actualbudget/translations packages/desktop-client/locale+fi+pushd packages/desktop-client/locale > /dev/null+git pull+popd > /dev/null+packages/desktop-client/bin/remove-untranslated-languages+yarn workspace @actual-app/web build --mode=desktop # electron specific buildyarn workspace desktop-electron update-clientdiff --git a/packages/desktop-client/src/i18n.ts b/packages/desktop-client/src/i18n.tsindex 7372866697..5955197e5f 100644--- a/packages/desktop-client/src/i18n.ts+++ b/packages/desktop-client/src/i18n.ts@@ -77,5 +77,9 @@ export const setI18NextLanguage = (language: string) => {return;}+ if (language === i18n.language) {+ return; // language is already set+ }+i18n.changeLanguage(language || 'en');};diff --git a/upcoming-release-notes/4317.md b/upcoming-release-notes/4317.mdnew file mode 100644index 0000000000..32541d97e9--- /dev/null+++ b/upcoming-release-notes/4317.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [MikesGlitch]+---++Fix Electron language support