Skip to content

Fix missing resources errors#1426

Merged
hazzik merged 2 commits intoHumanizr:mainfrom
hazzik:fix-missing-resources
Feb 22, 2024
Merged

Fix missing resources errors#1426
hazzik merged 2 commits intoHumanizr:mainfrom
hazzik:fix-missing-resources

Conversation

@hazzik
Copy link
Collaborator

@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
@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