Westwind.Globalization
Westwind.Globalization copied to clipboard
ResourceSet
Hello,
I see when you indicate just @DbRes.T("Test") it goes to a entry in the database with ResourceSet empty. Also, when a resource has no ResourceSet, it doesn't appear in the LocalizationAdmin utility and also it doesn't go to the static class if you create it.
Will it be possible to have that utility and the class creation creating also resources with no resourceset, or indicate by default a resource ser in the @DbRes.T("Test") even when you don't indicate any?
I'm having the same issue, for some time I was able to work around it by inserting this in the listcontroller.js line 74: vm.resourceSets.unshift("");
but after updating to .net core, this is no longer working. The empty string value will be interpreted as NULL by the LocalizationAdministration service, resulting in this query:
exec sp_executesql N'select ResourceId,CAST( MAX( case WHEN len( CAST(Value as nvarchar(10))) > 0 THEN 1 ELSE 0 end ) as Bit) as HasValue from Localizations where ResourceSet=@ResourceSet group by ResourceId',N'@ResourceSet nvarchar(4000)',@ResourceSet=NULL
Now no results is returned since the DbResInstance.WriteResource will default to string.Empty.
As the deafult is a empty string the code in LocalizationAdministrationController should convert a ResourceSet with a null value to string.Empty.