-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Bug/319 localization double parse #349
Conversation
Questions above aside, these changes will make GeoBlazor work inline with the ArcGIS JS SDK, along with a few other options that you could use to manipulate the |
public AttributesDictionary(Dictionary<string, object?> dictionary) | ||
{ | ||
CultureInfo cultureInfo = dictionary.TryGetValue("geoBlazorCulture", out object? gbCulture) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to make this a property on the class rather then another entry in the dictionary? It could help separate data vs framework, unless these attributes are not directly realted to the data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is the serialization of the attributes, where we have to switch them to an array of objects with key
, value
, and valueType
. I could rewrite all of that to be an object with an array, but this seemed simpler. Rewriting would mean rewriting both JSON and Protobuf serialization methods in both C# and TypeScript. 😩
# Conflicts: # src/dymaptic.GeoBlazor.Core/Objects/AttributesDictionary.cs
After discussing with @AndersenBell, we came up with a better plan. In my changes, we now query once for the browser language in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Closes #319
navigator.language
with graphic attributes indotNetBuilder.buildDotNetGraphic
CurrentCulture
.TestRunnerBase.razor
for synchronous testsThere is some question in my mind still if this is the "right" or "best" approach. The issue IMO stems from the following:
How these 3 pieces fit together, and how to know that we aren't breaking data in any one scenario (data from AGOL in culture A, data from GeoBlazor in culture B, etc.).
For example, if we pass data to ArcGIS JS layers in culture A from GeoBlazor, but the client is in culture B, when it returns to GB, it will have culture B tied to the data. Some of this stems from the fact that Blazor is both a server and client technology, often in the same application.