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

Locales: Fix plural expression for Persian locales #1012

Merged
merged 2 commits into from
Apr 25, 2020
Merged

Locales: Fix plural expression for Persian locales #1012

merged 2 commits into from
Apr 25, 2020

Conversation

farhadsakhaei
Copy link
Contributor

Hi,
This is a correction for plural form for Translate system for Persian language and Persian Afghanistan
Here is a sample:
Singular: %s post not updated, somebody is editing it.
Plural: %s posts not updated, somebody is editing them.
Singular translation: %s نوشته بروزرسانی نشد، فردی در حال ویرایش آن است.
Plural translation: %s نوشته بروزرسانی نشد، فردی در حال ویرایش آنها می‌باشد.
in first part of the sentence it is same, but in second part it is different
this is a very good sample to clear this issue
I added a patch for this problem

@yoavf
Copy link
Member

yoavf commented Jun 20, 2019

Tried to confirm this elsewhere:

@farhadsakhaei
Copy link
Contributor Author

farhadsakhaei commented Jun 20, 2019

@yoavf
I think POEDIT setting is wrong,
Correct form: nplurals=2; plural=(n > 1);

@ocean90
Copy link
Member

ocean90 commented Apr 25, 2020

https://php-gettext.github.io/Languages/ also has n > 1 which is generated from CLDR data which should be a trusted source.

@ocean90 ocean90 added this to the 3.0 milestone Apr 25, 2020
@ocean90 ocean90 self-requested a review April 25, 2020 14:42
farhadsakhaei and others added 2 commits April 25, 2020 16:53
Hi,
This is a correction for plural form for Translate system for Persian language and Persian Afghanistan
Here is a sample:
Singular: %s post not updated, somebody is editing it.
Plural: %s posts not updated, somebody is editing them.
Singular translation: %s نوشته بروزرسانی نشد، فردی در حال ویرایش آن است.
Plural translation: %s نوشته بروزرسانی نشد، فردی در حال ویرایش آنها می‌باشد.
in first part of the sentence it is same, but in second part it is different
this is a very good sample to clear this issue
I added a patch for this problem
@ocean90 ocean90 changed the title correct plural form for Persian language and Persian Afghanistan Locales: Fix plural expression for Persian locales Apr 25, 2020
@ocean90 ocean90 merged commit d44a49c into GlotPress:develop Apr 25, 2020
farhadsakhaei added a commit to farhadsakhaei/wordpress.org that referenced this pull request Apr 13, 2024
Hi,
Currently the form of singular and plural for Persian language on translate.wordpress.org site is not correct,
Previously we fixed this on GlotPress but it seems WP site missed this fix
https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/locales/locales.php?rev=12939#L1027
GlotPress/GlotPress#1012
Correct form for Persian languages:
$fa->nplurals = 2;
$fa->plural_expression = 'n > 1';

$fa_af->nplurals = 2;
$fa_af->plural_expression = 'n > 1';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants