1
0
Fork 0
mirror of https://github.com/heyarne/airsonic-ui.git synced 2026-05-06 18:33:38 +02:00

Correctly inflect "track" in collection info

This commit is contained in:
Arne Schlüter 2018-10-09 11:50:35 +02:00
commit 22eeeac42b

View file

@ -17,7 +17,8 @@
(defn collection-info [{:keys [songCount duration year]}]
(vec (cond-> [:ul.is-smaller.collection-info
[:li [icon :audio-spectrum] (str songCount " tracks")]
[:li [icon :audio-spectrum] (str songCount (if (= 1 songCount)
" track" " tracks"))]
[:li [icon :clock] (format-duration duration)]]
year (conj [:li [icon :calendar] (str "Released in " year)]))))