From af874a6022b848d661c9b21b777db208de83ccaa Mon Sep 17 00:00:00 2001 From: martbost Date: Fri, 21 Aug 2026 15:49:21 -0500 Subject: [PATCH] Fix eaten newline escapes in the translate marker protocol (broke server start) --- server.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server.js b/server.js index a5c9210..9fffbad 100644 --- a/server.js +++ b/server.js @@ -392,9 +392,7 @@ async function handleTranslate(req,res){ headers:{'Authorization':`Bearer ${apiKey}`,'Content-Type':'application/json','HTTP-Referer':'https://rmcircle.team','X-Title':'RM Circle Translate'}, body:JSON.stringify({model:OPENROUTER_MODEL,max_tokens:6000,temperature:0,messages:[ {role:'system',content:`You translate website UI strings from English to ${TR_LANG_NAMES[tl]}. The input is numbered items, each preceded by a line @@N@@. Reply with the SAME @@N@@ marker lines, each followed by that item's translation (multi-line items keep their line breaks). Output nothing except markers and translations — no preamble, no code fences. Keep these words untranslated wherever they appear: Scintilla, Ascensus, Fabrica, Culmen, Apex, Fastigium, Vertex, Corona, POL, Polygon, RM Circle, MoonPay, MetaMask, Trust Wallet. Keep numbers, #ids, emoji and punctuation intact. Natural, friendly tone.`}, - {role:'user',content:miss.map((i,j)=>`@@${j+1}@@ -${texts[i]}`).join(' -')} + {role:'user',content:miss.map((i,j)=>`@@${j+1}@@\n${texts[i]}`).join('\n')} ]}) }); clearTimeout(timer);