fix(api): a gone row and a refused playlist action are said in the reader's language, and a failure is reported once
Deep-review round 3 of bug hunt 2026-09.
- get_or_404 / owned_or_404 answer a structured {code: "not_found", reason: <what>}
(errors.notFound.* in HU+EN, generic fallback). The structured-404 fix of round 2 had gone into the
ad-hoc `_own_playlist` (CLAUDE.md's "Not" pattern) while the shared helpers stayed string-only, so
views, tags, pins, Plex playlists, invites and users still 404'd in English. `_own_playlist` now
goes through owned_or_404; admin's hand-rolled user lookups use get_or_404.
- A move into a list that is gone names the TARGET (reason "move_target") — "this playlist doesn't
exist any more" was read as the list on screen, which still exists.
- Every refusal in the playlists router is a {code: "playlist", reason} (playlists.errors.* HU+EN)
instead of a bare English string shown verbatim in the Hungarian UI.
- `req` / `uploadReq` mark the errors they already put on screen (the error dialog, the connection
notice, the 401 sign-out), and notifyActionError skips those. The watched toggles, the saved views
and a playlist delete toasted a fault the dialog was already showing; Playlists' two hand-written
status filters now go through the same check.
This commit is contained in:
@@ -4,6 +4,17 @@
|
||||
"validation": "Some of the values you entered weren't valid. Please check them and try again.",
|
||||
"server": "Server error",
|
||||
"syncCooldown": "You've synced a few times just now — give it a few minutes. The YouTube budget is shared with everyone on this instance, and background syncing keeps running either way.",
|
||||
"notFound": {
|
||||
"generic": "This item doesn't exist any more.",
|
||||
"view": "This view doesn't exist any more.",
|
||||
"tag": "This tag doesn't exist any more.",
|
||||
"pin": "This isn't on your comfort shelf any more.",
|
||||
"playlist": "This playlist doesn't exist any more.",
|
||||
"move_target": "The playlist you're moving it to doesn't exist any more.",
|
||||
"video": "This video isn't in the library any more.",
|
||||
"invite": "This invite doesn't exist any more.",
|
||||
"user": "This user doesn't exist any more."
|
||||
},
|
||||
"ok": "OK",
|
||||
"offline": {
|
||||
"title": "Connection lost",
|
||||
|
||||
@@ -78,7 +78,14 @@
|
||||
"moveFailed": "Couldn't move the video.",
|
||||
"removeFailed": "Couldn't remove the video.",
|
||||
"errors": {
|
||||
"not_found": "This playlist doesn't exist any more."
|
||||
"name_required": "Give the playlist a name.",
|
||||
"youtube_read_scope": "Connect YouTube (read access) to sync your playlists.",
|
||||
"not_on_youtube": "This playlist isn't on YouTube.",
|
||||
"youtube_failed": "YouTube didn't accept that just now. Please try again.",
|
||||
"watch_later_not_pushable": "The Watch later list can't be sent to YouTube.",
|
||||
"watch_later_undeletable": "The Watch later list can't be deleted.",
|
||||
"youtube_editing_off": "Enable YouTube editing in Settings first.",
|
||||
"quota_exceeded": "Not enough YouTube quota left today for this sync."
|
||||
},
|
||||
"moveErrors": {
|
||||
"not_in_playlist": "That video isn't in this playlist any more — it changed somewhere else.",
|
||||
|
||||
@@ -4,6 +4,17 @@
|
||||
"validation": "Néhány megadott érték érvénytelen volt. Ellenőrizd, majd próbáld újra.",
|
||||
"server": "Szerverhiba",
|
||||
"syncCooldown": "Az imént többször is szinkronizáltál — várj pár percet. A YouTube-keret közös az instance összes felhasználójával, a háttérszinkron pedig így is fut tovább.",
|
||||
"notFound": {
|
||||
"generic": "Ez az elem már nem létezik.",
|
||||
"view": "Ez a nézet már nem létezik.",
|
||||
"tag": "Ez a címke már nem létezik.",
|
||||
"pin": "Ez már nincs a komfort polcodon.",
|
||||
"playlist": "Ez a lejátszási lista már nem létezik.",
|
||||
"move_target": "A lejátszási lista, ahová áthelyeznéd, már nem létezik.",
|
||||
"video": "Ez a videó már nincs a könyvtárban.",
|
||||
"invite": "Ez a meghívó már nem létezik.",
|
||||
"user": "Ez a felhasználó már nem létezik."
|
||||
},
|
||||
"ok": "OK",
|
||||
"offline": {
|
||||
"title": "Megszakadt a kapcsolat",
|
||||
|
||||
@@ -78,7 +78,14 @@
|
||||
"moveFailed": "Nem sikerült áthelyezni a videót.",
|
||||
"removeFailed": "Nem sikerült eltávolítani a videót.",
|
||||
"errors": {
|
||||
"not_found": "Ez a lejátszási lista már nem létezik."
|
||||
"name_required": "Adj nevet a lejátszási listának.",
|
||||
"youtube_read_scope": "A listák szinkronizálásához kapcsold össze a YouTube-ot (olvasási hozzáférés).",
|
||||
"not_on_youtube": "Ez a lejátszási lista nincs fent a YouTube-on.",
|
||||
"youtube_failed": "A YouTube most nem fogadta el. Próbáld újra.",
|
||||
"watch_later_not_pushable": "A „Megnézem később” listát nem lehet a YouTube-ra küldeni.",
|
||||
"watch_later_undeletable": "A „Megnézem később” lista nem törölhető.",
|
||||
"youtube_editing_off": "Előbb engedélyezd a YouTube-szerkesztést a Beállításokban.",
|
||||
"quota_exceeded": "Mára nem maradt elég YouTube-keret ehhez a szinkronhoz."
|
||||
},
|
||||
"moveErrors": {
|
||||
"not_in_playlist": "Ez a videó már nincs ebben a listában — időközben máshol megváltozott.",
|
||||
|
||||
Reference in New Issue
Block a user