Add debugging to test in prod.

This commit is contained in:
yuanhau 2025-06-07 11:34:14 +08:00
parent 4cf8847a3d
commit 680ae1d987

View file

@ -56,9 +56,11 @@ watch(
const startTranslating = async (text: string) => {
try {
console.log(text);
translateItem[text] = {
translateText: await translate(text, { from: "zh", to: "en" }),
};
console.log(translateItem[text]);
} catch (error) {
console.error("Translation failed:", error);
translateItem[text] = { translateText: text }; // fallback to original text