Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix missing resources errors #1426

Merged
merged 2 commits into from
Feb 22, 2024
Merged

Conversation

hazzik
Copy link
Member

@hazzik hazzik commented Feb 22, 2024

The error The resource object with key 'DateHumanize_MultipleDaysFromNow' was not found Parameter name: resourceKey (and similar) was misleading. What was happening, I believe, is that for some Slavic and other languages, that resolve to _Paucal (or others) resource and when only default culture is installed then this error is being thrown. This was happening because the default resource did not have some of the keys that were present in other locales.

The solution is that default Resources.resx file should have all the keys that are present in other locales.

Also made exception more descriptive by providing the resolved key for the future.

Fixes #690

@SimonCropp SimonCropp added this to the v3.0 milestone Feb 22, 2024
@SimonCropp SimonCropp added the bug label Feb 22, 2024
@hazzik hazzik merged commit aeb7e39 into Humanizr:main Feb 22, 2024
3 checks passed
@hazzik hazzik deleted the fix-missing-resources branch February 29, 2024 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ArgumentException with locale sk_SK when only Humanizr.Core is installed
2 participants