fix i18n files missing and Toast messages (#634)

* fix Toast messages

* Copy i18n files to dist using
vite-plugin-static-copy
This commit is contained in:
Kimberly Graham
2025-05-28 13:55:45 -04:00
committed by GitHub
parent 24e9764fcb
commit 08dbe94679
4 changed files with 77 additions and 3 deletions

66
deno.lock generated
View File

@@ -76,6 +76,7 @@
"npm:vite-plugin-i18n-ally@^6.0.1": "6.0.1_vite@6.3.4__@types+node@22.15.3__picomatch@4.0.2_@types+node@22.15.3",
"npm:vite-plugin-node-polyfills@0.23": "0.23.0_vite@6.3.4__@types+node@22.15.3__picomatch@4.0.2_@types+node@22.15.3",
"npm:vite-plugin-pwa@1": "1.0.0_vite@6.3.4__@types+node@22.15.3__picomatch@4.0.2_workbox-build@7.3.0__ajv@8.17.1__@babel+core@7.27.1__rollup@2.79.2_workbox-window@7.3.0_@types+node@22.15.3",
"npm:vite-plugin-static-copy@3": "3.0.0_vite@6.3.4__@types+node@22.15.3__picomatch@4.0.2_@types+node@22.15.3",
"npm:vite@^6.3.4": "6.3.4_@types+node@22.15.3_picomatch@4.0.2",
"npm:vitest@^3.1.2": "3.1.2_@types+node@22.15.3_happy-dom@17.4.6_vite@6.3.4__@types+node@22.15.3__picomatch@4.0.2",
"npm:zod@^3.24.3": "3.24.3",
@@ -3971,6 +3972,13 @@
"ansi-styles@5.2.0": {
"integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="
},
"anymatch@3.1.3": {
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dependencies": [
"normalize-path",
"picomatch@2.3.1"
]
},
"argparse@2.0.1": {
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
@@ -4096,6 +4104,9 @@
"bignumber.js@9.3.0": {
"integrity": "sha512-EM7aMFTXbptt/wZdMlBv2t8IViwQL+h6SLHosp8Yf0dqJMTnY6iL32opnAB6kAdL0SZPuvcAzFr31o0c/R3/RA=="
},
"binary-extensions@2.3.0": {
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="
},
"bn.js@4.12.2": {
"integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw=="
},
@@ -4289,6 +4300,21 @@
"check-error@2.1.1": {
"integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw=="
},
"chokidar@3.6.0": {
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"dependencies": [
"anymatch",
"braces",
"glob-parent",
"is-binary-path",
"is-glob",
"normalize-path",
"readdirp"
],
"optionalDependencies": [
"fsevents"
]
},
"chownr@3.0.0": {
"integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g=="
},
@@ -4845,6 +4871,14 @@
"fraction.js@4.3.7": {
"integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew=="
},
"fs-extra@11.3.0": {
"integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==",
"dependencies": [
"graceful-fs",
"jsonfile",
"universalify"
]
},
"fs-extra@9.1.0": {
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
"dependencies": [
@@ -5171,6 +5205,12 @@
"has-bigints"
]
},
"is-binary-path@2.1.0": {
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dependencies": [
"binary-extensions"
]
},
"is-boolean-object@1.2.2": {
"integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==",
"dependencies": [
@@ -5714,6 +5754,9 @@
"vm-browserify"
]
},
"normalize-path@3.0.0": {
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
},
"normalize-range@0.1.2": {
"integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA=="
},
@@ -5782,6 +5825,9 @@
"p-limit@4.0.0"
]
},
"p-map@7.0.3": {
"integrity": "sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA=="
},
"pako@1.0.11": {
"integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
},
@@ -6109,6 +6155,12 @@
"util-deprecate"
]
},
"readdirp@3.6.0": {
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dependencies": [
"picomatch@2.3.1"
]
},
"redent@3.0.0": {
"integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==",
"dependencies": [
@@ -6962,6 +7014,17 @@
"workbox-window"
]
},
"vite-plugin-static-copy@3.0.0_vite@6.3.4__@types+node@22.15.3__picomatch@4.0.2_@types+node@22.15.3": {
"integrity": "sha512-Uki9pPUQ4ZnoMEdIFabvoh9h6Bh9Q1m3iF7BrZvoiF30reREpJh2gZb4jOnW1/uYFzyRiLCmFSkM+8hwiq1vWQ==",
"dependencies": [
"chokidar",
"fs-extra@11.3.0",
"p-map",
"picocolors",
"tinyglobby",
"vite"
]
},
"vite@6.3.4_@types+node@22.15.3_picomatch@4.0.2": {
"integrity": "sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==",
"dependencies": [
@@ -7147,7 +7210,7 @@
"ajv",
"common-tags",
"fast-json-stable-stringify",
"fs-extra",
"fs-extra@9.1.0",
"glob",
"lodash",
"pretty-bytes@5.6.0",
@@ -7376,6 +7439,7 @@
"npm:vite-plugin-i18n-ally@^6.0.1",
"npm:vite-plugin-node-polyfills@0.23",
"npm:vite-plugin-pwa@1",
"npm:vite-plugin-static-copy@3",
"npm:vite@^6.3.4",
"npm:vitest@^3.1.2",
"npm:zod@^3.24.3",

View File

@@ -112,6 +112,7 @@
"typescript": "^5.8.3",
"vite": "^6.3.4",
"vite-plugin-pwa": "^1.0.0",
"vite-plugin-static-copy": "^3.0.0",
"vitest": "^3.1.2"
}
}

View File

@@ -297,8 +297,8 @@ export const MessagesPage = () => {
onClick() {
toast({
title: otherNode.user?.publicKey?.length
? t("toast.pkiEncryption")
: t("toast.pskEncryption"),
? t("toast.messages.pkiEncryption.title")
: t("toast.messages.pskEncryption.title"),
});
},
},

View File

@@ -1,6 +1,7 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { VitePWA } from "vite-plugin-pwa";
import { viteStaticCopy } from "vite-plugin-static-copy";
import { execSync } from "node:child_process";
import process from "node:process";
import path from "node:path";
@@ -27,6 +28,14 @@ export default defineConfig({
sourcemap: true,
},
}),
viteStaticCopy({
targets: [
{
src: "src/i18n/locales/**/*",
dest: "src/i18n/locales"
}
]
}),
],
define: {
"import.meta.env.VITE_COMMIT_HASH": JSON.stringify(hash),