From b0c5677fdf3aeeabdaf709b4e2fead53e0fc0b3e Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Mon, 25 May 2026 11:02:18 -0400 Subject: [PATCH 1/2] Update menu localization IDs (as per our developers' meeting) and sort them --- ts/a11y/speech/SpeechMenu.ts | 10 ++--- ts/ui/menu/Menu.ts | 44 ++++++++++---------- ts/ui/menu/__locales__/de.json | 73 ++++++++++++++-------------------- ts/ui/menu/__locales__/en.json | 71 ++++++++++++++------------------- 4 files changed, 86 insertions(+), 112 deletions(-) diff --git a/ts/a11y/speech/SpeechMenu.ts b/ts/a11y/speech/SpeechMenu.ts index 5a19f96c7..30f1fd2ae 100644 --- a/ts/a11y/speech/SpeechMenu.ts +++ b/ts/a11y/speech/SpeechMenu.ts @@ -128,7 +128,7 @@ function csSelectionBox(menu: MJContextMenu, locale: string): object { }); } const sb = new SelectionDialog( - localize('ClearspeakTitle'), + localize('.Clearspeak/Title'), '', items, SelectionOrder.ALPHABETICAL, @@ -138,7 +138,7 @@ function csSelectionBox(menu: MJContextMenu, locale: string): object { return { type: 'command', id: 'ClearspeakPreferences', - content: localize('SelectPrefs'), + content: localize('.Clearspeak/SelectPrefs'), action: () => sb.post(), }; } @@ -160,13 +160,13 @@ function basePreferences(previous: string): object[] { const items = [ { type: 'radio', - content: localize('NoPrefs'), + content: localize('.Clearspeak/NoPrefs'), id: 'clearspeak-default', variable: 'speechRules', }, { type: 'radio', - content: localize('CurrentPrefs'), + content: localize('.Clearspeak/CurrentPrefs'), id: 'clearspeak-' + previous, variable: 'speechRules', }, @@ -192,7 +192,7 @@ function smartPreferences( ): object[] { const loc = localePreferences.get(locale); const items = [ - { type: 'label', content: localize('PrefsFor', smart) }, + { type: 'label', content: localize('.Clearspeak/PrefsFor', smart) }, { type: 'rule' }, ]; return items.concat( diff --git a/ts/ui/menu/Menu.ts b/ts/ui/menu/Menu.ts index d6e4a8d89..6b784875e 100644 --- a/ts/ui/menu/Menu.ts +++ b/ts/ui/menu/Menu.ts @@ -315,17 +315,17 @@ export class Menu { // lines.push( localize( - 'InputJax', + '.About/InputJax', this.document.inputJax.map((jax) => jax.name).join(', ') ), - localize('OutputJax', this.document.outputJax.name), - localize('DocType', this.document.kind) + localize('.About/OutputJax', this.document.outputJax.name), + localize('.About/DocType', this.document.kind) ); // // Add the loaded packages and their versions // if (MathJax && MathJax.loader) { - lines.push('
' + localize('Modules')); + lines.push('
' + localize('.About/Modules')); const Package = MathJax._.components.package.Package; const versions = (MathJax as any).loader.versions; for (const name of Array.from(Package.packages.keys()).sort( @@ -406,8 +406,8 @@ export class Menu { */ protected help() { InfoDialog.post({ - title: localize('HelpTitle'), - message: localize('HelpMessage'), + title: localize('.Help/Title'), + message: localize('.Help/Message'), adaptor: this.document.adaptor, extraNodes: [ this.document.adaptor.node( @@ -424,7 +424,7 @@ export class Menu { */ protected mathMLCode() { CopyDialog.post({ - title: localize('MmlTitle'), + title: localize('.Mml/Title'), message: this.menu.mathItem ? this.toMML(this.menu.mathItem) : '', adaptor: this.document.adaptor, code: true, @@ -436,7 +436,7 @@ export class Menu { */ protected originalText() { CopyDialog.post({ - title: localize('SourceTitle'), + title: localize('.Source/Title'), message: this.menu.mathItem?.math ?? '', adaptor: this.document.adaptor, code: true, @@ -448,7 +448,7 @@ export class Menu { */ protected annotationBox() { CopyDialog.post({ - title: localize('AnnotationTitle'), + title: localize('.Annotation/Title'), message: AnnotationMenu.annotation, adaptor: this.document.adaptor, code: true, @@ -460,7 +460,7 @@ export class Menu { */ public async svgImage() { CopyDialog.post({ - title: localize('SvgTitle'), + title: localize('.Svg/Title'), message: await this.toSVG(this.menu.mathItem), adaptor: this.document.adaptor, code: true, @@ -472,7 +472,7 @@ export class Menu { */ protected speechText() { CopyDialog.post({ - title: localize('SpeechTitle'), + title: localize('.Speech/Title'), message: this.menu.mathItem?.outputData?.speech ?? '', adaptor: this.document.adaptor, code: true, @@ -484,7 +484,7 @@ export class Menu { */ protected brailleText() { CopyDialog.post({ - title: localize('BrailleTitle'), + title: localize('.Braille/Title'), message: this.menu.mathItem?.outputData?.braille ?? '', adaptor: this.document.adaptor, code: true, @@ -496,7 +496,7 @@ export class Menu { */ protected errorMessage() { CopyDialog.post({ - title: localize('ErrorTitle'), + title: localize('.Error/Title'), message: this.menu.mathItem ? this.menu.errorMsg : '', adaptor: this.document.adaptor, code: true, @@ -517,7 +517,7 @@ export class Menu { text = `
${zoom.outerHTML}
`; } InfoDialog.post({ - title: localize('ZoomTitle'), + title: localize('.Zoom/Title'), message: text, adaptor: this.document.adaptor, styles: { @@ -963,7 +963,7 @@ export class Menu { Object.assign(this.settings, settings); this.setA11y(settings); } catch (err) { - Locale.warn(COMPONENT, 'StorageError', err.message); + Locale.warn(COMPONENT, '.Warn/StorageError', err.message); } } @@ -985,7 +985,7 @@ export class Menu { } localStorage.setItem(Menu.LOCALE_STORAGE, this.settings.language); } catch (err) { - Locale.warn(COMPONENT, 'StorageError', err.message); + Locale.warn(COMPONENT, '.Warn/StorageError', err.message); } } @@ -1090,7 +1090,7 @@ export class Menu { this.loadComponent('output/' + name, () => { const startup = MathJax.startup; if (!(name in startup.constructors)) { - return fail(new Error(localize('ComponentNotLoaded', name))); + return fail(new Error(localize('.Warn/ComponentNotLoaded', name))); } startup.useOutput(name, true); startup.output = this.applyRendererOptions(startup.getOutputJax()); @@ -1397,7 +1397,7 @@ export class Menu { const scale = (parseFloat(this.settings.scale) * 100) .toFixed(1) .replace(/.0$/, ''); - const percent = prompt(localize('ScalePrompt'), scale + '%'); + const percent = prompt(localize('.Scale/Prompt'), scale + '%'); if (this.current) { const speech = (this.menu.mathItem as ExplorerMathItem).explorers.speech; speech.refocus = this.current; @@ -1409,10 +1409,10 @@ export class Menu { if (scale) { this.menu.pool.lookup('scale').setValue(String(scale)); } else { - alert(localize('ScaleNonZero')); + alert(localize('.Scale/NonZero')); } } else { - alert(localize('ScalePercent')); + alert(localize('.Scale/Percent', '120%')); } } } @@ -1573,7 +1573,7 @@ export class Menu { protected async toSVG(math: HTMLMATHITEM): Promise { const jax = this.jax.SVG; if (!jax) { - return localize('NoSvgProduced'); + return localize('.Svg/NotProduced'); } const adaptor = jax.adaptor; const cache = jax.options.fontCache; @@ -1989,7 +1989,7 @@ export class Menu { * @returns {object} The JSON for the radio button item */ public radio(id: string, variable: string, other: object = {}): object { - const content = localize(id); + const content = id.match(/^\d+%$/) ? id : localize(id); return Object.assign({ type: 'radio', id, content, variable }, other); } diff --git a/ts/ui/menu/__locales__/de.json b/ts/ui/menu/__locales__/de.json index 0badab345..506d35771 100644 --- a/ts/ui/menu/__locales__/de.json +++ b/ts/ui/menu/__locales__/de.json @@ -1,11 +1,29 @@ { - "150%": "150%", - "175%": "175%", - "200%": "200%", - "250%": "250%", - "300%": "300%", - "400%": "400%", - "500%": "500%", + ".About/DocType": "Dokumenttyp: %1", + ".About/InputJax": "Input Jax: %1", + ".About/Modules": "Geladene Module:", + ".About/OutputJax": "Output Jax: %1", + ".Annotation/Title": "MathJax-Anmerkungstext", + ".Braille/Title": "MathJax-Braille-Text", + ".Clearspeak/CurrentPrefs": "Aktuelle Einstellungen", + ".Clearspeak/NoPrefs": "Keine Einstellungen", + ".Clearspeak/PrefsFor": "Einstellungen für %1", + ".Clearspeak/SelectPrefs": "Einstellungen auswählen", + ".Clearspeak/Title": "Clearspeak-Einstellungen", + ".Error/Title": "MathJax-Fehlermeldung", + ".Help/Message": "

MathJax ist eine JavaScript-Bibliothek, die es Seitenautoren ermöglicht, mathematische Formeln in ihre Webseiten einzubinden. Als Leser müssen Sie nichts tun, um dies zu nutzen.

Browser: MathJax funktioniert mit allen modernen Browsern, einschließlich Edge, Firefox, Chrome, Safari, Opera und den meisten mobilen Browsern.

Mathematik-Menü: MathJax fügt den Formeln ein Kontextmenü hinzu. Klicken Sie mit der rechten Maustaste oder bei gedrückter STRG-Taste auf eine beliebige mathematische Formel, um das Menü aufzurufen.

Mathematik anzeigen als: Mit diesen Optionen können Sie den Quellcode der Formel (als MathML oder im Originalformat) anzeigen.

In die Zwischenablage kopieren: Diese Optionen kopieren den Quellcode der Formel als MathML oder im Originalformat in die Zwischenablage (in Browsern, die dies unterstützen).

Mathematik-Einstellungen: Hiermit können Sie Funktionen von MathJax steuern, wie z. B. die Größe der mathematischen Ausdrücke, den Mechanismus zur Darstellung von Gleichungen und den Umgang mit zu breiten Gleichungen, sowie die Sprache, die für die Menüs und Fehlermeldungen von MathJax verwendet werden soll (in Version 4 noch nicht implementiert).

Barrierefreiheit: MathJax kann mit Bildschirmleseprogrammen zusammenarbeiten, um Mathematik für Sehbehinderte zugänglich zu machen. Aktivieren Sie die Sprach- oder Braille-Generierung, um die Erstellung von Sprachausgaben und die Möglichkeit zur interaktiven Untersuchung von Ausdrücken zu ermöglichen. Sie können den Stil des Explorers über dessen Menü steuern.

Mathematik-Zoom: Wenn Sie Schwierigkeiten haben, eine Gleichung zu lesen, MathJax kann die Darstellung vergrößern, damit Sie sie besser erkennen können, oder Sie können alle mathematischen Formeln auf der Seite vergrößern. Aktivieren Sie diese Funktionen im Menü Mathematik-Einstellungen.

Einstellungen: MathJax nutzt die localStorage-Datenbank Ihres Browsers, um die über dieses Menü festgelegten Einstellungen lokal in Ihrem Browser zu speichern. Diese werden nicht dazu verwendet, Sie zu verfolgen, und werden von MathJax in keiner Weise übertragen oder aus der Ferne genutzt.

", + ".Help/Title": "MathJax-Hilfe", + ".Mml/Title": "MathJax-MathML-Ausdruck", + ".Scale/NonZero": "Der Skalierungsfaktor darf nicht Null sein", + ".Scale/Percent": "Der Skalierungsfaktor muss ein Prozentsatz sein (z. B. %1)", + ".Scale/Prompt": "Alle mathematischen Formeln (im Vergleich zum umgebenden Text) um skalieren", + ".Source/Title": "MathJax-Originalquelle", + ".Speech/Title": "MathJax-Sprechtext", + ".Svg/NotProduced": "SVG kann nicht erzeugt werden.
Versuchen Sie zunächst, zur SVG-Ausgabe zu wechseln.", + ".Svg/Title": "MathJax-SVG-Bild", + ".Warn/ComponentNotLoaded": "Komponente %1 nicht geladen", + ".Warn/StorageError": "MathJax-localStorage-Fehler: %1", + ".Zoom/Title": "MathJax-vergrößerter Ausdruck", "A11yLanguage": "Sprache", "About": "Über MathJax", "Accessibility": "\u00A0\u00A0 Barrierefreiheit:", @@ -27,6 +45,7 @@ "Code": "Code-Format:", "Collapsible": "Zusammenklappbare Mathematik", "Command": "Befehl", + "Commands": "%1 Befehle", "Control": "Steuerelement", "Copy": "In Zwischenablage kopieren", "CopyAnnotation": "Anmerkung", @@ -50,8 +69,8 @@ "Magenta": "Magenta", "Magnification": "Vergrößerung", "MathHelp": "Hilfemeldung bei Fokus", - "MathJax": "MathJax", "MathJax expression": "MathJax-Ausdruck", + "MathJax": "MathJax", "MathMLcode": "MathML-Code", "MathmlIncludes": "MathML/SVG enthält", "Mathspeak": "Mathspeak", @@ -61,13 +80,14 @@ "Option": "Option", "Options": "\u00A0 \u00A0 Optionen", "Original": "Originalform", + "OriginalMathML": "Original MathML", "Overflow": "Überlauf", "Prefix": "Präfix", - "Rot": "Rot", "Renderer": "Mathematik-Renderer", "Reset": "Auf Standardwerte zurücksetzen", "Role": "Rolle", "RoleDescription": "Mathematik beschreiben als", + "Rot": "Rot", "Rules": "Regeln:", "SVG": "SVG", "Scale": "Skalierung", @@ -109,38 +129,5 @@ "showSRE": "Semantische Attribute", "showTex": "LaTeX-Attribute", "texHints": "TeX-Hinweise", - "ueb": "UEB", - - "OriginalMathML": "Original MathML", - "Commands": "%1 Befehle", - - "InputJax": "Input Jax: %1", - "OutputJax": "Output Jax: %1", - "DocType": "Dokumenttyp: %1", - "Modules": "Geladene Module:", - - "HelpTitle": "MathJax-Hilfe", - "HelpMessage": "

MathJax ist eine JavaScript-Bibliothek, die es Seitenautoren ermöglicht, mathematische Formeln in ihre Webseiten einzubinden. Als Leser müssen Sie nichts tun, um dies zu nutzen.

Browser: MathJax funktioniert mit allen modernen Browsern, einschließlich Edge, Firefox, Chrome, Safari, Opera und den meisten mobilen Browsern.

Mathematik-Menü: MathJax fügt den Formeln ein Kontextmenü hinzu. Klicken Sie mit der rechten Maustaste oder bei gedrückter STRG-Taste auf eine beliebige mathematische Formel, um das Menü aufzurufen.

Mathematik anzeigen als: Mit diesen Optionen können Sie den Quellcode der Formel (als MathML oder im Originalformat) anzeigen.

In die Zwischenablage kopieren: Diese Optionen kopieren den Quellcode der Formel als MathML oder im Originalformat in die Zwischenablage (in Browsern, die dies unterstützen).

Mathematik-Einstellungen: Hiermit können Sie Funktionen von MathJax steuern, wie z. B. die Größe der mathematischen Ausdrücke, den Mechanismus zur Darstellung von Gleichungen und den Umgang mit zu breiten Gleichungen, sowie die Sprache, die für die Menüs und Fehlermeldungen von MathJax verwendet werden soll (in Version 4 noch nicht implementiert).

Barrierefreiheit: MathJax kann mit Bildschirmleseprogrammen zusammenarbeiten, um Mathematik für Sehbehinderte zugänglich zu machen. Aktivieren Sie die Sprach- oder Braille-Generierung, um die Erstellung von Sprachausgaben und die Möglichkeit zur interaktiven Untersuchung von Ausdrücken zu ermöglichen. Sie können den Stil des Explorers über dessen Menü steuern.

Mathematik-Zoom: Wenn Sie Schwierigkeiten haben, eine Gleichung zu lesen, MathJax kann die Darstellung vergrößern, damit Sie sie besser erkennen können, oder Sie können alle mathematischen Formeln auf der Seite vergrößern. Aktivieren Sie diese Funktionen im Menü Mathematik-Einstellungen.

Einstellungen: MathJax nutzt die localStorage-Datenbank Ihres Browsers, um die über dieses Menü festgelegten Einstellungen lokal in Ihrem Browser zu speichern. Diese werden nicht dazu verwendet, Sie zu verfolgen, und werden von MathJax in keiner Weise übertragen oder aus der Ferne genutzt.

", - - "MmlTitle": "MathJax-MathML-Ausdruck", - "SourceTitle": "MathJax-Originalquelle", - "AnnotationTitle": "MathJax-Anmerkungstext", - "SvgTitle": "MathJax-SVG-Bild", - "SpeechTitle": "MathJax-Sprechtext", - "BrailleTitle": "MathJax-Braille-Text", - "ErrorTitle": "MathJax-Fehlermeldung", - "ZoomTitle": "MathJax-vergrößerter Ausdruck", - - "StorageError": "MathJax-localStorage-Fehler: %1", - "ComponentNotLoaded": "Komponente %1 nicht geladen", - "ScalePrompt": "Alle mathematischen Formeln (im Vergleich zum umgebenden Text) um skalieren", - "ScaleNonZero": "Der Skalierungsfaktor darf nicht Null sein", - "ScalePercent": "Der Skalierungsfaktor muss ein Prozentsatz sein (z. B. 120 %)", - "NoSvgProduced": "SVG kann nicht erzeugt werden.
Versuchen Sie zunächst, zur SVG-Ausgabe zu wechseln.", - - "ClearspeakTitle": "Clearspeak-Einstellungen", - "SelectPrefs": "Einstellungen auswählen", - "NoPrefs": "Keine Einstellungen", - "CurrentPrefs": "Aktuelle Einstellungen", - "PrefsFor": "Einstellungen für %1" + "ueb": "UEB" } diff --git a/ts/ui/menu/__locales__/en.json b/ts/ui/menu/__locales__/en.json index 83b2af7ea..d51ccf18b 100644 --- a/ts/ui/menu/__locales__/en.json +++ b/ts/ui/menu/__locales__/en.json @@ -1,11 +1,29 @@ { - "150%": "150%", - "175%": "175%", - "200%": "200%", - "250%": "250%", - "300%": "300%", - "400%": "400%", - "500%": "500%", + ".About/DocType": "Document Type: %1", + ".About/InputJax": "Input Jax: %1", + ".About/Modules": "Modules Loaded:", + ".About/OutputJax": "Outut Jax: %1", + ".Annotation/Title": "MathJax Annotation Text", + ".Braille/Title": "MathJax Braille Text", + ".Clearspeak/CurrentPrefs": "Current Preferences", + ".Clearspeak/NoPrefs": "No Preferences", + ".Clearspeak/PrefsFor": "Preferences for %1", + ".Clearspeak/SelectPrefs": "Select Preferences", + ".Clearspeak/Title": "Clearspeak Preferences", + ".Error/Title": "MathJax Error Message", + ".Help/Message": "

MathJax is a JavaScript library that allows page authors to include mathematics within their web pages. As a reader, you don't need to do anything to make that happen.

Browsers: MathJax works with all modern browsers including Edge, Firefox, Chrome, Safari, Opera, and most mobile browsers.

Math Menu: MathJax adds a contextual menu to equations. Right-click or CTRL-click on any mathematics to access the menu.

Show Math As: These options allow you to view the formula's source markup (as MathML or in its original format).

Copy to Clipboard: These options copy the formula's source markup, as MathML or in its original format, to the clipboard (in browsers that support that).

Math Settings: These give you control over features of MathJax, such the size of the mathematics, the mechanism used to display equations, how to handle equations that are too wide, and the language to use for MathJax's menus and error messages (not yet implemented in v4).

Accessibility: MathJax can work with screen readers to make mathematics accessible to the visually impaired. Turn on speech or braille generation to enable creation of speech strings and the ability to investigate expressions interactively. You can control the style of the explorer in its menu.

Math Zoom: If you are having difficulty reading an equation, MathJax can enlarge it to help you see it better, or you can scale all the math on the page to make it larger. Turn these features on in the Math Settings menu.

Preferences: MathJax uses your browser's localStorage database to save the preferences set via this menu locally in your browser. These are not used to track you, and are not transferred or used remotely by MathJax in any way.

", + ".Help/Title": "MathJax Help", + ".Mml/Title": "MathJax MathML Expression", + ".Scale/NonZero": "The scale should not be zero", + ".Scale/Percent": "The scale should be a percentage (e.g., %1)", + ".Scale/Prompt": "Scale all mathematics (compared to surrounding text) by", + ".Source/Title": "MathJax Original Source", + ".Speech/Title": "MathJax Speech Text", + ".Svg/NotProduced": "SVG can't be produced.
Try switching to SVG output first.", + ".Svg/Title": "MathJax SVG Image", + ".Warn/ComponentNotLoaded": "Component %1 not loaded", + ".Warn/StorageError": "MathJax localStorage error: %1", + ".Zoom/Title": "MathJax Zoomed Expression", "A11yLanguage": "Language", "About": "About MathJax", "Accessibility": "\u00A0\u00A0 Accessibility:", @@ -27,6 +45,7 @@ "Code": "Code Format:", "Collapsible": "Collapsible Math", "Command": "Command", + "Commands": "%1 Commands", "Control": "Control", "Copy": "Copy to Clipboard", "CopyAnnotation": "Annotation", @@ -50,8 +69,8 @@ "Magenta": "Magenta", "Magnification": "Magnification", "MathHelp": "Help message on focus", - "MathJax": "MathJax", "MathJax expression": "MathJax expression", + "MathJax": "MathJax", "MathMLcode": "MathML Code", "MathmlIncludes": "MathML/SVG has", "Mathspeak": "Mathspeak", @@ -61,6 +80,7 @@ "Option": "Option", "Options": "\u00A0 \u00A0 Options", "Original": "Original Form", + "OriginalMathML": "Original MathML", "Overflow": "Overflow", "Prefix": "Prefix", "Red": "Red", @@ -109,38 +129,5 @@ "showSRE": "Semantic attributes", "showTex": "LaTeX attributes", "texHints": "TeX hints", - "ueb": "UEB", - - "OriginalMathML": "Original MathML", - "Commands": "%1 Commands", - - "InputJax": "Input Jax: %1", - "OutputJax": "Outut Jax: %1", - "DocType": "Document Type: %1", - "Modules": "Modules Loaded:", - - "HelpTitle": "MathJax Help", - "HelpMessage": "

MathJax is a JavaScript library that allows page authors to include mathematics within their web pages. As a reader, you don't need to do anything to make that happen.

Browsers: MathJax works with all modern browsers including Edge, Firefox, Chrome, Safari, Opera, and most mobile browsers.

Math Menu: MathJax adds a contextual menu to equations. Right-click or CTRL-click on any mathematics to access the menu.

Show Math As: These options allow you to view the formula's source markup (as MathML or in its original format).

Copy to Clipboard: These options copy the formula's source markup, as MathML or in its original format, to the clipboard (in browsers that support that).

Math Settings: These give you control over features of MathJax, such the size of the mathematics, the mechanism used to display equations, how to handle equations that are too wide, and the language to use for MathJax's menus and error messages (not yet implemented in v4).

Accessibility: MathJax can work with screen readers to make mathematics accessible to the visually impaired. Turn on speech or braille generation to enable creation of speech strings and the ability to investigate expressions interactively. You can control the style of the explorer in its menu.

Math Zoom: If you are having difficulty reading an equation, MathJax can enlarge it to help you see it better, or you can scale all the math on the page to make it larger. Turn these features on in the Math Settings menu.

Preferences: MathJax uses your browser's localStorage database to save the preferences set via this menu locally in your browser. These are not used to track you, and are not transferred or used remotely by MathJax in any way.

", - - "MmlTitle": "MathJax MathML Expression", - "SourceTitle": "MathJax Original Source", - "AnnotationTitle": "MathJax Annotation Text", - "SvgTitle": "MathJax SVG Image", - "SpeechTitle": "MathJax Speech Text", - "BrailleTitle": "MathJax Braille Text", - "ErrorTitle": "MathJax Error Message", - "ZoomTitle": "MathJax Zoomed Expression", - - "StorageError": "MathJax localStorage error: %1", - "ComponentNotLoaded": "Component %1 not loaded", - "ScalePrompt": "Scale all mathematics (compared to surrounding text) by", - "ScaleNonZero": "The scale should not be zero", - "ScalePercent": "The scale should be a percentage (e.g., 120%)", - "NoSvgProduced": "SVG can't be produced.
Try switching to SVG output first.", - - "ClearspeakTitle": "Clearspeak Preferences", - "SelectPrefs": "Select Preferences", - "NoPrefs": "No Preferences", - "CurrentPrefs": "Current Preferences", - "PrefsFor": "Preferences for %1" + "ueb": "UEB" } From e880b1cd5ff5d1132499ab841acb6e53342f6cd6 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Fri, 29 May 2026 18:00:16 -0400 Subject: [PATCH 2/2] Add message for error during copying (missed in initial menu localization branch) --- ts/ui/menu/MenuUtil.ts | 3 ++- ts/ui/menu/__locales__/de.json | 1 + ts/ui/menu/__locales__/en.json | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ts/ui/menu/MenuUtil.ts b/ts/ui/menu/MenuUtil.ts index 0eaa58c74..0e25d632b 100644 --- a/ts/ui/menu/MenuUtil.ts +++ b/ts/ui/menu/MenuUtil.ts @@ -22,6 +22,7 @@ */ import { context } from '../../util/context.js'; +import { localize } from './__locales__/Component.js'; /** * True when platform is a Mac (so we can enable CMD menu item for zoom trigger) @@ -43,7 +44,7 @@ export function copyToClipboard(text: string) { try { document.execCommand('copy'); } catch (error) { - alert(`Can't copy to clipboard: ${error.message}`); + alert(localize('.Warn/CantCopy', error.message)); } document.body.removeChild(input); } diff --git a/ts/ui/menu/__locales__/de.json b/ts/ui/menu/__locales__/de.json index 506d35771..5858d331a 100644 --- a/ts/ui/menu/__locales__/de.json +++ b/ts/ui/menu/__locales__/de.json @@ -21,6 +21,7 @@ ".Speech/Title": "MathJax-Sprechtext", ".Svg/NotProduced": "SVG kann nicht erzeugt werden.
Versuchen Sie zunächst, zur SVG-Ausgabe zu wechseln.", ".Svg/Title": "MathJax-SVG-Bild", + ".Warn/CantCopy": "Kann nicht in die Zwischenablage kopiert werden: %1", ".Warn/ComponentNotLoaded": "Komponente %1 nicht geladen", ".Warn/StorageError": "MathJax-localStorage-Fehler: %1", ".Zoom/Title": "MathJax-vergrößerter Ausdruck", diff --git a/ts/ui/menu/__locales__/en.json b/ts/ui/menu/__locales__/en.json index d51ccf18b..ad96c702b 100644 --- a/ts/ui/menu/__locales__/en.json +++ b/ts/ui/menu/__locales__/en.json @@ -21,6 +21,7 @@ ".Speech/Title": "MathJax Speech Text", ".Svg/NotProduced": "SVG can't be produced.
Try switching to SVG output first.", ".Svg/Title": "MathJax SVG Image", + ".Warn/CantCopy": "Can't copy to clipboard: %1", ".Warn/ComponentNotLoaded": "Component %1 not loaded", ".Warn/StorageError": "MathJax localStorage error: %1", ".Zoom/Title": "MathJax Zoomed Expression",