From 6062a38b99f54194470ffce49f652ae8210d6df9 Mon Sep 17 00:00:00 2001 From: Julian Freeman Date: Fri, 17 Apr 2026 17:26:55 -0400 Subject: [PATCH] i18n --- src/App.vue | 16 ++++----- .../browser-data/AssociatedProfilesModal.vue | 36 ++++++++++++------- .../browser-data/BookmarkRemovalModal.vue | 17 ++++----- src/components/browser-data/BookmarksList.vue | 16 ++++----- .../browser-data/BrowserDataView.vue | 22 ++++++------ .../browser-data/ExtensionRemovalModal.vue | 20 ++++------- .../browser-data/ExtensionsList.vue | 20 +++++------ .../browser-data/HistoryCleanupList.vue | 26 +++++++------- .../browser-data/HistoryCleanupModal.vue | 18 +++++----- .../browser-data/PasswordSitesList.vue | 8 ++--- src/components/browser-data/ProfilesList.vue | 14 ++++---- src/components/config/ConfigurationView.vue | 30 ++++++++-------- src/components/sidebar/AppSidebar.vue | 10 +++--- src/composables/useBrowserManager.ts | 24 ++++++------- 14 files changed, 137 insertions(+), 140 deletions(-) diff --git a/src/App.vue b/src/App.vue index 0f058cd..d8fa602 100644 --- a/src/App.vue +++ b/src/App.vue @@ -145,9 +145,9 @@ const {
-

Scanning

-

Reading local browser data

-

Profiles, extensions, bookmarks, and saved login sites are being collected.

+

扫描中

+

正在读取本地浏览器数据

+

正在收集用户资料、插件、书签和已保存登录站点。

- {{ profile.installSource === "store" ? "Store" : "External" }} + {{ profile.installSource === "store" ? "商店安装" : "外部安装" }}
- {{ isOpeningProfile(browserId, profile.id) ? "Opening..." : "Open" }} + {{ isOpeningProfile(browserId, profile.id) ? "打开中..." : "打开" }}
@@ -217,12 +217,22 @@ function isSelected(profileId: string) { align-items: center; justify-content: space-between; gap: 12px; + min-width: 0; } .modal-header h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; + min-width: 0; + flex: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.modal-close-button { + flex-shrink: 0; } .modal-table { diff --git a/src/components/browser-data/BookmarkRemovalModal.vue b/src/components/browser-data/BookmarkRemovalModal.vue index b0f129b..c5f9ef8 100644 --- a/src/components/browser-data/BookmarkRemovalModal.vue +++ b/src/components/browser-data/BookmarkRemovalModal.vue @@ -52,19 +52,18 @@ const resultSummary = computed(() => { diff --git a/src/components/browser-data/BookmarksList.vue b/src/components/browser-data/BookmarksList.vue index b51548b..0b90a2f 100644 --- a/src/components/browser-data/BookmarksList.vue +++ b/src/components/browser-data/BookmarksList.vue @@ -47,7 +47,7 @@ function isSelected(url: string) { - Select All + 全选
-
Pick
- +
选择
+ -
Actions
+
操作
@@ -89,7 +89,7 @@ function isSelected(url: string) {
{{ bookmark.url }}
-

No bookmarks were discovered for this browser.

+

这个浏览器没有扫描到任何书签。

diff --git a/src/components/browser-data/BrowserDataView.vue b/src/components/browser-data/BrowserDataView.vue index 30af56a..4cb72fe 100644 --- a/src/components/browser-data/BrowserDataView.vue +++ b/src/components/browser-data/BrowserDataView.vue @@ -126,7 +126,7 @@ const emit = defineEmits<{ type="button" @click="emit('update:activeSection', 'profiles')" > - Profiles + 资料 {{ sectionCount("profiles") }} @@ -233,7 +233,7 @@ const emit = defineEmits<{ { diff --git a/src/components/browser-data/ExtensionsList.vue b/src/components/browser-data/ExtensionsList.vue index 4453eef..deb7f5f 100644 --- a/src/components/browser-data/ExtensionsList.vue +++ b/src/components/browser-data/ExtensionsList.vue @@ -47,7 +47,7 @@ function isSelected(extensionId: string) { - Select All + 全选
-
Pick
-
Icon
- - -
Actions
+
选择
+
图标
+ + +
操作
@@ -94,7 +94,7 @@ function isSelected(extensionId: string) {
{{ extension.id }}
-

No extensions were discovered for this browser.

+

这个浏览器没有扫描到任何插件。

diff --git a/src/components/browser-data/HistoryCleanupList.vue b/src/components/browser-data/HistoryCleanupList.vue index bf7e56e..907c529 100644 --- a/src/components/browser-data/HistoryCleanupList.vue +++ b/src/components/browser-data/HistoryCleanupList.vue @@ -37,7 +37,7 @@ const allSelected = computed( ); function statusLabel(status: CleanupFileStatus) { - return status === "found" ? "Found" : "Missing"; + return status === "found" ? "存在" : "缺失"; } function statusClass(status: CleanupFileStatus) { @@ -79,7 +79,7 @@ function hasAnyHistoryFile(statuses: CleanupFileStatus[]) { - Select All + 全选
-
Pick
-
Avatar
-
Profile
-
History
-
Top Sites
-
Visited Links
-
Sessions
-
Action
+
选择
+
头像
+
资料
+
历史记录
+
热门站点
+
访问链接
+
会话
+
操作
@@ -158,14 +158,14 @@ function hasAnyHistoryFile(statuses: CleanupFileStatus[]) { :disabled="!isSelectable(profile) || cleanupBusy" @click="emit('cleanupProfile', profile.id)" > - Clean + 清理
-

No profile directories were found for this browser.

+

这个浏览器没有找到任何用户资料目录。

diff --git a/src/components/browser-data/HistoryCleanupModal.vue b/src/components/browser-data/HistoryCleanupModal.vue index 244e496..47d0414 100644 --- a/src/components/browser-data/HistoryCleanupModal.vue +++ b/src/components/browser-data/HistoryCleanupModal.vue @@ -22,14 +22,14 @@ const emit = defineEmits<{ @@ -60,19 +60,19 @@ const emit = defineEmits<{ {{ result.profileId }}

{{ result.error }}

- Deleted {{ result.deletedFiles.join(", ") }} + 已删除:{{ result.deletedFiles.join("、") }}

- Nothing was deleted. + 没有删除任何文件。

- Missing {{ result.skippedFiles.join(", ") }} + 已跳过(不存在):{{ result.skippedFiles.join("、") }}

diff --git a/src/components/browser-data/PasswordSitesList.vue b/src/components/browser-data/PasswordSitesList.vue index 08aedf8..4083484 100644 --- a/src/components/browser-data/PasswordSitesList.vue +++ b/src/components/browser-data/PasswordSitesList.vue @@ -16,9 +16,9 @@ const emit = defineEmits<{
- + -
Profiles
+
关联资料
{{ passwordSite.url }}
@@ -40,7 +40,7 @@ const emit = defineEmits<{
-

No saved login sites were discovered for this browser.

+

这个浏览器没有扫描到任何已保存登录站点。

diff --git a/src/components/browser-data/ProfilesList.vue b/src/components/browser-data/ProfilesList.vue index ff6829f..a655834 100644 --- a/src/components/browser-data/ProfilesList.vue +++ b/src/components/browser-data/ProfilesList.vue @@ -25,11 +25,11 @@ const emit = defineEmits<{
-
Avatar
- - - -
Action
+
头像
+ + + +
操作
@@ -57,14 +57,14 @@ const emit = defineEmits<{ type="button" @click="emit('openProfile', browserId, profile.id)" > - {{ isOpeningProfile(browserId, profile.id) ? "Opening..." : "Open" }} + {{ isOpeningProfile(browserId, profile.id) ? "打开中..." : "打开" }}
-

No profile directories were found for this browser.

+

这个浏览器没有找到任何用户资料目录。

diff --git a/src/components/config/ConfigurationView.vue b/src/components/config/ConfigurationView.vue index bd6233b..44238e2 100644 --- a/src/components/config/ConfigurationView.vue +++ b/src/components/config/ConfigurationView.vue @@ -45,28 +45,28 @@ const iconOptions = computed(() =>
-

Add Custom Browser

+

添加自定义浏览器

@@ -107,14 +107,14 @@ const iconOptions = computed(() => :disabled="savingConfig" @click="emit('createConfig')" > - {{ savingConfig ? "Saving..." : "Add Config" }} + {{ savingConfig ? "保存中..." : "添加配置" }}
-

Loading browser configs...

+

正在加载浏览器配置...

:disabled="isDeletingConfig(config.id)" @click="emit('deleteConfig', config.id)" > - {{ isDeletingConfig(config.id) ? "Deleting..." : "Delete" }} + {{ isDeletingConfig(config.id) ? "删除中..." : "删除" }}
- Executable -

{{ config.executablePath || "Not resolved" }}

+ 可执行文件 +

{{ config.executablePath || "未解析" }}

- User Data + 用户资料

{{ config.userDataPath }}

diff --git a/src/components/sidebar/AppSidebar.vue b/src/components/sidebar/AppSidebar.vue index d859508..e7e671a 100644 --- a/src/components/sidebar/AppSidebar.vue +++ b/src/components/sidebar/AppSidebar.vue @@ -22,7 +22,7 @@ const emit = defineEmits<{ diff --git a/src/composables/useBrowserManager.ts b/src/composables/useBrowserManager.ts index cc6627d..95fa166 100644 --- a/src/composables/useBrowserManager.ts +++ b/src/composables/useBrowserManager.ts @@ -165,7 +165,7 @@ export function useBrowserManager() { browserConfigs.value = result.configs; } catch (loadError) { configError.value = - loadError instanceof Error ? loadError.message : "Failed to load browser configs."; + loadError instanceof Error ? loadError.message : "加载浏览器配置失败。"; } finally { configsLoading.value = false; } @@ -181,7 +181,7 @@ export function useBrowserManager() { error.value = scanError instanceof Error ? scanError.message - : "Failed to scan browser data."; + : "扫描浏览器数据失败。"; } finally { loading.value = false; } @@ -205,7 +205,7 @@ export function useBrowserManager() { openProfileError.value = openError instanceof Error ? openError.message - : "Failed to open the selected browser profile."; + : "打开所选浏览器资料失败。"; } finally { openingProfileKey.value = ""; } @@ -229,7 +229,7 @@ export function useBrowserManager() { await scanBrowsers(); } catch (saveError) { configError.value = - saveError instanceof Error ? saveError.message : "Failed to create browser config."; + saveError instanceof Error ? saveError.message : "创建浏览器配置失败。"; } finally { savingConfig.value = false; } @@ -247,7 +247,7 @@ export function useBrowserManager() { await scanBrowsers(); } catch (deleteError) { configError.value = - deleteError instanceof Error ? deleteError.message : "Failed to delete browser config."; + deleteError instanceof Error ? deleteError.message : "删除浏览器配置失败。"; } finally { deletingConfigId.value = ""; } @@ -348,7 +348,7 @@ export function useBrowserManager() { if (!extension || !currentBrowser.value) return; extensionModalSelectedProfileIds.value = []; associatedProfilesModal.value = { - title: `${extension.name} Profiles`, + title: extension.name, browserId: currentBrowser.value.browserId, profiles: extension.profiles, isBookmark: false, @@ -362,7 +362,7 @@ export function useBrowserManager() { if (!bookmark || !currentBrowser.value) return; bookmarkModalSelectedProfileIds.value = []; associatedProfilesModal.value = { - title: `${bookmark.title} Profiles`, + title: bookmark.title, browserId: currentBrowser.value.browserId, profiles: bookmark.profiles, isBookmark: true, @@ -374,7 +374,7 @@ export function useBrowserManager() { const passwordSite = currentBrowser.value?.passwordSites.find((item) => item.url === url); if (!passwordSite || !currentBrowser.value) return; associatedProfilesModal.value = { - title: `${passwordSite.domain} Profiles`, + title: passwordSite.domain, browserId: currentBrowser.value.browserId, profiles: passwordSite.profiles, isBookmark: false, @@ -523,7 +523,7 @@ export function useBrowserManager() { cleanupHistoryError.value = cleanupErrorValue instanceof Error ? cleanupErrorValue.message - : "Failed to clean history files."; + : "清理历史文件失败。"; historyCleanupResultOpen.value = true; } finally { historyCleanupBusy.value = false; @@ -687,7 +687,7 @@ export function useBrowserManager() { } else { associatedProfilesModal.value = { ...associatedProfilesModal.value, - title: `${currentBookmark.title} Profiles`, + title: currentBookmark.title, profiles: currentBookmark.profiles, }; bookmarkModalSelectedProfileIds.value = bookmarkModalSelectedProfileIds.value.filter((id) => @@ -723,7 +723,7 @@ export function useBrowserManager() { } catch (removeError) { resetBookmarkRemovalConfirmState(); bookmarkRemovalError.value = - removeError instanceof Error ? removeError.message : "Failed to remove bookmarks."; + removeError instanceof Error ? removeError.message : "删除书签失败。"; bookmarkRemovalResultOpen.value = true; } finally { bookmarkDeleteBusy.value = false; @@ -932,7 +932,7 @@ export function useBrowserManager() { } catch (removeError) { resetExtensionRemovalConfirmState(); extensionRemovalError.value = - removeError instanceof Error ? removeError.message : "Failed to remove extensions."; + removeError instanceof Error ? removeError.message : "删除插件失败。"; extensionRemovalResultOpen.value = true; } finally { extensionDeleteBusy.value = false;