diff --git a/chrome-extension/package.json b/chrome-extension/package.json index 14bd5d1..e00d447 100644 --- a/chrome-extension/package.json +++ b/chrome-extension/package.json @@ -24,6 +24,7 @@ "@laynezh/vite-plugin-lib-assets": "^0.5.21", "@types/pako": "^2.0.3", "@types/ws": "^8.5.10", + "@univer-clipsheet-core/locale": "workspace:*", "@univer-clipsheet-core/scraper": "workspace:*", "@univer-clipsheet-core/shared": "workspace:*", "@univer-clipsheet-core/table": "workspace:*", diff --git a/chrome-extension/public/_locales/en/messages.json b/chrome-extension/public/_locales/en/messages.json deleted file mode 100644 index e9d6c05..0000000 --- a/chrome-extension/public/_locales/en/messages.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extensionDescription": { - "description": "Extension description", - "message": "Use AI to help you extract all table data from public web pages and generate sheets." - }, - "extensionName": { - "description": "Extension name", - "message": "Univer ClipSheet - An AI-driven one-click solution for web scraping" - } -} diff --git a/chrome-extension/vite.config.ts b/chrome-extension/vite.config.ts index 3576654..cfc66bd 100644 --- a/chrome-extension/vite.config.ts +++ b/chrome-extension/vite.config.ts @@ -3,6 +3,7 @@ import process from 'node:process'; import { defineConfig } from 'vite'; import libAssetsPlugin from '@laynezh/vite-plugin-lib-assets'; import { watchRebuildPlugin } from '@univer-clipsheet/hmr'; +import { copyLocalesPlugin } from '@univer-clipsheet-core/locale'; import makeManifestPlugin from './utils/plugins/make-manifest-plugin'; const rootDir = resolve(__dirname); @@ -21,6 +22,9 @@ export default defineConfig({ }, }, plugins: [ + copyLocalesPlugin({ + packageName: '@univer-clipsheet-core/locale', + }), libAssetsPlugin({ outputPath: outDir, }), diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 33f8e64..bf08643 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -109,6 +109,9 @@ importers: '@types/ws': specifier: ^8.5.10 version: 8.5.10 + '@univer-clipsheet-core/locale': + specifier: workspace:* + version: link:../submodules/univer-clipsheet-core/packages/locale '@univer-clipsheet-core/scraper': specifier: workspace:* version: link:../submodules/univer-clipsheet-core/packages/scraper