feat: Update translation models and enhance order status handling in OrdersTab with new 'picked_up' status and corresponding translations across multiple locales

This commit is contained in:
sebseb7
2026-03-24 07:27:40 +01:00
parent 1840512aac
commit e5a3b7bcce
24 changed files with 477 additions and 446 deletions

View File

@@ -55,7 +55,7 @@ const LEGAL_FILES = [
// Model configuration
const GERMAN_TO_ENGLISH_MODEL = 'gpt-5.4'; // High-quality model for German -> English (critical step)
const ENGLISH_TO_OTHER_MODEL = 'gpt-4.1-mini'; // Faster/cheaper model for English -> Other languages
const ENGLISH_TO_OTHER_MODEL = 'gpt-5.4-mini'; // Faster/cheaper model for English -> Other languages
// Supported languages for translation
const TARGET_LANGUAGES = {
@@ -379,7 +379,7 @@ async function translateContent(content, systemPrompt, targetLanguage = null, mo
}
// Function to translate English to other languages (optimized for caching)
async function translateToTargetLanguage(englishContent, targetLanguage, model = 'gpt-4.1-mini', isLegalFile = false) {
async function translateToTargetLanguage(englishContent, targetLanguage, model = 'gpt-5.4-mini', isLegalFile = false) {
try {
// Choose appropriate system prompt based on file type
const promptTemplate = isLegalFile
@@ -396,9 +396,7 @@ async function translateToTargetLanguage(englishContent, targetLanguage, model =
messages: [
{ role: 'system', content: systemPrompt },
{ role: 'user', content: `Please translate to ${targetLanguage}` }
],
temperature: 0.1,
max_tokens: 4000
]
});
return response.choices[0].message.content;