i18n.lua
i18n.lua copied to clipboard
Added support for arrays of strings to i18n. Arrays support pluralisa…
Hi, this is my attempt to add support for #29
I've changed the way pluralisation works to support this. Whereas previously the code always used data.count to determine the pluralisation it now uses the first %{field} or %<value> name in the string, falling back to count if none found.
This will cause issues if the user attempts to combine pluralisation and interpolation with independent variables at the same time. At the moment I cannot think of a use case for this.
Coverage decreased (-0.04%) to 98.613% when pulling 9e255c140e717b2442f88944ab69aa6cc4291bf0 on personalnadir:master into 93f8cbef2aceb7df1163c3d96bd2f23702bb1164 on kikito:master.