From c639bfb2272dcd9d922df2a73083a30beca06477 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Mon, 2 Sep 2024 12:43:37 +0500 Subject: [PATCH] mobile: fix localize errors --- apps/mobile/app/screens/settings/settings-data.tsx | 2 +- apps/mobile/app/services/biometrics.ts | 1 - apps/mobile/app/services/event-manager.ts | 3 ++- apps/mobile/app/services/exporter.ts | 5 +++-- packages/intl/src/strings.tsx | 4 +++- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/mobile/app/screens/settings/settings-data.tsx b/apps/mobile/app/screens/settings/settings-data.tsx index fe485828f..876bc8898 100644 --- a/apps/mobile/app/screens/settings/settings-data.tsx +++ b/apps/mobile/app/screens/settings/settings-data.tsx @@ -1369,7 +1369,7 @@ export const settingsGroups: SettingSection[] = [ sections: [ { id: "report-issue", - name: "Report an issue", + name: strings.reportAnIssue(), icon: "bug", modifer: () => { presentSheet({ diff --git a/apps/mobile/app/services/biometrics.ts b/apps/mobile/app/services/biometrics.ts index 3a7805abd..716bf7027 100644 --- a/apps/mobile/app/services/biometrics.ts +++ b/apps/mobile/app/services/biometrics.ts @@ -167,7 +167,6 @@ async function validateUser(title: string, description?: string) { } else { ToastManager.show({ heading: strings.biometricsAuthFailed(), - message: "Tap to try again.", type: "error", context: "local" }); diff --git a/apps/mobile/app/services/event-manager.ts b/apps/mobile/app/services/event-manager.ts index 54f94f923..6376d895f 100644 --- a/apps/mobile/app/services/event-manager.ts +++ b/apps/mobile/app/services/event-manager.ts @@ -30,6 +30,7 @@ import { eOpenVaultDialog, eShowToast } from "../utils/events"; +import { strings } from "@notesnook/intl"; type Vault = { item: unknown; @@ -172,7 +173,7 @@ export const ToastManager = { func: () => { Clipboard.setString(e?.stack || ""); ToastManager.show({ - heading: "Logs copied!", + heading: strings.logsCopied(), type: "success", context: "global", duration: duration diff --git a/apps/mobile/app/services/exporter.ts b/apps/mobile/app/services/exporter.ts index cd2441619..a2aec62b7 100644 --- a/apps/mobile/app/services/exporter.ts +++ b/apps/mobile/app/services/exporter.ts @@ -37,6 +37,7 @@ import { basename, dirname, join } from "pathe"; import downloadAttachment from "../common/filesystem/download-attachment"; import { cacheDir } from "../common/filesystem/utils"; import { unlockVault } from "../utils/unlock-vault"; +import { strings } from "@notesnook/intl"; const FolderNames: { [name: string]: string } = { txt: "Text", @@ -60,8 +61,8 @@ async function getPath(type: string) { async function unlockVaultForNoteExport() { return await unlockVault({ - title: "Unlock vault", - paragraph: "Some exported notes are locked, Unlock to export them", + title: strings.unlockNotes(), + paragraph: strings.exportedNotesLocked(), context: "export-notes" }); } diff --git a/packages/intl/src/strings.tsx b/packages/intl/src/strings.tsx index 693133e83..0bb1947ff 100644 --- a/packages/intl/src/strings.tsx +++ b/packages/intl/src/strings.tsx @@ -1425,5 +1425,7 @@ For example: words: () => t`words`, addATag: () => t`Add a tag`, startWritingNote: () => t`Start writing your note...`, - off: () => t`Off` + off: () => t`Off`, + exportedNotesLocked: () => + t`Some exported notes are locked, Unlock to export them` };