From 58c168dca3c706cf5f835312f968caec391bab4d Mon Sep 17 00:00:00 2001 From: Aaron Leopold <36278431+aaronleopold@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:14:18 -0700 Subject: [PATCH 01/13] =?UTF-8?q?=F0=9F=8C=90=20Update=20translations=20(#?= =?UTF-8?q?318)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * New translations en.json (Portuguese) * New translations en.json (Chinese Simplified) * New translations en.json (Chinese Traditional) * New translations en.json (Portuguese, Brazilian) * New translations en.json (Polish) * New translations en.json (Polish) --- packages/i18n/src/locales/pl.json | 114 +++++++++++++++--------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/packages/i18n/src/locales/pl.json b/packages/i18n/src/locales/pl.json index 1eb056c65..b9f867b8a 100644 --- a/packages/i18n/src/locales/pl.json +++ b/packages/i18n/src/locales/pl.json @@ -1,9 +1,9 @@ { "underConstruction": { - "heading": "This is awkward", - "message": "You've stumbled upon a page that's still being developed. I'd love to show it to you, but it isn't quite ready yet.", - "homeLink": "Go Home", - "githubLink": "View the GitHub issue" + "heading": "To trochę niezręczne", + "message": "Natrafiono na stronę która jest wciąż w fazie rozwojowej. Z racji iż nie jest ona skończona, nie mogę Ci jej jeszcze pokazać.", + "homeLink": "Wróć do ekranu głównego", + "githubLink": "Zobacz problem na serwisie GitHub" }, "authScene": { "claimHeading": "Inicjalizuj serwer", @@ -72,7 +72,7 @@ "member_role_spec": { "heading": "Własne mapowanie ról", "subtitle": [ - "You can create custom names for the roles in your book club. For example, you could rename the 'Member' role to 'Crewmate', or 'Creator' to 'Captain'. If you don't want to use custom names, you can leave these fields blank and the default names will be used instead. For more information about roles, refer to the", + "Możesz stworzyć własne nazwy dla poszczególnych ról w Twoim klubie książki. Dla zasięgnięcia dalszych informacji sprawdź", "dokumentację" ], "member": { @@ -97,8 +97,8 @@ } }, "creator_preferences": { - "heading": "Your membership preferences", - "subtitle": "Some preferences for your membership in the book club. These can be changed at any time from the book club settings page", + "heading": "Członkowstwo", + "subtitle": "Ustawienia Twojego członkowstwa w klubie książki", "creator_display_name": { "label": "Nazwa wyświetlana", "placeholder": "oromei", @@ -113,8 +113,8 @@ } }, "createLibraryScene": { - "heading": "Create New Library", - "subtitle": "Libraries are used to group your books together. If you're wanting a refresh on libraries and how they work, check out the", + "heading": "Utwórz bibliotekę", + "subtitle": "Biblioteki służą do grupowania książek. Jeśli chcesz odświeżyć sobie metodykę ich działania, sprawdź", "subtitleLink": "stosowna dokumentacja", "form": { "labels": { @@ -130,8 +130,8 @@ } }, "librarySettingsScene": { - "heading": "Manage Library", - "subtitle": "Update the details or configuration of your library, change control access rules, or scan files. If you're wanting a refresh on libraries and how they work, check out the", + "heading": "Ustawienia", + "subtitle": "Zarządzaj tutaj swoją biblioteką. Jeśli chcesz odświeżyć sobie działanie tych ustawień, sprawdź", "subtitleLink": "stosowna dokumentacja", "form": { "labels": { @@ -325,7 +325,7 @@ }, "avatarPicker": { "heading": "Ustaw swój awatar", - "subtitle": "Stump wspiera niestandardowe awatary które można ustawić poprzez podanie odnośnika do obrazu. Wgrywanie obrazów nie jest obsługiwane w celu zmniejszenia ilości danych przechowywanych przez serwer.", + "subtitle": "Stump wspiera niestandardowe awatary które można ustawić poprzez podanie odnośnika do obrazu. Wgrywanie obrazów jest nieobsługiwane z racji zmniejszenia ilości danych przechowywanych na serwerze.", "preview": "Podgląd pojawi się tutaj po wprowadzeniu odnośnika.", "labels": { "imageUrl": "Adres obrazka", @@ -375,29 +375,29 @@ } }, "navigationArrangement": { - "label": "Navigation arrangement", + "label": "Układ nawigacji", "description": { - "sidebar": "Arrange and customize the navigation items in the sidebar", - "topbar": "Arrange and customize the navigation items in the topbar" + "sidebar": "Uporządkuj i dostosuj elementy nawigacji na pasku bocznym", + "topbar": "Uporządkuj i dostosuj elementy nawigacji na górnym pasku" }, - "isLocked": "Arrangement is locked", - "lock": "Lock arrangement", - "unlock": "Unlock arrangement", + "isLocked": "Układ jest zablokowany", + "lock": "Zablokuj układ", + "unlock": "Odblokuj układ", "options": { - "Home": "Home", - "Explore": "Explore", - "Libraries": "Libraries", - "BookClubs": "Book clubs", - "SmartLists": "Smart lists" + "Home": "Strona główna", + "Explore": "Odkrywaj", + "Libraries": "Biblioteki", + "BookClubs": "Kluby książki", + "SmartLists": "Inteligentne listy" }, "entityOptions": { "createAction": { - "label": "Show create action", - "help": "Show the create action in the navigation" + "label": "Pokaż akcję tworzenia", + "help": "Pokaż akcję tworzenia w menu nawigacji" }, "linkToAll": { - "label": "See all link", - "help": "A link to a page dedicated to viewing all items of this type" + "label": "Odnośnik do ukazania wszystkiego", + "help": "Odnośnik do strony przeznaczonej do przeglądania wszystkich elementów tego typu" } } } @@ -413,11 +413,11 @@ "description": "Komiksy, manga i inne książki obrazkowe", "sections": { "preloadAheadCount": { - "label": "Ilość do wstępnego zastosowania w przód", + "label": "Ilość do wstępnego załadowania w przód", "description": "Ilość stron do wstępnego załadowania w przód względem aktualnej strony" }, "preloadBehindCount": { - "label": "Ilość do wstępnego zastosowania do tyłu", + "label": "Ilość do wstępnego załadowania do tyłu", "description": "Ilość stron do wstępnego załadowania do tyłu względem aktualnej strony" } } @@ -430,9 +430,9 @@ "description": "Ustawienia związane z aplikacją dekstopową Stump", "sections": { "discordPresence": { - "label": "Status aktywności Discorda", + "label": "Status aktywności Discord", "description": "Wyświetl swoją aktywność Stump na Discordzie za pomocą statusu aktywności Discorda", - "reconnect": "Połącz ponownie z Discordem" + "reconnect": "Połącz ponownie z Discord" } } }, @@ -559,75 +559,75 @@ "bookclub": { "label": "Kluby książki", "read": { - "label": "Dostęp do funkcji klub książki", - "description": "Zezwala użytkownikowi na dostęp do funkcji klubu książki, w tym do przeglądania i dołączania do klubów książki" + "label": "Dostęp do funkcji klubu książki", + "description": "Pozwala użytkownikowi na dostęp do funkcji klubu książki, w tym do przeglądania i dołączania do klubów książki" }, "create": { "label": "Stwórz klub książki", - "description": "Zezwala użytkownikowi na tworzenie nowego klubu książki" + "description": "Pozwala użytkownikowi na tworzenie nowego klubu książki" } }, "file": { "label": "Zarządzanie plikami", "explorer": { - "label": "File Explorer", - "description": "Allows the user to access the Library File Explorer.\nContent restriction is not supported when this feature is granted" + "label": "Eksplorator plików", + "description": "Pozwala użytkownikowi na dostęp do różnych eksploratorów plików. Ograniczenie zawartości nie może być zagwarantowane, gdy to uprawnienie jest nadane" }, "download": { - "label": "Pobierz pliki", - "description": "Zezwala użytkownikowi na pobieranie plików z serwera" + "label": "Pobieranie plików", + "description": "Pozwala użytkownikowi na pobieranie plików z serwera" }, "upload": { - "label": "Prześlij pliki", + "label": "Przesyłanie plików", "description": "Pozwala użytkownikowi na przesyłanie plików na serwer" } }, "library": { - "label": "Zarządzanie biblioteką", + "label": "Zarządzanie bibliotekami", "create": { - "label": "Utwórz biblioteki", - "description": "Zezwala użytkownikowi na tworzenie nowych bilbliotek. Zawiera zezwolenia na edycje i skanowanie" + "label": "Tworzenie bibliotek", + "description": "Pozwala użytkownikowi na tworzenie nowych bilbliotek. Zawiera zezwolenia na edycje i skanowanie" }, "scan": { - "label": "Skanuj biblioteki", + "label": "Skanowanie bibliotek", "description": "Pozwól użytkownikom na rozpoczęcie skanowania dla istniejących bibliotek" }, "edit": { - "label": "Edytuj biblioteki", - "description": "Zezwala użytkownikowi na zmianę podstawowych danych istniejących bibliotek" + "label": "Edytowanie bibliotek", + "description": "Pozwala użytkownikowi na zmianę podstawowych danych istniejących bibliotek" }, "manage": { - "label": "Zarządzaj bibliotekami", - "description": "Zezwala użytkownikowi na zmianę zaawansowanych ustawień istniejących bibliotek. Zawiera zezwolenia na edycje i skanowanie" + "label": "Zarządzanie biblioteką", + "description": "Pozwala użytkownikowi na zmianę zaawansowanych ustawień istniejących bibliotek. Zawiera zezwolenia na edycje i skanowanie" }, "delete": { - "label": "Usuń biblioteki", - "description": "Zezwala użytkownikowi na usuwanie istniejących bilbliotek. Zawiera zezwolenia na edycje, zarządzanie i skanowanie" + "label": "Usuwanie bibliotek", + "description": "Pozwala użytkownikowi na usuwanie istniejących bilbliotek. Zawiera zezwolenia na edycje, zarządzanie i skanowanie" } }, "server": { "label": "Zarządzanie serwerem", "manage": { - "label": "Zarządzaj serwerem", + "label": "Zarządzanie serwerem", "description": "Pozwala użytkownikowi zarządzać serwerem.\nZawiera *wiele* innych uprawnień" } }, "user": { "label": "Zarządzanie użytkownikami", "read": { - "label": "Przeglądaj użytkowników", + "label": "Przeglądanie użytkowników", "description": "Pozwala użytkownikowi na przeglądanie innych użytkowników na serwerze. Jest to wymagane w przypadku niektórych innych funkcji, np. do wyłączenia użytkowników z dostępu do biblioteki" }, "manage": { - "label": "Zarządzaj użytkownikami", - "description": "Allows the user to manage other users on the server.\nIncludes permissions to create and update" + "label": "Zarządzanie użytkownikami", + "description": "Pozwala użytkownikowi na dostęp do zarządzania innymi użytkownikami na serwerze. Zawiera zezwolenie na czytanie, tworzenie i aktualizowanie" } }, "smartlist": { "label": "Inteligentne listy", "read": { "label": "Dostęp do funkcji inteligentnej listy", - "description": "Allows the user to access smart lists features" + "description": "Pozwala użytkownikowi na dostęp do funkcji inteligentnych list. Szczegółowe uprawnienia nie są jeszcze zaimplementowane, pozycja ta zawiera więc uprawnienia do czytania, tworzenia i aktualizowania własnych list" } } }, @@ -685,12 +685,12 @@ "smartlists": "Inteligentne listy", "noSmartlists": "Brak inteligentnych list", "createSmartlist": "Utwórz inteligentną listę", - "seeAll": "See all" + "seeAll": "Pokaż wszystko" }, "libraryOptions": { "scanLibrary": "Skanuj", "fileExplorer": "Przeglądarka plików", - "manageLibrary": "Manage", + "manageLibrary": "Zarządzaj", "deleteLibrary": "Usuń" }, "versionInformation": { @@ -734,7 +734,7 @@ "placeholderNoTags": "Brak etykiet" }, "thumbnailDropdown": { - "label": "Edit thumbnail", + "label": "Edytuj miniaturkę", "options": { "selectFromBooks": "Wybierz z książek", "uploadImage": "Wrzuć zdjęcie" From a71fbe158ef2ebb7b4404e3dae8cc041988ef09f Mon Sep 17 00:00:00 2001 From: Aaron Leopold <36278431+aaronleopold@users.noreply.github.com> Date: Fri, 26 Apr 2024 06:26:01 -0700 Subject: [PATCH 02/13] =?UTF-8?q?=F0=9F=92=9A=20Fix=20`yarn`=20timeout=20i?= =?UTF-8?q?ssues=20during=20install=20step=20(#319)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/opds/author.rs | 17 +++++++++++++---- core/src/opds/feed.rs | 8 ++++++++ docker/Dockerfile | 12 ++++++++---- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/core/src/opds/author.rs b/core/src/opds/author.rs index 07ee01f55..fa3208d13 100644 --- a/core/src/opds/author.rs +++ b/core/src/opds/author.rs @@ -13,6 +13,15 @@ pub struct StumpAuthor { pub uri: Option, } +impl Default for StumpAuthor { + fn default() -> Self { + Self { + name: "Stump".to_string(), + uri: Some("https://github.com/stumpapp/stump".to_string()), + } + } +} + impl StumpAuthor { /// Creates a new author. pub fn new(name: String, uri: Option) -> StumpAuthor { @@ -56,7 +65,7 @@ mod tests { #[test] fn test_author_with_only_name() { - let author = StumpAuthor::new("Aaron Leopold".to_string(), None); + let author = StumpAuthor::new("Stump".to_string(), None); let mut writer = EventWriter::new(Vec::new()); author.write(&mut writer).unwrap(); @@ -66,7 +75,7 @@ mod tests { r#" - Aaron Leopold + Stump "#, ); @@ -77,7 +86,7 @@ mod tests { #[test] fn test_author_with_name_and_uri() { let author = StumpAuthor::new( - "Aaron Leopold".to_string(), + "Stump".to_string(), Some("https://www.stumpapp.dev/".to_string()), ); @@ -89,7 +98,7 @@ mod tests { r#" - Aaron Leopold + Stump https://www.stumpapp.dev/ "#, diff --git a/core/src/opds/feed.rs b/core/src/opds/feed.rs index c076233b2..36596c1cd 100644 --- a/core/src/opds/feed.rs +++ b/core/src/opds/feed.rs @@ -11,6 +11,7 @@ use tracing::warn; use xml::{writer::XmlEvent, EventWriter}; use super::{ + author::StumpAuthor, entry::OpdsEntry, link::{OpdsLinkRel, OpdsLinkType}, util, @@ -86,6 +87,9 @@ impl OpdsFeed { util::write_xml_element("title", &self.title, &mut writer)?; util::write_xml_element("updated", &updated.to_rfc3339(), &mut writer)?; + let author = StumpAuthor::default(); + author.write(&mut writer)?; + if let Some(links) = &self.links { for link in links { link.write(&mut writer)?; @@ -318,6 +322,10 @@ mod tests { feed_id Feed Title {{{INSERT}}} + + Stump + https://github.com/stumpapp/stump + Modern Online Philately urn:uuid:6409a00b-7bf2-405e-826c-3fdff0fd0734 diff --git a/docker/Dockerfile b/docker/Dockerfile index 1cdedfea6..e5711900a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,9 +9,12 @@ WORKDIR /app COPY . . -RUN yarn install; \ - yarn web build; \ - mv ./apps/web/dist build +# https://github.com/nodejs/docker-node/issues/1335 +RUN yarn config set network-timeout 300000 && \ + yarn install --frozen-lockfile && \ + yarn web build && \ + mv ./apps/web/dist/ ./build && \ + if [ ! -d "./build" ] || [ ! "$(ls -A ./build)" ]; then exit 1; fi # ------------------------------------------------------------------------------ # Cargo Build Stage @@ -78,7 +81,8 @@ COPY --from=frontend /app/build /app/client COPY docker/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh; \ - ln -s /opt/pdfium/lib/libpdfium.so /lib/libpdfium.so + ln -s /opt/pdfium/lib/libpdfium.so /lib/libpdfium.so; \ + if [ ! -d "/app/client" ] || [ ! "$(ls -A /app/client)" ]; then exit 1; fi # Default Stump environment variables ENV STUMP_CONFIG_DIR=/config \ From 7be6eda9c649e02b57bfc6a0f8b150124212fff7 Mon Sep 17 00:00:00 2001 From: Aaron Leopold <36278431+aaronleopold@users.noreply.github.com> Date: Sat, 27 Apr 2024 12:55:05 -0700 Subject: [PATCH 03/13] :bug: Fix inverted swipe handlers in EPUB reader (#324) Fixes #323 --- .../readers/epub/EpubReaderHeader.tsx | 2 ++ .../epub/controls/EpubNavigationControls.tsx | 33 ++++++++++++++----- .../src/scenes/book/EpubReaderScene.tsx | 10 +++--- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/packages/browser/src/components/readers/epub/EpubReaderHeader.tsx b/packages/browser/src/components/readers/epub/EpubReaderHeader.tsx index 8aa4a3b0e..2c9a223d4 100644 --- a/packages/browser/src/components/readers/epub/EpubReaderHeader.tsx +++ b/packages/browser/src/components/readers/epub/EpubReaderHeader.tsx @@ -14,6 +14,8 @@ import { } from './controls' import { LocationManager } from './locations' +// TODO(UX): gather feedback on the header design. I am worried the actionable items are too small on +// mobile devices. export default function EpubReaderHeader() { const { readerMeta: { bookEntity }, diff --git a/packages/browser/src/components/readers/epub/controls/EpubNavigationControls.tsx b/packages/browser/src/components/readers/epub/controls/EpubNavigationControls.tsx index ee8e65788..27a8ca790 100644 --- a/packages/browser/src/components/readers/epub/controls/EpubNavigationControls.tsx +++ b/packages/browser/src/components/readers/epub/controls/EpubNavigationControls.tsx @@ -11,8 +11,6 @@ type Props = { children: React.ReactNode } -// TODO: allow config to hide the icons, this will allow for a less intrusive reading experience IMO without -// sacrificing accessibility for those who want the icon always visible export default function EpubNavigationControls({ children }: Props) { const { visible, onPaginateBackward, onPaginateForward, setVisible } = useEpubReaderControls() @@ -22,7 +20,14 @@ export default function EpubNavigationControls({ children }: Props) { const invertControls = readingDirection === 'rtl' - const onLeftNavigate = useCallback(() => { + /** + * A callback to navigate backward in the book, wrt the natural reading + * progression direction. + * + * If the reading direction is RTL, then the backward navigation is actually + * forward in the book. + */ + const onBackwardNavigation = useCallback(() => { if (invertControls) { onPaginateForward() } else { @@ -30,7 +35,14 @@ export default function EpubNavigationControls({ children }: Props) { } }, [invertControls, onPaginateBackward, onPaginateForward]) - const onRightNavigate = useCallback(() => { + /** + * A callback to navigate forward in the book, wrt the natural reading + * progression direction. + * + * If the reading direction is RTL, then the forward navigation is actually + * backwards in the book. + */ + const onForwardNavigation = useCallback(() => { if (invertControls) { onPaginateBackward() } else { @@ -38,16 +50,21 @@ export default function EpubNavigationControls({ children }: Props) { } }, [invertControls, onPaginateBackward, onPaginateForward]) + /** + * A swipe handler to navigate forward or backward in the book. + * + * Note that the swip handler function semantics are inverted wrt the reading direction. + */ const swipeHandlers = useSwipeable({ - onSwipedLeft: onLeftNavigate, - onSwipedRight: onRightNavigate, + onSwipedLeft: onForwardNavigation, + onSwipedRight: onBackwardNavigation, preventScrollOnSwipe: true, }) return (