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
When using multiple namespaces along with the "--fail-on-update" flag the result is always flagged as updated.
The issue seems to be the countWithPlurals that is used to check how many keys were added to a specific namespace. Since the countWithPlurals is set for the whole locale, not the specific namespace, the addCount for the namespace is wrong.
This can also be seen when the verbose setting is enabled, then the added keys will list the total number of keys for the locale minus the keys added in the specific namespace.
To Reproduce
Use a setup with multiple namespaces with different keys in the different namespaces
Extract the keys once
Enable --fail-on-update (and verbose to see that the added keys is not 0)
Output will be flagged as having updates, even though output is the same
Expected behavior
Fail on update should not always fail when run in environments with multiple namespaces
Your Environment
runtime version: node 16.5.0
i18next version: 21.5.4
i18next-parser version: 5.3.0
os: Linux (WSL)
The text was updated successfully, but these errors were encountered:
@karellm unfortunately upgrading to 6.2.0 does not solve my issue yet but I was not able to reproduce it in a new project with the same config as my private project. I will reopen later if I can find a way to reproduce it. Thanks 馃檹馃徏
馃悰 Bug Report
When using multiple namespaces along with the "--fail-on-update" flag the result is always flagged as updated.
The issue seems to be the
countWithPlurals
that is used to check how many keys were added to a specific namespace. Since thecountWithPlurals
is set for the whole locale, not the specific namespace, theaddCount
for the namespace is wrong.This can also be seen when the
verbose
setting is enabled, then the added keys will list the total number of keys for the locale minus the keys added in the specific namespace.To Reproduce
Expected behavior
Fail on update should not always fail when run in environments with multiple namespaces
Your Environment
The text was updated successfully, but these errors were encountered: