Plural rules problem with "calculating"

Having a question about translating phpBB 3.1? Want to discuss and collaborate with people currently translating phpBB 3.1? Here would be the correct place to do so.
Locked
aleksu
Translator
Posts: 72
Joined: Mon Mar 01, 2010 5:36 pm
Location: sLOVEnia

Plural rules problem with "calculating"

Post by aleksu »

Hi.
I have a problem with plural rule. At least in slovenian, when using rule "10".
The problem is in the private message setting, more specific in the "FOLDER_STATUS_MSG". It is using for calculating, which line to use %3$d%% instead of %2$d, or I am missing something?
pm1.jpg
pm2.jpg
It should be the same.
English is not my native language
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Plural rules problem with "calculating"

Post by RMcGirr83 »

Are you saying that this is incorrect?
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
aleksu
Translator
Posts: 72
Joined: Mon Mar 01, 2010 5:36 pm
Location: sLOVEnia

Re: Plural rules problem with "calculating"

Post by aleksu »

No. Plural rule number 10 is perfect.
I am saying, that instead of using string number 1, it is using string number 2 (from percents). Just in this case.
English is not my native language
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Plural rules problem with "calculating"

Post by 3Di »

Have you tried adding the ZERO case for PMs?
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
aleksu
Translator
Posts: 72
Joined: Mon Mar 01, 2010 5:36 pm
Location: sLOVEnia

Re: Plural rules problem with "calculating"

Post by aleksu »

Tried right now, and it is same. It is using case number 2, because there are 2%.
English is not my native language
aleksu
Translator
Posts: 72
Joined: Mon Mar 01, 2010 5:36 pm
Location: sLOVEnia

Re: Plural rules problem with "calculating"

Post by aleksu »

Here is the "error":
I'm don't know php at all, but with trying and succeeding , I managed to change it, so it work as it should.
From:
$return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), $return['cur'], $return['percent']);

To:
$return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', $return['max']), (int) $return['cur'], $return['percent']);

Just moved (int) from $return['max'] to $return['cur'].
But this is not the solution. Or is it?
English is not my native language
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Plural rules problem with "calculating"

Post by RMcGirr83 »

They both need to be int. I have opened a ticket and made a pull request.

https://github.com/phpbb/phpbb/pull/4022
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
Locked

Return to “[3.1.x] Translations”