Skip to content

fix(sort): correct direction labels and 'Recently added' wording#59

Merged
InstaZDLL merged 1 commit into
mainfrom
fix/sort-ui-labels
May 18, 2026
Merged

fix(sort): correct direction labels and 'Recently added' wording#59
InstaZDLL merged 1 commit into
mainfrom
fix/sort-ui-labels

Conversation

@InstaZDLL
Copy link
Copy Markdown
Owner

@InstaZDLL InstaZDLL commented May 18, 2026

Summary

Closes #51 and #52 — two related sort-UI bugs reported by @jo-el414.

#51 — Direction labels were wrong in two ways

  1. en.json shipped sort.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.
  2. The direction toggle described the next action ("Descending ↓") when the user expected it to describe the current state ("Ascending ↑"). The arrow icon followed the same flipped logic.

Fixes:

  • LibraryView.tsx: toggle now shows current state with matching arrow (asc → "Ascending ↑", desc → "Descending ↓"). Click still toggles direction.
  • Proper translation of sort.ascending across the 14 affected locales.

#52 — "Added on" wording in album sort

sort.addedAt displayed "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.addedAt column header in TrackPropertiesModal keeps its date-style "Added on" wording — different scope.

Test plan

  • bun run typecheck
  • bun run lint
  • Library view → sort dropdown → toggle shows "Ascending ↑" / "Descending ↓" matching the current direction
  • Library view → Albums tab → sort options include "Recently added" (not "Added on")
  • Switch UI language to any of fr/de/es/it/ja/zh-CN/ar → "Croissant" pastry is gone, proper local word shown

Summary by CodeRabbit

Notes de version

  • Correctifs

    • Correction des libellés et icônes du menu de tri pour afficher correctement l'ordre croissant et décroissant.
  • Localisation

    • Mise à jour des libellés de tri dans toutes les langues supportées pour une meilleure cohérence et clarté.

Review Change Stack

 #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.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

📝 Walkthrough

Walkthrough

La PR corrige le bug #51 en inversant le mappage des étiquettes et icônes de direction de tri dans SortDropdown, puis synchronise l'intégralité des fichiers de traductions pour remplacer les libellés de tri incorrects (« Croissant ») par les traductions correctes dans chaque langue.

Changes

Correction des libellés de tri et mappage des directions

Layer / File(s) Summary
Logique et affichage du composant SortDropdown
src/components/views/LibraryView.tsx
Le mappage conditionnel de SortDropdown est inversé : « asc » affiche désormais « sort.ascending » avec l'icône flèche vers le haut, et « desc » affiche « sort.descending » avec l'icône flèche vers le bas.
Corrections des libellés de tri dans tous les fichiers de localisation
src/i18n/locales/ar.json, src/i18n/locales/de.json, src/i18n/locales/en.json, src/i18n/locales/es.json, src/i18n/locales/fr.json, src/i18n/locales/hi.json, src/i18n/locales/id.json, src/i18n/locales/it.json, src/i18n/locales/ja.json, src/i18n/locales/kr.json, src/i18n/locales/nl.json, src/i18n/locales/pt-BR.json, src/i18n/locales/pt.json, src/i18n/locales/ru.json, src/i18n/locales/tr.json, src/i18n/locales/zh-CN.json, src/i18n/locales/zh-TW.json
Mise à jour cohérente : remplacement du libellé « Croissant » (traduction erronée française) par le terme correct « Ascending »/« Ascendant »/équivalent dans chaque langue. Standardisation du libellé « addedAt » vers une formulation « Récemment ajouté » ou équivalent au lieu de formulations au passé défini (« Ajouté le », « Hinzugefügt am », etc.).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

type: fix, size: m, scope: frontend, scope: i18n

Poem

Une flèche qui monte, une qui descend,
Des libellés clairs, sans malentendu,
« Ascending » enfin à sa vraie place,
Et « Croissant » part, chassé de l'interface,
Le tri brille au clair, enfin bien ordonné. 🎵⬆️⬇️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Le titre suit les conventions Conventional Commits avec un scope kebab-case approprié (sort) et décrit clairement les deux correctifs : correction des libellés de direction et cohérence du libellé 'Recently added'.
Linked Issues check ✅ Passed Le PR résout intégralement l'issue #51 : correction de 'Croissant' vers les traductions correctes de 'Ascending/Descending', inversion de la logique du toggle pour afficher l'état courant avec flèches cohérentes. L'issue #52 sur 'Recently added' est aussi traitée.
Out of Scope Changes check ✅ Passed Tous les changements sont directement liés aux deux issues : correction du composant LibraryView, mise à jour cohérente de 17 fichiers i18n pour 'sort.ascending' et 'sort.addedAt'. Pas de modifications hors-scope détectées.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed La description couvre les deux problèmes (#51 et #52), explique les corrections apportées, énumère les fichiers modifiés et présente un plan de test incluant typecheck, lint et validations manuelles.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sort-ui-labels

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added scope: frontend React/Vite frontend (src/) scope: i18n Translations (src/i18n/) type: fix Bug fix size: m 50-200 lines labels May 18, 2026
@InstaZDLL InstaZDLL merged commit 5d1bfbf into main May 18, 2026
13 checks passed
@InstaZDLL InstaZDLL deleted the fix/sort-ui-labels branch May 18, 2026 18:12
@InstaZDLL InstaZDLL self-assigned this May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: frontend React/Vite frontend (src/) scope: i18n Translations (src/i18n/) size: m 50-200 lines type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Sorting name are not corect

1 participant