From 7053e242d2c25c76e7fe7382e7521cec459323b9 Mon Sep 17 00:00:00 2001 From: sepehr Date: Thu, 30 Apr 2026 21:29:17 +0200 Subject: [PATCH] fix: increase markdown transform word limit to 2000 + i18n errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same fix as reformulate — raise limit from 500 to 2000 and use i18n error keys instead of hardcoded English messages. Co-Authored-By: Claude Opus 4.7 --- memento-note/app/api/ai/transform-markdown/route.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/memento-note/app/api/ai/transform-markdown/route.ts b/memento-note/app/api/ai/transform-markdown/route.ts index bc1caee..77f81b6 100644 --- a/memento-note/app/api/ai/transform-markdown/route.ts +++ b/memento-note/app/api/ai/transform-markdown/route.ts @@ -22,14 +22,14 @@ export async function POST(request: NextRequest) { const wordCount = text.split(/\s+/).length if (wordCount < 10) { return NextResponse.json( - { error: 'Text must have at least 10 words to transform' }, + { errorKey: 'ai.wordCountMin', params: { min: 10, current: wordCount } }, { status: 400 } ) } - if (wordCount > 500) { + if (wordCount > 2000) { return NextResponse.json( - { error: 'Text must have maximum 500 words to transform' }, + { errorKey: 'ai.wordCountMax', params: { max: 2000, current: wordCount } }, { status: 400 } ) }