Skip to content

Commit

Permalink
Fix electron translations (#4317)
Browse files Browse the repository at this point in the history
* fix electron translations
  • Loading branch information
MikesGlitch authored Feb 6, 2025
1 parent 1529870 commit f5b9a5b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bin/package-electron
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ fi

yarn 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 build

yarn workspace desktop-electron update-client
Expand Down
4 changes: 4 additions & 0 deletions packages/desktop-client/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,9 @@ export const setI18NextLanguage = (language: string) => {
return;
}

if (language === i18n.language) {
return; // language is already set
}

i18n.changeLanguage(language || 'en');
};
6 changes: 6 additions & 0 deletions upcoming-release-notes/4317.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [MikesGlitch]
---

Fix Electron language support

0 comments on commit f5b9a5b

Please sign in to comment.