simplify reader.ftl (#4756)

Remove logic constructing a11y announcements from reader.ftl.
Instead, reader will fetch and put together components as needed on the fly.

Follow-up to cde21ac9f2
per https://github.com/zotero/zotero/pull/4752#discussion_r1800481917

Also, add { general-key-command } and { general-key-alt } and add a reader
string that uses those on macOS and non-macOS for textual annotation
instructions. On macOS, the end of highlight and underline annotations is
resized via Shift+Command+arrows, which is different from the Option
modifier used in all other instances
(per https://github.com/zotero/reader/pull/138#issuecomment-2373775068)

Finally, tweak aria-description of "Find in Document" as it sounded
as if Control+Option/Alt+1 would create either highlight or underline
annotation.
This commit is contained in:
abaevbog 2024-10-15 03:11:01 -07:00 committed by GitHub
parent d14a72e1b0
commit d786454a3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 22 deletions

View file

@ -12,31 +12,18 @@ pdfReader-imageAnnotation = Image Annotation
pdfReader-find-in-document = Find in Document
pdfReader-move-annotation-start-key =
{ PLATFORM() ->
[macos] { general-key-command }
*[other] { general-key-alt }
}
pdfReader-a11yMoveAnnotation = Use the arrow keys to move the annotation.
pdfReader-a11yEditTextAnnotation = To move the end of the text annotation, hold { general-key-shift } and use the left/right arrow keys. To move the start of the annotation, hold { general-key-shift }-{ option-or-alt } and use the arrow keys.
pdfReader-a11yEditTextAnnotation = To move the end of the text annotation, hold { general-key-shift } and use the left/right arrow keys. To move the start of the annotation, hold { general-key-shift }-{ pdfReader-move-annotation-start-key } and use the arrow keys.
pdfReader-a11yResizeAnnotation = To resize the annotation, hold { general-key-shift } and use the arrow keys.
pdfReader-a11yAnnotationPopupAppeared = Use Tab to navigate the annotation popup.
pdfReader-a11yAnnotationCreated = { $type ->
[highlight] { pdfReader-highlightAnnotation }
[underline] { pdfReader-underlineAnnotation }
[note] { pdfReader-noteAnnotation }
[text] { pdfReader-textAnnotation }
[image] { pdfReader-imageAnnotation }
*[other] Annotation
} created.
pdfReader-a11yAnnotationSelected = { $type ->
[highlight] { pdfReader-highlightAnnotation } selected. { pdfReader-a11yEditTextAnnotation }
[underline] { pdfReader-underlineAnnotation } selected. { pdfReader-a11yEditTextAnnotation }
[note] { pdfReader-noteAnnotation } selected. { pdfReader-a11yMoveAnnotation }
[text] { pdfReader-textAnnotation } selected. { pdfReader-a11yMoveAnnotation } { pdfReader-a11yResizeAnnotation }
[image] { pdfReader-imageAnnotation } selected. { pdfReader-a11yMoveAnnotation } { pdfReader-a11yResizeAnnotation }
*[other] Annotation selected.
} { $popupVisible ->
[yes] { pdfReader-a11yAnnotationPopupAppeared }
*[other] { "" }
}
pdfReader-a11yAnnotationCreated = { $type } created.
pdfReader-a11yAnnotationSelected = { $type } selected.
-pdfReader-a11yTextualAnnotationInstruction = To annotate text via the keyboard, first use “{ pdfReader-find-in-document }” to locate the phrase, and then press { general-key-control }-{ option-or-alt }-{ $number } to turn the search result into an annotation.
-pdfReader-a11yAnnotationInstruction = To add this annotation into the document, focus the document and press { general-key-control }-{ option-or-alt }-{ $number }.
@ -63,4 +50,4 @@ pdfReader-toolbar-draw =
pdfReader-findInDocumentInput =
.title = Find
.placeholder = { pdfReader-find-in-document }
.aria-description = To turn a search result into a highlight or underline annotation, press { general-key-control }-{ option-or-alt }-1. To turn a search result into an underline annotation, press { general-key-control }-{ option-or-alt }-2.
.aria-description = To turn a search result into a highlight annotation, press { general-key-control }-{ option-or-alt }-1. To turn a search result into an underline annotation, press { general-key-control }-{ option-or-alt }-2.

View file

@ -1,5 +1,7 @@
general-key-control = Control
general-key-shift = Shift
general-key-alt = Alt
general-key-command = Command
option-or-alt =
{ PLATFORM() ->
[macos] Option