diff --git a/_raw/_locales/en/messages.json b/_raw/_locales/en/messages.json index 9261fc8d..87b3436d 100644 --- a/_raw/_locales/en/messages.json +++ b/_raw/_locales/en/messages.json @@ -1316,6 +1316,9 @@ "message": "Import Profile" }, "Insufficient_Storage": { + "message": "Insufficient storage." + }, + "Almost_run_out_of_account_storage": { "message": "Almost run out of account storage." }, "Insufficient_storage_after_action": { diff --git a/_raw/_locales/ja/messages.json b/_raw/_locales/ja/messages.json index 79092f49..4e8add82 100644 --- a/_raw/_locales/ja/messages.json +++ b/_raw/_locales/ja/messages.json @@ -1316,6 +1316,9 @@ "message": "プロファイルをインポート" }, "Insufficient_Storage": { + "message": "ストレージが不足しています" + }, + "Almost_run_out_of_account_storage": { "message": "アカウントのストレージが不足しています" }, "Transaction_failed_storage_exceeded": { diff --git a/_raw/_locales/ru/messages.json b/_raw/_locales/ru/messages.json index aac00a9b..4f2505c6 100644 --- a/_raw/_locales/ru/messages.json +++ b/_raw/_locales/ru/messages.json @@ -1316,6 +1316,9 @@ "message": "Импортировать профиль" }, "Insufficient_Storage": { + "message": "Недостаточно памяти" + }, + "Almost_run_out_of_account_storage": { "message": "В вашем аккаунте недостаточно места для хранения данных" }, "Transaction_failed_storage_exceeded": { diff --git a/_raw/_locales/zh_CN/messages.json b/_raw/_locales/zh_CN/messages.json index bf3cdbe4..3afa0cd5 100644 --- a/_raw/_locales/zh_CN/messages.json +++ b/_raw/_locales/zh_CN/messages.json @@ -1316,6 +1316,9 @@ "message": "导入账户" }, "Insufficient_Storage": { + "message": "存储不足" + }, + "Almost_run_out_of_account_storage": { "message": "帐户存储空间几乎耗尽" }, "Transaction_failed_storage_exceeded": { diff --git a/src/background/service/news.ts b/src/background/service/news.ts index 9db32fba..9b53a7ce 100644 --- a/src/background/service/news.ts +++ b/src/background/service/news.ts @@ -40,8 +40,14 @@ class NewsService { const filteredNewsPromises = news .filter((n) => !this.isDismissed(n.id)) .map(async (newsItem) => { - const shouldShow = await conditionsEvaluator.evaluateConditions(newsItem.conditions); - return shouldShow ? newsItem : null; + try { + const shouldShow = await conditionsEvaluator.evaluateConditions(newsItem.conditions); + return shouldShow ? newsItem : null; + } catch (error) { + // Catch error here otherwise the whole news list will be empty + console.error('Error evaluating conditions', error); + return null; + } }); const filteredNews = await Promise.all(filteredNewsPromises) .catch((error) => { diff --git a/src/messages.json b/src/messages.json index 6ce504a1..0c2fa891 100644 --- a/src/messages.json +++ b/src/messages.json @@ -1289,6 +1289,9 @@ "message": "Import Profile" }, "Insufficient_Storage": { + "message": "Insufficient storage." + }, + "Almost_run_out_of_account_storage": { "message": "Almost run out of account storage." }, "Transaction_failed_storage_exceeded": { diff --git a/src/ui/FRWComponent/WarningStorageLowSnackbar.tsx b/src/ui/FRWComponent/WarningStorageLowSnackbar.tsx index eb7bc96c..eb1aadc7 100644 --- a/src/ui/FRWComponent/WarningStorageLowSnackbar.tsx +++ b/src/ui/FRWComponent/WarningStorageLowSnackbar.tsx @@ -13,7 +13,7 @@ export const WarningStorageLowSnackbar = ({ isLowStorageAfterAction, }: WarningStorageLowSnackbarProps = {}) => { const message = isLowStorage - ? chrome.i18n.getMessage('Insufficient_storage') + ? chrome.i18n.getMessage('Almost_run_out_of_account_storage') : isLowStorageAfterAction ? chrome.i18n.getMessage('Insufficient_storage_after_action') : undefined;