intl: use pseudo locale in development

This commit is contained in:
Abdullah Atta
2024-10-10 12:19:33 +05:00
committed by Abdullah Atta
parent 8437394891
commit 3cd6c6a371
15 changed files with 424 additions and 6846 deletions

View File

@@ -36,13 +36,19 @@ import { bringToFront } from "./utils/bring-to-front";
import { bridge } from "./api/bridge"; import { bridge } from "./api/bridge";
import { setupDesktopIntegration } from "./utils/desktop-integration"; import { setupDesktopIntegration } from "./utils/desktop-integration";
import { disableCustomDns, enableCustomDns } from "./utils/custom-dns"; import { disableCustomDns, enableCustomDns } from "./utils/custom-dns";
import { $en, setI18nGlobal, $de } from "@notesnook/intl"; import { Messages, setI18nGlobal } from "@notesnook/intl";
import { i18n } from "@lingui/core"; import { i18n } from "@lingui/core";
i18n.load({
en: $en, const locale =
de: $de process.env.NODE_ENV === "development"
? import("@notesnook/intl/locales/$pseudo-LOCALE.json")
: import("@notesnook/intl/locales/$en.json");
locale.then(({ default: locale }) => {
i18n.load({
en: locale.messages as unknown as Messages
});
i18n.activate("en");
}); });
i18n.activate("de");
setI18nGlobal(i18n); setI18nGlobal(i18n);
// only run a single instance // only run a single instance

View File

