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

Enable plural forms for Persian languages #1831

Closed
wants to merge 1 commit into from

Conversation

farhadsakhaei
Copy link
Contributor

Hi,
We need to have plural and singular forms in our language So I deleted the settings to have default values

Regards

Hi,
We need to have plural and singular forms in our language
So I deleted the settings to have default values

Regards
@amieiro
Copy link
Member

amieiro commented Apr 9, 2024

The plural expression for Persian is n > 1. You can check it at:

In GlotPress, the default expression for plurals is n != 1, that is different to the Persian language n > 1, available here.

So the current Persian plural is correct in GlotPress. I have made a test in my local machine and it works fine.

image

The problem is at translate.wordpress.org. If you look for the same Akismet string in Persian, you only have one form, not 2.

image

The incorrect code is here:

$fa->nplurals = 1;
$fa->plural_expression = '0';

I think we should update it with the GlotPress code:

$fa->nplurals = 2;
$fa->plural_expression = 'n > 1';

I am going to ping in Slack to the current Persian GTE to get their opinion. Thank you for arising this problem.

@farhadsakhaei
Copy link
Contributor Author

@amieiro
Thank you for your reply and detail review
Yes, Exactly,
I was wonder why we can't have 2 forms for singular and plural on translate.wordpress.org
I was requested before for this:
#1012
I am a Persian locale manager too

@ocean90
Copy link
Member

ocean90 commented Apr 9, 2024

WordPress.org has its own copy of locales.php, see https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/locales/locales.php?rev=12939#L1027.

I think the change wasn't done because there's no migration step for such a change and existing translations may cause missing translations in WordPress. Probably something to test if this is still the case.

Closing the PR since the correct change was done in #1012.

@ocean90 ocean90 closed this Apr 9, 2024
@farhadsakhaei
Copy link
Contributor Author

farhadsakhaei commented Apr 9, 2024

Hi @ocean90 ,
Thank you for your reply,
Actually both requests are made by me,
I was wonder why previous change didn't apply in the translate.wordpress.org
now @amieiro mentioned a good point,
The previous change didn't apply on the wordpress site (translate) itself:

https://github.com/WordPress/wordpress.org/blob/c48300cae7c36cce9d2cde982acb2137dc48f6b5/wordpress.org/public_html/wp-content/mu-plugins/pub/locales/locales.php#L1034-L1035

It was applied on the glotpress source only:

GlotPress/locales/locales.php

Lines 1023 to 1024 in 10644fd

$fa->nplurals = 2;
$fa->plural_expression = 'n > 1';

And yes, the correct format is :

$fa->nplurals = 2;
$fa->plural_expression = 'n > 1';

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

Successfully merging this pull request may close these issues.

None yet

3 participants