UserMessages.kt
Each line, with the release that last changed it.
| 0.5.0 | 1 | package dev.stave.ui.copy |
| 2 | ||
| 3 | /** | |
| 4 | * User-facing copy for failures outside Browse (review 5, V3). Raw technical | |
| 5 | * strings ("libvlc reported an error", "LRCLIB returned HTTP 503", | |
| 6 | * "NullPointerException") belong in the log; the screen shows these instead. | |
| 7 | * | |
| 8 | * | Situation | Copy | | |
| 9 | * |-----------------------------------|----------------------------------------------------------| | |
| 10 | * | Track failed to play | "Couldn't play ‘Title’." | | |
| 11 | * | …and the player moved on | "Couldn't play ‘Title’ — skipping to the next track." | | |
| 12 | * | Party / random returned nothing | "Your library didn't return any tracks to party with." | | |
| 13 | * | Party / random failed | "Couldn't pick random tracks right now. Try again in a moment." | | |
| 14 | * | Lyrics service HTTP / network | "Lyrics service is unavailable right now." (+ Retry) | | |
| 15 | * | Album notes found nothing | "No album notes found for this album." | | |
| 16 | * | Anything else unexpected | "Something went wrong. Try again in a moment." | | |
| 17 | * | |
| 18 | * Browse failures have their own typed table (BrowseError, review 5 V3); keep | |
| 19 | * the two in the same voice: plain words, no protocol names, say what to try. | |
| 20 | */ | |
| 21 | object UserMessages { | |
| 22 | fun playbackFailed(title: String?): String = | |
| 23 | if (title.isNullOrBlank()) "Couldn't play this track." else "Couldn't play ‘$title’." | |
| 24 | ||
| 25 | fun playbackFailedSkipping(title: String?): String = | |
| 26 | if (title.isNullOrBlank()) "Couldn't play this track — skipping to the next one." | |
| 27 | else "Couldn't play ‘$title’ — skipping to the next track." | |
| 28 | ||
| 29 | const val PARTY_EMPTY = "Your library didn't return any tracks to party with." | |
| 30 | const val RANDOM_FAILED = "Couldn't pick random tracks right now. Try again in a moment." | |
| 31 | const val LYRICS_UNAVAILABLE = "Lyrics service is unavailable right now." | |
| 32 | const val ALBUM_NOTES_EMPTY = "No album notes found for this album." | |
| 33 | const val GENERIC = "Something went wrong. Try again in a moment." | |
| 34 | } |


