i18n: enhance check-i18n script with precise filtering and multiline support (#23298)

This commit is contained in:
lyzno1 2025-08-02 12:52:12 +08:00 • committed by GitHub
commit f9b3cd1b68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 420 additions and 216 deletions

View file

@ -265,7 +265,6 @@ export default translation
fs.writeFileSync(path.join(testZhDir, 'pages.ts'), file2Content)
const allEnKeys = await getKeysFromLanguage('en-US')
const allZhKeys = await getKeysFromLanguage('zh-Hans')
// Test file filtering logic
const targetFile = 'components'
@ -563,4 +562,201 @@ export default translation
expect(enKeys.length - zhKeysExtra.length).toBe(-2) // -2 means 2 extra keys
})
})
describe('Auto-remove multiline key-value pairs', () => {
// Helper function to simulate removeExtraKeysFromFile logic
function removeExtraKeysFromFile(content: string, keysToRemove: string[]): string {
const lines = content.split('\n')
const linesToRemove: number[] = []
for (const keyToRemove of keysToRemove) {
let targetLineIndex = -1
const linesToRemoveForKey: number[] = []
// Find the key line (simplified for single-level keys in test)
for (let i = 0; i < lines.length; i++) {
const line = lines[i]
const keyPattern = new RegExp(`^\\s*${keyToRemove}\\s*:`)
if (keyPattern.test(line)) {
targetLineIndex = i
break
}
}
if (targetLineIndex !== -1) {
linesToRemoveForKey.push(targetLineIndex)
// Check if this is a multiline key-value pair
const keyLine = lines[targetLineIndex]
const trimmedKeyLine = keyLine.trim()
// If key line ends with ":" (not complete value), it's likely multiline
if (trimmedKeyLine.endsWith(':') && !trimmedKeyLine.includes('{') && !trimmedKeyLine.match(/:\s*['"`]/)) {
// Find the value lines that belong to this key
let currentLine = targetLineIndex + 1
let foundValue = false
while (currentLine < lines.length) {
const line = lines[currentLine]
const trimmed = line.trim()
// Skip empty lines
if (trimmed === '') {
currentLine++
continue
}
// Check if this line starts a new key (indicates end of current value)
if (trimmed.match(/^\w+\s*:/))
break
// Check if this line is part of the value
if (trimmed.startsWith('\'') || trimmed.startsWith('"') || trimmed.startsWith('`') || foundValue) {
linesToRemoveForKey.push(currentLine)
foundValue = true
// Check if this line ends the value (ends with quote and comma/no comma)
if ((trimmed.endsWith('\',') || trimmed.endsWith('",') || trimmed.endsWith('`,')
|| trimmed.endsWith('\'') || trimmed.endsWith('"') || trimmed.endsWith('`'))
&& !trimmed.startsWith('//'))
break
}
else {
break
}
currentLine++
}
}
linesToRemove.push(...linesToRemoveForKey)
}
}
// Remove duplicates and sort in reverse order
const uniqueLinesToRemove = [...new Set(linesToRemove)].sort((a, b) => b - a)
for (const lineIndex of uniqueLinesToRemove)
lines.splice(lineIndex, 1)
return lines.join('\n')
}
it('should remove single-line key-value pairs correctly', () => {
const content = `const translation = {
keepThis: 'This should stay',
removeThis: 'This should be removed',
alsoKeep: 'This should also stay',
}
export default translation`
const result = removeExtraKeysFromFile(content, ['removeThis'])
expect(result).toContain('keepThis: \'This should stay\'')
expect(result).toContain('alsoKeep: \'This should also stay\'')
expect(result).not.toContain('removeThis: \'This should be removed\'')
})
it('should remove multiline key-value pairs completely', () => {
const content = `const translation = {
keepThis: 'This should stay',
removeMultiline:
'This is a multiline value that should be removed completely',
alsoKeep: 'This should also stay',
}
export default translation`
const result = removeExtraKeysFromFile(content, ['removeMultiline'])
expect(result).toContain('keepThis: \'This should stay\'')
expect(result).toContain('alsoKeep: \'This should also stay\'')
expect(result).not.toContain('removeMultiline:')
expect(result).not.toContain('This is a multiline value that should be removed completely')
})
it('should handle mixed single-line and multiline removals', () => {
const content = `const translation = {
keepThis: 'Keep this',
removeSingle: 'Remove this single line',
removeMultiline:
'Remove this multiline value',
anotherMultiline:
'Another multiline that spans multiple lines',
keepAnother: 'Keep this too',
}
export default translation`
const result = removeExtraKeysFromFile(content, ['removeSingle', 'removeMultiline', 'anotherMultiline'])
expect(result).toContain('keepThis: \'Keep this\'')
expect(result).toContain('keepAnother: \'Keep this too\'')
expect(result).not.toContain('removeSingle:')
expect(result).not.toContain('removeMultiline:')
expect(result).not.toContain('anotherMultiline:')
expect(result).not.toContain('Remove this single line')
expect(result).not.toContain('Remove this multiline value')
expect(result).not.toContain('Another multiline that spans multiple lines')
})
it('should properly detect multiline vs single-line patterns', () => {
const multilineContent = `const translation = {
singleLine: 'This is single line',
multilineKey:
'This is multiline',
keyWithColon: 'Value with: colon inside',
objectKey: {
nested: 'value'
},
}
export default translation`
// Test that single line with colon in value is not treated as multiline
const result1 = removeExtraKeysFromFile(multilineContent, ['keyWithColon'])
expect(result1).not.toContain('keyWithColon:')
expect(result1).not.toContain('Value with: colon inside')
// Test that true multiline is handled correctly
const result2 = removeExtraKeysFromFile(multilineContent, ['multilineKey'])
expect(result2).not.toContain('multilineKey:')
expect(result2).not.toContain('This is multiline')
// Test that object key removal works (note: this is a simplified test)
// In real scenario, object removal would be more complex
const result3 = removeExtraKeysFromFile(multilineContent, ['objectKey'])
expect(result3).not.toContain('objectKey: {')
// Note: Our simplified test function doesn't handle nested object removal perfectly
// This is acceptable as it's testing the main multiline string removal functionality
})
it('should handle real-world Polish translation structure', () => {
const polishContent = `const translation = {
createApp: 'UTWÓRZ APLIKACJĘ',
newApp: {
captionAppType: 'Jaki typ aplikacji chcesz stworzyć?',
chatbotDescription:
'Zbuduj aplikację opartą na czacie. Ta aplikacja używa formatu pytań i odpowiedzi.',
agentDescription:
'Zbuduj inteligentnego agenta, który może autonomicznie wybierać narzędzia.',
basic: 'Podstawowy',
},
}
export default translation`
const result = removeExtraKeysFromFile(polishContent, ['captionAppType', 'chatbotDescription', 'agentDescription'])
expect(result).toContain('createApp: \'UTWÓRZ APLIKACJĘ\'')
expect(result).toContain('basic: \'Podstawowy\'')
expect(result).not.toContain('captionAppType:')
expect(result).not.toContain('chatbotDescription:')
expect(result).not.toContain('agentDescription:')
expect(result).not.toContain('Jaki typ aplikacji')
expect(result).not.toContain('Zbuduj aplikację opartą na czacie')
expect(result).not.toContain('Zbuduj inteligentnego agenta')
})
})
})

View file

@ -129,10 +129,11 @@ async function removeExtraKeysFromFile(language, fileName, extraKeys) {
let modified = false
const linesToRemove = []
// Find lines to remove for each key
// Find lines to remove for each key (including multiline values)
for (const keyToRemove of fileSpecificKeys) {
const keyParts = keyToRemove.split('.')
let targetLineIndex = -1
const linesToRemoveForKey = []
// Build regex pattern for the exact key path
if (keyParts.length === 1) {
@ -183,8 +184,53 @@ async function removeExtraKeysFromFile(language, fileName, extraKeys) {
}
if (targetLineIndex !== -1) {
linesToRemove.push(targetLineIndex)
console.log(`🗑️ Found key to remove: ${keyToRemove} at line ${targetLineIndex + 1}`)
linesToRemoveForKey.push(targetLineIndex)
// Check if this is a multiline key-value pair
const keyLine = lines[targetLineIndex]
const trimmedKeyLine = keyLine.trim()
// If key line ends with ":" (not ":", "{ " or complete value), it's likely multiline
if (trimmedKeyLine.endsWith(':') && !trimmedKeyLine.includes('{') && !trimmedKeyLine.match(/:\s*['"`]/)) {
// Find the value lines that belong to this key
let currentLine = targetLineIndex + 1
let foundValue = false
while (currentLine < lines.length) {
const line = lines[currentLine]
const trimmed = line.trim()
// Skip empty lines
if (trimmed === '') {
currentLine++
continue
}
// Check if this line starts a new key (indicates end of current value)
if (trimmed.match(/^\w+\s*:/))
break
// Check if this line is part of the value
if (trimmed.startsWith('\'') || trimmed.startsWith('"') || trimmed.startsWith('`') || foundValue) {
linesToRemoveForKey.push(currentLine)
foundValue = true
// Check if this line ends the value (ends with quote and comma/no comma)
if ((trimmed.endsWith('\',') || trimmed.endsWith('",') || trimmed.endsWith('`,')
|| trimmed.endsWith('\'') || trimmed.endsWith('"') || trimmed.endsWith('`'))
&& !trimmed.startsWith('//'))
break
}
else {
break
}
currentLine++
}
}
linesToRemove.push(...linesToRemoveForKey)
console.log(`🗑️ Found key to remove: ${keyToRemove} at line ${targetLineIndex + 1}${linesToRemoveForKey.length > 1 ? ` (multiline, ${linesToRemoveForKey.length} lines)` : ''}`)
modified = true
}
else {
@ -193,10 +239,10 @@ async function removeExtraKeysFromFile(language, fileName, extraKeys) {
}
if (modified) {
// Remove lines in reverse order to maintain correct indices
linesToRemove.sort((a, b) => b - a)
// Remove duplicates and sort in reverse order to maintain correct indices
const uniqueLinesToRemove = [...new Set(linesToRemove)].sort((a, b) => b - a)
for (const lineIndex of linesToRemove) {
for (const lineIndex of uniqueLinesToRemove) {
const line = lines[lineIndex]
console.log(`🗑️ Removing line ${lineIndex + 1}: ${line.trim()}`)
lines.splice(lineIndex, 1)
@ -237,7 +283,7 @@ async function main() {
// Filter target keys by file if specified
const targetKeys = targetFile
? allTargetKeys.filter(key => key.startsWith(targetFile.replace(/[-_](.)/g, (_, c) => c.toUpperCase())))
? allTargetKeys.filter(key => key.startsWith(`${targetFile.replace(/[-_](.)/g, (_, c) => c.toUpperCase())}.`))
: allTargetKeys
// Filter languages by target language if specified
@ -247,7 +293,7 @@ async function main() {
// Filter language keys by file if specified
const languagesKeys = targetFile
? allLanguagesKeys.map(keys => keys.filter(key => key.startsWith(targetFile.replace(/[-_](.)/g, (_, c) => c.toUpperCase()))))
? allLanguagesKeys.map(keys => keys.filter(key => key.startsWith(`${targetFile.replace(/[-_](.)/g, (_, c) => c.toUpperCase())}.`)))
: allLanguagesKeys
const keysCount = languagesKeys.map(keys => keys.length)

View file

@ -83,6 +83,16 @@ const translation = {
configConfirmBtn: 'Speichern',
},
embeddingModelSwitchTip: 'Anmerkungstext-Vektorisierungsmodell, das Wechseln von Modellen wird neu eingebettet, was zusätzliche Kosten verursacht.',
list: {
delete: {
title: 'Bist du sicher, dass du löschen möchtest?',
},
},
batchAction: {
cancel: 'Abbrechen',
selected: 'Ausgewählt',
delete: 'Löschen',
},
}
export default translation

View file

@ -83,6 +83,16 @@ const translation = {
configConfirmBtn: 'Guardar',
},
embeddingModelSwitchTip: 'Modelo de vectorización de texto de anotación, cambiar de modelo volverá a incrustar, lo que resultará en costos adicionales.',
list: {
delete: {
title: '¿Estás seguro de que deseas eliminar?',
},
},
batchAction: {
delete: 'Eliminar',
selected: 'Seleccionado',
cancel: 'Cancelar',
},
}
export default translation

View file

@ -83,6 +83,16 @@ const translation = {
configConfirmBtn: 'ذخیره',
},
embeddingModelSwitchTip: 'مدل برداری‌سازی متن یادداشت، تغییر مدل‌ها باعث جاسازی مجدد خواهد شد و هزینه‌های اضافی به همراه خواهد داشت.',
list: {
delete: {
title: 'آیا مطمئن هستید که می‌خواهید حذف کنید؟',
},
},
batchAction: {
cancel: 'لغو',
selected: 'انتخاب شده',
delete: 'حذف کنید',
},
}
export default translation

View file

@ -31,21 +31,7 @@ const translation = {
newApp: {
startFromBlank: 'ایجاد از خالی',
startFromTemplate: 'ایجاد از قالب',
captionAppType: 'چه نوع برنامه‌ای می‌خواهید ایجاد کنید؟',
chatbotDescription: 'ساخت برنامه‌ای مبتنی بر چت. این برنامه از قالب پرسش و پاسخ استفاده می‌کند و امکان چندین دور مکالمه مداوم را فراهم می‌کند.',
completionDescription: 'ساخت برنامه‌ای که متن با کیفیت بالا بر اساس درخواست‌ها تولید می‌کند، مانند تولید مقالات، خلاصه‌ها، ترجمه‌ها و بیشتر.',
completionWarning: 'این نوع برنامه دیگر پشتیبانی نمی‌شود.',
agentDescription: 'ساخت نماینده هوشمند که می‌تواند ابزارها را برای انجام وظایف به طور خودمختار انتخاب کند',
workflowDescription: 'ساخت برنامه‌ای که متن با کیفیت بالا بر اساس گردش کار با درجه بالای سفارشی‌سازی تولید می‌کند. مناسب برای کاربران با تجربه.',
workflowWarning: 'در حال حاضر در نسخه بتا',
chatbotType: 'روش سازماندهی چت‌بات',
basic: 'اساسی',
basicTip: 'برای مبتدیان، می‌توان بعداً به Chatflow تغییر داد',
basicFor: 'برای مبتدیان',
basicDescription: 'سازماندهی اساسی به شما اجازه می‌دهد تا یک برنامه چت‌بات را با تنظیمات ساده و بدون امکان تغییر درخواست‌های داخلی سازماندهی کنید. مناسب برای مبتدیان است.',
advanced: 'Chatflow',
advancedFor: 'برای کاربران پیشرفته',
advancedDescription: 'سازماندهی گردش کار، چت‌بات‌ها را به صورت گردش کار سازماندهی می‌کند و درجه بالایی از سفارشی‌سازی، از جمله امکان ویرایش درخواست‌های داخلی را فراهم می‌کند. مناسب برای کاربران با تجربه است.',
captionName: 'آیکون و نام برنامه',
appNamePlaceholder: 'به برنامه خود یک نام بدهید',
captionDescription: 'توضیحات',

View file

@ -83,6 +83,16 @@ const translation = {
configConfirmBtn: 'Enregistrer',
},
embeddingModelSwitchTip: 'Modèle de vectorisation de texte d\'annotation, changer de modèles entraînera une ré-intégration, ce qui entraînera des coûts supplémentaires.',
list: {
delete: {
title: 'Êtes-vous sûr de vouloir supprimer ?',
},
},
batchAction: {
cancel: 'Annuler',
delete: 'Supprimer',
selected: 'sélectionné',
},
}
export default translation

View file

@ -27,21 +27,7 @@ const translation = {
newApp: {
startFromBlank: 'Créer à partir de zéro',
startFromTemplate: 'Créer à partir d\'un modèle',
captionAppType: 'Quel type d\'application souhaitez-vous créer ?',
chatbotDescription: 'Construisez une application basée sur le chat. Cette application utilise un format question-réponse, permettant ainsi plusieurs tours de conversation continue.',
completionDescription: 'Construisez une application qui génère du texte de haute qualité en fonction des invites, telles que la génération d\'articles, de résumés, de traductions, et plus encore.',
completionWarning: 'Ce type d\'application ne sera plus pris en charge.',
agentDescription: 'Construisez un agent intelligent capable de choisir automatiquement les outils pour accomplir les tâches',
workflowDescription: 'Construisez une application qui génère du texte de haute qualité en fonction d\'un flux de travail avec un haut degré de personnalisation. Il convient aux utilisateurs expérimentés.',
workflowWarning: 'Actuellement en version bêta',
chatbotType: 'Méthode d\'orchestration du chatbot',
basic: 'Basique',
basicTip: 'Pour les débutants, peut passer à Chatflow plus tard',
basicFor: 'POUR LES DÉBUTANTS',
basicDescription: 'L\'orchestration de base permet d\'orchestrer une application Chatbot à l\'aide de paramètres simples, sans possibilité de modifier les invites intégrées. Il convient aux débutants.',
advanced: 'Chatflow',
advancedFor: 'Pour les utilisateurs avancés',
advancedDescription: 'L\'orchestration de flux de travail orchestre les Chatbots sous forme de workflows, offrant un haut degré de personnalisation, y compris la possibilité de modifier les invites intégrées. Il convient aux utilisateurs expérimentés.',
captionName: 'Icône et nom de l\'application',
appNamePlaceholder: 'Donnez un nom à votre application',
captionDescription: 'Description',

View file

@ -83,6 +83,16 @@ const translation = {
configConfirmBtn: 'सहेजें',
},
embeddingModelSwitchTip: 'एनोटेशन टेक्स्ट वेक्टराइजेशन मॉडल, मॉडल बदलने से पुनः एम्बेड किया जाएगा, जिससे अतिरिक्त लागतें उत्पन्न होंगी।',
list: {
delete: {
title: 'क्या आप सुनिश्चित हैं कि हटाएं?',
},
},
batchAction: {
selected: 'चुना हुआ',
delete: 'हटाएँ',
cancel: 'रद्द करें',
},
}
export default translation

View file

@ -90,12 +90,6 @@ const translation = {
viewLog: 'व्यू लॉग',
agentLogDetail: {
agentMode: 'एजेंट मोड',
startTime: 'शुरू करने का समय',
endTime: 'समाप्ति समय',
duration: 'अवधि',
promptTemplate: 'प्रॉम्प्ट टेम्पलेट',
promptInput: 'प्रॉम्प्ट इनपुट',
response: 'प्रतिक्रिया',
iterations: 'पुनरूक्तियाँ',
toolUsed: 'प्रयुक्त उपकरण',
finalProcessing: 'अंतिम प्रसंस्करण',

View file

@ -27,21 +27,7 @@ const translation = {
newApp: {
startFromBlank: 'रिक्त से बनाएँ',
startFromTemplate: 'टेम्पलेट से बनाएँ',
captionAppType: 'आप किस प्रकार का ऐप बनाना चाहते हैं?',
chatbotDescription: 'एक चैट-आधारित एप्लिकेशन बनाएं। यह ऐप प्रश्न-उत्तर प्रारूप का उपयोग करता है, जिससे निरंतर बातचीत के कई राउंड संभव होते हैं।',
completionDescription: 'ऐसा एप्लिकेशन बनाएं जो प्रॉम्प्ट्स के आधार पर उच्च गुणवत्ता वाला टेक्स्ट उत्पन्न करता है, जैसे लेख, सारांश, अनुवाद आदि उत्पन्न करना।',
completionWarning: 'इस प्रकार के ऐप का समर्थन नहीं किया जाएगा।',
agentDescription: 'एक बुद्धिमान एजेंट बनाएं जो स्वायत्त रूप से टूल्स का चयन करके कार्य पूरा कर सके।',
workflowDescription: 'एक एप्लिकेशन बनाएं जो वर्कफ़्लो ऑर्केस्ट्रेट्स के साथ उच्च डिग्री के कस्टमाइज़ेशन के साथ उच्च गुणवत्ता वाला टेक्स्ट उत्पन्न करता है। यह अनुभवी उपयोगकर्ताओं के लिए उपयुक्त है।',
workflowWarning: 'वर्तमान में बीटा में',
chatbotType: 'चैटबॉट ऑर्केस्ट्रेट विधि',
basic: 'बेसिक',
basicTip: 'शुरुआती लोगों के लिए, बाद में चैटफ़्लो में स्विच कर सकते हैं',
basicFor: 'शुरुआती लोगों के लिए',
basicDescription: 'बेसिक ऑर्केस्ट्रेट चैटबॉट ऐप को सरल सेटिंग्स का उपयोग करके ऑर्केस्ट्रेट करने की अनुमति देता है, बिना अंतर्निहित प्रॉम्प्ट्स को संशोधित करने की क्षमता के। यह शुरुआती लोगों के लिए उपयुक्त है।',
advanced: 'चैटफ्लो',
advancedFor: 'अनुभवी उपयोगकर्ताओं के लिए',
advancedDescription: 'वर्कफ़्लो ऑर्केस्ट्रेट वर्कफ़्लोज़ के रूप में चैटबॉट्स को ऑर्केस्ट्रेट करता है, जिसमें अंतर्निहित प्रॉम्प्ट्स को संपादित करने की क्षमता सहित उच्च डिग्री का कस्टमाइज़ेशन होता है। यह अनुभवी उपयोगकर्ताओं के लिए उपयुक्त है।',
captionName: 'ऐप आइकन और नाम',
appNamePlaceholder: 'अपने ऐप को नाम दें',
captionDescription: 'विवरण',

View file

@ -85,6 +85,16 @@ const translation = {
},
embeddingModelSwitchTip:
'Modello di vettorizzazione del testo di annotazione, il cambio di modello comporterà una nuova integrazione, comportando costi aggiuntivi.',
list: {
delete: {
title: 'Sei sicuro di voler eliminare?',
},
},
batchAction: {
delete: 'Elimina',
cancel: 'Annulla',
selected: 'selezionato',
},
}
export default translation

View file

@ -27,27 +27,7 @@ const translation = {
newApp: {
startFromBlank: 'Crea da zero',
startFromTemplate: 'Crea da modello',
captionAppType: 'Che tipo di app vuoi creare?',
chatbotDescription:
'Crea un\'applicazione basata sulla chat. Questa app utilizza un formato domanda-e-risposta, consentendo più round di conversazione continua.',
completionDescription:
'Crea un\'applicazione che genera testo di alta qualità basato sui prompt, come articoli, riassunti, traduzioni e altro.',
completionWarning: 'Questo tipo di app non sarà più supportato.',
agentDescription:
'Crea un Agente intelligente che può scegliere autonomamente gli strumenti per completare i compiti',
workflowDescription:
'Crea un\'applicazione che genera testo di alta qualità basato su flussi di lavoro orchestrati con un alto grado di personalizzazione. È adatto per utenti esperti.',
workflowWarning: 'Attualmente in beta',
chatbotType: 'Metodo di orchestrazione Chatbot',
basic: 'Base',
basicTip: 'Per principianti, può passare a Chatflow in seguito',
basicFor: 'PER PRINCIPIANTI',
basicDescription:
'L\'Orchestrazione di base consente l\'orchestrazione di un\'app Chatbot utilizzando impostazioni semplici, senza la possibilità di modificare i prompt integrati. È adatta per principianti.',
advanced: 'Chatflow',
advancedFor: 'Per utenti avanzati',
advancedDescription:
'L\'Orchestrazione del flusso di lavoro orchestra i Chatbot sotto forma di flussi di lavoro, offrendo un alto grado di personalizzazione, inclusa la possibilità di modificare i prompt integrati. È adatta per utenti esperti.',
captionName: 'Icona e nome dell\'app',
appNamePlaceholder: 'Dai un nome alla tua app',
captionDescription: 'Descrizione',

View file

@ -83,6 +83,16 @@ const translation = {
configConfirmBtn: '저장',
},
embeddingModelSwitchTip: '어노테이션 텍스트의 임베딩 모델입니다. 모델을 변경하면 다시 임베딩되며 추가 비용이 발생합니다.',
list: {
delete: {
title: '삭제할 것인지 확실합니까?',
},
},
batchAction: {
cancel: '취소',
delete: '삭제',
selected: '선택됨',
},
}
export default translation

View file

@ -85,6 +85,16 @@ const translation = {
},
embeddingModelSwitchTip:
'Model wektoryzacji tekstu adnotacji, przełączanie modeli spowoduje ponowne osadzenie, co wiąże się z dodatkowymi kosztami.',
list: {
delete: {
title: 'Czy na pewno chcesz usunąć?',
},
},
batchAction: {
selected: 'Wybrany',
delete: 'Usuń',
cancel: 'Anuluj',
},
}
export default translation

View file

@ -27,27 +27,7 @@ const translation = {
newApp: {
startFromBlank: 'Utwórz od podstaw',
startFromTemplate: 'Utwórz z szablonu',
captionAppType: 'Jaki typ aplikacji chcesz stworzyć?',
chatbotDescription:
'Zbuduj aplikację opartą na czacie. Ta aplikacja używa formatu pytań i odpowiedzi, umożliwiając wielokrotne rundy ciągłej konwersacji.',
completionDescription:
'Zbuduj aplikację generującą teksty wysokiej jakości na podstawie monitów, takich jak generowanie artykułów, streszczeń, tłumaczeń i innych.',
completionWarning: 'Ten typ aplikacji nie będzie już obsługiwany.',
agentDescription:
'Zbuduj inteligentnego agenta, który może autonomicznie wybierać narzędzia do wykonywania zadań',
workflowDescription:
'Zbuduj aplikację, która w oparciu o przepływ pracy generuje teksty wysokiej jakości z dużą możliwością dostosowania. Jest odpowiednia dla doświadczonych użytkowników.',
workflowWarning: 'Obecnie w fazie beta',
chatbotType: 'Metoda orkiestracji chatbota',
basic: 'Podstawowy',
basicTip: 'Dla początkujących, można przełączyć się później na Chatflow',
basicFor: 'Dla początkujących',
basicDescription:
'Podstawowa orkiestracja pozwala na skonfigurowanie aplikacji Chatbot za pomocą prostych ustawień, bez możliwości modyfikacji wbudowanych monitów. Jest odpowiednia dla początkujących.',
advanced: 'Chatflow',
advancedFor: 'Dla zaawansowanych użytkowników',
advancedDescription:
'Orkiestracja przepływu pracy organizuje Chatboty w formie przepływów pracy, oferując wysoki stopień dostosowania, w tym możliwość edycji wbudowanych monitów. Jest odpowiednia dla doświadczonych użytkowników.',
captionName: 'Ikona i nazwa aplikacji',
appNamePlaceholder: 'Podaj nazwę swojej aplikacji',
captionDescription: 'Opis',

View file

@ -83,6 +83,16 @@ const translation = {
configConfirmBtn: 'Salvar',
},
embeddingModelSwitchTip: 'Modelo de vetorização de texto de anotação, a troca de modelos será refeita, resultando em custos adicionais.',
list: {
delete: {
title: 'Você tem certeza que deseja excluir?',
},
},
batchAction: {
cancel: 'Cancelar',
selected: 'Selecionado',
delete: 'Excluir',
},
}
export default translation

View file

@ -87,11 +87,6 @@ const translation = {
agentLog: 'Registro do agente',
viewLog: 'Ver Registro',
agenteLogDetail: {
agentMode: 'Modo Agente',
toolUsed: 'Ferramenta usada',
iterations: 'Iterações',
iteration: 'Iteração',
finalProcessing: 'Processamento Final',
},
agentLogDetail: {
iterations: 'Iterações',

View file

@ -27,21 +27,7 @@ const translation = {
newApp: {
startFromBlank: 'Criar do zero',
startFromTemplate: 'Criar do modelo',
captionAppType: 'Que tipo de aplicativo você deseja criar?',
chatbotDescription: 'Construa um aplicativo baseado em chat. Este aplicativo usa um formato de pergunta e resposta, permitindo várias rodadas de conversa contínua.',
completionDescription: 'Construa um aplicativo que gera texto de alta qualidade com base em prompts, como geração de artigos, resumos, traduções e muito mais.',
completionWarning: 'Este tipo de aplicativo não será mais suportado.',
agentDescription: 'Construa um Agente inteligente que pode escolher ferramentas para completar as tarefas autonomamente',
workflowDescription: 'Construa um aplicativo que gera texto de alta qualidade com base em fluxo de trabalho com alto grau de personalização. É adequado para usuários experientes.',
workflowWarning: 'Atualmente em beta',
chatbotType: 'Método de orquestração do Chatbot',
basic: 'Básico',
basicTip: 'Para iniciantes, pode mudar para o Chatflow mais tarde',
basicFor: 'PARA INICIANTES',
basicDescription: 'A Orquestração Básica permite orquestrar um aplicativo Chatbot usando configurações simples, sem a capacidade de modificar prompts integrados. É adequado para iniciantes.',
advanced: 'Chatflow',
advancedFor: 'Para usuários avançados',
advancedDescription: 'A Orquestração de Fluxo de Trabalho orquestra Chatbots na forma de fluxos de trabalho, oferecendo um alto grau de personalização, incluindo a capacidade de editar prompts integrados. É adequado para usuários experientes.',
captionName: 'Ícone e nome do aplicativo',
appNamePlaceholder: 'Dê um nome para o seu aplicativo',
captionDescription: 'Descrição',

View file

@ -83,6 +83,16 @@ const translation = {
configConfirmBtn: 'Salvează',
},
embeddingModelSwitchTip: 'Model de vectorizare a textului anotației, schimbarea modelelor va fi reîncorporată, rezultând costuri suplimentare.',
list: {
delete: {
title: 'Ești sigur că vrei să ștergi?',
},
},
batchAction: {
cancel: 'Anulează',
delete: 'Șterge',
selected: 'Selectat',
},
}
export default translation

Some files were not shown because too many files have changed in this diff Show more