Skip to content

Commit

Permalink
Fix:Rich text editor labels and add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Jan 26, 2024
1 parent 0b334cf commit e43c4f0
Show file tree
Hide file tree
Showing 18 changed files with 164 additions and 11 deletions.
22 changes: 11 additions & 11 deletions client/components/ui/RichTextEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,29 @@ export default {
toolbar: {
getDefaultHTML: () => `<div class="trix-button-row">
<span class="trix-button-group trix-button-group--text-tools" data-trix-button-group="text-tools">
<button type="button" class="trix-button trix-button--icon trix-button--icon-bold" data-trix-attribute="bold" data-trix-key="b" title="#{lang.bold}" tabindex="-1">#{lang.bold}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-italic" data-trix-attribute="italic" data-trix-key="i" title="#{lang.italic}" tabindex="-1">#{lang.italic}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-strike" data-trix-attribute="strike" title="#{lang.strike}" tabindex="-1">#{lang.strike}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-link" data-trix-attribute="href" data-trix-action="link" data-trix-key="k" title="#{lang.link}" tabindex="-1">#{lang.link}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-bold" data-trix-attribute="bold" data-trix-key="b" title="${this.$strings.LabelFontBold}" tabindex="-1">${this.$strings.LabelFontBold}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-italic" data-trix-attribute="italic" data-trix-key="i" title="${this.$strings.LabelFontItalic}" tabindex="-1">${this.$strings.LabelFontItalic}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-strike" data-trix-attribute="strike" title="${this.$strings.LabelFontStrikethrough}" tabindex="-1">${this.$strings.LabelFontStrikethrough}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-link" data-trix-attribute="href" data-trix-action="link" data-trix-key="k" title="${this.$strings.LabelTextEditorLink}" tabindex="-1">${this.$strings.LabelTextEditorLink}</button>
</span>
<span class="trix-button-group trix-button-group--block-tools" data-trix-button-group="block-tools">
<button type="button" class="trix-button trix-button--icon trix-button--icon-bullet-list" data-trix-attribute="bullet" title="#{lang.bullets}" tabindex="-1">#{lang.bullets}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-number-list" data-trix-attribute="number" title="#{lang.numbers}" tabindex="-1">#{lang.numbers}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-bullet-list" data-trix-attribute="bullet" title="${this.$strings.LabelTextEditorBulletedList}" tabindex="-1">${this.$strings.LabelTextEditorBulletedList}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-number-list" data-trix-attribute="number" title="${this.$strings.LabelTextEditorNumberedList}" tabindex="-1">${this.$strings.LabelTextEditorNumberedList}</button>
</span>
<span class="trix-button-group-spacer"></span>
<span class="trix-button-group trix-button-group--history-tools" data-trix-button-group="history-tools">
<button type="button" class="trix-button trix-button--icon trix-button--icon-undo" data-trix-action="undo" data-trix-key="z" title="#{lang.undo}" tabindex="-1">#{lang.undo}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-redo" data-trix-action="redo" data-trix-key="shift+z" title="#{lang.redo}" tabindex="-1">#{lang.redo}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-undo" data-trix-action="undo" data-trix-key="z" title="${this.$strings.LabelUndo}" tabindex="-1">${this.$strings.LabelUndo}</button>
<button type="button" class="trix-button trix-button--icon trix-button--icon-redo" data-trix-action="redo" data-trix-key="shift+z" title="${this.$strings.LabelRedo}" tabindex="-1">${this.$strings.LabelRedo}</button>
</span>
</div>
<div class="trix-dialogs" data-trix-dialogs>
<div class="trix-dialog trix-dialog--link" data-trix-dialog="href" data-trix-dialog-attribute="href">
<div class="trix-dialog__link-fields">
<input type="url" name="href" class="trix-input trix-input--dialog" placeholder="#{lang.urlPlaceholder}" aria-label="#{lang.url}" required data-trix-input>
<input type="url" name="href" class="trix-input trix-input--dialog" placeholder="" aria-label="URL" required data-trix-input>
<div class="trix-button-group">
<input type="button" class="trix-button trix-button--dialog" value="#{lang.link}" data-trix-method="setAttribute">
<input type="button" class="trix-button trix-button--dialog" value="#{lang.unlink}" data-trix-method="removeAttribute">
<input type="button" class="trix-button trix-button--dialog" value="${this.$strings.LabelTextEditorLink}" data-trix-method="setAttribute">
<input type="button" class="trix-button trix-button--dialog" value="${this.$strings.LabelTextEditorUnlink}" data-trix-method="removeAttribute">
</div>
</div>
</div>
Expand Down
9 changes: 9 additions & 0 deletions client/strings/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,11 @@
"LabelFinished": "Dokončeno",
"LabelFolder": "Složka",
"LabelFolders": "Složky",
"LabelFontBold": "Bold",
"LabelFontFamily": "Rodina písem",
"LabelFontItalic": "Italic",
"LabelFontScale": "Měřítko písma",
"LabelFontStrikethrough": "Strikethrough",
"LabelFormat": "Formát",
"LabelGenre": "Žánr",
"LabelGenres": "Žánry",
Expand Down Expand Up @@ -403,6 +406,7 @@
"LabelRecentlyAdded": "Nedávno přidané",
"LabelRecentSeries": "Nedávné série",
"LabelRecommended": "Doporučeno",
"LabelRedo": "Redo",
"LabelRegion": "Region",
"LabelReleaseDate": "Datum vydání",
"LabelRemoveCover": "Odstranit obálku",
Expand Down Expand Up @@ -491,6 +495,10 @@
"LabelTagsAccessibleToUser": "Značky přístupné uživateli",
"LabelTagsNotAccessibleToUser": "Značky nepřístupné uživateli",
"LabelTasks": "Spuštěné Úlohy",
"LabelTextEditorBulletedList": "Bulleted list",
"LabelTextEditorLink": "Link",
"LabelTextEditorNumberedList": "Numbered list",
"LabelTextEditorUnlink": "Unlink",
"LabelTheme": "Téma",
"LabelThemeDark": "Tmavé",
"LabelThemeLight": "Světlé",
Expand All @@ -516,6 +524,7 @@
"LabelTracksSingleTrack": "Jedna stopa",
"LabelType": "Typ",
"LabelUnabridged": "Nezkráceno",
"LabelUndo": "Undo",
"LabelUnknown": "Neznámý",
"LabelUpdateCover": "Aktualizovat obálku",
"LabelUpdateCoverHelp": "Povolit přepsání existujících obálek pro vybrané knihy, pokud je nalezena shoda",
Expand Down
9 changes: 9 additions & 0 deletions client/strings/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,11 @@
"LabelFinished": "Færdig",
"LabelFolder": "Mappe",
"LabelFolders": "Mapper",
"LabelFontBold": "Bold",
"LabelFontFamily": "Fontfamilie",
"LabelFontItalic": "Italic",
"LabelFontScale": "Skriftstørrelse",
"LabelFontStrikethrough": "Strikethrough",
"LabelFormat": "Format",
"LabelGenre": "Genre",
"LabelGenres": "Genrer",
Expand Down Expand Up @@ -403,6 +406,7 @@
"LabelRecentlyAdded": "Senest tilføjet",
"LabelRecentSeries": "Seneste serie",
"LabelRecommended": "Anbefalet",
"LabelRedo": "Redo",
"LabelRegion": "Region",
"LabelReleaseDate": "Udgivelsesdato",
"LabelRemoveCover": "Fjern omslag",
Expand Down Expand Up @@ -491,6 +495,10 @@
"LabelTagsAccessibleToUser": "Mærker tilgængelige for bruger",
"LabelTagsNotAccessibleToUser": "Mærker ikke tilgængelige for bruger",
"LabelTasks": "Kører opgaver",
"LabelTextEditorBulletedList": "Bulleted list",
"LabelTextEditorLink": "Link",
"LabelTextEditorNumberedList": "Numbered list",
"LabelTextEditorUnlink": "Unlink",
"LabelTheme": "Tema",
"LabelThemeDark": "Mørk",
"LabelThemeLight": "Lys",
Expand All @@ -516,6 +524,7 @@
"LabelTracksSingleTrack": "Enkeltspors",
"LabelType": "Type",
"LabelUnabridged": "Uforkortet",
"LabelUndo": "Undo",
"LabelUnknown": "Ukendt",
"LabelUpdateCover": "Opdater omslag",
"LabelUpdateCoverHelp": "Tillad overskrivning af eksisterende omslag for de valgte bøger, når der findes en match",
Expand Down
9 changes: 9 additions & 0 deletions client/strings/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,11 @@
"LabelFinished": "Beendet",
"LabelFolder": "Ordner",
"LabelFolders": "Verzeichnisse",
"LabelFontBold": "Bold",
"LabelFontFamily": "Schriftfamilie",
"LabelFontItalic": "Italic",
"LabelFontScale": "Schriftgröße",
"LabelFontStrikethrough": "Strikethrough",
"LabelFormat": "Format",
"LabelGenre": "Kategorie",
"LabelGenres": "Kategorien",
Expand Down Expand Up @@ -403,6 +406,7 @@
"LabelRecentlyAdded": "Kürzlich hinzugefügt",
"LabelRecentSeries": "Aktuelle Serien",
"LabelRecommended": "Empfohlen",
"LabelRedo": "Redo",
"LabelRegion": "Region",
"LabelReleaseDate": "Veröffentlichungsdatum",
"LabelRemoveCover": "Lösche Titelbild",
Expand Down Expand Up @@ -491,6 +495,10 @@
"LabelTagsAccessibleToUser": "Für Benutzer zugängliche Schlagwörter",
"LabelTagsNotAccessibleToUser": "Für Benutzer nicht zugängliche Schlagwörter",
"LabelTasks": "Laufende Aufgaben",
"LabelTextEditorBulletedList": "Bulleted list",
"LabelTextEditorLink": "Link",
"LabelTextEditorNumberedList": "Numbered list",
"LabelTextEditorUnlink": "Unlink",
"LabelTheme": "Theme",
"LabelThemeDark": "Dunkel",
"LabelThemeLight": "Hell",
Expand All @@ -516,6 +524,7 @@
"LabelTracksSingleTrack": "Einzeldatei",
"LabelType": "Typ",
"LabelUnabridged": "Ungekürzt",
"LabelUndo": "Undo",
"LabelUnknown": "Unbekannt",
"LabelUpdateCover": "Titelbild aktualisieren",
"LabelUpdateCoverHelp": "Erlaube das Überschreiben bestehender Titelbilder für die ausgewählten Hörbücher, wenn eine Übereinstimmung gefunden wird",
Expand Down
9 changes: 9 additions & 0 deletions client/strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,11 @@
"LabelFinished": "Finished",
"LabelFolder": "Folder",
"LabelFolders": "Folders",
"LabelFontBold": "Bold",
"LabelFontFamily": "Font family",
"LabelFontItalic": "Italic",
"LabelFontScale": "Font scale",
"LabelFontStrikethrough": "Strikethrough",
"LabelFormat": "Format",
"LabelGenre": "Genre",
"LabelGenres": "Genres",
Expand Down Expand Up @@ -403,6 +406,7 @@
"LabelRecentlyAdded": "Recently Added",
"LabelRecentSeries": "Recent Series",
"LabelRecommended": "Recommended",
"LabelRedo": "Redo",
"LabelRegion": "Region",
"LabelReleaseDate": "Release Date",
"LabelRemoveCover": "Remove cover",
Expand Down Expand Up @@ -491,6 +495,10 @@
"LabelTagsAccessibleToUser": "Tags Accessible to User",
"LabelTagsNotAccessibleToUser": "Tags not Accessible to User",
"LabelTasks": "Tasks Running",
"LabelTextEditorBulletedList": "Bulleted list",
"LabelTextEditorLink": "Link",
"LabelTextEditorNumberedList": "Numbered list",
"LabelTextEditorUnlink": "Unlink",
"LabelTheme": "Theme",
"LabelThemeDark": "Dark",
"LabelThemeLight": "Light",
Expand All @@ -516,6 +524,7 @@
"LabelTracksSingleTrack": "Single-track",
"LabelType": "Type",
"LabelUnabridged": "Unabridged",
"LabelUndo": "Undo",
"LabelUnknown": "Unknown",
"LabelUpdateCover": "Update Cover",
"LabelUpdateCoverHelp": "Allow overwriting of existing covers for the selected books when a match is located",
Expand Down
9 changes: 9 additions & 0 deletions client/strings/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,11 @@
"LabelFinished": "Terminado",
"LabelFolder": "Carpeta",
"LabelFolders": "Carpetas",
"LabelFontBold": "Bold",
"LabelFontFamily": "Familia tipográfica",
"LabelFontItalic": "Italic",
"LabelFontScale": "Tamaño de Fuente",
"LabelFontStrikethrough": "Strikethrough",
"LabelFormat": "Formato",
"LabelGenre": "Genero",
"LabelGenres": "Géneros",
Expand Down Expand Up @@ -403,6 +406,7 @@
"LabelRecentlyAdded": "Agregado Recientemente",
"LabelRecentSeries": "Series Recientes",
"LabelRecommended": "Recomendados",
"LabelRedo": "Redo",
"LabelRegion": "Región",
"LabelReleaseDate": "Fecha de Estreno",
"LabelRemoveCover": "Remover Portada",
Expand Down Expand Up @@ -491,6 +495,10 @@
"LabelTagsAccessibleToUser": "Etiquetas Accessibles al Usuario",
"LabelTagsNotAccessibleToUser": "Etiquetas no Accesibles al Usuario",
"LabelTasks": "Tareas Corriendo",
"LabelTextEditorBulletedList": "Bulleted list",
"LabelTextEditorLink": "Link",
"LabelTextEditorNumberedList": "Numbered list",
"LabelTextEditorUnlink": "Unlink",
"LabelTheme": "Tema",
"LabelThemeDark": "Oscuro",
"LabelThemeLight": "Claro",
Expand All @@ -516,6 +524,7 @@
"LabelTracksSingleTrack": "Una pista",
"LabelType": "Tipo",
"LabelUnabridged": "No Abreviado",
"LabelUndo": "Undo",
"LabelUnknown": "Desconocido",
"LabelUpdateCover": "Actualizar Portada",
"LabelUpdateCoverHelp": "Permitir sobrescribir las portadas existentes de los libros seleccionados cuando sean encontradas.",
Expand Down
9 changes: 9 additions & 0 deletions client/strings/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,11 @@
"LabelFinished": "Terminé le",
"LabelFolder": "Dossier",
"LabelFolders": "Dossiers",
"LabelFontBold": "Bold",
"LabelFontFamily": "Polices de caractères",
"LabelFontItalic": "Italic",
"LabelFontScale": "Taille de la police de caractère",
"LabelFontStrikethrough": "Strikethrough",
"LabelFormat": "Format",
"LabelGenre": "Genre",
"LabelGenres": "Genres",
Expand Down Expand Up @@ -403,6 +406,7 @@
"LabelRecentlyAdded": "Derniers ajouts",
"LabelRecentSeries": "Séries récentes",
"LabelRecommended": "Recommandé",
"LabelRedo": "Redo",
"LabelRegion": "Région",
"LabelReleaseDate": "Date de parution",
"LabelRemoveCover": "Supprimer la couverture",
Expand Down Expand Up @@ -491,6 +495,10 @@
"LabelTagsAccessibleToUser": "Étiquettes accessibles à l’utilisateur",
"LabelTagsNotAccessibleToUser": "Étiquettes non accessibles à l’utilisateur",
"LabelTasks": "Tâches en cours",
"LabelTextEditorBulletedList": "Bulleted list",
"LabelTextEditorLink": "Link",
"LabelTextEditorNumberedList": "Numbered list",
"LabelTextEditorUnlink": "Unlink",
"LabelTheme": "Thème",
"LabelThemeDark": "Sombre",
"LabelThemeLight": "Clair",
Expand All @@ -516,6 +524,7 @@
"LabelTracksSingleTrack": "Piste simple",
"LabelType": "Type",
"LabelUnabridged": "Version intégrale",
"LabelUndo": "Undo",
"LabelUnknown": "Inconnu",
"LabelUpdateCover": "Mettre à jour la couverture",
"LabelUpdateCoverHelp": "Autoriser la mise à jour de la couverture existante lorsqu’une correspondance est trouvée",
Expand Down
9 changes: 9 additions & 0 deletions client/strings/gu.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,11 @@
"LabelFinished": "Finished",
"LabelFolder": "Folder",
"LabelFolders": "Folders",
"LabelFontBold": "Bold",
"LabelFontFamily": "ફોન્ટ કુટુંબ",
"LabelFontItalic": "Italic",
"LabelFontScale": "Font scale",
"LabelFontStrikethrough": "Strikethrough",
"LabelFormat": "Format",
"LabelGenre": "Genre",
"LabelGenres": "Genres",
Expand Down Expand Up @@ -403,6 +406,7 @@
"LabelRecentlyAdded": "Recently Added",
"LabelRecentSeries": "Recent Series",
"LabelRecommended": "Recommended",
"LabelRedo": "Redo",
"LabelRegion": "Region",
"LabelReleaseDate": "Release Date",
"LabelRemoveCover": "Remove cover",
Expand Down Expand Up @@ -491,6 +495,10 @@
"LabelTagsAccessibleToUser": "Tags Accessible to User",
"LabelTagsNotAccessibleToUser": "Tags not Accessible to User",
"LabelTasks": "Tasks Running",
"LabelTextEditorBulletedList": "Bulleted list",
"LabelTextEditorLink": "Link",
"LabelTextEditorNumberedList": "Numbered list",
"LabelTextEditorUnlink": "Unlink",
"LabelTheme": "Theme",
"LabelThemeDark": "Dark",
"LabelThemeLight": "Light",
Expand All @@ -516,6 +524,7 @@
"LabelTracksSingleTrack": "Single-track",
"LabelType": "Type",
"LabelUnabridged": "Unabridged",
"LabelUndo": "Undo",
"LabelUnknown": "Unknown",
"LabelUpdateCover": "Update Cover",
"LabelUpdateCoverHelp": "Allow overwriting of existing covers for the selected books when a match is located",
Expand Down
9 changes: 9 additions & 0 deletions client/strings/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,11 @@
"LabelFinished": "Finished",
"LabelFolder": "Folder",
"LabelFolders": "Folders",
"LabelFontBold": "Bold",
"LabelFontFamily": "फुहारा परिवार",
"LabelFontItalic": "Italic",
"LabelFontScale": "Font scale",
"LabelFontStrikethrough": "Strikethrough",
"LabelFormat": "Format",
"LabelGenre": "Genre",
"LabelGenres": "Genres",
Expand Down Expand Up @@ -403,6 +406,7 @@
"LabelRecentlyAdded": "Recently Added",
"LabelRecentSeries": "Recent Series",
"LabelRecommended": "Recommended",
"LabelRedo": "Redo",
"LabelRegion": "Region",
"LabelReleaseDate": "Release Date",
"LabelRemoveCover": "Remove cover",
Expand Down Expand Up @@ -491,6 +495,10 @@
"LabelTagsAccessibleToUser": "Tags Accessible to User",
"LabelTagsNotAccessibleToUser": "Tags not Accessible to User",
"LabelTasks": "Tasks Running",
"LabelTextEditorBulletedList": "Bulleted list",
"LabelTextEditorLink": "Link",
"LabelTextEditorNumberedList": "Numbered list",
"LabelTextEditorUnlink": "Unlink",
"LabelTheme": "Theme",
"LabelThemeDark": "Dark",
"LabelThemeLight": "Light",
Expand All @@ -516,6 +524,7 @@
"LabelTracksSingleTrack": "Single-track",
"LabelType": "Type",
"LabelUnabridged": "Unabridged",
"LabelUndo": "Undo",
"LabelUnknown": "Unknown",
"LabelUpdateCover": "Update Cover",
"LabelUpdateCoverHelp": "Allow overwriting of existing covers for the selected books when a match is located",
Expand Down
9 changes: 9 additions & 0 deletions client/strings/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,11 @@
"LabelFinished": "Finished",
"LabelFolder": "Folder",
"LabelFolders": "Folderi",
"LabelFontBold": "Bold",
"LabelFontFamily": "Font family",
"LabelFontItalic": "Italic",
"LabelFontScale": "Font scale",
"LabelFontStrikethrough": "Strikethrough",
"LabelFormat": "Format",
"LabelGenre": "Genre",
"LabelGenres": "Žanrovi",
Expand Down Expand Up @@ -403,6 +406,7 @@
"LabelRecentlyAdded": "Nedavno dodano",
"LabelRecentSeries": "Nedavne serije",
"LabelRecommended": "Recommended",
"LabelRedo": "Redo",
"LabelRegion": "Regija",
"LabelReleaseDate": "Datum izlaska",
"LabelRemoveCover": "Remove cover",
Expand Down Expand Up @@ -491,6 +495,10 @@
"LabelTagsAccessibleToUser": "Tags dostupni korisniku",
"LabelTagsNotAccessibleToUser": "Tags not Accessible to User",
"LabelTasks": "Tasks Running",
"LabelTextEditorBulletedList": "Bulleted list",
"LabelTextEditorLink": "Link",
"LabelTextEditorNumberedList": "Numbered list",
"LabelTextEditorUnlink": "Unlink",
"LabelTheme": "Theme",
"LabelThemeDark": "Dark",
"LabelThemeLight": "Light",
Expand All @@ -516,6 +524,7 @@
"LabelTracksSingleTrack": "Single-track",
"LabelType": "Tip",
"LabelUnabridged": "Unabridged",
"LabelUndo": "Undo",
"LabelUnknown": "Nepoznato",
"LabelUpdateCover": "Aktualiziraj Cover",
"LabelUpdateCoverHelp": "Dozvoli postavljanje novog covera za odabrane knjige nakon što je match pronađen.",
Expand Down
Loading

0 comments on commit e43c4f0

Please sign in to comment.