You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use choice() and use straight line symbol (|) in the parameters, it causes the sentence structure to be messed up. It seems that the library first places the parameters in the sentences and then selects the sentence based on the number parameter in choice(). While the correct way is to first select the correct sentence in terms of number, then replace the parameters.
Steps To Reproduce home.php file:
return [
'greeting' => '{0} Hello :name|[1,*] Hello :name, you have :count unread messages'
];
When I use
choice()
and use straight line symbol (|
) in the parameters, it causes the sentence structure to be messed up. It seems that the library first places the parameters in the sentences and then selects the sentence based on the number parameter inchoice()
. While the correct way is to first select the correct sentence in terms of number, then replace the parameters.Steps To Reproduce
home.php
file:Usage:
Above code must result in
Hello Alex | Moi
, But it results toHello Alex
.The text was updated successfully, but these errors were encountered: