cibernox / svelte-intl-precompile

I18n library for Svelte.js that analyzes your keys at build time for max performance and minimal footprint
https://svelte-intl-precompile.com
ISC License
274 stars 13 forks source link

pluralized not working #13

Closed yadoga closed 3 years ago

yadoga commented 3 years ago

following the example

"foot": "{count} {count, plural, =1 {foot} other {feet}}"

using the standard way to call

$t('foot', { values: { count: 2 } })

…outputs the translation string logic itself:

=> {count} {count, plural, =1 {foot} other {feet}}

running latest SvelteKit version

cibernox commented 3 years ago

Can you verify your setup looks somewhat similar to the one in this demo app: https://github.com/cibernox/quick-i18n-throwaway-demo/

Particularly pay attention to https://github.com/cibernox/quick-i18n-throwaway-demo/blob/main/svelte.config.js and https://github.com/cibernox/quick-i18n-throwaway-demo/blob/main/src/routes/index.svelte

yadoga commented 3 years ago

Thanks, paid close attention to those. Regular translations do work fine. I guess my issue is also a duplicate of #7 ...

That being said, the problem persists for now on my end.

yadoga commented 3 years ago

Just cloned your barebones repo and it is working for me. Now trying to find a particular difference that's holding my setup up...

yadoga commented 3 years ago

Cleaned up package.json, everything working now! Was not yet able to pinpoint the root cause. I'm suspected some typescript packages but cannot confirm that just yet. Closing this, thanks again!

cibernox commented 3 years ago

Glad you fixed it!