Pause translation when appending the outline/attachment/layer trees to the sidebar

Also, pause translation when collapsing/expanding subtrees.
This commit is contained in:
Jonas Jenwald 2023-10-25 17:10:58 +02:00
parent 0fc899338c
commit 6b265b3a15
6 changed files with 41 additions and 2 deletions

View file

@ -87,12 +87,12 @@ class PDFLayerViewer extends BaseTreeViewer {
/**
* @private
*/
_setNestedName(element, { name = null }) {
async _setNestedName(element, { name = null }) {
if (typeof name === "string") {
element.textContent = this._normalizeTextContent(name);
return;
}
element.setAttribute("data-l10n-id", "pdfjs-additional-layers");
element.textContent = await this._l10n.get("pdfjs-additional-layers");
element.style.fontStyle = "italic";
}