Resolve the page UI language once and let each ExApp fill its own Phrases.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-11 11:45:25 +02:00
co-authored by Cursor
parent afbd76445d
commit 623ada5f99
14 changed files with 1051 additions and 53 deletions
+2 -1
View File
@@ -10,6 +10,7 @@
var field = document.getElementById("exapp-dialog-value");
var cancelBtn = document.getElementById("exapp-dialog-cancel");
var agreeBtn = document.getElementById("exapp-dialog-agree");
var defaultAgree = agreeBtn.textContent;
var queue = [];
var busy = false;
var finish = null;
@@ -97,7 +98,7 @@
field.hidden = !isPrompt;
field.value = isPrompt ? textOf(opts.value) : "";
cancelBtn.hidden = kind === "message";
agreeBtn.textContent = kind !== "message" && opts.agree ? textOf(opts.agree) : "OK";
agreeBtn.textContent = kind !== "message" && opts.agree ? textOf(opts.agree) : defaultAgree;
agreeBtn.classList.toggle("destructive", kind === "confirm" && !!opts.destructive);
refreshAgree();
if (!dialog.open) dialog.showModal();