Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

All diary entries' comments described to have at least 1 comment if user's language preference is FR #4686

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments

Comments

@openstreetmap-trac
Copy link

Reporter: skorasaurus
[Submitted to the original trac issue database at 3.05pm, Wednesday, 14th November 2012]

When a user has 'fr' selected as their preferred language in their user settings (http://www.openstreetmap.org/user/INSERTUSERNAMEHERE/account ), diary entries that do not have any comments state on the main diary page that they have 1 comment on them, even if they do not have any comments on them (see the attachment OSM-diary-entry-FR.png as an example).

I've seen this occur on the main [http://www.openstreetmap.org/diary/fr french,][http://www.openstreetmap.org/diary/en english], and [http://www.openstreetmap.org/diary/de German] diary pages.

Entries that have 1 or more comments have the correct number of comments listed.

Users who have en-US,en set as their preferred language have 0 comments listed if they do not have any comments on their entry.

@openstreetmap-trac
Copy link
Author

Author: skorasaurus
[Added to the original trac issue at 3.07pm, Thursday, 15th November 2012]

This problem also occurs if you visit a particular user's diary as well (for example) http://www.openstreetmap.org/user/skorasaurus/diary

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 3.09pm, Thursday, 15th November 2012]

Well of course if it affects one diary list it will affect them all - it's all the same page just with different search criteria to select the entries to show.

My immediate guess would be that this is a translation issue.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 3.16pm, Thursday, 15th November 2012]

Yes, it's a combination of our fr locale rules:

http://git.openstreetmap.org/rails.git/blob/HEAD:/config/locales/fr.yml#l345

which are a direct translation of the hardcoded "1" in the en rules:

http://git.openstreetmap.org/rails.git/blob/HEAD:/config/locales/en.yml#l369

and the fr pluralization rules, which use the "one" string for zero:

https://github.com/tomhughes/rails-i18n/blob/master/lib/rails_i18n/common_pluralizations/one_upto_two_other.rb

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 3.25pm, Thursday, 15th November 2012]

Fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant