mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 07:41:02 +08:00
Add debugging to test in prod.
This commit is contained in:
parent
4cf8847a3d
commit
680ae1d987
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user