mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 11:02:28 +08:00
move translation strings for AI Chat Note type
This commit is contained in:
parent
c046343349
commit
29845c343c
@ -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...",
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user