move translation strings for AI Chat Note type

This commit is contained in:
perf3ct 2025-03-30 21:28:34 +00:00
parent c046343349
commit 29845c343c
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232
2 changed files with 11 additions and 4 deletions

View File

@ -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...",

View File

@ -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,