i18next / i18next-parser

Parse your code to extract translation keys/values and manage your catalog files
MIT License
482 stars 196 forks source link

Nesting t calls causes unwanted key removal #1025

Open adroste opened 3 months ago

adroste commented 3 months ago

🐛 Bug Report

Nesting t calls causes unwanted removal of keys

To Reproduce

const condition = true
t('test.outer', { subString: condition ? t('test.inner1') : t('test.inner2') })

The keys test.inner1 and test.inner2 will be removed from the translations file.

Expected behavior

Keys should not be removed.

Your Environment