[PR #4185] [MERGED] Fix i18n language fallback for regional languages #5245

Closed
opened 2026-02-28 21:08:57 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/4185
Author: @jfdoming
Created: 1/18/2025
Status: Merged
Merged: 1/18/2025
Merged by: @jfdoming

Base: masterHead: jfdoming/fix-language-fallback-bug


📝 Commits (3)

📊 Changes

3 files changed (+110 additions, -11 deletions)

View changed files

packages/desktop-client/src/i18n.test.ts (+81 -0)
📝 packages/desktop-client/src/i18n.ts (+23 -11)
upcoming-release-notes/4185.md (+6 -0)

📄 Description

Two bugs here:

  • All language codes were being converted to lowercase, which breaks languages with region codes as those are capitalized. Instead, we only fallback to lowercase.
  • A missing language would crash the application due to explicitly throwing an error in that case. Instead, we'll fall back to English if all other attempted languages are missing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/4185 **Author:** [@jfdoming](https://github.com/jfdoming) **Created:** 1/18/2025 **Status:** ✅ Merged **Merged:** 1/18/2025 **Merged by:** [@jfdoming](https://github.com/jfdoming) **Base:** `master` ← **Head:** `jfdoming/fix-language-fallback-bug` --- ### 📝 Commits (3) - [`8bc0aaf`](https://github.com/actualbudget/actual/commit/8bc0aafe2266ee84fe7d71a3fad71cf5c209de4a) Fix i18n language fallback for regional languages - [`97c4839`](https://github.com/actualbudget/actual/commit/97c48392b37346f4159b2abbe200faf1595b46e7) Add release notes - [`16c8325`](https://github.com/actualbudget/actual/commit/16c8325b2350a734957902f704c1a2a9a9dcf890) Fix test ### 📊 Changes **3 files changed** (+110 additions, -11 deletions) <details> <summary>View changed files</summary> ➕ `packages/desktop-client/src/i18n.test.ts` (+81 -0) 📝 `packages/desktop-client/src/i18n.ts` (+23 -11) ➕ `upcoming-release-notes/4185.md` (+6 -0) </details> ### 📄 Description Two bugs here: - All language codes were being converted to lowercase, which breaks languages with region codes as those are capitalized. Instead, we only fallback to lowercase. - A missing language would crash the application due to explicitly throwing an error in that case. Instead, we'll fall back to English if all other attempted languages are missing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 21:08:57 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#5245