Skip to content

Commit 9dde7d7

Browse files
authored
Merge pull request: feat(localization): global exception handling restructuring and localization support
- Standardized exceptions across Auth, LocalDatabase, Platform, and RestClient layers. - Implemented dynamic localization for all error codes and notification channels. - Refactored directory structures and updated imports across multiple feature packages. - Updated unit and integration tests to verify localized error string keys.
2 parents dc6c1f5 + 70a92cc commit 9dde7d7

285 files changed

Lines changed: 10917 additions & 6002 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
name: PR - Test Bookify Flutter App
1+
name: CI - Test Bookify Flutter App
22

33
on:
4+
push:
5+
branches:
6+
- '**'
7+
48
pull_request:
59
branches:
610
- main

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
# Web related
3939
lib/generated_plugin_registrant.dart
4040

41+
# Debug Symbols
42+
/debug_symbols/
43+
4144
# Symbolication related
4245
app.*.symbols
4346

android/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ android.uniquePackageNames=false
1414
android.dependency.useConstraints=true
1515
android.r8.strictFullModeForKeepRules=false
1616
android.r8.optimizedResourceShrinking=false
17+
18+
#! TODO: Temporarily ignore JVM target validation until Facebook Auth Plugin is updated to support Java 17. --- IGNORE ---
19+
kotlin.jvm.target.validation.mode = IGNORE

