fix: Adjust the order of hook function parameters

This commit is contained in:
Gabe
2025-08-30 18:21:28 +08:00
parent 5fb7157f57
commit 4a5e6c2a23
2 changed files with 4 additions and 4 deletions

View File

@@ -1194,9 +1194,9 @@ export const I18N = {
zh_TW: `翻譯完成 Hook`,
},
translate_end_hook_helper: {
zh: `翻译完成时运行,入参为: 翻译节点,文文本,文文本,保留元素、术语列表,返回:译文文本。`,
en: `Run when the translation is completed, the input parameters are: translation node, original text, translation text, retained elements, and returns: translation text.`,
zh_TW: `翻譯完成時執行,入參為:翻譯節點、文文字、文文字、保留元素,返回:譯文文本。`,
zh: `翻译完成时运行,入参为: 翻译节点,文文本,文文本,保留元素、术语列表,返回:译文文本。`,
en: `Run when the translation is completed, the input parameters are: translation node, translation text, original text, retained elements, and returns: translation text.`,
zh_TW: `翻譯完成時執行,入參為:翻譯節點、文文字、文文字、保留元素,返回:譯文文本。`,
},
translate_remove_hook: {
zh: `翻译移除钩子函数`,

View File

@@ -152,7 +152,7 @@ export default function Content({ q, keeps, translator, $el }) {
// 翻译完成钩子函数
interpreter.run(`exports.transEndHook = ${transEndHook}`);
return interpreter.exports.transEndHook($el, q, text, keeps);
return interpreter.exports.transEndHook($el, text, q, keeps);
}, [loading, $el, q, text, keeps, transEndHook]);
if (loading) {