You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The languine extract command successfully detects new translation keys in the codebase but doesn't automatically add them to the translation JSON files. This seems to be different from the expected behavior of an extraction tool.
Current Behavior
The extract command finds new translation keys (shows "Found X new translation keys")
However, these keys are not added to the translation files
We need to manually add the keys to the English translation file first
Expected Behavior
When new translation keys are found in the code
They should be automatically added to the English translation file
Then the translate command can generate translations for other languages
Reproduction Steps
Start with this translation file (en/translation.json):
import{useTranslation}from'react-i18next'constComponent=()=>{const{ t }=useTranslation()// New translation key that doesn't exist in JSONconsole.log(t('test.extract.key'))return(// ... rest of the component)}
Run the extract command:
npx languine extract
Result:
┌ Extracting translation keys...
│
└ Found X new translation keys from source files
Check en/translation.json - the new key test.extract.key is not added
Environment
Languine Version: 1.0.2
Node.js Version: v22.12.0
OS: macOS 24.1.0
The text was updated successfully, but these errors were encountered:
The
languine extract
command successfully detects new translation keys in the codebase but doesn't automatically add them to the translation JSON files. This seems to be different from the expected behavior of an extraction tool.Current Behavior
Expected Behavior
Reproduction Steps
en/translation.json
):en/translation.json
- the new keytest.extract.key
is not addedEnvironment
The text was updated successfully, but these errors were encountered: