Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -549,16 +549,8 @@ class DatabaseErrorDialog : AsyncDialogFragment() {
private val message: String?
get() =
when (requireDialogType()) {
DIALOG_LOAD_FAILED ->
if (databaseCorruptFlag) {
// The sqlite database has been corrupted (DatabaseErrorHandler.onCorrupt() was called)
// Show a specific message appropriate for the situation
res().getString(R.string.corrupt_db_message, res().getString(R.string.repair_deck))
} else {
// Generic message shown when a libanki task failed
res().getString(R.string.access_collection_failed_message, res().getString(R.string.link_help))
}
DIALOG_DB_ERROR -> res().getString(R.string.answering_error_message)
DIALOG_LOAD_FAILED -> res().getString(R.string.load_failed_fallback_message) // show a short localized fallback message in
DIALOG_DB_ERROR -> res().getString(R.string.answering_error_message)
DIALOG_DISK_FULL -> res().getString(R.string.storage_full_message)
DIALOG_REPAIR_COLLECTION -> res().getString(R.string.repair_deck_dialog, BackupManager.BROKEN_COLLECTIONS_SUFFIX)
DIALOG_RESTORE_BACKUP -> res().getString(R.string.backup_restore_no_backups)
Expand Down
3 changes: 2 additions & 1 deletion AnkiDroid/src/main/res/values/03-dialogs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
<item quantity="one">%d card reset</item>
<item quantity="other">%d cards reset</item>
</plurals>


<string name="load_failed_fallback_message">An error occurred. Tap OK to continue.</string>
<string name="answering_error_title">Database error</string>
<string name="answering_error_message">Writing to the collection failed. The database could be corrupt or there may not to be enough empty space on disk.\n\nIf this happens more often, try checking the database, repairing the collection or restoring it from a backup. Touch “options” for that.\n\Or it could be an AnkiDroid bug as well; please report the error so that we can check this.</string>
<string name="answering_error_report">Report error</string>
Expand Down
Loading