Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Multiple definitions of same key shows no error #48

Open
crowdagger opened this issue Aug 19, 2023 · 3 comments
Open

Multiple definitions of same key shows no error #48

crowdagger opened this issue Aug 19, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@crowdagger
Copy link

Hey, thanks for this crate! 🙏

When moving one of my project to use it, I added the same key twice by accident. Obviously the end result of what was displayed was not as expected 😓

I don't know how feasible it is, but it would be awesome if this could be caught at compile time with a clear message :)

@huacnlee
Copy link
Member

In some times we may need to override a key, so this can't add any warning.

@crowdagger
Copy link
Author

Couldn't it be an option? If not big deal

@huacnlee huacnlee self-assigned this Aug 22, 2023
@huacnlee huacnlee added the enhancement New feature or request label Aug 22, 2023
@Mastermindaxe
Copy link

@crowdagger It may help if you use a yaml file as a workaround. In my case I'm using a single yaml file for all translations. This way my IDE warns me if the same key is defined twice. Hope this helps! 😊

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants