-
Notifications
You must be signed in to change notification settings - Fork 1
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
OSOE-47: Open-source Data Tables #80
Conversation
@* Forces the CultureInfo to use the canonical date format. This prevents user or system level customizations. We | ||
need this for the UI tests to work reliably. *@ | ||
var cultureInfo = new CultureInfo(CultureInfo.CurrentCulture.Name, useUserOverride: false); |
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.
I don't have the foggiest why this came up only now, so any insight is appreciated. I think it might be related to when you edit Time & Language > _Region> Change data format in the system Settings app, but I'm not super sure.
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.
Isn't useUserOverride
something that you can specify in the format string? Because then we can use the DateTime
shape. If not, shouldn't this be added to the shape as well? Please open an OC issue.
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.
Isn't useUserOverride something that you can specify in the format string?
No, you can only set IFormatProvider
which defaults to CultureInfo.CurrentCulture
which apparently can be affected by your system settings.
Because then we can use the DateTime shape. If not, shouldn't this be added to the shape as well? Please open an OC issue.
Does the shape even accept a format provider? I can't find a full documentation for that shape and it's tough to search for it in the OC source code becuase "DateTime" is kind of a common word.
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.
It doesn't except a format provider but only a format string, see here.
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.
Thanks. I think what they do is very reasonable, since OC is supposed to to set the current UI culture. Let me check if I can find something bug reportable on that end.
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.
Generally I think the problem is with how OC sets the CurrentCulture/CurrentUICulture. I have made a bug report with a suggested solution here. I also have added this to the comment above.
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.
They don't seem to be super receptive to it. However I have a fallback issue here.
Also I think it's a valid point that the server shouldn't customize the date format in the first place, so why is it in CI?
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.
Replied there.
Lombiq.DataTables.Samples/Views/Sample/DataTableTagHelper.cshtml
Outdated
Show resolved
Hide resolved
Lombiq.DataTables.Samples/Views/Sample/DataTableTagHelper.cshtml
Outdated
Show resolved
Hide resolved
@* Forces the CultureInfo to use the canonical date format. This prevents user or system level customizations. We | ||
need this for the UI tests to work reliably. *@ | ||
var cultureInfo = new CultureInfo(CultureInfo.CurrentCulture.Name, useUserOverride: false); |
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.
Isn't useUserOverride
something that you can specify in the format string? Because then we can use the DateTime
shape. If not, shouldn't this be added to the shape as well? Please open an OC issue.
Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj
Outdated
Show resolved
Hide resolved
Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj
Outdated
Show resolved
Hide resolved
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.
See comments.
Co-authored-by: Zoltán Lehóczky <[email protected]>
Co-authored-by: Zoltán Lehóczky <[email protected]>
Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj
Outdated
Show resolved
Hide resolved
Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj
Outdated
Show resolved
Hide resolved
Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj
Show resolved
Hide resolved
@* Forces the CultureInfo to use the canonical date format. This prevents user or system level customizations. We | ||
need this for the UI tests to work reliably. *@ | ||
var cultureInfo = new CultureInfo(CultureInfo.CurrentCulture.Name, useUserOverride: false); |
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.
Replied there.
CHANGE BASE BRANCH TO DEV BEFORE MERGE.
OSOE-47
This merges the release upgrade done in FINI-859. It might be worthwhile to review that PR first, but do as you please. :) This branch further upgrades from Orchard Core 1.0.0 to 1.2.1 but there were no issues with that.