Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorect user cache count shown in log (language specific) #2670

Closed
bubi-luka opened this issue Apr 21, 2013 · 18 comments
Closed

Incorect user cache count shown in log (language specific) #2670

bubi-luka opened this issue Apr 21, 2013 · 18 comments
Labels
Bug Issues classified as a bug

Comments

@bubi-luka
Copy link

When I read log of a cache, I found a user claiming his 100 cache, but his count show "one cache". Should it be "one hundred and one cache" and the string did not fit on my screen, or is it a bug?

@SammysHP
Copy link
Member

Can you give us the geocode and the username?

@bubi-luka
Copy link
Author

The cache code is GC4A5Z1 and user name of person in question is Janko132. But this issue was found on another phone, so I can not send screenshot. On my phone it works as expected. But I remember I have seen this issue on my phone also, just don't know when (cache, user, situation).

@SammysHP
Copy link
Member

Old version? Small screen? It works here as well, so closing.

@bubi-luka
Copy link
Author

Samsung galaxy S2, Android 4.0.4, last version c:geo. Will try to find more information about the situation.

@Bananeweizen
Copy link
Member

What language was used on the phone when that error occured? That output depends on the locale, and it might be an error in one of the translations. For instance the polish translation looks suspicious to me "Liczba skrzynek: %1$d". There should not be a colon, as the intended meaning of that string is "many caches", where "many" is represented by "%1$d".

@Bananeweizen Bananeweizen reopened this Apr 22, 2013
@bubi-luka
Copy link
Author

The phone language is Slovenian (ask @mucek4), the c:geo's language is English.

@mucek4
Copy link
Member

mucek4 commented Apr 24, 2013

Luka do you still have log with 101 caches in cache? I suspect bug on phone that takes Slovenian rules and English text as translation does not exists.

@bubi-luka
Copy link
Author

Unfortunately no. I there a way to set test conditions for this case (load fake logs/users)? Is there a way to find a user with 100 or 101 finds to test it?

@mucek4
Copy link
Member

mucek4 commented Apr 25, 2013

I found a friend who has 99 founds. She will log 2 of my caches to have 101 so we can test.

@bubi-luka
Copy link
Author

Nice! I can offer to test on two of my phones (Galaxy Ace2, original firmware, GB 2.3.6; Galaxy Spica, rooted GB 2.3.6) and my brother's phone (Galaxy S2, JB 4.0.4).

@mucek4
Copy link
Member

mucek4 commented Apr 25, 2013

elantra20 http://coord.info/GC2RPBX
I get 101 Caches.
2013-04-25 16 59 39

@mucek4
Copy link
Member

mucek4 commented Apr 25, 2013

Ok. The above screen shot was made with HTC ONE X (rooted ARHD 20.1) System language and locale setting: English (Slovenia)
This screenshot is made by same phone, system l&l setting Slovenščina (Slovenija):
2013-04-25 17 03 40

It is what I was afraid. For some reason we use Slovenian rules to build English text.
one: number mod 100 = 1
two: number mod 100 = 2
few: number mod 100 = 3 or 4
other: everything else.

@Bananeweizen
Copy link
Member

Please check 2 things: Have you force-closed c:geo after switching the locale? Are you sure the option "Use English" is not set?

And maybe you want to run c:geo in a debugger and have a look what value your current locale has, e.g. "si-SI" or "si" or something different?

@Lineflyer
Copy link
Member

What about this unverified issue.
Is there still a problem with the plural-strings or was it solved ?

@mucek4
Copy link
Member

mucek4 commented Jun 26, 2013

Sorry didn't investigate any further as user has more finds now :(

@bubi-luka
Copy link
Author

I too can not find any cache on my lists with the required count of finds. But @mucek4 has posted screenshots that verify the issue and if nobody produced a fix than the problem is still there.

@Bananeweizen
Copy link
Member

I've been reading the related Android Plurals implementation and discussion up and down. It seems that this is fixed only by setting minSdkVersion to 11 or higher. We surely don't want to do that (as it would make run cgeo on Android 3.0+ only).

An alternative might be to switch to a third party plurals implementation: https://code.google.com/p/android-i18n-plurals/ A nice side effect of this one would be the support of special zero strings even for languages with no zero rules (e.g. "No caches" instead of "0 caches").

@Lineflyer Lineflyer changed the title Incorect user cache count shown in log Incorect user cache count shown in log (language specific) Jul 27, 2015
@Lineflyer
Copy link
Member

minSdkVersion to 11 or higher. We surely don't want to do that (as it would make run cgeo on Android 3.0+ only).

We have done this meanwhile :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues classified as a bug
Projects
None yet
Development

No branches or pull requests

5 participants