Skip to content

Build your personal knowledge base with Trilium Notes

move translation strings for AI Chat Note type

perf3ct29845c343c7c
diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json
index 6c08a11f0b..2e567abd68 100644
--- a/src/public/translations/en/translation.json
+++ b/src/public/translations/en/translation.json
@@ -1879,6 +1879,12 @@
"sources": "Sources",
"start_indexing": "Start Indexing",
"use_advanced_context": "Use Advanced Context",
+ "chat": {
+ "root_note_title": "AI Chats",
+ "root_note_content": "This note contains your saved AI chat conversations.",
+ "new_chat_title": "New Chat",
+ "create_new_ai_chat": "Create new AI Chat"
+ },
"processing": {
"common": "Processing...",
"thinking": "Thinking...",
diff --git a/src/services/llm/chat_storage_service.ts b/src/services/llm/chat_storage_service.ts
index 552c7b6d9e..df6ba52691 100644
--- a/src/services/llm/chat_storage_service.ts
+++ b/src/services/llm/chat_storage_service.ts
@@ -2,6 +2,7 @@ import notes from '../notes.js';
import sql from '../sql.js';
import attributes from '../attributes.js';
import type { Message } from './ai_interface.js';
+import { t } from 'i18next';
interface StoredChat {
id: string;
@@ -38,9 +39,9 @@ export class ChatStorageService {
// Create root note for chats
const { note } = notes.createNewNote({
parentNoteId: 'root',
- title: 'AI Chats',
+ title: t('ai.chat.root_note_title'),
type: 'text',
- content: 'This note contains your saved AI chat conversations.'
+ content: t('ai.chat.root_note_content')
});
attributes.createLabel(
@@ -61,7 +62,7 @@ export class ChatStorageService {
const { note } = notes.createNewNote({
parentNoteId: rootNoteId,
- title: title || 'New Chat ' + now.toLocaleString(),
+ title: title || t('ai.chat.new_chat_title') + ' ' + now.toLocaleString(),
type: ChatStorageService.CHAT_TYPE,
mime: ChatStorageService.CHAT_MIME,
content: JSON.stringify({
@@ -79,7 +80,7 @@ export class ChatStorageService {
return {
id: note.noteId,
- title: title || 'New Chat ' + now.toLocaleString(),
+ title: title || t('ai.chat.new_chat_title') + ' ' + now.toLocaleString(),
messages,
noteId: note.noteId,
createdAt: now,