Westwind.Globalization icon indicating copy to clipboard operation
Westwind.Globalization copied to clipboard

ResourceSet

Open Juanllb76 opened this issue 6 years ago • 1 comments

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?

Juanllb76 avatar May 01 '18 10:05 Juanllb76

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.

PaxHumana avatar Apr 09 '21 16:04 PaxHumana