Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: add Learn more action to theme import invalid JSON file error and modified error message

kashaf-ansari-deve49291c55e2f
diff --git a/apps/mobile/app/screens/settings/theme-selector.tsx b/apps/mobile/app/screens/settings/theme-selector.tsx
index 8e42c6ed7..1bd150dc0 100644
--- a/apps/mobile/app/screens/settings/theme-selector.tsx
+++ b/apps/mobile/app/screens/settings/theme-selector.tsx
@@ -63,6 +63,7 @@ import { getElevationStyle } from "../../utils/elevation";
import { MenuItemsList } from "../../utils/menu-items";
import { AppFontSize, defaultBorderRadius } from "../../utils/size";
import { DefaultAppStyles } from "../../utils/styles";
+import { openLinkInBrowser } from "../../utils/functions";
const THEME_SERVER_URL = "https://themes-api.notesnook.com";
//@ts-ignore
@@ -448,7 +449,13 @@ function ThemeSelector() {
ToastManager.show({
heading: strings.invalidThemeFileFormat(),
type: "error",
- context: "global"
+ context: "global",
+ actionText: strings.learnMore(),
+ func: () => {
+ openLinkInBrowser(
+ "https://help.notesnook.com/custom-themes/introduction"
+ );
+ }
});
return;
}
diff --git a/packages/intl/locale/en.po b/packages/intl/locale/en.po
index bad0875a9..5d891aeb7 100644
--- a/packages/intl/locale/en.po
+++ b/packages/intl/locale/en.po
@@ -7274,8 +7274,8 @@ msgid "We are sorry, it seems that the app crashed due to an error. You can subm
msgstr "We are sorry, it seems that the app crashed due to an error. You can submit a bug report below so we can fix this asap."
#: src/strings.ts:2700
-msgid "We couldn't load this theme. Please make sure the file is a valid theme export."
-msgstr "We couldn't load this theme. Please make sure the file is a valid theme export."
+msgid "We couldn't load this theme. Please make sure the file is a valid JSON theme file."
+msgstr "We couldn't load this theme. Please make sure the file is a valid JSON theme file."
#: src/strings.ts:1390
msgid "We have sent you an email confirmation link. Please check your email inbox. If you cannot find the email, check your spam folder."
diff --git a/packages/intl/locale/pseudo-LOCALE.po b/packages/intl/locale/pseudo-LOCALE.po
index 9202bdeae..64969b285 100644
--- a/packages/intl/locale/pseudo-LOCALE.po
+++ b/packages/intl/locale/pseudo-LOCALE.po
@@ -7221,10 +7221,10 @@ msgstr ""
#: src/strings.ts:474
msgid "We are sorry, it seems that the app crashed due to an error. You can submit a bug report below so we can fix this asap."
-msgstr ""
+msgstr "<<<<<<< HEAD"
#: src/strings.ts:2700
-msgid "We couldn't load this theme. Please make sure the file is a valid theme export."
+msgid "We couldn't load this theme. Please make sure the file is a valid JSON theme file."
msgstr ""
#: src/strings.ts:1390
diff --git a/packages/intl/src/strings.ts b/packages/intl/src/strings.ts
index 30d9bf16d..2f8eb2d92 100644
--- a/packages/intl/src/strings.ts
+++ b/packages/intl/src/strings.ts
@@ -2697,5 +2697,5 @@ Continue without attachments?`,
maximumReminderDate: (maxDate: string) =>
t`Maximum reminder date is ${maxDate}`,
invalidThemeFileFormat: () =>
- t`We couldn't load this theme. Please make sure the file is a valid theme export.`
+ t`We couldn't load this theme. Please make sure the file is a valid JSON theme file.`
};