Skip to content

Conversation

@gewarren
Copy link
Contributor

I changed all instances of the phrase "current thread culture" to "current culture", except in this section: https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo?view=net-6.0#Threads.

In most cases, I didn't update code snippets to call CultureInfo.CurrentCulture instead of Thread.CurrentThread.CurrentCulture. I added project files for the snippets I did update, which meant I had to uniquify class and method names.

Fixes #7331.

@gewarren gewarren requested review from a team as code owners November 20, 2021 02:33
@ghost ghost added the area-Meta Concerns something that extends across runtime area boundaries, for example, IDisposable. label Nov 20, 2021
@opbld32
Copy link

opbld32 commented Nov 20, 2021

Docs Build status updates of commit ac488d3:

✅ Validation status: passed

File Status Preview URL Details
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/ToString1.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/ToString2.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/ToString4.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/tostring.csproj ✅Succeeded
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/tostring3.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/tostring5.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.CultureInfo.CurrentCulture2/CS/currentculture.cs ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/ToString1.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/ToString2.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/ToString4.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/tostring.vbproj ✅Succeeded
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/tostring3.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/tostring5.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CultureInfo.CurrentCulture2/VB/currentculture.vb ✅Succeeded View
xml/System.Globalization/CultureAndRegionInfoBuilder.xml ✅Succeeded View
xml/System.Globalization/CultureInfo.xml ✅Succeeded View
xml/System.Globalization/DateTimeFormatInfo.xml ✅Succeeded View
xml/System.Globalization/HebrewCalendar.xml ✅Succeeded View
xml/System.Globalization/NumberFormatInfo.xml ✅Succeeded View
xml/System.Numerics/Vector2.xml ✅Succeeded View
xml/System.Numerics/Vector3.xml ✅Succeeded View
xml/System.Numerics/Vector4.xml ✅Succeeded View
xml/System.Numerics/Vector`1.xml ✅Succeeded View
xml/System/Convert.xml ✅Succeeded View
xml/System/DateTime.xml ✅Succeeded View
xml/System/Double.xml ✅Succeeded View
xml/System/FormatException.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

Copy link
Member

@tarekgh tarekgh left a comment

Choose a reason for hiding this comment

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

I left some little comments. LGTM otherwise. Thanks a lot for getting this cleaned up!

@opbld34

This comment has been minimized.

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

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

This is great @gewarren

Once you address @tarekgh 's suggestion, this is ready to :shipit:

@opbld32

This comment has been minimized.

@opbld34
Copy link

opbld34 commented Nov 23, 2021

Docs Build status updates of commit 3ec0ea0:

⚠️ Validation status: warnings

File Status Preview URL Details
xml/System/DateTime.xml ⚠️Warning View Details
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/ToString1.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/ToString2.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/ToString4.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/tostring.csproj ✅Succeeded
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/tostring3.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/tostring5.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.CultureInfo.CurrentCulture2/CS/currentculture.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.CultureInfo.CurrentCulture2/CS/currentculture.csproj ✅Succeeded
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/ToString1.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/ToString2.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/ToString4.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/tostring.vbproj ✅Succeeded
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/tostring3.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/tostring5.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CultureInfo.CurrentCulture2/VB/currentculture.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CultureInfo.CurrentCulture2/VB/currentculture.vbproj ✅Succeeded
xml/System.Globalization/CultureAndRegionInfoBuilder.xml ✅Succeeded View
xml/System.Globalization/CultureInfo.xml ✅Succeeded View
xml/System.Globalization/DateTimeFormatInfo.xml ✅Succeeded View
xml/System.Globalization/HebrewCalendar.xml ✅Succeeded View
xml/System.Globalization/NumberFormatInfo.xml ✅Succeeded View
xml/System.Numerics/Vector2.xml ✅Succeeded View
xml/System.Numerics/Vector3.xml ✅Succeeded View
xml/System.Numerics/Vector4.xml ✅Succeeded View
xml/System.Numerics/Vector`1.xml ✅Succeeded View
xml/System/Convert.xml ✅Succeeded View
xml/System/Double.xml ✅Succeeded View
xml/System/FormatException.xml ✅Succeeded View

xml/System/DateTime.xml

  • Line 0, Column 0: [Warning: invalid-code] It looks like your code snippet was not rendered. Try range instead.

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@gewarren
Copy link
Contributor Author

Close/reopen to build with latest commit.

@gewarren gewarren closed this Nov 23, 2021
@gewarren gewarren reopened this Nov 23, 2021
@opbld33
Copy link

opbld33 commented Nov 24, 2021

Docs Build status updates of commit eaefd65:

✅ Validation status: passed

File Status Preview URL Details
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/ToString1.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/ToString2.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/ToString4.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/tostring.csproj ✅Succeeded
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/tostring3.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.ToString/cs/tostring5.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.CultureInfo.CurrentCulture2/CS/currentculture.cs ✅Succeeded View
samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.CultureInfo.CurrentCulture2/CS/currentculture.csproj ✅Succeeded
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/ToString1.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/ToString2.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/ToString4.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/tostring.vbproj ✅Succeeded
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/tostring3.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.ToString/vb/tostring5.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CultureInfo.CurrentCulture2/VB/currentculture.vb ✅Succeeded View
samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CultureInfo.CurrentCulture2/VB/currentculture.vbproj ✅Succeeded
xml/System.Globalization/CultureAndRegionInfoBuilder.xml ✅Succeeded View
xml/System.Globalization/CultureInfo.xml ✅Succeeded View
xml/System.Globalization/DateTimeFormatInfo.xml ✅Succeeded View
xml/System.Globalization/HebrewCalendar.xml ✅Succeeded View
xml/System.Globalization/NumberFormatInfo.xml ✅Succeeded View
xml/System.Numerics/Vector2.xml ✅Succeeded View
xml/System.Numerics/Vector3.xml ✅Succeeded View
xml/System.Numerics/Vector4.xml ✅Succeeded View
xml/System.Numerics/Vector`1.xml ✅Succeeded View
xml/System/Convert.xml ✅Succeeded View
xml/System/DateTime.xml ✅Succeeded View
xml/System/Double.xml ✅Succeeded View
xml/System/FormatException.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@gewarren gewarren merged commit 8ccdcc7 into dotnet:main Nov 24, 2021
@gewarren gewarren deleted the current-culture branch November 24, 2021 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Meta Concerns something that extends across runtime area boundaries, for example, IDisposable.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace "current thread culture" phrasing

6 participants