Skip to content

Commit 5e9a337

Browse files
committed
update i18n
1 parent b9a819e commit 5e9a337

File tree

11 files changed

+109
-326
lines changed

11 files changed

+109
-326
lines changed

src-tauri/src/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::mcp_server::{
2-
get_server_address, is_server_running, start_server, start_server_with_permissions, stop_server,
2+
get_server_address, is_server_running, start_server_with_permissions, stop_server,
33
};
44
use tauri::Manager;
55
use tauri_plugin_sql::{Migration, MigrationKind};

src-tauri/src/mcp_server.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pub struct CreateSnippetRequest {
3434
}
3535

3636
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
37+
#[allow(dead_code)]
3738
pub struct UpdateSnippetRequest {
3839
#[schemars(description = "ID of the code snippet to update")]
3940
pub id: i64,
@@ -48,6 +49,7 @@ pub struct UpdateSnippetRequest {
4849
}
4950

5051
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
52+
#[allow(dead_code)]
5153
pub struct SearchSnippetRequest {
5254
#[schemars(description = "Search keyword to match in title and code content")]
5355
pub query: String,
@@ -81,6 +83,7 @@ pub struct SnippetService {
8183
}
8284

8385
#[derive(Clone)]
86+
#[allow(dead_code)]
8487
pub struct ServerPermissions {
8588
pub allow_query: bool,
8689
pub allow_create: bool,
@@ -557,6 +560,7 @@ pub async fn start_server_with_permissions(
557560
}
558561

559562
// 保持向后兼容的原始启动函数
563+
#[allow(dead_code)]
560564
pub async fn start_server(db_pool: SqlitePool, port: u16) -> Result<SocketAddr> {
561565
start_server_with_permissions(db_pool, port, true, true, false, false).await
562566
}

src/components/CodeSnippetList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
<span
9292
v-if="snippet.tags.length > 3"
9393
class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 dark:bg-gray-600/50 text-gray-500 dark:text-gray-400 flex-shrink-0"
94-
:title="`还有 ${snippet.tags.length - 3} 个标签`"
94+
:title="$t('tags.moreTags', { count: snippet.tags.length - 3 })"
9595
>
9696
+{{ snippet.tags.length - 3 }}
9797
</span>

src/components/PluginSettings.vue

Lines changed: 0 additions & 294 deletions
This file was deleted.

src/components/SnippetMainContent.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<button
4242
@click="removeTag(index)"
4343
class="w-3.5 h-3.5 rounded-full bg-blue-200 dark:bg-blue-800/50 hover:bg-blue-300 dark:hover:bg-blue-700/50 flex items-center justify-center transition-colors duration-200 group-hover:bg-blue-300 dark:group-hover:bg-blue-700/50"
44-
title="删除标签"
44+
:title="$t('snippet.deleteTag')"
4545
>
4646
<i
4747
class="fas fa-times text-blue-600 dark:text-blue-300 text-xs"
@@ -58,19 +58,19 @@
5858
@blur="handleAddTagBlur"
5959
type="text"
6060
class="px-2.5 py-1 border border-blue-300 dark:border-blue-600 rounded-full text-xs bg-white dark:bg-gray-700 focus:outline-none focus:ring-1 focus:ring-blue-400/50 dark:focus:ring-blue-500/50 focus:border-blue-400 dark:focus:border-blue-500 placeholder-slate-400 dark:placeholder-gray-500 text-slate-700 dark:text-slate-200 min-w-20"
61-
placeholder="标签名"
61+
:placeholder="$t('snippet.tagName')"
6262
/>
6363
<button
6464
@click="addTag"
6565
class="w-6 h-6 rounded-full bg-green-500 hover:bg-green-600 flex items-center justify-center transition-colors duration-200"
66-
title="确认添加"
66+
:title="$t('snippet.confirmAdd')"
6767
>
6868
<i class="fas fa-check text-white text-xs"></i>
6969
</button>
7070
<button
7171
@click="cancelAddTag"
7272
class="w-6 h-6 rounded-full bg-gray-400 hover:bg-gray-500 flex items-center justify-center transition-colors duration-200"
73-
title="取消"
73+
:title="$t('common.cancel')"
7474
>
7575
<i class="fas fa-times text-white text-xs"></i>
7676
</button>

0 commit comments

Comments
 (0)