Bugfix: Use correct plural froms in translations

https://www.phpbb.com/ideas/
Post Reply
Author:
GunChleoc
Posted:
Mon Nov 18, 2013 11:54 am
Rating:
Status:
Implemented
Ideas Bot
Registered User
Posts: 288
Joined: Sat Oct 13, 2012 10:06 am

Bugfix: Use correct plural froms in translations

Post by Ideas Bot » Mon Nov 18, 2013 11:54 am

phpBB has a working plural system. Please use it for all plural strings so that all languages can translate their plurals correctly.

The problem

The English plural pattern is

Code: Select all

nplurals=2; plural=(n != 1)
. This is fine for Germanic and romance languages, but many other languages have different plural patterns. You might want to ignore me because I'm "only" translating a minority language, but majority languages like Russian and Arabic are affected by this as well (cf. Localization Guide).

Here's an example of the working plural implementation in Scottish Gaelic:

Code: Select all

	'NUM_POSTS_IN_QUEUE'	=> array(
		'0'	=> '%d post sa chiudha',
		'1'	=> '%d phost sa chiudha',
		'3'	=> '%d postaichean sa chiudha',
		'11'	=> '%d phost sa chiudha',
		'13'	=> '%d postaichean sa chiudha',
		'20'	=> '%d post sa chiudha',
	),
As you can see, the patterns are quite different fromm English.

I have suggested this bugfix before but was shot down with the argument that fixing it would break existing translations, but the way it stands, it breaks existing translations as well, and in an unfixable manner to boot.

Pros
  • All languages will have correct plural forms.
  • We won't be stuck forever with a choice between grammar errors (e.g. in my translation "%d postaichean" for "%d posts" which is wrong for all numbers except 3-9, 13-19) or something both unreadable and illegible (e.g. "%d p(h)ost(aichean)" in my translation) which can't be fixed
Cons
  • Some translation teams will have to fix some strings
----------

View idea at: Bugfix: Use correct plural froms in translations

Posted by GunChleoc

GunChleoc
Translator
Posts: 139
Joined: Tue Jun 16, 2009 7:48 am

Re: Bugfix: Use correct plural froms in translations

Post by GunChleoc » Mon Nov 18, 2013 11:55 am

I meant to preview this and it got posted instead, so please ignore the typos.

User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: Bugfix: Use correct plural froms in translations

Post by nickvergessen » Mon Nov 18, 2013 11:55 am

This is already fixed in 3.1, see https://wiki.phpbb.com/Plural_Rules for more information
No Support via PM

GunChleoc
Translator
Posts: 139
Joined: Tue Jun 16, 2009 7:48 am

Re: Bugfix: Use correct plural froms in translations

Post by GunChleoc » Thu Feb 20, 2014 11:22 am

Excellent, thank you :)

Post Reply

Return to “phpBB Ideas”

Who is online

Users browsing this forum: JoshyPHP and 3 guests