google-code-export / globalite

Automatically exported from code.google.com/p/globalite
1 stars 0 forks source link

Pluralize not working when more than one occurence in the string #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The pluralize method used in localization strings does not seem to work
when used multiple times, for example: "pluralize{{count_users}, user,
users} have posted pluralize{{count_messages}, message, messages}".

This is because the regular expression used for detecting occurences of
"pluralize" in the string to be localized is slightly incorrect: it should
use a "non greedy" matcher.

Attached is a patch which hopefully solves the problem.

Original issue reported on code.google.com by njacob...@gmail.com on 4 Mar 2008 at 4:47

Attachments: