Skip to content

Conversation

@4rthem
Copy link

@4rthem 4rthem commented Jan 24, 2025

Allow to use defaultValue_other with compatibilityJSON v4

@dm-xai
Copy link

dm-xai commented Feb 17, 2025

This addition would be awesome.

Sadly, it doesn't handle <Trans/> component

          <Trans
            i18nKey="testMsg"
            count={2}
            tOptions={{
              defaultValue_one: 'You have a message.',
              defaultValue_other: 'You have {{count}} messages.',
            }}
          />

@4rthem
Copy link
Author

4rthem commented Feb 24, 2025

@dm-xai It's working correctly on my side.

@alexanderbh
Copy link

Get this merged please. I tested it and it works. It does not work without these changes. I don't understand how people say it works. It does not.

The code here is the code that actually creates the keys. And without this change it simply does not look at the defaultValue_one or defaultValue_other attributes. They are ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants