diff --git a/main.js b/main.js index d8adef3d..ed6dd5be 100644 --- a/main.js +++ b/main.js @@ -55,6 +55,12 @@ const SMART_TRANSLATION = { "prompt": "Sulla base degli appunti", "initial_message": "Ciao, sono ChatGPT e ho accesso ai tuoi appunti tramite Smart Connections. Fatemi una domanda sui vostri appunti e cercherò di rispondervi.", }, + "ja": { + "pronous": ["私", "自分", "僕", "俺", "私達", "この"], + "prompt": "このノートに基づいて", + "initial_message": "こんにちは、スマートコネクションであなたのノートにアクセスできるChatGPTです。あなたのノートに関する質問を私に投げかけてください。", + "unsegmented": true + }, } class SmartConnectionsPlugin extends Obsidian.Plugin { @@ -221,7 +227,10 @@ class SmartConnectionsPlugin extends Obsidian.Plugin { }); } // load self_ref_kw_regex - this.self_ref_kw_regex = new RegExp(`\\b(${SMART_TRANSLATION[this.settings.language].pronous.join("|")})\\b`, "gi"); + this.self_ref_kw_regex = + !SMART_TRANSLATION[this.settings.language].unsegmented + ? new RegExp(`\\b(${SMART_TRANSLATION[this.settings.language].pronous.join("|")})\\b`, "gi") + : new RegExp(`(${SMART_TRANSLATION[this.settings.language].pronous.join("|")})`, "gi"); // load failed files await this.load_failed_files(); }