Skip to content

Commit

Permalink
up bookmarks accessibility and i18n check
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur-lemeur committed Dec 30, 2024
1 parent 4d7c584 commit 9ed67ca
Show file tree
Hide file tree
Showing 29 changed files with 182 additions and 31 deletions.
13 changes: 8 additions & 5 deletions src/renderer/reader/components/ReaderMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ const AnnotationCard: React.FC<{ timestamp: number, annotation: IAnnotationState
<></>
: <button className={classNames(stylesAnnotations.annotation_name, "R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE")}
// title={bname}
aria-label={__("reader.annotations.goToContent")}
aria-label={__("reader.goToContent")}
style={{ borderLeft: dockedEditAnnotation && "2px solid var(--color-blue)" }}
onClick={(e) => {
e.preventDefault();
Expand Down Expand Up @@ -1498,7 +1498,7 @@ const BookmarkItem: React.FC<{ bookmark: IBookmarkState; i: number }> = (props)
}, [isEdited]);

return (
<div
<li
className={stylesPopoverDialog.bookmarks_line}
key={i}
onKeyDown={isEdited ? (e) => {
Expand All @@ -1513,6 +1513,7 @@ const BookmarkItem: React.FC<{ bookmark: IBookmarkState; i: number }> = (props)
}, 100);
}
} : undefined}
aria-label={__("reader.navigation.bookmarkTitle")}
>
<div
className={stylesPopoverDialog.bookmark_infos}
Expand Down Expand Up @@ -1550,6 +1551,7 @@ const BookmarkItem: React.FC<{ bookmark: IBookmarkState; i: number }> = (props)
const closeNavBookmark = !dockedMode && !(e.shiftKey && e.altKey);
goToLocator(bookmark.locator, closeNavBookmark);
}}
aria-label={__("reader.goToContent")}

// does not work on button (works on 'a' link)
// onDoubleClick={(_e) => goToLocator(bookmark.locator, false)}
Expand All @@ -1573,7 +1575,7 @@ const BookmarkItem: React.FC<{ bookmark: IBookmarkState; i: number }> = (props)
</button>
}
<div className={stylesPopoverDialog.bookmark_actions}>
<div>
<div aria-label={__("reader.marks.progression")}>
<SVG ariaHidden svg={BookOpenIcon} />
<p>{bprogression}</p>
</div>
Expand Down Expand Up @@ -1614,7 +1616,7 @@ const BookmarkItem: React.FC<{ bookmark: IBookmarkState; i: number }> = (props)
</div>
</div>
</div>
</div>
</li>
);
};

Expand Down Expand Up @@ -1697,7 +1699,7 @@ const BookmarkList: React.FC<{ r2Publication: R2Publication, dockedMode: boolean
itemEdited,
setItemToEdit,
}}>

