Localize color names in pdf-reader

This commit is contained in:
Martynas Bagdonas 2021-07-06 16:57:47 +03:00
parent 28f5fed509
commit 9e7ab68fb4
3 changed files with 8 additions and 5 deletions

View file

@ -77,7 +77,10 @@ class ReaderInstance {
sidebarWidth: this._sidebarWidth,
sidebarOpen: this._sidebarOpen,
bottomPlaceholderHeight: this._bottomPlaceholderHeight,
localizedStrings: Zotero.Intl.getPrefixedStrings('pdfReader')
localizedStrings: {
...Zotero.Intl.getPrefixedStrings('general.'),
...Zotero.Intl.getPrefixedStrings('pdfReader.')
}
}, [buf]);
// Set title once again, because `ReaderWindow` isn't loaded the first time
this.updateTitle();
@ -389,7 +392,7 @@ class ReaderInstance {
// Colors
for (let color of colors) {
menuitem = this._window.document.createElement('menuitem');
menuitem.setAttribute('label', color[0]);
menuitem.setAttribute('label', Zotero.getString(color[0]));
menuitem.className = 'menuitem-iconic';
menuitem.setAttribute('disabled', readOnly);
menuitem.setAttribute('image', this._getColorIcon(color[1], color[1] === selectedColor));
@ -431,7 +434,7 @@ class ReaderInstance {
let menuitem;
for (let color of colors) {
menuitem = this._window.document.createElement('menuitem');
menuitem.setAttribute('label', color[0]);
menuitem.setAttribute('label', Zotero.getString(color[0]));
menuitem.className = 'menuitem-iconic';
menuitem.setAttribute('image', this._getColorIcon(color[1], color[1] === selectedColor));
menuitem.addEventListener('command', () => {

@ -1 +1 @@
Subproject commit a348bbdebf2771222f628c8d14546e3b410c5a58
Subproject commit 02f98e95126a2c212aff9c3dcbd82c6c3af768e4

@ -1 +1 @@
Subproject commit 326c2e0829522662fc35528dbde6454949142bb4
Subproject commit 1a678ffb5cbfd949a015d1fd25a825643a0bf632