mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -03:00
refactor(i18n): Remove server_i18n references from routes and update translations in zh-CN and zh-TW locales
This commit is contained in:
@@ -131,9 +131,7 @@ class BaseModelRoutes(ABC):
|
|||||||
'settings': settings,
|
'settings': settings,
|
||||||
'request': request,
|
'request': request,
|
||||||
'folders': [],
|
'folders': [],
|
||||||
# 添加服务端翻译函数
|
|
||||||
't': server_i18n.get_translation,
|
't': server_i18n.get_translation,
|
||||||
'server_i18n': server_i18n,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if not is_initializing:
|
if not is_initializing:
|
||||||
|
|||||||
@@ -151,7 +151,6 @@ class RecipeRoutes:
|
|||||||
request=request,
|
request=request,
|
||||||
# 添加服务端翻译函数
|
# 添加服务端翻译函数
|
||||||
t=server_i18n.get_translation,
|
t=server_i18n.get_translation,
|
||||||
server_i18n=server_i18n,
|
|
||||||
)
|
)
|
||||||
except Exception as cache_error:
|
except Exception as cache_error:
|
||||||
logger.error(f"Error loading recipe cache data: {cache_error}")
|
logger.error(f"Error loading recipe cache data: {cache_error}")
|
||||||
@@ -163,7 +162,6 @@ class RecipeRoutes:
|
|||||||
request=request,
|
request=request,
|
||||||
# 添加服务端翻译函数
|
# 添加服务端翻译函数
|
||||||
t=server_i18n.get_translation,
|
t=server_i18n.get_translation,
|
||||||
server_i18n=server_i18n,
|
|
||||||
)
|
)
|
||||||
logger.info("Recipe cache error, returning initialization page")
|
logger.info("Recipe cache error, returning initialization page")
|
||||||
|
|
||||||
|
|||||||
@@ -75,9 +75,7 @@ class StatsRoutes:
|
|||||||
is_initializing=is_initializing,
|
is_initializing=is_initializing,
|
||||||
settings=settings,
|
settings=settings,
|
||||||
request=request,
|
request=request,
|
||||||
# 添加服务端翻译函数
|
|
||||||
t=server_i18n.get_translation,
|
t=server_i18n.get_translation,
|
||||||
server_i18n=server_i18n,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return web.Response(
|
return web.Response(
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export const zhCN = {
|
|||||||
navigation: {
|
navigation: {
|
||||||
loras: 'LoRA',
|
loras: 'LoRA',
|
||||||
recipes: '配方',
|
recipes: '配方',
|
||||||
checkpoints: '大模型',
|
checkpoints: 'Checkpoint',
|
||||||
embeddings: 'Embedding',
|
embeddings: 'Embedding',
|
||||||
statistics: '统计'
|
statistics: '统计'
|
||||||
},
|
},
|
||||||
@@ -102,7 +102,7 @@ export const zhCN = {
|
|||||||
placeholders: {
|
placeholders: {
|
||||||
loras: '搜索 LoRA...',
|
loras: '搜索 LoRA...',
|
||||||
recipes: '搜索配方...',
|
recipes: '搜索配方...',
|
||||||
checkpoints: '搜索大模型...',
|
checkpoints: '搜索Checkpoint...',
|
||||||
embeddings: '搜索 Embedding...'
|
embeddings: '搜索 Embedding...'
|
||||||
},
|
},
|
||||||
options: '搜索选项',
|
options: '搜索选项',
|
||||||
@@ -237,9 +237,9 @@ export const zhCN = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 大模型页面
|
// Checkpoint页面
|
||||||
checkpoints: {
|
checkpoints: {
|
||||||
title: '大模型',
|
title: 'Checkpoint',
|
||||||
info: {
|
info: {
|
||||||
filename: '文件名',
|
filename: '文件名',
|
||||||
modelName: '模型名称',
|
modelName: '模型名称',
|
||||||
@@ -267,7 +267,7 @@ export const zhCN = {
|
|||||||
overview: {
|
overview: {
|
||||||
title: '概览',
|
title: '概览',
|
||||||
totalLoras: 'LoRA 总数',
|
totalLoras: 'LoRA 总数',
|
||||||
totalCheckpoints: '大模型总数',
|
totalCheckpoints: 'Checkpoint总数',
|
||||||
totalEmbeddings: 'Embedding 总数',
|
totalEmbeddings: 'Embedding 总数',
|
||||||
totalSize: '总大小',
|
totalSize: '总大小',
|
||||||
favoriteModels: '收藏模型'
|
favoriteModels: '收藏模型'
|
||||||
@@ -378,8 +378,8 @@ export const zhCN = {
|
|||||||
message: '正在扫描并构建 LoRA 缓存,这可能需要几分钟时间...'
|
message: '正在扫描并构建 LoRA 缓存,这可能需要几分钟时间...'
|
||||||
},
|
},
|
||||||
checkpoints: {
|
checkpoints: {
|
||||||
title: '初始化大模型管理器',
|
title: '初始化Checkpoint管理器',
|
||||||
message: '正在扫描并构建大模型缓存,这可能需要几分钟时间...'
|
message: '正在扫描并构建Checkpoint缓存,这可能需要几分钟时间...'
|
||||||
},
|
},
|
||||||
embeddings: {
|
embeddings: {
|
||||||
title: '初始化 Embedding 管理器',
|
title: '初始化 Embedding 管理器',
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export const zhTW = {
|
|||||||
navigation: {
|
navigation: {
|
||||||
loras: 'LoRA',
|
loras: 'LoRA',
|
||||||
recipes: '配方',
|
recipes: '配方',
|
||||||
checkpoints: '大模型',
|
checkpoints: 'Checkpoint',
|
||||||
embeddings: 'Embedding',
|
embeddings: 'Embedding',
|
||||||
statistics: '統計'
|
statistics: '統計'
|
||||||
},
|
},
|
||||||
@@ -102,7 +102,7 @@ export const zhTW = {
|
|||||||
placeholders: {
|
placeholders: {
|
||||||
loras: '搜尋 LoRA...',
|
loras: '搜尋 LoRA...',
|
||||||
recipes: '搜尋配方...',
|
recipes: '搜尋配方...',
|
||||||
checkpoints: '搜尋大模型...',
|
checkpoints: '搜尋Checkpoint...',
|
||||||
embeddings: '搜尋 Embedding...'
|
embeddings: '搜尋 Embedding...'
|
||||||
},
|
},
|
||||||
options: '搜尋選項',
|
options: '搜尋選項',
|
||||||
@@ -241,9 +241,9 @@ export const zhTW = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 大模型頁面
|
// Checkpoint頁面
|
||||||
checkpoints: {
|
checkpoints: {
|
||||||
title: '大模型',
|
title: 'Checkpoint',
|
||||||
info: {
|
info: {
|
||||||
filename: '檔案名稱',
|
filename: '檔案名稱',
|
||||||
modelName: '模型名稱',
|
modelName: '模型名稱',
|
||||||
|
|||||||
Reference in New Issue
Block a user