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

Feature request: Config option to ignore specific file names/types #48

Closed venashial closed 2 years ago

venashial commented 2 years ago

We use a git submodule for our translations, so a crowdin.yml file ends up in the locales folder. It would be nice if we could ignore it.

cibernox commented 2 years ago

good point. IMO in fact only locales named after ISO language codes should be considered. E.g. en.yml or en-US.yml, but any file not matching /\w\w(-\w\w)?\.\w*/ should be ignored.

cibernox commented 2 years ago

I released 0.10.1 with a change. Only files with a name that maches the ISO code of a language (with or without regional variant) are considered locales. Give it a try.

venashial commented 2 years ago

Thanks! That works.