mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
intl: fix localization
This commit is contained in:
@@ -775,7 +775,7 @@ export const useActions = ({
|
|||||||
actions.push(
|
actions.push(
|
||||||
{
|
{
|
||||||
id: "favorite",
|
id: "favorite",
|
||||||
title: item.favorite ? strings.favorite() : strings.unfavorite(),
|
title: !item.favorite ? strings.favorite() : strings.unfavorite(),
|
||||||
icon: item.favorite ? "star-off" : "star-outline",
|
icon: item.favorite ? "star-off" : "star-outline",
|
||||||
func: addToFavorites,
|
func: addToFavorites,
|
||||||
close: false,
|
close: false,
|
||||||
|
|||||||
@@ -19,19 +19,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
import { getFormattedDate } from "@notesnook/common";
|
import { getFormattedDate } from "@notesnook/common";
|
||||||
import {
|
import {
|
||||||
EVENTS,
|
|
||||||
isEncryptedContent,
|
|
||||||
NoteContent,
|
|
||||||
ContentItem,
|
ContentItem,
|
||||||
ContentType,
|
ContentType,
|
||||||
DeletedItem,
|
DeletedItem,
|
||||||
|
EVENTS,
|
||||||
ItemReference,
|
ItemReference,
|
||||||
Note,
|
Note,
|
||||||
|
NoteContent,
|
||||||
TrashItem,
|
TrashItem,
|
||||||
UnencryptedContentItem,
|
UnencryptedContentItem,
|
||||||
isDeleted,
|
isDeleted,
|
||||||
|
isEncryptedContent,
|
||||||
isTrashItem
|
isTrashItem
|
||||||
} from "@notesnook/core";
|
} from "@notesnook/core";
|
||||||
|
import { strings } from "@notesnook/intl";
|
||||||
import { useThemeEngineStore } from "@notesnook/theme";
|
import { useThemeEngineStore } from "@notesnook/theme";
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
import WebView from "react-native-webview";
|
import WebView from "react-native-webview";
|
||||||
@@ -57,6 +58,7 @@ import {
|
|||||||
eUpdateNoteInEditor
|
eUpdateNoteInEditor
|
||||||
} from "../../../utils/events";
|
} from "../../../utils/events";
|
||||||
import { tabBarRef } from "../../../utils/global-refs";
|
import { tabBarRef } from "../../../utils/global-refs";
|
||||||
|
import { sleep } from "../../../utils/time";
|
||||||
import { unlockVault } from "../../../utils/unlock-vault";
|
import { unlockVault } from "../../../utils/unlock-vault";
|
||||||
import { onNoteCreated } from "../../notes/common";
|
import { onNoteCreated } from "../../notes/common";
|
||||||
import Commands from "./commands";
|
import Commands from "./commands";
|
||||||
@@ -73,8 +75,6 @@ import {
|
|||||||
isEditorLoaded,
|
isEditorLoaded,
|
||||||
post
|
post
|
||||||
} from "./utils";
|
} from "./utils";
|
||||||
import { sleep } from "../../../utils/time";
|
|
||||||
import { strings } from "@notesnook/intl";
|
|
||||||
|
|
||||||
type NoteWithContent = Note & {
|
type NoteWithContent = Note & {
|
||||||
content?: NoteContent<false>;
|
content?: NoteContent<false>;
|
||||||
@@ -282,7 +282,7 @@ export const useEditor = (
|
|||||||
if (saved) return;
|
if (saved) return;
|
||||||
commands.setStatus(
|
commands.setStatus(
|
||||||
getFormattedDate(note ? note.dateEdited : Date.now(), "date-time"),
|
getFormattedDate(note ? note.dateEdited : Date.now(), "date-time"),
|
||||||
"Saving",
|
strings.saving(),
|
||||||
tabId
|
tabId
|
||||||
);
|
);
|
||||||
}, 50);
|
}, 50);
|
||||||
@@ -365,7 +365,7 @@ export const useEditor = (
|
|||||||
note = (await db.notes?.note(id)) as Note;
|
note = (await db.notes?.note(id)) as Note;
|
||||||
await commands.setStatus(
|
await commands.setStatus(
|
||||||
getFormattedDate(note.dateEdited, "date-time"),
|
getFormattedDate(note.dateEdited, "date-time"),
|
||||||
"Saved",
|
strings.saved(),
|
||||||
tabId
|
tabId
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -574,7 +574,7 @@ export const useEditor = (
|
|||||||
|
|
||||||
await commands.setStatus(
|
await commands.setStatus(
|
||||||
getFormattedDate(item.dateEdited, "date-time"),
|
getFormattedDate(item.dateEdited, "date-time"),
|
||||||
"Saved",
|
strings.saved(),
|
||||||
tabId
|
tabId
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -695,7 +695,7 @@ export const useEditor = (
|
|||||||
if (currentNotes.current[noteId]?.dateEdited !== note.dateEdited) {
|
if (currentNotes.current[noteId]?.dateEdited !== note.dateEdited) {
|
||||||
commands.setStatus(
|
commands.setStatus(
|
||||||
getFormattedDate(note.dateEdited, "date-time"),
|
getFormattedDate(note.dateEdited, "date-time"),
|
||||||
"Saved",
|
strings.saved(),
|
||||||
tabId as number
|
tabId as number
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -186,14 +186,14 @@ export const strings = {
|
|||||||
key:
|
key:
|
||||||
| "dateCreated"
|
| "dateCreated"
|
||||||
| "dateEdited"
|
| "dateEdited"
|
||||||
| "dateModifed"
|
| "dateModified"
|
||||||
| "dateUploaded"
|
| "dateUploaded"
|
||||||
| "dateDeleted"
|
| "dateDeleted"
|
||||||
) =>
|
) =>
|
||||||
select(key, {
|
select(key, {
|
||||||
dateCreated: `Created at`,
|
dateCreated: `Created at`,
|
||||||
dateEdited: `Last edited at`,
|
dateEdited: `Last edited at`,
|
||||||
dateModifed: `Last modified at`,
|
dateModified: `Last modified at`,
|
||||||
dateUploaded: `Uploaded at`,
|
dateUploaded: `Uploaded at`,
|
||||||
dateDeleted: `Deleted at`,
|
dateDeleted: `Deleted at`,
|
||||||
other: key
|
other: key
|
||||||
@@ -1484,7 +1484,9 @@ For example:
|
|||||||
remindeMeOf: () => t`Remind me of...`,
|
remindeMeOf: () => t`Remind me of...`,
|
||||||
addShortNote: () => t`Add a short note`,
|
addShortNote: () => t`Add a short note`,
|
||||||
typeAKeywordToSearchIn: (route: string) =>
|
typeAKeywordToSearchIn: (route: string) =>
|
||||||
t`Type a keyword to search in ${route}`,
|
t`Type a keyword to search in ${strings.routes[
|
||||||
|
route as keyof typeof strings.routes
|
||||||
|
]()}...`,
|
||||||
searchingFor: (query: string) => t`Searching for ${query}`,
|
searchingFor: (query: string) => t`Searching for ${query}`,
|
||||||
typeAKeyword: () => t`Type a keyword`,
|
typeAKeyword: () => t`Type a keyword`,
|
||||||
search: () => t`Search`,
|
search: () => t`Search`,
|
||||||
@@ -2419,5 +2421,7 @@ Use this if changes from other devices are not appearing on this device. This wi
|
|||||||
setTableSizeNotice: () => t`Please set a table size`,
|
setTableSizeNotice: () => t`Please set a table size`,
|
||||||
clickToReset: (title: string) => t`Click to reset ${title}`,
|
clickToReset: (title: string) => t`Click to reset ${title}`,
|
||||||
increase: (title: string) => t`Increase ${title}`,
|
increase: (title: string) => t`Increase ${title}`,
|
||||||
decrease: (title: string) => t`Decrease ${title}`
|
decrease: (title: string) => t`Decrease ${title}`,
|
||||||
|
saved: () => t`Saved`,
|
||||||
|
saving: () => t`Saving`
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user