refactor(android): error messages come from the web's copy, one source for both apps (DRY B6)
release / web (push) Successful in 1m27s
release / go (push) Successful in 1m54s
release / govulncheck (push) Successful in 18s
release / android (push) Failing after 1m10s
release / integration (push) Successful in 4m9s
release / Build signed APK (push) Successful in 4m43s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped

Android's ErrorCopy was a hand-kept copy of web/src/lib/styles/
error-copy.json that had drifted: 14 of the web's codes were missing
(a server shutting down, a bad setting value, the backup and duplicates
codes), so those read "Something went wrong." on the phone, and only 2
of the web's 7 codes appended the server's specifics.

Now app/build.gradle.kts copies error-copy.json and a new
error-detail-codes.json (the list web/src/lib/api/errors.ts kept
inline) into the app's Java resources, and ErrorCopy reads them. The
three codes only Android had (auth_required, not_found,
cleartext_public) move into the shared file. PasswordRules' too-short
line is the shared password_too_short copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-27 14:11:34 -05:00
co-authored by Claude Opus 5.5
parent 25cee5ed69
commit 5d85739038
7 changed files with 100 additions and 69 deletions
+4 -1
View File
@@ -49,5 +49,8 @@
"destination_failed": "Couldn't reach the backup destination.",
"backup_running": "A backup is already running.",
"backup_not_ready": "Set up where backups go first.",
"shutting_down": "The server is shutting down. Try again in a moment."
"shutting_down": "The server is shutting down. Try again in a moment.",
"auth_required": "You need to sign in to do that.",
"not_found": "That no longer exists.",
"cleartext_public": "This server is on the internet, so its URL must start with https://. Plain http:// only works on your home network."
}
@@ -0,0 +1,9 @@
[
"library_not_writable",
"file_delete_failed",
"invalid_setting",
"invalid_public_url",
"bad_folders",
"invalid_backup_setting",
"destination_failed"
]