assets/lang/en_US.json

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
"reading-time-description": "Scheduling time for reading is the first step to creating a habit.\n\nSet the days and times that work best for your reading, and we'll remind you here in the notifications!",
3636
"reading-time-calculate-success-snackbar": "Reading time successfully calculated.",
3737
"reading-time-notification-removed-success-snackbar": "Notification successfully removed.",
38+
"reading-time-notification-title": "Time to read!",
39+
"reading-time-notification-body": "Many adventures await you!",
3840
"repeat-time-title": "Set the repetition to be notified for your readings:",
3941
"daily-dropdown-menu-entry": "Daily",
4042
"weekly-dropdown-menu-entry": "Weekly",
@@ -87,6 +89,7 @@
8789
"page-tooltip": "Page %s",
8890
"try-again-button": "Try again",
8991
"no-books-found-with-terms": "No books were found with these terms.\nCheck that you have typed them correctly.",
92+
"no-books-registered": "No books registered. Go back to the home page to register.",
9093
"enter-title-label": "Enter the Title",
9194
"enter-author-label": "Enter the Author",
9295
"enter-category-label": "Enter the Category",
@@ -101,6 +104,8 @@
101104
"search-by-isbn-tooltip": "Search by ISBN",
102105
"book-successfully-added-snackbar": "Book successfully added.",
103106
"book-successfully-removed-snackbar": "Book successfully removed.",
107+
"bookcase-inserted-success-snackbar": "Bookcase successfully added.",
108+
"bookcase-updated-success-snackbar": "Bookcase successfully updated.",
104109
"remove-book-title": "Remove the book %s",
105110
"remove-book-description": "By clicking \"CONFIRM\" you will remove this book from your bookcase.\nAre you sure?",
106111
"pages-label": "%s PAGES",
@@ -122,7 +127,6 @@
122127
"field-cannot-be-empty-error": "This field cannot be empty",
123128
"invalid-ISBN-format-error": "Invalid ISBN format",
124129
"camera-error": "An error occurred with the camera: %s",
125-
"unknown-error": "unknown error",
126130
"enter-loaned-title-label": "Enter the title of the loaned book.",
127131
"enter-title-your-book-label": "Enter the title of your book.",
128132
"enter-bookcase-name-label": "Enter the name of the bookcase.",
@@ -153,6 +157,7 @@
153157
"delete-bookcase-description": "By clicking \"CONFIRM\" you will delete the bookcase %s.\nAre you sure?",
154158
"delete-books-title": "Delete books",
155159
"delete-books-description": "By clicking \"CONFIRM\" you will delete the selected books in this bookcase.\nAre you sure?",
160+
"all-books-already-inserted": "All registered books have already been added to this bookcase.",
156161
"book-added-successfully-snackbar": "Book added successfully.\nWait until you are redirected to the previous page.",
157162
"select-books-title": "Select the books",
158163
"selected-books-quantity-label": "Selected books: %s",
@@ -178,6 +183,9 @@
178183
"contact-required-field": "Contact *",
179184
"observation-optional-field": "Observation (optional)",
180185
"loan-date-required-field": "Loan date *",
186+
"loan-notification-title": "Hey, your book is coming back!",
187+
"loan-notification-body": "Hi! Just dropping by to remind you that it's time for %s0 to return %s1 that you loaned on %s2.",
188+
"loan-insertion-success-snackbar": "Loan added successfully!",
181189
"devolution-date-required-field": "Devolution date *",
182190
"send-button": "Send",
183191
"contact-selected-label": "Contact selected",
@@ -243,5 +251,34 @@
243251
"book-on-loan-label": "on loan",
244252
"book-on-reading-label": "on reading",
245253
"previous-month-tooltip": "Previous month",
246-
"next-month-tooltip": "Next month"
254+
"next-month-tooltip": "Next month",
255+
"error-rest-client-connection-timeout": "Connection to server failed due to timeout. Check your internet connection and try again: %s",
256+
"error-rest-client-receive-timeout": "Server response took too long to arrive. Verify your connection quality and retry: %s",
257+
"error-rest-client-not-found": "The requested resource was not found. Verify your search terms or try a different query: %s",
258+
"error-rest-client-socket-exception": "Network connection error detected. Check your internet connection and try again: %s",
259+
"error-invalid-isbn": "The ISBN format is invalid. Enter a valid ISBN number (10 or 13 digits): %s",
260+
"error-unknown": "An unexpected error occurred. Please try again later or contact support: %s",
261+
"error-auth-user-not-found": "Unable to log in. Check that your email is registered or sign up if you don't have an account: %s",
262+
"error-auth-wrong-password": "Incorrect password. Verify your credentials and try again: %s",
263+
"error-auth-invalid-email": "Invalid email format. Enter a valid email address: %s",
264+
"error-auth-account-disabled": "Your account has been temporarily disabled. Contact support for help: %s",
265+
"error-auth-too-many-requests": "Too many login attempts. Wait a few minutes and try again: %s",
266+
"error-auth-operation-not-allowed": "This authentication method is not available right now. Try again later: %s",
267+
"error-auth-network-request-failed": "Connection lost. Check your internet connection and try again: %s",
268+
"error-auth-internal-error": "Something went wrong. If the problem persists, please contact support: %s",
269+
"error-storage-invalid-value": "Data storage issue detected. Try logging out and logging back in: %s",
270+
"error-storage-write-failed": "Unable to save your changes. Check your storage space and try again: %s",
271+
"error-storage-read-failed": "Unable to load your data. Check your internet connection and try again: %s",
272+
"error-local-database-conversion-failed": "Failed to process data from database. %s",
273+
"error-local-database-not-null-constraint": "A required field is empty. %s",
274+
"error-local-database-open-failed": "Could not open the database. %s",
275+
"error-local-database-operation-failed": "Database operation failed during read, write, or update. %s",
276+
"error-local-database-unique-constraint": "This record already exists in the database. %s",
277+
"notification-channel-loan-description": "Channel that notifies when it's time to receive your loaned book.",
278+
"notification-channel-loan-label": "Loans",
279+
"notification-channel-read-description": "Channel that notifies when it's time for reading.",
280+
"notification-channel-read-label": "Readings",
281+
"error-platform-permission-denied": "Permission denied: %s",
282+
"error-platform-permission-permanently-denied": "Permission permanently denied. Open settings to grant it: %s",
283+
"error-platform-unsupported": "Operation not supported on this device: %s"
247284
}

