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
I experienced this same issue. It took a very long time to figure out why only half of my translations were showing up in the output file. It is due to src/helpers.js:35-41 which is this code.
// There is no key to process so we return an empty object
if (!key) {
if (!target[entry.namespace]) {
target[entry.namespace] = {}
}
return { target, duplicate, conflict }
}
I don't understand why we would want to overwrite all previous translations just because there's an empty key. At the very least, keep old translations and just skip this key.
馃悰 Bug Report
When
t('')
is used anywhere in code, other translations cannot be found/referenced byi18next-parser
.To Reproduce
The key
TITLE
is removed form the translation.jsonExpected behavior
The key
TITLE
should not be removed from the translation.json.Fix / Workaround
Removing
{t('')}
fixes the issue. TheTITLE
key remains in the original translationYour Environment
The text was updated successfully, but these errors were encountered: