Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Conversation

@warappa
Copy link
Contributor

@warappawarappa commentedJul 30, 2024
edited
Loading

  • Ensure tests checking against validation messages have invariant (english) culture
  • Fix bug inPostgresGenerator ifIndexVacuumCleanupIndexScaleFactor is used with a floating point number (should use invariant culture).

Fixes#1848

Note

Maybe otherToString() calls need to be investigated to ensure they do not cause the same issues as inPostgresGenerator.

publicvoidDefaultMigrationExpressionValidatorShouldReturnErrorWhenTableNameIsNotSpecified()
{
// Ensure error messages are in English
CultureInfo.CurrentUICulture=CultureInfo.InvariantCulture;
Copy link
Collaborator

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")]

Copy link
ContributorAuthor

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!👍

Copy link
ContributorAuthor

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).

Copy link
Collaborator

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

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Updated to empty string

Copy link
Collaborator

@jzabroskijzabroski left a 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.

warappa reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@jzabroskijzabroskijzabroski requested changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

6.0.0

Development

Successfully merging this pull request may close these issues.

Some tests fail if culture is different from en-US

2 participants

@warappa@jzabroski

[8]ページ先頭

©2009-2025 Movatter.jp