sveltekit-i18n / lib

Internationalization library built for SvelteKit.
MIT License
447 stars 28 forks source link

Single character default is not recognised #173

Open jnsprnw opened 4 months ago

jnsprnw commented 4 months ago

Default values with only on character, for example a, are not recognised.

Example

Consider the following example:

as {{age; 8:an; 11:an; 18:an; default:a;}} {{age}}-year-old

This should result in:

as an 18-year-old
as an 8-year-old
as a 7-year-old

But instead, the last sentence renders to:

as a; 7-year-old

Workaround

It does work with a space after a:

as {{age; 8:an; 11:an; 18:an; default:a ;}} {{age}}-year-old

But I guess, that this is not how it is meant to be used.