assets/lang/it_IT.json

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"auth-success-snackbar": "Autenticazione avvenuta con successo.",
2121
"reading-time-success-snackbar": "Tempo di lettura calcolato con successo.",
2222
"reading-instruction-title": "Calcoliamo la tua velocità di lettura?",
23-
"reading-instruction-description": "Leggi un breve estratto da un libro generato dall'IA mentre tracciamo il tuo tempo con un cronometro. Dopo il calcolo, ti verrà comunicato il tempo medio che ti ci è voluto per finire di leggere qualsiasi libro nell'app, basato sul tempo impiegato per leggere il testo.",
23+
"reading-instruction-description": "Leggi un breve estratto da un libro generato dalla IA mentre tracciamo il tuo tempo con un cronometro. Dopo il calcolo, ti verrà comunicato il tempo medio che ti ci è voluto per finire di leggere qualsiasi libro nell'app, basato sul tempo impiegato per leggere il testo.",
2424
"calculate-later-button": "Calcola più tardi",
2525
"calculate-time-button": "Calcola tempo",
2626
"close-page-button-tooltip": "Chiudi la pagina",
@@ -35,6 +35,8 @@
3535
"reading-time-description": "Pianificare un momento dedicato alla lettura è il primo passo per creare l'abitudine.\n\nDecidi quali giorni e quali sono gli orari migliori per le tue letture e noi te lo ricorderemo qui nelle notifiche!",
3636
"reading-time-calculate-success-snackbar": "Tempo di lettura calcolato con successo.",
3737
"reading-time-notification-removed-success-snackbar": "Notifica rimossa con successo.",
38+
"reading-time-notification-title": "È l'ora di leggere!",
39+
"reading-time-notification-body": "Molte avventure ti aspettano!",
3840
"repeat-time-title": "Imposta la ripetizione per ricevere una notifica per le tue letture:",
3941
"daily-dropdown-menu-entry": "Giornaliera",
4042
"weekly-dropdown-menu-entry": "Settimanale",
@@ -87,9 +89,10 @@
8789
"page-tooltip": "Pagina %s",
8890
"try-again-button": "Riprova",
8991
"no-books-found-with-terms": "Nessun libro trovato con questi termini.\nVerifica che sia stato digitato correttamente.",
92+
"no-books-registered": "Nessun libro registrato. Torna alla pagina iniziale per registrare.",
9093
"enter-title-label": "Inserisci il Titolo",
9194
"enter-author-label": "Inserisci l'Autore",
92-
"enter-category-label": "Inserisci la Categoria",
95+
"enter-category-label": "Inserisci la Categoria (Inglese)",
9396
"enter-publisher-label": "Inserisci l'Editore",
9497
"enter-isbn-label": "Inserisci l'ISBN",
9598
"delete-text-typed-tooltip": "Cancella il testo digitato.",
@@ -101,6 +104,8 @@
101104
"search-by-isbn-tooltip": "Cerca per ISBN",
102105
"book-successfully-added-snackbar": "Libro aggiunto con successo.",
103106
"book-successfully-removed-snackbar": "Libro rimosso con successo.",
107+
"bookcase-inserted-success-snackbar": "Libreria aggiunta con successo.",
108+
"bookcase-updated-success-snackbar": "Libreria aggiornata con successo.",
104109
"remove-book-title": "Rimuovere il libro %s",
105110
"remove-book-description": "Cliccando su “CONFERMA” rimuoverai questo libro dal tuo Scaffale.\nSei sicuro?",
106111
"pages-label": "%s PAGINE",
@@ -122,7 +127,6 @@
122127
"field-cannot-be-empty-error": "Questo campo non può essere vuoto",
123128
"invalid-ISBN-format-error": "Formato del ISBN non valido",
124129
"camera-error": "Si è verificato un errore con la fotocamera: %s",
125-
"unknown-error": "errore sconosciuto",
126130
"enter-loaned-title-label": "Inserisci il titolo del libro in prestito.",
127131
"enter-title-your-book-label": "Inserisci il titolo del tuo libro.",
128132
"enter-bookcase-name-label": "Inserisci il nome dello scaffale.",
@@ -153,6 +157,7 @@
153157
"delete-bookcase-description": "Cliccando su “CONFERMA” eliminerai il scaffale %s.\nSei sicuro?",
154158
"delete-books-title": "Eliminare libri",
155159
"delete-books-description": "Cliccando su “CONFERMA” eliminerai i libri selezionati in questo scaffale.\nSei sicuro?",
160+
"all-books-already-inserted": "Tutti i libri registrati sono già stati aggiunti a questo scaffale.",
156161
"books-added-successfully-snackbar": "Libro aggiunto con successo.\nAttendere fino al ritorno alla pagina precedente.",
157162
"select-books-title": "Seleziona i libri",
158163
"selected-books-quantity-label": "Libri selezionati: %s",
@@ -178,6 +183,9 @@
178183
"contact-required-field": "Contatto *",
179184
"observation-optional-field": "Osservazione (opzionale)",
180185
"loan-date-required-field": "Data del prestito *",
186+
"loan-notification-title": "Ehi, il tuo libro sta per tornare!",
187+
"loan-notification-body": "Ciao! Solo un promemoria per ricordarti che è ora che %s0 restituisca il libro %s1 che hai prestato il giorno %s2.",
188+
"loan-insertion-success-snackbar": "Prestito inserito con successo!",
181189
"devolution-date-required-field": "Data di restituzione *",
182190
"send-button": "Inviare",
183191
"contact-selected-label": "Contatto selezionato",
@@ -243,5 +251,34 @@
243251
"book-on-loan-label": "in prestito",
244252
"book-on-reading-label": "in lettura",
245253
"previous-month-tooltip": "Mese precedente",
246-
"next-month-tooltip": "Mese successivo"
254+
"next-month-tooltip": "Mese successivo",
255+
"error-rest-client-connection-timeout": "La connessione al server è scaduta. Controlla la tua connessione internet e riprova: %s",
256+
"error-rest-client-receive-timeout": "Il server ha impiegato troppo tempo per rispondere. Verifica la qualità della connessione e riprova: %s",
257+
"error-rest-client-not-found": "La risorsa cercata non è stata trovata. Verifica i termini di ricerca o prova una query diversa: %s",
258+
"error-rest-client-socket-exception": "Errore di connessione di rete rilevato. Controlla la tua connessione internet e riprova: %s",
259+
"error-invalid-isbn": "Il formato dell'ISBN non è valido. Inserisci un numero ISBN valido (10 o 13 cifre): %s",
260+
"error-unknown": "Si è verificato un errore imprevisto. Riprova più tardi o contatta il supporto: %s",
261+
"error-auth-user-not-found": "Impossibile accedere. Verifica che la tua email sia registrata o iscriviti se non hai ancora un account: %s",
262+
"error-auth-wrong-password": "Password non corretta. Verifica le tue credenziali e riprova: %s",
263+
"error-auth-invalid-email": "Formato email non valido. Inserisci un indirizzo email valido: %s",
264+
"error-auth-account-disabled": "Il tuo account è stato temporaneamente disabilitato. Contatta l'assistenza per ricevere aiuto: %s",
265+
"error-auth-too-many-requests": "Troppi tentativi di accesso. Attendi alcuni minuti e riprova: %s",
266+
"error-auth-operation-not-allowed": "Questo metodo di autenticazione non è disponibile al momento. Riprova più tardi: %s",
267+
"error-auth-network-request-failed": "Connessione persa. Verifica la tua connessione internet e riprova: %s",
268+
"error-auth-internal-error": "Qualcosa è andato storto. Se il problema persiste, contatta l'assistenza: %s",
269+
"error-storage-invalid-value": "Problema rilevato nel salvataggio dei dati. Prova a disconnetterti e riconnetterti: %s",
270+
"error-storage-write-failed": "Impossibile salvare le tue modifiche. Verifica lo spazio di archiviazione e riprova: %s",
271+
"error-storage-read-failed": "Impossibile caricare i tuoi dati. Verifica la tua connessione internet e riprova: %s",
272+
"error-local-database-conversion-failed": "Errore nell'elaborazione dei dati dal database. %s",
273+
"error-local-database-not-null-constraint": "Un campo obbligatorio è vuoto. %s",
274+
"error-local-database-open-failed": "Impossibile aprire il database. %s",
275+
"error-local-database-operation-failed": "Operazione del database fallita durante lettura, scrittura o aggiornamento. %s",
276+
"error-local-database-unique-constraint": "Questo record esiste già nel database. %s",
277+
"notification-channel-loan-description": "Canale che notifica quando è il momento di ricevere il libro prestato.",
278+
"notification-channel-loan-label": "Prestiti",
279+
"notification-channel-read-description": "Canale che notifica quando è il momento della lettura.",
280+
"notification-channel-read-label": "Letture",
281+
"error-platform-permission-denied": "Permesso negato: %s",
282+
"error-platform-permission-permanently-denied": "Permesso negato permanentemente. Apri le impostazioni per concederlo: %s",
283+
"error-platform-unsupported": "Operazione non supportata su questo dispositivo: %s"
247284
}

0 commit comments

Comments
 (0)