refactor(i18n): Remove server_i18n references from routes and update translations in zh-CN and zh-TW locales

This commit is contained in:
Will Miao
2025-08-30 19:02:37 +08:00
parent 7b374d747b
commit f6709a55c3
5 changed files with 11 additions and 17 deletions

View File

@@ -131,9 +131,7 @@ class BaseModelRoutes(ABC):
'settings': settings,
'request': request,
'folders': [],
# 添加服务端翻译函数
't': server_i18n.get_translation,
'server_i18n': server_i18n,
}
if not is_initializing:

View File

@@ -151,7 +151,6 @@ class RecipeRoutes:
request=request,
# 添加服务端翻译函数
t=server_i18n.get_translation,
server_i18n=server_i18n,
)
except Exception as cache_error:
logger.error(f"Error loading recipe cache data: {cache_error}")
@@ -163,7 +162,6 @@ class RecipeRoutes:
request=request,
# 添加服务端翻译函数
t=server_i18n.get_translation,
server_i18n=server_i18n,
)
logger.info("Recipe cache error, returning initialization page")

View File

@@ -75,9 +75,7 @@ class StatsRoutes:
is_initializing=is_initializing,
settings=settings,
request=request,
# 添加服务端翻译函数
t=server_i18n.get_translation,
server_i18n=server_i18n,
)
return web.Response(

View File

@@ -93,7 +93,7 @@ export const zhCN = {
navigation: {
loras: 'LoRA',
recipes: '配方',
checkpoints: '大模型',
checkpoints: 'Checkpoint',
embeddings: 'Embedding',
statistics: '统计'
},
@@ -102,7 +102,7 @@ export const zhCN = {
placeholders: {
loras: '搜索 LoRA...',
recipes: '搜索配方...',
checkpoints: '搜索大模型...',
checkpoints: '搜索Checkpoint...',
embeddings: '搜索 Embedding...'
},
options: '搜索选项',
@@ -237,9 +237,9 @@ export const zhCN = {
}
},
// 大模型页面
// Checkpoint页面
checkpoints: {
title: '大模型',
title: 'Checkpoint',
info: {
filename: '文件名',
modelName: '模型名称',
@@ -267,7 +267,7 @@ export const zhCN = {
overview: {
title: '概览',
totalLoras: 'LoRA 总数',
totalCheckpoints: '大模型总数',
totalCheckpoints: 'Checkpoint总数',
totalEmbeddings: 'Embedding 总数',
totalSize: '总大小',
favoriteModels: '收藏模型'
@@ -378,8 +378,8 @@ export const zhCN = {
message: '正在扫描并构建 LoRA 缓存,这可能需要几分钟时间...'
},
checkpoints: {
title: '初始化大模型管理器',
message: '正在扫描并构建大模型缓存,这可能需要几分钟时间...'
title: '初始化Checkpoint管理器',
message: '正在扫描并构建Checkpoint缓存,这可能需要几分钟时间...'
},
embeddings: {
title: '初始化 Embedding 管理器',

View File

@@ -93,7 +93,7 @@ export const zhTW = {
navigation: {
loras: 'LoRA',
recipes: '配方',
checkpoints: '大模型',
checkpoints: 'Checkpoint',
embeddings: 'Embedding',
statistics: '統計'
},
@@ -102,7 +102,7 @@ export const zhTW = {
placeholders: {
loras: '搜尋 LoRA...',
recipes: '搜尋配方...',
checkpoints: '搜尋大模型...',
checkpoints: '搜尋Checkpoint...',
embeddings: '搜尋 Embedding...'
},
options: '搜尋選項',
@@ -241,9 +241,9 @@ export const zhTW = {
}
},
// 大模型頁面
// Checkpoint頁面
checkpoints: {
title: '大模型',
title: 'Checkpoint',
info: {
filename: '檔案名稱',
modelName: '模型名稱',