@@ -25,13 +25,18 @@ import { getServiceWorkerVersion } from "./utils/version";
import { register as registerStreamSaver } from "./utils/stream-saver/mitm"; import { register as registerStreamSaver } from "./utils/stream-saver/mitm";
import { ThemeDark, ThemeLight, themeToCSS } from "@notesnook/theme"; import { ThemeDark, ThemeLight, themeToCSS } from "@notesnook/theme";
import Config from "./utils/config"; import Config from "./utils/config";
import { $en, setI18nGlobal, $de } from "@notesnook/intl"; import { setI18nGlobal, Messages } from "@notesnook/intl";
import { i18n } from "@lingui/core"; import { i18n } from "@lingui/core";
i18n.load({
en: $en, const locale = import.meta.env.DEV
de: $de ? import("@notesnook/intl/locales/$pseudo-LOCALE.json")
: import("@notesnook/intl/locales/$en.json");
locale.then(({ default: locale }) => {
i18n.load({
en: locale.messages as unknown as Messages
});
i18n.activate("en");
}); });
i18n.activate("de");
setI18nGlobal(i18n); setI18nGlobal(i18n);
const colorScheme = JSON.parse( const colorScheme = JSON.parse(

View File

@@ -10,8 +10,8 @@
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@emotion/react": "11.11.1", "@emotion/react": "11.11.1",
"@lingui/core": "4.11.2", "@lingui/core": "4.11.4",
"@lingui/react": "4.11.2", "@lingui/react": "4.11.4",
"@mdi/js": "^7.2.96", "@mdi/js": "^7.2.96",
"@mdi/react": "^1.6.0", "@mdi/react": "^1.6.0",
"@notesnook/editor": "file:../editor", "@notesnook/editor": "file:../editor",
@@ -42,6 +42,7 @@
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"dependencies": { "dependencies": {
"@notesnook/common": "file:../common", "@notesnook/common": "file:../common",
"@notesnook/intl": "file:../intl",
"@notesnook/theme": "file:../theme", "@notesnook/theme": "file:../theme",
"@notesnook/ui": "file:../ui", "@notesnook/ui": "file:../ui",
"@social-embed/lib": "^0.1.0-next.7", "@social-embed/lib": "^0.1.0-next.7",
@@ -132,18 +133,20 @@
"../intl": { "../intl": {
"name": "@notesnook/intl", "name": "@notesnook/intl",
"version": "1.0.0", "version": "1.0.0",
"hasInstallScript": true,
"license": "GPL-3.0-or-later",
"devDependencies": { "devDependencies": {
"@babel/core": "^7.24.9", "@lingui/cli": "^4.11.4",
"@babel/preset-env": "^7.20.2", "@lingui/macro": "^4.11.4 ",
"@lingui/cli": "^4.11.2", "@lingui/swc-plugin": "^4.0.10",
"@lingui/macro": "^4.11.2",
"@lingui/swc-plugin": "^4.0.7",
"@rspack/cli": "^0.6.2",
"@rspack/core": "^0.6.2",
"@types/react": "^18.2.39", "@types/react": "^18.2.39",
"babel-plugin-macros": "^3.1.0", "babel-plugin-macros": "^3.1.0",
"react": "18.2.0", "react": "18.2.0",
"typescript": "5.5.3" "typescript": "5.5.3",
"vite": "^5.4.8",
"vite-plugin-dts": "^4.2.3",
"vite-plugin-static-copy": "^2.0.0",
"vite-plugin-swc-transform": "^1.0.1"
}, },
"peerDependencies": { "peerDependencies": {
"@lingui/macro": "*", "@lingui/macro": "*",
@@ -3638,12 +3641,13 @@
"dev": true "dev": true
}, },
"node_modules/@lingui/core": { "node_modules/@lingui/core": {
"version": "4.11.2", "version": "4.11.4",
"resolved": "https://registry.npmjs.org/@lingui/core/-/core-4.11.2.tgz", "resolved": "https://registry.npmjs.org/@lingui/core/-/core-4.11.4.tgz",
"integrity": "sha512-5wFmpHeDbLXEqaEUwlayS4SoqrCbDI3/bVRlwhmdNCeUcUYWh+7dTDlQnp4tPek1x1dEppABIkdN/0qLDdKcBQ==", "integrity": "sha512-W0bBIFe44s//Qs+RQ+NMfzK5vAm9oEKyDddlN94Db6rzeUT/IJo7N+T75A6Bya8v/BrtF2G/W4b77eS3sd0utw==",
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.13", "@babel/runtime": "^7.20.13",
"@lingui/message-utils": "4.11.2", "@lingui/message-utils": "4.11.4",
"unraw": "^3.0.0" "unraw": "^3.0.0"
}, },
"engines": { "engines": {
@@ -3651,9 +3655,10 @@
} }
}, },
"node_modules/@lingui/message-utils": { "node_modules/@lingui/message-utils": {
"version": "4.11.2", "version": "4.11.4",
"resolved": "https://registry.npmjs.org/@lingui/message-utils/-/message-utils-4.11.2.tgz", "resolved": "https://registry.npmjs.org/@lingui/message-utils/-/message-utils-4.11.4.tgz",
"integrity": "sha512-3oJk7ZKExk4NVa4d3CM0z0iNqIokaFOWeu7lYVzu0oEX7DP6OxNjlCAtObIhJCB0FdIPz8sXxhDkyDHFj+eIvw==", "integrity": "sha512-ZTCDhGbj5EN+P9Ajcj0Gq9uDP3HZTRW6/kT09WkiFgL4NayYLksPvgBk29sIglsS6M+Y6Iw2BrUK403SZjZKgw==",
"license": "MIT",
"dependencies": { "dependencies": {
"@messageformat/parser": "^5.0.0", "@messageformat/parser": "^5.0.0",
"js-sha256": "^0.10.1" "js-sha256": "^0.10.1"
@@ -3663,12 +3668,13 @@
} }
}, },
"node_modules/@lingui/react": { "node_modules/@lingui/react": {
"version": "4.11.2", "version": "4.11.4",
"resolved": "https://registry.npmjs.org/@lingui/react/-/react-4.11.2.tgz", "resolved": "https://registry.npmjs.org/@lingui/react/-/react-4.11.4.tgz",
"integrity": "sha512-OKHCg3yPW2xhYWoY2kOz+eP7qpdkab+4tERUvJ9QJ9bzQ6OnPLCagaRftB3nqdKuWzKoA5F2VG2QLUhF7DjpGA==", "integrity": "sha512-f7re4HhjI6CLBV1CY/PcI3VYP5zS4rtfU33speWnfkymsxGIXQv4ol3BqrgPLGhypMl2nKcL5nfL+LewrLIW8g==",
"license": "MIT",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.13", "@babel/runtime": "^7.20.13",
"@lingui/core": "4.11.2" "@lingui/core": "4.11.4"
}, },
"engines": { "engines": {
"node": ">=16.0.0" "node": ">=16.0.0"
@@ -3694,6 +3700,7 @@
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/@messageformat/parser/-/parser-5.1.0.tgz", "resolved": "https://registry.npmjs.org/@messageformat/parser/-/parser-5.1.0.tgz",
"integrity": "sha512-jKlkls3Gewgw6qMjKZ9SFfHUpdzEVdovKFtW1qRhJ3WI4FW5R/NnGDqr8SDGz+krWDO3ki94boMmQvGke1HwUQ==", "integrity": "sha512-jKlkls3Gewgw6qMjKZ9SFfHUpdzEVdovKFtW1qRhJ3WI4FW5R/NnGDqr8SDGz+krWDO3ki94boMmQvGke1HwUQ==",
"license": "MIT",
"dependencies": { "dependencies": {
"moo": "^0.5.1" "moo": "^0.5.1"
} }
@@ -4457,7 +4464,7 @@
"version": "15.7.11", "version": "15.7.11",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz",
"integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==", "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==",
"dev": true "devOptional": true
}, },
"node_modules/@types/q": { "node_modules/@types/q": {
"version": "1.5.8", "version": "1.5.8",
@@ -4481,7 +4488,7 @@
"version": "18.2.39", "version": "18.2.39",
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.39.tgz", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.39.tgz",
"integrity": "sha512-Oiw+ppED6IremMInLV4HXGbfbG6GyziY3kqAwJYOR0PNbkYDmLWQA3a95EhdSmamsvbkJN96ZNN+YD+fGjzSBA==", "integrity": "sha512-Oiw+ppED6IremMInLV4HXGbfbG6GyziY3kqAwJYOR0PNbkYDmLWQA3a95EhdSmamsvbkJN96ZNN+YD+fGjzSBA==",
"dev": true, "devOptional": true,
"dependencies": { "dependencies": {
"@types/prop-types": "*", "@types/prop-types": "*",
"@types/scheduler": "*", "@types/scheduler": "*",
@@ -4516,7 +4523,7 @@
"version": "0.16.8", "version": "0.16.8",
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz",
"integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==",
"dev": true "devOptional": true
}, },
"node_modules/@types/semver": { "node_modules/@types/semver": {
"version": "7.5.6", "version": "7.5.6",
@@ -9801,7 +9808,7 @@
"version": "9.0.21", "version": "9.0.21",
"resolved": "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz", "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz",
"integrity": "sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==", "integrity": "sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==",
"dev": true, "devOptional": true,
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
"url": "https://opencollective.com/immer" "url": "https://opencollective.com/immer"
@@ -12610,7 +12617,8 @@
"node_modules/js-sha256": { "node_modules/js-sha256": {
"version": "0.10.1", "version": "0.10.1",
"resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.10.1.tgz", "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.10.1.tgz",
"integrity": "sha512-5obBtsz9301ULlsgggLg542s/jqtddfOpV5KJc4hajc9JV8GeY2gZHSVpYBn4nWqAUTJ9v+xwtbJ1mIBgIH5Vw==" "integrity": "sha512-5obBtsz9301ULlsgggLg542s/jqtddfOpV5KJc4hajc9JV8GeY2gZHSVpYBn4nWqAUTJ9v+xwtbJ1mIBgIH5Vw==",
"license": "MIT"
}, },
"node_modules/js-tokens": { "node_modules/js-tokens": {
"version": "4.0.0", "version": "4.0.0",
@@ -13284,7 +13292,8 @@
"node_modules/moo": { "node_modules/moo": {
"version": "0.5.2", "version": "0.5.2",
"resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz",
"integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==",
"license": "BSD-3-Clause"
}, },
"node_modules/ms": { "node_modules/ms": {
"version": "2.1.2", "version": "2.1.2",
@@ -17897,6 +17906,21 @@
"is-typedarray": "^1.0.0" "is-typedarray": "^1.0.0"
} }
}, },
"node_modules/typescript": {
"version": "4.9.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
"dev": true,
"license": "Apache-2.0",
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
},
"node_modules/unbox-primitive": { "node_modules/unbox-primitive": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",

View File

@@ -19,8 +19,8 @@
"react-freeze": "^1.0.3", "react-freeze": "^1.0.3",
"tinycolor2": "1.6.0", "tinycolor2": "1.6.0",
"zustand": "^4.4.7", "zustand": "^4.4.7",
"@lingui/react": "4.11.2", "@lingui/core": "4.11.4",
"@lingui/core": "4.11.2" "@lingui/react": "4.11.4"
}, },
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.37.1", "@playwright/test": "^1.37.1",

View File

@@ -32,6 +32,7 @@ import { useSafeArea } from "../hooks/useSafeArea";
import { useTabContext, useTabStore } from "../hooks/useTabStore"; import { useTabContext, useTabStore } from "../hooks/useTabStore";
import { EventTypes, Settings } from "../utils"; import { EventTypes, Settings } from "../utils";
import styles from "./styles.module.css"; import styles from "./styles.module.css";
import { strings } from "@notesnook/intl";
const menuClassName = ({ state }: any) => const menuClassName = ({ state }: any) =>
state === "opening" state === "opening"
@@ -429,7 +430,7 @@ function Header({
color: "var(--nn_primary_paragraph)" color: "var(--nn_primary_paragraph)"
}} }}
> >
Search {strings.search()}
</span> </span>
</MenuItem> </MenuItem>
@@ -450,7 +451,7 @@ function Header({
color: "var(--nn_primary_paragraph)" color: "var(--nn_primary_paragraph)"
}} }}
> >
Table of contents {strings.toc()}
</span> </span>
</MenuItem> </MenuItem>
<MenuItem <MenuItem
@@ -470,7 +471,7 @@ function Header({
color: "var(--nn_primary_paragraph)" color: "var(--nn_primary_paragraph)"
}} }}
> >
Properties {strings.properties()}
</span> </span>
</MenuItem> </MenuItem>
</ControlledMenu> </ControlledMenu>

View File

@@ -40,6 +40,7 @@ import {
import { injectCss, transform } from "../utils/css"; import { injectCss, transform } from "../utils/css";
import { pendingSaveRequests } from "../utils/pending-saves"; import { pendingSaveRequests } from "../utils/pending-saves";
import { useTabContext, useTabStore } from "./useTabStore"; import { useTabContext, useTabStore } from "./useTabStore";
import { strings } from "@notesnook/intl";
type Attachment = { type Attachment = {
hash: string; hash: string;
@@ -139,7 +140,7 @@ export function useEditorController({
const setTheme = useThemeEngineStore((store) => store.setTheme); const setTheme = useThemeEngineStore((store) => store.setTheme);
const { colors } = useThemeColors("editor"); const { colors } = useThemeColors("editor");
const [title, setTitle] = useState(""); const [title, setTitle] = useState("");
const [titlePlaceholder, setTitlePlaceholder] = useState("Note title"); const [titlePlaceholder, setTitlePlaceholder] = useState(strings.noteTitle());
const htmlContentRef = useRef<string | null>(null); const htmlContentRef = useRef<string | null>(null);
const updateTabOnFocus = useRef(false); const updateTabOnFocus = useRef(false);
const timers = useRef<Timers>({ const timers = useRef<Timers>({

View File

@@ -22,20 +22,28 @@ import "@notesnook/editor/styles/fonts.mobile.css";
import "@notesnook/editor/styles/katex-fonts.mobile.css"; import "@notesnook/editor/styles/katex-fonts.mobile.css";
import "@notesnook/editor/styles/katex.min.css"; import "@notesnook/editor/styles/katex.min.css";
import "@notesnook/editor/styles/styles.css"; import "@notesnook/editor/styles/styles.css";
import { $en, setI18nGlobal } from "@notesnook/intl"; import { setI18nGlobal } from "@notesnook/intl";
import { createRoot } from "react-dom/client"; import { createRoot } from "react-dom/client";
import App from "./App"; import App from "./App";
import "./index.css"; import "./index.css";
i18n.load({ const locale = globalThis.LINGUI_LOCALE_DATA
en: $en, ? Promise.resolve(globalThis.LINGUI_LOCALE_DATA)
...globalThis.LINGUI_LOCALE_DATA : globalThis.__DEV__ || process.env.NODE_ENV === "development"
}); ? import("@notesnook/intl/locales/$pseudo-LOCALE.json").then(
i18n.activate(globalThis.LINGUI_LOCALE || "en"); ({ default: locale }) => ({ en: locale.messages })
setI18nGlobal(i18n); )
: import("@notesnook/intl/locales/$en.json").then(({ default: locale }) => ({
en: locale.messages
}));
locale.then((locale) => {
i18n.load(locale);
i18n.activate(globalThis.LINGUI_LOCALE || "en");
setI18nGlobal(i18n);
const rootElement = document.getElementById("root"); const rootElement = document.getElementById("root");
if (rootElement) { if (rootElement) {
const root = createRoot(rootElement); const root = createRoot(rootElement);
root.render(<App />); root.render(<App />);
} }
});

View File

@@ -19,8 +19,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/** @type {import('@lingui/conf').LinguiConfig} */ /** @type {import('@lingui/conf').LinguiConfig} */
module.exports = { module.exports = {
locales: ["en", "de", "fr"], locales: ["en", "pseudo-LOCALE"],
sourceLocale: "en", sourceLocale: "en",
pseudoLocale: "pseudo-LOCALE",
fallbackLocales: {
"pseudo-LOCALE": "en"
},
catalogs: [ catalogs: [
{ {
path: "<rootDir>/locale/{locale}", path: "<rootDir>/locale/{locale}",

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,11 @@
msgid "" msgid ""
msgstr "" msgstr ""
"POT-Creation-Date: 2024-08-15 12:13+0500\n" "POT-Creation-Date: 2024-10-10 09:52+0500\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: @lingui/cli\n" "X-Generator: @lingui/cli\n"
"Language: fr\n" "Language: pseudo-LOCALE\n"
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
@@ -17,46 +17,14 @@ msgstr ""
msgid "— not just the" msgid "— not just the"
msgstr "" msgstr ""
#: src/strings.tsx:1391
#~ msgid "\"App does not have permission to schedule notifications\""
#~ msgstr ""
#: src/strings.ts:1487
#~ msgid "\"Backup directory not selected\""
#~ msgstr ""
#: src/strings.ts:499
#~ msgid "\"I understand, change my password\""
#~ msgstr ""
#: src/strings.ts:1836
#~ msgid "\"Please wait while your data is downloaded & decrypted.\""
#~ msgstr ""
#: src/strings.ts:1709 #: src/strings.ts:1709
msgid "\"Refunded" msgid "\"Refunded"
msgstr "" msgstr ""
#: src/strings.ts:1224
#~ msgid "\"This version of Notesnook app does not support in-app purchases. Kindly login on the Notesnook web app to make the purchase.\""
#~ msgstr ""
#: src/strings.ts:509
#~ msgid "\"Your note will be unencrypted and removed from the vault.\""
#~ msgstr ""
#: src/strings.ts:1826
#~ msgid "\"Your password is always hashed before leaving this device.\""
#~ msgstr ""
#: src/strings.ts:242 #: src/strings.ts:242
msgid "(empty block)" msgid "(empty block)"
msgstr "" msgstr ""
#: src/strings.tsx:204
#~ msgid "(Empty block)"
#~ msgstr ""
#: src/strings.ts:219 #: src/strings.ts:219
msgid "{0}" msgid "{0}"
msgstr "" msgstr ""
@@ -65,10 +33,6 @@ msgstr ""
msgid "{0} downloaded" msgid "{0} downloaded"
msgstr "" msgstr ""
#: src/strings.tsx:184
#~ msgid "{0}... Please wait"
#~ msgstr ""
#: src/strings.ts:1907 #: src/strings.ts:1907
msgid "{count, plural, one {{0} {1}?} other {{2} # {3}?}}" msgid "{count, plural, one {{0} {1}?} other {{2} # {3}?}}"
msgstr "" msgstr ""
@@ -149,10 +113,6 @@ msgstr ""
msgid "{count, plural, one {Are you sure you want to move this notebook to {selectedNotebookTitle}?} other {Are you sure you want to move these # notebooks {selectedNotebookTitle}?}}" msgid "{count, plural, one {Are you sure you want to move this notebook to {selectedNotebookTitle}?} other {Are you sure you want to move these # notebooks {selectedNotebookTitle}?}}"
msgstr "" msgstr ""
#: src/strings.ts:1875
#~ msgid "{count, plural, one {Are you sure you want to permanently delete this {0}? This action is IRREVERSIBLE.} other {Are you sure you want to permanently delete these {1}? This action is IRREVERSIBLE.}}"
#~ msgstr ""
#: src/strings.ts:140 #: src/strings.ts:140
msgid "{count, plural, one {Attach image} other {Attach # images}}" msgid "{count, plural, one {Attach image} other {Attach # images}}"
msgstr "" msgstr ""
@@ -539,10 +499,6 @@ msgstr ""
msgid "Are you sure you want to delete this note permanently?" msgid "Are you sure you want to delete this note permanently?"
msgstr "" msgstr ""
#: src/strings.ts:1468
#~ msgid "Are you sure you want to logout and clear all data stored on this device?"
#~ msgstr ""
#: src/strings.ts:1511 #: src/strings.ts:1511
msgid "Are you sure you want to logout and clear all data stored on THIS DEVICE?" msgid "Are you sure you want to logout and clear all data stored on THIS DEVICE?"
msgstr "" msgstr ""
@@ -605,10 +561,6 @@ msgstr ""
msgid "Attachments cache cleared!" msgid "Attachments cache cleared!"
msgstr "" msgstr ""
#: src/strings.tsx:636
#~ msgid "Audio"
#~ msgstr ""
#: src/strings.ts:721 #: src/strings.ts:721
msgid "Audios" msgid "Audios"
msgstr "" msgstr ""
@@ -674,10 +626,6 @@ msgstr ""
msgid "Automatic updates" msgid "Automatic updates"
msgstr "" msgstr ""
#: src/strings.tsx:1046
#~ msgid "Automatically backup your data at regular intervals"
#~ msgstr ""
#: src/strings.ts:1104 #: src/strings.ts:1104
msgid "Automatically clear trash after a certain period of time" msgid "Automatically clear trash after a certain period of time"
msgstr "" msgstr ""
@@ -714,10 +662,6 @@ msgstr ""
msgid "Background sync (experimental)" msgid "Background sync (experimental)"
msgstr "" msgstr ""
#: src/strings.tsx:1155
#~ msgid "Backing up your data"
#~ msgstr ""
#: src/strings.ts:2129 #: src/strings.ts:2129
msgid "Backup" msgid "Backup"
msgstr "" msgstr ""
@@ -742,10 +686,6 @@ msgstr ""
msgid "Backup encryption" msgid "Backup encryption"
msgstr "" msgstr ""
#: src/strings.tsx:646
#~ msgid "Backup failed"
#~ msgstr ""
#: src/strings.ts:1837 #: src/strings.ts:1837
msgid "Backup files have .nnbackup extension" msgid "Backup files have .nnbackup extension"
msgstr "" msgstr ""
@@ -1092,10 +1032,6 @@ msgstr ""
msgid "Clear trash interval" msgid "Clear trash interval"
msgstr "" msgstr ""
#: src/strings.tsx:1020
#~ msgid "Clear your vault and remove all notes from it"
#~ msgstr ""
#: src/strings.ts:1850 #: src/strings.ts:1850
msgid "" msgid ""
"Clearing attachments cache will perform the following actions:\n" "Clearing attachments cache will perform the following actions:\n"
@@ -1268,10 +1204,6 @@ msgstr ""
msgid "Copied" msgid "Copied"
msgstr "" msgstr ""
#: src/strings.ts:2017
#~ msgid "Copied to clipboard"
#~ msgstr ""
#: src/strings.ts:647 #: src/strings.ts:647
msgid "Copy" msgid "Copy"
msgstr "" msgstr ""
@@ -1292,10 +1224,6 @@ msgstr ""
msgid "Copy internal link" msgid "Copy internal link"
msgstr "" msgstr ""
#: src/strings.tsx:816
#~ msgid "Copy link"
#~ msgstr ""
#: src/strings.ts:2272 #: src/strings.ts:2272
msgid "Copy link text" msgid "Copy link text"
msgstr "" msgstr ""
@@ -1324,10 +1252,6 @@ msgstr ""
msgid "Could not clear trash" msgid "Could not clear trash"
msgstr "" msgstr ""
#: src/strings.tsx:1477
#~ msgid "Could not connect to"
#~ msgstr ""
#: src/strings.ts:1601 #: src/strings.ts:1601
msgid "Could not connect to {server}" msgid "Could not connect to {server}"
msgstr "" msgstr ""
@@ -1348,10 +1272,6 @@ msgstr ""
msgid "Create" msgid "Create"
msgstr "" msgstr ""
#: src/strings.tsx:1043
#~ msgid "Create a backup of your data now"
#~ msgstr ""
#: src/strings.ts:691 #: src/strings.ts:691
msgid "Create a group" msgid "Create a group"
msgstr "" msgstr ""
@@ -1368,10 +1288,6 @@ msgstr ""
msgid "Create a shortcut" msgid "Create a shortcut"
msgstr "" msgstr ""
#: src/strings.tsx:1018
#~ msgid "Create a vault to store your most important notes"
#~ msgstr ""
#: src/strings.ts:1828 #: src/strings.ts:1828
msgid "Create account" msgid "Create account"
msgstr "" msgstr ""
@@ -2286,10 +2202,6 @@ msgstr ""
msgid "File too big" msgid "File too big"
msgstr "" msgstr ""
#: src/strings.tsx:828
#~ msgid "File too large"
#~ msgstr ""
#: src/strings.ts:1452 #: src/strings.ts:1452
msgid "Filter attachments by filename, type or hash" msgid "Filter attachments by filename, type or hash"
msgstr "" msgstr ""
@@ -2766,12 +2678,6 @@ msgstr ""
msgid "It seems that your changes could not be saved. What to do next:" msgid "It seems that your changes could not be saved. What to do next:"
msgstr "" msgstr ""
#: src/strings.tsx:237
#~ msgid ""
#~ "It took us a year to bring Notesnook to life. Share your experience\n"
#~ "and suggestions to help us improve it."
#~ msgstr ""
#: src/strings.ts:281 #: src/strings.ts:281
msgid "It took us a year to bring Notesnook to life. Share your experience and suggestions to help us improve it." msgid "It took us a year to bring Notesnook to life. Share your experience and suggestions to help us improve it."
msgstr "" msgstr ""
@@ -3153,10 +3059,6 @@ msgstr ""
msgid "Meet other privacy-minded people & talk to us directly about your concerns, issues and suggestions." msgid "Meet other privacy-minded people & talk to us directly about your concerns, issues and suggestions."
msgstr "" msgstr ""
#: src/strings.tsx:1621
#~ msgid "Member since"
#~ msgstr ""
#: src/strings.ts:1745 #: src/strings.ts:1745
msgid "Member since {date}" msgid "Member since {date}"
msgstr "" msgstr ""
@@ -3433,10 +3335,6 @@ msgstr ""
msgid "No references found of this note" msgid "No references found of this note"
msgstr "" msgstr ""
#: src/strings.tsx:1357
#~ msgid "No results found for"
#~ msgstr ""
#: src/strings.ts:396 #: src/strings.ts:396
msgid "No results found for \"{query}\"" msgid "No results found for \"{query}\""
msgstr "" msgstr ""
@@ -3638,10 +3536,6 @@ msgstr ""
msgid "Oldest - newest" msgid "Oldest - newest"
msgstr "" msgstr ""
#: src/strings.ts:578
#~ msgid "Once"
#~ msgstr ""
#: src/strings.ts:697 #: src/strings.ts:697
msgid "Once your password is changed, please make sure to save the new account recovery key" msgid "Once your password is changed, please make sure to save the new account recovery key"
msgstr "" msgstr ""
@@ -3803,10 +3697,6 @@ msgstr ""
msgid "PDF is password protected" msgid "PDF is password protected"
msgstr "" msgstr ""
#: src/strings.ts:579
#~ msgid "Permanent"
#~ msgstr ""
#: src/strings.ts:41 #: src/strings.ts:41
msgid "Permanently delete" msgid "Permanently delete"
msgstr "" msgstr ""
@@ -4188,12 +4078,6 @@ msgstr ""
msgid "Published note can only be viewed by someone with the password." msgid "Published note can only be viewed by someone with the password."
msgstr "" msgstr ""
#: src/strings.tsx:232
#~ msgid ""
#~ "Published note link will be automatically deleted once it is\n"
#~ "viewed by someone."
#~ msgstr ""
#: src/strings.ts:277 #: src/strings.ts:277
msgid "Published note link will be automatically deleted once it is viewed by someone." msgid "Published note link will be automatically deleted once it is viewed by someone."
msgstr "" msgstr ""
@@ -4474,10 +4358,6 @@ msgstr ""
msgid "Reorder" msgid "Reorder"
msgstr "" msgstr ""
#: src/strings.ts:577
#~ msgid "Repeat"
#~ msgstr ""
#: src/strings.ts:337 #: src/strings.ts:337
msgid "Repeats daily at {date}" msgid "Repeats daily at {date}"
msgstr "" msgstr ""
@@ -4502,10 +4382,6 @@ msgstr ""
msgid "Report issue" msgid "Report issue"
msgstr "" msgstr ""
#: src/strings.tsx:569
#~ msgid "Resend code ({seconds})"
#~ msgstr ""
#: src/strings.ts:133 #: src/strings.ts:133
msgid "Resend code in ({seconds})" msgid "Resend code in ({seconds})"
msgstr "" msgstr ""
@@ -4615,10 +4491,6 @@ msgstr ""
msgid "Restoring backup..." msgid "Restoring backup..."
msgstr "" msgstr ""
#: src/strings.tsx:1438
#~ msgid "Restoring backups..."
#~ msgstr ""
#: src/strings.ts:658 #: src/strings.ts:658
msgid "Resubscribe from Playstore" msgid "Resubscribe from Playstore"
msgstr "" msgstr ""
@@ -4768,10 +4640,6 @@ msgstr ""
msgid "Search a note to link to" msgid "Search a note to link to"
msgstr "" msgstr ""
#: src/strings.tsx:1343
#~ msgid "Search a section of a note to link to"
#~ msgstr ""
#: src/strings.ts:2383 #: src/strings.ts:2383
msgid "Search languages" msgid "Search languages"
msgstr "" msgstr ""
@@ -4788,10 +4656,6 @@ msgstr ""
msgid "Search themes" msgid "Search themes"
msgstr "" msgstr ""
#: src/strings.tsx:1350
#~ msgid "Searching for"
#~ msgstr ""
#: src/strings.ts:1484 #: src/strings.ts:1484
msgid "Searching for {query}" msgid "Searching for {query}"
msgstr "" msgstr ""
@@ -4844,10 +4708,6 @@ msgstr ""
msgid "Select date" msgid "Select date"
msgstr "" msgstr ""
#: src/strings.tsx:290
#~ msgid "Select day of the month to repeat the reminder."
#~ msgstr ""
#: src/strings.ts:340 #: src/strings.ts:340
msgid "Select day of the week to repeat the reminder." msgid "Select day of the week to repeat the reminder."
msgstr "" msgstr ""
@@ -5032,10 +4892,6 @@ msgstr ""
msgid "Setup a new password for app lock" msgid "Setup a new password for app lock"
msgstr "" msgstr ""
#: src/strings.tsx:1019
#~ msgid "Setup a new password for your vault."
#~ msgstr ""
#: src/strings.ts:1161 #: src/strings.ts:1161
msgid "Setup a password to lock the app" msgid "Setup a password to lock the app"
msgstr "" msgstr ""
@@ -5505,10 +5361,6 @@ msgstr ""
msgid "Text direction" msgid "Text direction"
msgstr "" msgstr ""
#: src/strings.tsx:1628
#~ msgid "Thank you for choosing end-to-end encrypted note taking."
#~ msgstr ""
#: src/strings.ts:1752 #: src/strings.ts:1752
msgid "Thank you for choosing end-to-end encrypted note taking. Now you can sync your notes to unlimited devices." msgid "Thank you for choosing end-to-end encrypted note taking. Now you can sync your notes to unlimited devices."
msgstr "" msgstr ""
@@ -5553,14 +5405,6 @@ msgstr ""
msgid "The security key for unlocking the app. This is the most secure method." msgid "The security key for unlocking the app. This is the most secure method."
msgstr "" msgstr ""
#: src/strings.tsx:1465
#~ msgid "The server version is not compatible with the app."
#~ msgstr ""
#: src/strings.tsx:1463
#~ msgid "The URL you have given ({url}) does not point to the"
#~ msgstr ""
#: src/strings.ts:1603 #: src/strings.ts:1603
msgid "The URL you have given ({url}) does not point to the {server}" msgid "The URL you have given ({url}) does not point to the {server}"
msgstr "" msgstr ""
@@ -5699,10 +5543,6 @@ msgstr ""
msgid "Trash" msgid "Trash"
msgstr "" msgstr ""
#: src/strings.tsx:1160
#~ msgid "Trash cleared"
#~ msgstr ""
#: src/strings.ts:1284 #: src/strings.ts:1284
msgid "Trash cleared successfully!" msgid "Trash cleared successfully!"
msgstr "" msgstr ""
@@ -5767,10 +5607,6 @@ msgstr ""
msgid "Type a keyword" msgid "Type a keyword"
msgstr "" msgstr ""
#: src/strings.tsx:1349
#~ msgid "Type a keyword to search in"
#~ msgstr ""
#: src/strings.ts:1507 #: src/strings.ts:1507
msgid "Type a keyword to search in {0}" msgid "Type a keyword to search in {0}"
msgstr "" msgstr ""
@@ -6040,14 +5876,6 @@ msgstr ""
msgid "Use this if changes made on this device are not appearing on other devices. This will overwrite the data on the server with the data from this device.\\n\\nThis must only be used for troubleshooting. Using it regularly for sync is not recommended and will lead to unexpected data loss and other issues. If you are having persistent issues with sync, please report them to us at support@streetwriters.co." msgid "Use this if changes made on this device are not appearing on other devices. This will overwrite the data on the server with the data from this device.\\n\\nThis must only be used for troubleshooting. Using it regularly for sync is not recommended and will lead to unexpected data loss and other issues. If you are having persistent issues with sync, please report them to us at support@streetwriters.co."
msgstr "" msgstr ""
#: src/strings.tsx:948
#~ msgid "Use this if some changes are not appearing on other devices from this device. This will push everything to the server and overwrite with whatever is on this device.\\n\\nThese must only be used for troubleshooting. Using them regularly for sync is not recommended and will lead to unexpected data loss and other issues. If you are having persistent issues with sync, please report them to us at support@streetwriters.co."
#~ msgstr ""
#: src/strings.tsx:943
#~ msgid "Use this if some changes are not appearing on this device from other devices. This will pull everything from the server and overwrite with whatever is one this device.\\n\\nThese must only be used for troubleshooting. Using them regularly for sync is not recommended and will lead to unexpected data loss and other issues. If you are having persistent issues with sync, please report them to us at support@streetwriters.co."
#~ msgstr ""
#: src/strings.ts:998 #: src/strings.ts:998
msgid "User verification failed" msgid "User verification failed"
msgstr "" msgstr ""
@@ -6084,10 +5912,6 @@ msgstr ""
msgid "Verification email sent" msgid "Verification email sent"
msgstr "" msgstr ""
#: src/strings.tsx:880
#~ msgid "Verification failed"
#~ msgstr ""
#: src/strings.ts:554 #: src/strings.ts:554
msgid "Verify" msgid "Verify"
msgstr "" msgstr ""
@@ -6490,10 +6314,6 @@ msgstr ""
msgid "Your monographs" msgid "Your monographs"
msgstr "" msgstr ""
#: src/strings.ts:1231
#~ msgid "Your name is end-to-end encrypted and only visible to you."
#~ msgstr ""
#: src/strings.ts:1271 #: src/strings.ts:1271
msgid "Your name is stored 100% end-to-end encrypted and only visible to you." msgid "Your name is stored 100% end-to-end encrypted and only visible to you."
msgstr "" msgstr ""

View File

@@ -18,6 +18,7 @@
"typescript": "5.5.3", "typescript": "5.5.3",
"vite": "^5.4.8", "vite": "^5.4.8",
"vite-plugin-dts": "^4.2.3", "vite-plugin-dts": "^4.2.3",
"vite-plugin-static-copy": "^2.0.0",
"vite-plugin-swc-transform": "^1.0.1" "vite-plugin-swc-transform": "^1.0.1"
}, },
"peerDependencies": { "peerDependencies": {
@@ -1158,6 +1159,24 @@
"node": ">=16.0.0" "node": ">=16.0.0"
} }
}, },
"node_modules/@lingui/react": {
"version": "4.11.4",
"resolved": "https://registry.npmjs.org/@lingui/react/-/react-4.11.4.tgz",
"integrity": "sha512-f7re4HhjI6CLBV1CY/PcI3VYP5zS4rtfU33speWnfkymsxGIXQv4ol3BqrgPLGhypMl2nKcL5nfL+LewrLIW8g==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/runtime": "^7.20.13",
"@lingui/core": "4.11.4"
},
"engines": {
"node": ">=16.0.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@lingui/swc-plugin": { "node_modules/@lingui/swc-plugin": {
"version": "4.0.10", "version": "4.0.10",
"resolved": "https://registry.npmjs.org/@lingui/swc-plugin/-/swc-plugin-4.0.10.tgz", "resolved": "https://registry.npmjs.org/@lingui/swc-plugin/-/swc-plugin-4.0.10.tgz",
@@ -1316,6 +1335,44 @@
"resolve": "~1.22.2" "resolve": "~1.22.2"
} }
}, },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@nodelib/fs.stat": "2.0.5",
"run-parallel": "^1.1.9"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/@nodelib/fs.stat": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 8"
}
},
"node_modules/@nodelib/fs.walk": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
"integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@nodelib/fs.scandir": "2.1.5",
"fastq": "^1.6.0"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/@rollup/pluginutils": { "node_modules/@rollup/pluginutils": {
"version": "5.1.2", "version": "5.1.2",
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.2.tgz", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.2.tgz",
@@ -2846,6 +2903,33 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/fast-glob": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
"integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
"dev": true,
"license": "MIT",
"dependencies": {
"@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3",
"glob-parent": "^5.1.2",
"merge2": "^1.3.0",
"micromatch": "^4.0.4"
},
"engines": {
"node": ">=8.6.0"
}
},
"node_modules/fastq": {
"version": "1.17.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",
"integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==",
"dev": true,
"license": "ISC",
"dependencies": {
"reusify": "^1.0.4"
}
},
"node_modules/figures": { "node_modules/figures": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
@@ -3663,17 +3747,28 @@
"@jridgewell/sourcemap-codec": "^1.5.0" "@jridgewell/sourcemap-codec": "^1.5.0"
} }
}, },
"node_modules/micromatch": { "node_modules/merge2": {
"version": "4.0.2", "version": "1.4.1",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
"integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
"dev": true, "dev": true,
"license": "MIT",
"engines": {
"node": ">= 8"
}
},
"node_modules/micromatch": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"braces": "^3.0.1", "braces": "^3.0.3",
"picomatch": "^2.0.5" "picomatch": "^2.3.1"
}, },
"engines": { "engines": {
"node": ">=8" "node": ">=8.6"
} }
}, },
"node_modules/mimic-fn": { "node_modules/mimic-fn": {
@@ -4140,6 +4235,27 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT"
},
"node_modules/ramda": { "node_modules/ramda": {
"version": "0.27.2", "version": "0.27.2",
"resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.2.tgz", "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.2.tgz",
@@ -4246,6 +4362,17 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/reusify": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
"dev": true,
"license": "MIT",
"engines": {
"iojs": ">=1.0.0",
"node": ">=0.10.0"
}
},
"node_modules/rollup": { "node_modules/rollup": {
"version": "4.24.0", "version": "4.24.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz",
@@ -4291,6 +4418,30 @@
"node": ">=0.12.0" "node": ">=0.12.0"
} }
}, },
"node_modules/run-parallel": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
"integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT",
"dependencies": {
"queue-microtask": "^1.2.2"
}
},
"node_modules/rxjs": { "node_modules/rxjs": {
"version": "6.6.7", "version": "6.6.7",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
@@ -4700,6 +4851,101 @@
} }
} }
}, },
"node_modules/vite-plugin-static-copy": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/vite-plugin-static-copy/-/vite-plugin-static-copy-2.0.0.tgz",
"integrity": "sha512-b/quFjTUa/RY9t3geIyeeT2GtWEoRI0GawYFFjys5iMLGgVP638NTGu0RoMjwmi8MoZZ3BQw4OQvb1GpVcXZDA==",
"dev": true,
"license": "MIT",
"dependencies": {
"chokidar": "^3.5.3",
"fast-glob": "^3.2.11",
"fs-extra": "^11.1.0",
"picocolors": "^1.0.0"
},
"engines": {
"node": "^18.0.0 || >=20.0.0"
},
"peerDependencies": {
"vite": "^5.0.0"
}
},
"node_modules/vite-plugin-static-copy/node_modules/chokidar": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"dev": true,
"license": "MIT",
"dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
},
"engines": {
"node": ">= 8.10.0"
},
"funding": {
"url": "https://paulmillr.com/funding/"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/vite-plugin-static-copy/node_modules/fs-extra": {
"version": "11.2.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
"dev": true,
"license": "MIT",
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=14.14"
}
},
"node_modules/vite-plugin-static-copy/node_modules/jsonfile": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"universalify": "^2.0.0"
},
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
},
"node_modules/vite-plugin-static-copy/node_modules/readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
"license": "MIT",
"dependencies": {
"picomatch": "^2.2.1"
},
"engines": {
"node": ">=8.10.0"
}
},
"node_modules/vite-plugin-static-copy/node_modules/universalify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
"integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 10.0.0"
}
},
"node_modules/vite-plugin-swc-transform": { "node_modules/vite-plugin-swc-transform": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/vite-plugin-swc-transform/-/vite-plugin-swc-transform-1.0.1.tgz", "resolved": "https://registry.npmjs.org/vite-plugin-swc-transform/-/vite-plugin-swc-transform-1.0.1.tgz",

View File

@@ -6,14 +6,17 @@
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"exports": { "exports": {
"require": { ".": {
"types": "./dist/index.d.ts", "require": {
"default": "./dist/index.js" "types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
}
}, },
"import": { "./locales/*.json": "./dist/locales/*.json"
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
}
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@@ -23,9 +26,9 @@
"extract": "lingui extract", "extract": "lingui extract",
"compile": "lingui compile --typescript", "compile": "lingui compile --typescript",
"build-locale": "npm run extract && npm run compile", "build-locale": "npm run extract && npm run compile",
"clean": "rm -rf dist && rm -rf locales", "build": "npm run build-locale && npx vite build && node scripts/postbuild.mjs",
"build": "npm run build-locale && npx vite build", "watch": "nodemon --watch ./src/*.ts --exec \"npx vite build\"",
"watch": "nodemon --watch ./src/*.ts --exec \"npx vite build\"" "postinstall": "patch-package"
}, },
"devDependencies": { "devDependencies": {
"@lingui/cli": "^4.11.4", "@lingui/cli": "^4.11.4",
@@ -37,6 +40,7 @@
"typescript": "5.5.3", "typescript": "5.5.3",
"vite": "^5.4.8", "vite": "^5.4.8",
"vite-plugin-dts": "^4.2.3", "vite-plugin-dts": "^4.2.3",
"vite-plugin-static-copy": "^2.0.0",
"vite-plugin-swc-transform": "^1.0.1" "vite-plugin-swc-transform": "^1.0.1"
}, },
"peerDependencies": { "peerDependencies": {

View File

@@ -0,0 +1,16 @@
diff --git a/node_modules/@lingui/cli/dist/api/pseudoLocalize.js b/node_modules/@lingui/cli/dist/api/pseudoLocalize.js
index 34f3952..83cbc1e 100644
--- a/node_modules/@lingui/cli/dist/api/pseudoLocalize.js
+++ b/node_modules/@lingui/cli/dist/api/pseudoLocalize.js
@@ -48,8 +48,9 @@ function default_1(message) {
message = addDelimiters(message);
message = (0, pseudolocale_1.default)(message, {
delimiter,
- prepend: "",
- append: "",
+ prepend: "[!!",
+ append: "!!]",
+ extend: 0.3
});
return removeDelimiters(message);
}

View File

@@ -0,0 +1,33 @@
/*
This file is part of the Notesnook project (https://notesnook.com/)
Copyright (C) 2023 Streetwriters (Private) Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { cp } from "fs/promises";
import path from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
await cp(
path.join(__dirname, "..", "locales"),
path.join(__dirname, "..", "dist/locales"),
{
recursive: true
}
);

View File

@@ -17,13 +17,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
import { messages as _$en } from "../locales/$en.json"; export type { Messages } from "@lingui/core";
import { messages as _$de } from "../locales/$de.json";
import { messages as _$fr } from "../locales/$fr.json";
import type { Messages } from "@lingui/core";
export const $en = _$en as Messages;
export const $de = _$de as Messages;
export const $fr = _$fr as Messages;
export { strings } from "./strings"; export { strings } from "./strings";
export { setI18nGlobal } from "./setup"; export { setI18nGlobal } from "./setup";