i18n.lua icon indicating copy to clipboard operation
i18n.lua copied to clipboard

Added support for arrays of strings to i18n. Arrays support pluralisa…

Open personalnadir opened this issue 6 years ago • 2 comments

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.

personalnadir avatar Nov 04 '19 15:11 personalnadir

Coverage Status

Coverage decreased (-0.04%) to 98.613% when pulling 9e255c140e717b2442f88944ab69aa6cc4291bf0 on personalnadir:master into 93f8cbef2aceb7df1163c3d96bd2f23702bb1164 on kikito:master.

coveralls avatar Nov 04 '19 15:11 coveralls

Coverage Status

Coverage decreased (-0.02%) to 98.631% when pulling a0ada42b52c4451821f3515797bbc02142e3202c on personalnadir:master into 93f8cbef2aceb7df1163c3d96bd2f23702bb1164 on kikito:master.

coveralls avatar Nov 04 '19 15:11 coveralls