Skip to content

Conversation

vikasp07
Copy link

Purpose / Description

Replace the cryptic, technical diagnostic shown to users when DIALOG_LOAD_FAILED is triggered with a short, localized fallback message. This prevents alarming or confusing error text from being presented in the UI while preserving troubleshooting information in the logs.

Fixes

Fixes #19092

Approach

When the dialog type is DIALOG_LOAD_FAILED return a single localized string resource (R.string.load_failed_fallback_message) instead of the long libanki/sqlite diagnostic text. The change is UI-only: the visible dialog now shows a simple, user-friendly message ("An error occurred. Tap OK to continue using AnkiDroid.").

Detailed diagnostics are preserved in code paths (and may still be emitted to the app logs) so developers can debug issues without exposing raw technical output to end users.

Files changed:

  • Anki-Android/.../DatabaseErrorDialog.kt — return res().getString(R.string.load_failed_fallback_message) for DIALOG_LOAD_FAILED.
  • 03-dialogs.xml — add load_failed_fallback_message string resource.

show localized fallback for DIALOG_LOAD_FAILED (ankidroid#19092)

Replace the cryptic, technical diagnostic shown to users when DIALOG_LOAD_FAILED
is triggered with a  fallback message
This is a minimal UX-only change that keeps other dialog flows unchanged. ankidroid#19092
Show localized fallback for DIALOG_LOAD_FAILED (ankidroid#19092)
Copy link

welcome bot commented Sep 19, 2025

First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible.

Copy link
Contributor

Important

Maintainers: This PR contains Strings changes

  1. Sync Translations before merging this PR and wait for the action to complete
  2. Review and merge the auto-generated PR in order to sync all user-submitted translations
  3. Sync Translations again and merge the PR so the huge automated string changes caused by merging this PR are by themselves and easy to review

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Sep 19, 2025
Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As stated on the issue, the problem is that this dialog isn't displayed, not that there is a problem with this dialog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Author Reply Waiting for a reply from the original author New contributor Strings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error should contain a human readable message
2 participants