- Notifications
You must be signed in to change notification settings - Fork691
Bugfixes/1848 issues with non english culture#1849
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Bugfixes/1848 issues with non english culture#1849
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| publicvoidDefaultMigrationExpressionValidatorShouldReturnErrorWhenTableNameIsNotSpecified() | ||
| { | ||
| // Ensure error messages are in English | ||
| CultureInfo.CurrentUICulture=CultureInfo.InvariantCulture; |
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.
Why not just use [Test, Culture("en-US")]
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 didn't know about this but this seems very handy! Thanks for pointing that out!👍
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 useSetUICultureAttribute, as the validation messages rely onCurrentUICulture and not onCurrentCulture (tested).
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. will kick off ci service in a bit
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.
Updated to empty string
jzabroski left a comment
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.
Are you familiar withhttps://docs.nunit.org/articles/nunit/writing-tests/attributes/setculture.html ? I have not used it but have used the xunit equivalent UseCulture. In reading the docs, it seems extremely similar. I am not sure if it will work side-by-side with Setup, but otherwise it should work great? Note, nunit confusingly has a CultureAttribute, which is atest filter. We want SetCultureAttribute, not CultureAttribute. SetCultureAttribute sets the culture. CultureAttribute filters it.
Uh oh!
There was an error while loading.Please reload this page.
PostgresGeneratorifIndexVacuumCleanupIndexScaleFactoris used with a floating point number (should use invariant culture).Fixes#1848
Note
Maybe other
ToString()calls need to be investigated to ensure they do not cause the same issues as inPostgresGenerator.