About [[Mifos:Ui-EXCEEDING NUMBER OF DIGITS AFTER DECIMAL SEPARATOR FOR MONEY/en]]
Hi Siebrand,
I see the message reads: EXCEEDING_NUMBER_OF_DIGITS_AFTER_DECIMAL_SEPARATOR_FOR_MONEY=Only %s digit(s) after decimal separator is allowed
This seems to take care of plural support. Is this resolved or perhaps I don't understand your comment.
There are languages where adding (s) for plural just does not work. Whenever you use numbers in running sentences, you really, really need a proper implementation for plurals in your i18n framework. Have a look at Plural to see how many different grammers there are...
Thanks Siebrand. I read a little bit about plural-forms on gettext utilities. If I understand correctly, in some languages, the plural form will depend on the value of %s. In this case, the translation would have to be generated on the fly depending on %s, which seems like it would be difficult to do.
Here's another ignorant question. If we rephrase the message to read as follows: EXCEEDING_NUMBER_OF_DIGITS_AFTER_DECIMAL_SEPARATOR_FOR_MONEY=The number of digits after the decimal separator exceeds the allowed number, %s.
Is this equally difficult to translate because the plural form 'digits' is still dependent on %s?
Alternatively, I also tried to look through the code to see what %s should be, but it wasn't straightforward - I'll look more carefully and post what I discover.
In PHP using gettext extraction, you'd need something like this:
<?php
sprintf(ngettext('Only %d digit after decimal separator is allowed',
'Only %d digits after decimal separator are allowed',
$digitsAllowed),
$digitsAllowed);
I do not know which language Mifos is written in. We can probably provide examples for plural implementations in at least PHP, Ruby and Java.