ZF-11173: Pluralized strings are not translated correctly when using routing between languages

Description

If you have 2 translation languages loaded into any adapter, with routing between the two languages, the "fallback" language translation will not be treated correctly when dealing with a pluralized string.

The problem is line ~777 {{return $this->translate($messageId, $this->_options['route'][$locale]);}}

This call passes the modified $messageId variable to the translate() method with the routed locale. It should in fact be passing the original $messageId variable that was used to call that run of the method.

To fix, I suggest having a variable such as $origMessageId at the top of the translate() method, and modifying the line

{{return $this->translate($messageId, $this->_options['route'][$locale]);}}

to read

{{return $this->translate($origMessageId, $this->_options['route'][$locale]);}}

Comments

Fixed in ZF2 with GH-363

Can you please add this fix to ZF 1 also? Or is there a reason I'm missing for not doing it in ZF1? Thanks in advance.