cozy / cozy-photos-v2

Deprecated - New : https://github.com/cozy/cozy-drive/tree/master/src/photos - Personal Photo Gallery Manager
http://cozy.io
GNU Affero General Public License v3.0
27 stars 25 forks source link

Displaying number of photos per album: cases < 2 should be managed #80

Closed ghost closed 8 years ago

ghost commented 9 years ago

When there is only 1 or even 0 photo in an album, the interface shows "1 photos" and "0 photos". Singular and zero cases should be managed with " 1 photo" an "no photo" I suppose the issue can be fixed in app/templates/album.jade around line 35 1photos singulier_0photos

0gust1 commented 8 years ago

Issue still present, see also #117

poupotte commented 8 years ago

Thanks @0gust1 , with version 1.0.20, it works well in french version :+1: . However, in english version, "1 picture" is well displayed but "0 pictures" is still in plural.

0gust1 commented 8 years ago

Did you change your navigator locale when testing ? The reason could that the "pluralization engine" of polyglot.js here is initialized with the navigator locale (and not with the localization settings of Cozy's configuration). Imho, navigator locale should be ok for majority of user-cases, but it's suboptimal and debatable.

0gust1 commented 8 years ago

Ah, sorry @poupotte I misread your comment. In fact it's okay. In english "0" with a noun is plural. The pluralization engine of polyglot.js works well.

http://english.stackexchange.com/questions/13073/correct-plural-form-of-a-zero-quantified-noun http://www.bbc.co.uk/worldservice/learningenglish/grammar/learnit/learnitv354.shtml

Pluralization can be pretty hairy (the worst is in russian, but it's handled by polyglot as well)

poupotte commented 8 years ago

Thanks @0gust1 :) ! So, I close this issue