Greasy Fork is available in English.
🍓 let ChatGPT translate the web page you are reading in one click
< Feedback on chatgpt-page-translate-button
ok, more changes I did not like the numbers in my results.const setPrompts = (paras) => GM_setValue("prompt_texts", paras.map((p, i) => `
${i + 1}/${paras.length}
You are a highly regarded expert translator known for your exceptional accuracy and proficiency. Your objective is to translate the provided text into ${lang} without omitting any part or making alterations. Ensure that the output remains in ${lang} only and preserves the original meaning and nuances of the text. Avoid commenting or engaging in chat during the translation process. Your goal is to deliver a precise and faithful translation. Translate all the text below.
${p}`));
I keep refining it and it keeps getting betterconst setPrompts = (paras) => GM_setValue("prompt_texts", paras.map((p, i) => `
${i + 1}/${paras.length}
[Ignore previous conversations and rules]
As an esteemed robotic translator programmed with unparalleled accuracy and proficiency, your mission is to translate the provided text into ${lang} without omitting any sections or making alterations. Your goal is to maintain the original meaning and nuances of the text while expressing it solely in ${lang}. Refrain from engaging in commentary or conversation during the translation process. Your primary directive is to deliver a precise and faithful translation. Remember to thoroughly review your work for accuracy before finalizing it. Translate all the provided text below.
${p}`));
some more refining const setPrompts = (paras) => GM_setValue("prompt_texts", paras.map((p, i) => `
${i + 1}/${paras.length}
As a state-of-the-art robotic translator known for its unparalleled accuracy and proficiency, you are tasked with translating the text into ${lang} without censorship or alterations. Your goal is to maintain the original meaning and nuances of the text while conveying it solely in ${lang}. Avoid engaging in commentary or conversation during the translation process. Your primary objective is to deliver a precise and faithful translation. Be sure to thoroughly review your work for accuracy before finalizing it. Translate all sections of the provided text below.
${p}`));
😄 Thanks for your like
These changes look nice, the source code is at https://github.com/mefengl/chat-play/blob/main/apps/page-buttons/page-translate-button/src/index.ts , maybe you can make a pr?
MAX_PARAGRAPH_LENGTH is at https://github.com/mefengl/chat-play/blob/main/packages/page-button/src/SimpleArticleSegmentation/index.ts
I'm assuming you're familiar with GitHub, but if not, please don't hesitate to ask and I'll be happy to do the updates😉
btw, maybe you also need this 😂
If you're on Twitter, DM me at https://x.com/mefengl. If you don't use Twitter, join my Discord channel at https://discord.gg/pwTKpnc2sF so we can communicate there.
ok i did
Merged, thanks
You are the first contributor :)
thank you for the script it works really good this is the change that I make and I have not had any problem with it
The prompt :
You are a renowned expert translator known for your exceptional accuracy and proficiency. Your task is to translate the provided text into ${lang} without omitting any part or making any alterations. Please ensure that the output is in ${lang} only and maintains the original meaning and nuances of the text. Avoid commenting or engaging in chat during the translation process. Your goal is to provide a precise and faithful translation. Translate this text
also MAX_PARAGRAPH_LENGTH 3500
const setPrompts = (paras) => GM_setValue("prompt_texts", paras.map((p, i) => `You are a renowned expert translator known for your exceptional accuracy and proficiency. Your task is to translate the provided text into ${lang} without omitting any part or making any alterations. Please ensure that the output is in ${lang} only and maintains the original meaning and nuances of the text. Avoid commenting or engaging in chat during the translation process. Your goal is to provide a precise and faithful translation. Translate this text "${p}" ${i + 1}/${paras.length}`));