fix(sort): correct direction labels and 'Recently added' wording#59
Conversation
#51, #52) #51 had two stacked problems: 1. The English locale shipped `sort.ascending = "Croissant"` (French leaked into the source-of-truth UI), and 13 other locales had copied that French string verbatim — including arabic, japanese, chinese, korean. They literally meant "the pastry". 2. The direction toggle button labelled itself with the *next* action ("Click to switch to descending ↓") while the user expected it to describe the *current* state ("currently ascending ↑"). The arrow icon followed the same flipped logic. Combined effect: a user sorting A-Z saw "Descending ↓"; toggling, they saw "Croissant" (in every locale except FR/ID/RU/TR where ascending was already translated locally). Fixes: - LibraryView sort dropdown now shows the current state with a matching arrow — `asc` → "Ascending ↑", `desc` → "Descending ↓". The click still toggles the direction. - Proper translation of `sort.ascending` rolled out across the 14 affected locales (en, es, de, it, nl, pt, pt-BR, ja, kr, zh-CN, zh-TW, ar, hi — fr/id/ru/tr were already correct). #52: the album sort option labelled itself "Added on" which is a date-column wording, while the HomeView already used "Recently added" for the same concept. Updated `sort.addedAt` to "Recently added" (and proper equivalents in all 17 locales). The track sort option shares the same key and benefits from the consistency. The unrelated column header `propsModal.addedAt` ("Added on" in TrackPropertiesModal) keeps its date-style wording — different scope.
📝 WalkthroughWalkthroughLa PR corrige le bug ChangesCorrection des libellés de tri et mappage des directions
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Closes #51 and #52 — two related sort-UI bugs reported by @jo-el414.
#51 — Direction labels were wrong in two ways
en.jsonshippedsort.ascending = \"Croissant\"(FR leak in the source-of-truth UI). 13 other locales had inherited that French string verbatim — including Arabic كروسان, Japanese クロワッサン, Chinese 牛角包, Korean 크루아상. They literally translated to "the pastry". Only fr/id/ru/tr had a proper local translation.Fixes:
asc→ "Ascending ↑",desc→ "Descending ↓"). Click still toggles direction.sort.ascendingacross the 14 affected locales.#52 — "Added on" wording in album sort
sort.addedAtdisplayed "Added on" while HomeView used "Recently added" for the same concept. Now consistent — "Recently added" across all 17 locales, with the same propagation to the track sort option (same key, same intent).The unrelated
propsModal.addedAtcolumn header in TrackPropertiesModal keeps its date-style "Added on" wording — different scope.Test plan
bun run typecheckbun run lintSummary by CodeRabbit
Notes de version
Correctifs
Localisation