<ul style={{listStyleType: "none", padding: "0"}}>
{
bookmarksPagedArray.map((bookmark, i) =>
<BookmarkItem
Expand All @@ -1707,6 +1709,7 @@ const BookmarkList: React.FC<{ r2Publication: R2Publication, dockedMode: boolean
/>,
)
}
</ul>
</bookmarkCardContext.Provider>
{
isPaginated ? <>
Expand Down
6 changes: 6 additions & 0 deletions src/resources/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
"red": "",
"yellow": ""
},
"date": "",
"filter": {
"all": "",
"filterByColor": "",
Expand All @@ -354,6 +355,7 @@
"hide": "عدم الإظهار",
"highlight": "تمييز",
"noSelectionToast": "لم يتم اختيار شيء",
"note": "",
"quickAnnotations": "إنشاء سريع (تخطي المحرِّر)",
"saveNote": "حفظ",
"sorting": {
Expand All @@ -377,13 +379,15 @@
"fxl": {
"fit": "ملاءمة"
},
"goToContent": "",
"marks": {
"annotations": "التعليقات",
"bookmarks": "الإشارات المرجعية",
"delete": "حذف",
"edit": "تحرير",
"goTo": "الانتقال إلى صفحة",
"landmarks": "المَعالم",
"progression": "",
"saveMark": "حفظ الإشارة المرجعية",
"search": "بحث",
"searchResult": "بحث عن [{{- searchText}}]",
Expand All @@ -404,6 +408,8 @@
"title": "القراءة بصوت عالٍ"
},
"navigation": {
"ZenModeExit": "",
"ZenModeTitle": "",
"annotationTitle": "التعليق",
"backHomeTitle": "عودة إلى رف الكتب",
"bookmarkTitle": "الإشارة المرجعية",
Expand Down
6 changes: 6 additions & 0 deletions src/resources/locales/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
"red": "",
"yellow": ""
},
"date": "",
"filter": {
"all": "",
"filterByColor": "",
Expand All @@ -354,6 +355,7 @@
"hide": "",
"highlight": "",
"noSelectionToast": "",
"note": "",
"quickAnnotations": "",
"saveNote": "",
"sorting": {
Expand All @@ -377,13 +379,15 @@
"fxl": {
"fit": ""
},
"goToContent": "",
"marks": {
"annotations": "Анотации",
"bookmarks": "Отметки",
"delete": "Изтрий",
"edit": "Edit",
"goTo": "",
"landmarks": "Landmarks",
"progression": "",
"saveMark": "",
"search": "Търси",
"searchResult": "",
Expand All @@ -404,6 +408,8 @@
"title": "Четене на глас"
},
"navigation": {
"ZenModeExit": "",
"ZenModeTitle": "",
"annotationTitle": "",
"backHomeTitle": "обратно към лавицата с книги",
"bookmarkTitle": "отметка",
Expand Down
6 changes: 6 additions & 0 deletions src/resources/locales/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
"red": "",
"yellow": ""
},
"date": "",
"filter": {
"all": "",
"filterByColor": "",
Expand All @@ -354,6 +355,7 @@
"hide": "No ho mostris",
"highlight": "Ressaltat",
"noSelectionToast": "Sense selecció",
"note": "",
"quickAnnotations": "Creació ràpida (omet l'editor)",
"saveNote": "Desa",
"sorting": {
Expand All @@ -377,13 +379,15 @@
"fxl": {
"fit": "Ajusta"
},
"goToContent": "",
"marks": {
"annotations": "Anotacions",
"bookmarks": "Marcadors",
"delete": "Eliminar",
"edit": "Editar",
"goTo": "Anar a la pàgina",
"landmarks": "Punts de referència",
"progression": "",
"saveMark": "Desa el marcador",
"search": "Cercar",
"searchResult": "Cercar [{{- searchText}}]",
Expand All @@ -404,6 +408,8 @@
"title": "Lectura en veu alta"
},
"navigation": {
"ZenModeExit": "",
"ZenModeTitle": "",
"annotationTitle": "anotació",
"backHomeTitle": "Tornar a la biblioteca",
"bookmarkTitle": "Marcador",
Expand Down
6 changes: 6 additions & 0 deletions src/resources/locales/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
"red": "Rød",
"yellow": "Gul"
},
"date": "",
"filter": {
"all": "Alle",
"filterByColor": "Filtrér efter Farve",
Expand All @@ -354,6 +355,7 @@
"hide": "Skjul",
"highlight": "Overstregning",
"noSelectionToast": "Intet markeret",
"note": "",
"quickAnnotations": "Hurtig-oprettelse (spring redigering over)",
"saveNote": "Gem",
"sorting": {
Expand All @@ -377,13 +379,15 @@
"fxl": {
"fit": "Tilpas"
},
"goToContent": "",
"marks": {
"annotations": "Noter",
"bookmarks": "Bogmærker",
"delete": "Slet",
"edit": "Rediger",
"goTo": "Gå til side",
"landmarks": "Regioner",
"progression": "",
"saveMark": "Gem bogmærke",
"search": "Søg",
"searchResult": "Søgning [{{- searchText}}]",
Expand All @@ -404,6 +408,8 @@
"title": "Oplæsning"
},
"navigation": {
"ZenModeExit": "",
"ZenModeTitle": "",
"annotationTitle": "lav note",
"backHomeTitle": "tilbage til boghylden",
"bookmarkTitle": "bogmærke",
Expand Down
6 changes: 6 additions & 0 deletions src/resources/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
"red": "",
"yellow": ""
},
"date": "",
"filter": {
"all": "",
"filterByColor": "",
Expand All @@ -354,6 +355,7 @@
"hide": "Ausblenden",
"highlight": "Markieren",
"noSelectionToast": "Keine Auswahl",
"note": "",
"quickAnnotations": "Schnell erstellen (Editor überspringen)",
"saveNote": "Speichern",
"sorting": {
Expand All @@ -377,13 +379,15 @@
"fxl": {
"fit": "Einpassen"
},
"goToContent": "",
"marks": {
"annotations": "Meine Anmerkungen",
"bookmarks": "Meine Lesezeichen",
"delete": "Löschen",
"edit": "Bearbeiten",
"goTo": "Gehe zu Seite",
"landmarks": "Navigationspunkte",
"progression": "",
"saveMark": "Lesezeichen speichern",
"search": "Suche",
"searchResult": "Suche [{{- searchText}}]",
Expand All @@ -404,6 +408,8 @@
"title": "Vorlesen"
},
"navigation": {
"ZenModeExit": "",
"ZenModeTitle": "",
"annotationTitle": "Notizen",
"backHomeTitle": "Zurück zum Bücherregal",
"bookmarkTitle": "Lesezeichen setzen",
Expand Down
6 changes: 6 additions & 0 deletions src/resources/locales/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
"red": "",
"yellow": ""
},
"date": "",
"filter": {
"all": "",
"filterByColor": "",
Expand All @@ -354,6 +355,7 @@
"hide": "Να μην εμφανίζεται",
"highlight": "Επισήμανση",
"noSelectionToast": "Καμία επιλογή",
"note": "",
"quickAnnotations": "Γρήγορη δημιουργία (παράβλεψη επεξεργασίας)",
"saveNote": "Αποθήκευση",
"sorting": {
Expand All @@ -377,13 +379,15 @@
"fxl": {
"fit": "Προσαρμογή"
},
"goToContent": "",
"marks": {
"annotations": "Σχόλια",
"bookmarks": "Σελιδοδείκτες",
"delete": "Διαγραφή",
"edit": "Επεξεργασία",
"goTo": "Μετάβαση σε σελίδα",
"landmarks": "Ορόσημα",
"progression": "",
"saveMark": "Αποθήκευση σελιδοδείκτη",
"search": "Αναζήτηση",
"searchResult": "Αναζήτηση [{{- searchText}}]",
Expand All @@ -404,6 +408,8 @@
"title": "Λειτουργία προφορικού αναγνώστη / Readaloud"
},
"navigation": {
"ZenModeExit": "",
"ZenModeTitle": "",
"annotationTitle": "σχόλιο",
"backHomeTitle": "Πίσω στη βιβλιοθήκη",
"bookmarkTitle": "Σελιδοδείκτης",
Expand Down
11 changes: 6 additions & 5 deletions src/resources/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,6 @@
},
"reader": {
"annotations": {
"note": "{{- color}} Note",
"date": "Modification date",
"goToContent": "Go to the content",
"Color": "Color",
"addNote": "Annotate",
"advancedMode": "Instant mode (auto create after select)",
Expand All @@ -345,6 +342,7 @@
"red": "Red",
"yellow": "Yellow"
},
"date": "Modification date",
"filter": {
"all": "All",
"filterByColor": "Filter by Color",
Expand All @@ -357,6 +355,7 @@
"hide": "Do not display",
"highlight": "Highlight",
"noSelectionToast": "No selection",
"note": "{{- color}} Note",
"quickAnnotations": "Quick create (skip editor)",
"saveNote": "Save",
"sorting": {
Expand All @@ -380,13 +379,15 @@
"fxl": {
"fit": "Fit"
},
"goToContent": "Go to the content",
"marks": {
"annotations": "Annotations",
"bookmarks": "Bookmarks",
"delete": "Delete",
"edit": "Edit",
"goTo": "Go to page",
"landmarks": "Landmarks",
"progression": "Progression",
"saveMark": "Save bookmark",
"search": "Search",
"searchResult": "Search [{{- searchText}}]",
Expand All @@ -407,15 +408,15 @@
"title": "Readaloud"
},
"navigation": {
"ZenModeExit": "Exit Zen mode",
"ZenModeTitle": "Zen mode",
"annotationTitle": "annotation",
"backHomeTitle": "Close this reading window (back to bookshelf)",
"bookmarkTitle": "bookmark",
"currentPage": "Current page: {{- current}}",
"currentPageTotal": "Current page: {{- current}}/{{- total}}",
"detachWindowTitle": "show library / bookshelf window",
"fullscreenTitle": "go fullscreen",
"ZenModeTitle": "Zen mode",
"ZenModeExit": "Exit Zen mode",
"goTo": "Go to",
"goToError": "Page break does not exist",
"goToPlaceHolder": "Enter page number",
Expand Down
Loading

0 comments on commit 9ed67ca

Please sign in to comment.