From 88295cc6e496e07e564d391daebc2d0c53c596b8 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Thu, 17 Oct 2024 16:27:17 +0530 Subject: [PATCH 1/2] fix: i18n strings not falling back correctly (#4447) --- packages/hoppscotch-common/src/modules/i18n.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/hoppscotch-common/src/modules/i18n.ts b/packages/hoppscotch-common/src/modules/i18n.ts index a65152732..3bdde0fb5 100644 --- a/packages/hoppscotch-common/src/modules/i18n.ts +++ b/packages/hoppscotch-common/src/modules/i18n.ts @@ -11,6 +11,8 @@ import { throwError } from "~/helpers/functional/error" import { PersistenceService } from "~/services/persistence" import { getService } from "./dioc" +import FALLBACK_LANG_MESSAGES from "../../locales/en.json" + /* In context of this file, we have 2 main kinds of things. 1. Locale -> A locale is termed as the i18n entries present in the /locales folder @@ -144,6 +146,12 @@ export default { i18nInstance = i18n + // Load in fallback lang messages + i18nInstance.global.setLocaleMessage( + FALLBACK_LANG_CODE, + FALLBACK_LANG_MESSAGES + ) + // TODO: Global loading state to hide the resolved lang loading const currentLocale = resolveCurrentLocale() changeAppLanguage(currentLocale) From 9da5f63e701ba072ea393e68847d7f8e395d4c4a Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Thu, 17 Oct 2024 16:58:51 +0530 Subject: [PATCH 2/2] chore: bump version to 2024.9.3 --- packages/hoppscotch-backend/package.json | 2 +- packages/hoppscotch-common/package.json | 2 +- packages/hoppscotch-selfhost-desktop/package.json | 2 +- packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.lock | 2 +- packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.toml | 2 +- packages/hoppscotch-selfhost-desktop/src-tauri/tauri.conf.json | 2 +- packages/hoppscotch-selfhost-web/package.json | 2 +- packages/hoppscotch-sh-admin/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/hoppscotch-backend/package.json b/packages/hoppscotch-backend/package.json index d85e8b74f..b4cf06d82 100644 --- a/packages/hoppscotch-backend/package.json +++ b/packages/hoppscotch-backend/package.json @@ -1,6 +1,6 @@ { "name": "hoppscotch-backend", - "version": "2024.9.2", + "version": "2024.9.3", "description": "", "author": "", "private": true, diff --git a/packages/hoppscotch-common/package.json b/packages/hoppscotch-common/package.json index 390cc165a..30c78ce38 100644 --- a/packages/hoppscotch-common/package.json +++ b/packages/hoppscotch-common/package.json @@ -1,7 +1,7 @@ { "name": "@hoppscotch/common", "private": true, - "version": "2024.9.2", + "version": "2024.9.3", "scripts": { "dev": "pnpm exec npm-run-all -p -l dev:*", "test": "vitest --run", diff --git a/packages/hoppscotch-selfhost-desktop/package.json b/packages/hoppscotch-selfhost-desktop/package.json index 863442e2c..e4bbf6ce5 100644 --- a/packages/hoppscotch-selfhost-desktop/package.json +++ b/packages/hoppscotch-selfhost-desktop/package.json @@ -1,7 +1,7 @@ { "name": "@hoppscotch/selfhost-desktop", "private": true, - "version": "2024.9.2", + "version": "2024.9.3", "type": "module", "scripts": { "dev:vite": "vite", diff --git a/packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.lock b/packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.lock index 554dd6927..b5e9519b8 100644 --- a/packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.lock +++ b/packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.lock @@ -1383,7 +1383,7 @@ dependencies = [ [[package]] name = "hoppscotch-desktop" -version = "24.9.2" +version = "24.9.3" dependencies = [ "cocoa 0.25.0", "dashmap", diff --git a/packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.toml b/packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.toml index 0ca282993..89355274f 100644 --- a/packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.toml +++ b/packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hoppscotch-desktop" -version = "24.9.2" +version = "24.9.3" description = "A Tauri App" authors = ["you"] license = "" diff --git a/packages/hoppscotch-selfhost-desktop/src-tauri/tauri.conf.json b/packages/hoppscotch-selfhost-desktop/src-tauri/tauri.conf.json index 41bd1a622..85a0a7405 100644 --- a/packages/hoppscotch-selfhost-desktop/src-tauri/tauri.conf.json +++ b/packages/hoppscotch-selfhost-desktop/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "Hoppscotch", - "version": "24.9.2" + "version": "24.9.3" }, "tauri": { "allowlist": { diff --git a/packages/hoppscotch-selfhost-web/package.json b/packages/hoppscotch-selfhost-web/package.json index fe1a32da5..0b04691b3 100644 --- a/packages/hoppscotch-selfhost-web/package.json +++ b/packages/hoppscotch-selfhost-web/package.json @@ -1,7 +1,7 @@ { "name": "@hoppscotch/selfhost-web", "private": true, - "version": "2024.9.2", + "version": "2024.9.3", "type": "module", "scripts": { "dev:vite": "vite", diff --git a/packages/hoppscotch-sh-admin/package.json b/packages/hoppscotch-sh-admin/package.json index 4d6682c11..fb6d47305 100644 --- a/packages/hoppscotch-sh-admin/package.json +++ b/packages/hoppscotch-sh-admin/package.json @@ -1,7 +1,7 @@ { "name": "hoppscotch-sh-admin", "private": true, - "version": "2024.9.2", + "version": "2024.9.3", "type": "module", "scripts": { "dev": "pnpm exec npm-run-all -p -l dev:*",