Humanizr / Humanizer

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities
Other
8.64k stars 962 forks source link

Fix missing resources errors #1426

Closed hazzik closed 7 months ago

hazzik commented 7 months ago

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