From 0fb338c1e6b3753c34a47079da6e054c1e73401c Mon Sep 17 00:00:00 2001 From: Lynn Dai Date: Tue, 24 Jan 2023 10:32:21 -0800 Subject: [PATCH 1/4] update reference link --- src/NuGetGallery/Strings.Designer.cs | 10 +++++----- src/NuGetGallery/Strings.resx | 4 ++-- .../Services/PackageMetadataValidationServiceFacts.cs | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/NuGetGallery/Strings.Designer.cs b/src/NuGetGallery/Strings.Designer.cs index 88df3599b4..eb6aaf6c4b 100644 --- a/src/NuGetGallery/Strings.Designer.cs +++ b/src/NuGetGallery/Strings.Designer.cs @@ -2058,7 +2058,7 @@ public static string SecurityPolicy_RequireMinProtocolVersionForPush { } /// - /// Looks up a localized string similar to You have not published a package with this prefix in the past. This means other users may be able to push packages starting with the same prefix. Contact account@nuget.org to reserve the prefix. Go to https://docs.microsoft.com/en-us/nuget/reference/id-prefix-reservation to learn more about Package ID prefix reservation.. + /// Looks up a localized string similar to You have not published a package with this prefix in the past. This means other users may be able to push packages starting with the same prefix. Contact account@nuget.org to reserve the prefix. Go to https://docs.microsoft.com/nuget/reference/id-prefix-reservation to learn more about Package ID prefix reservation.. /// public static string SecurityPolicy_RequirePackagePrefixReserved { get { @@ -2598,7 +2598,7 @@ public static string UploadPackage_IconUrlDeprecated { } /// - /// Looks up a localized string similar to This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID. Go to https://docs.microsoft.com/en-us/nuget/reference/id-prefix-reservation learn more about Package ID prefix reservation.. + /// Looks up a localized string similar to This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID. Go to https://docs.microsoft.com/nuget/reference/id-prefix-reservation learn more about Package ID prefix reservation.. /// public static string UploadPackage_IdNamespaceConflict { get { @@ -2607,7 +2607,7 @@ public static string UploadPackage_IdNamespaceConflict { } /// - /// Looks up a localized string similar to This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID. <a href="https://docs.microsoft.com/en-us/nuget/reference/id-prefix-reservation">Learn more about Package ID prefix reservation</a>.. + /// Looks up a localized string similar to This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID. <a href="https://docs.microsoft.com/nuget/reference/id-prefix-reservation">Learn more about Package ID prefix reservation</a>.. /// public static string UploadPackage_IdNamespaceConflictHtml { get { @@ -2841,7 +2841,7 @@ public static string UploadPackage_MissingLicenseInformation { } /// - /// Looks up a localized string similar to Readme missing. Go to https://learn.microsoft.com/en-us/nuget/create-packages/package-authoring-best-practices#readme learn How to include a readme file within the package.. + /// Looks up a localized string similar to Readme missing. Go to https://aka.ms/nuget-include-readme learn How to include a readme file within the package.. /// public static string UploadPackage_MissingReadme { get { @@ -2850,7 +2850,7 @@ public static string UploadPackage_MissingReadme { } /// - /// Looks up a localized string similar to <strong>Readme</strong> missing.<a href="https://learn.microsoft.com/en-us/nuget/create-packages/package-authoring-best-practices#readme"> See how to include a readme file within the package</a>, or add it as you upload.. + /// Looks up a localized string similar to <strong>Readme</strong> missing.<a href="https://aka.ms/nuget-include-readme"> See how to include a readme file within the package</a>, or add it as you upload.. /// public static string UploadPackage_MissingReadmeHtml { get { diff --git a/src/NuGetGallery/Strings.resx b/src/NuGetGallery/Strings.resx index aa5e645f3a..f515658d62 100644 --- a/src/NuGetGallery/Strings.resx +++ b/src/NuGetGallery/Strings.resx @@ -539,10 +539,10 @@ For more information, please contact '{2}'. The Documentation URL must be a raw Markdown file hosted on GitHub. - <strong>Readme</strong> missing.<a href="https://learn.microsoft.com/nuget/create-packages/package-authoring-best-practices#readme"> See how to include a readme file within the package</a>, or add it as you upload. + <strong>Readme</strong> missing.<a href="https://aka.ms/nuget-include-readme"> See how to include a readme file within the package</a>, or add it as you upload. - Readme missing. Go to https://learn.microsoft.com/nuget/create-packages/package-authoring-best-practices#readme learn How to include a readme file within the package. + Readme missing. Go to https://aka.ms/nuget-include-readme learn How to include a readme file within the package. The user '{0}' is now an owner of the prefix '{1}'. diff --git a/tests/NuGetGallery.Facts/Services/PackageMetadataValidationServiceFacts.cs b/tests/NuGetGallery.Facts/Services/PackageMetadataValidationServiceFacts.cs index 24599eb16e..b4f5e14ed0 100644 --- a/tests/NuGetGallery.Facts/Services/PackageMetadataValidationServiceFacts.cs +++ b/tests/NuGetGallery.Facts/Services/PackageMetadataValidationServiceFacts.cs @@ -1500,8 +1500,8 @@ public async Task WarnsAboutPackagesWithoutReadmeWhenDisplayUploadWarningV2Enabl Assert.Null(result.Message); var warning = Assert.Single(result.Warnings); Assert.IsType(warning); - Assert.StartsWith("Readme missing. Go to https://learn.microsoft.com/nuget/create-packages/package-authoring-best-practices#readme learn How to include a readme file within the package.", warning.PlainTextMessage); - Assert.StartsWith("Readme missing. See how to include a readme file within the package, or add it as you upload.", warning.RawHtmlMessage); + Assert.StartsWith("Readme missing. Go to https://aka.ms/nuget-include-readme learn How to include a readme file within the package.", warning.PlainTextMessage); + Assert.StartsWith("Readme missing. See how to include a readme file within the package, or add it as you upload.", warning.RawHtmlMessage); } [Fact] From 1cc2264ccd1ea4f82651a098b814862426460814 Mon Sep 17 00:00:00 2001 From: Lynn Dai Date: Tue, 24 Jan 2023 10:38:07 -0800 Subject: [PATCH 2/4] a --- src/NuGetGallery/Strings.Designer.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NuGetGallery/Strings.Designer.cs b/src/NuGetGallery/Strings.Designer.cs index eb6aaf6c4b..88df3599b4 100644 --- a/src/NuGetGallery/Strings.Designer.cs +++ b/src/NuGetGallery/Strings.Designer.cs @@ -2058,7 +2058,7 @@ public static string SecurityPolicy_RequireMinProtocolVersionForPush { } /// - /// Looks up a localized string similar to You have not published a package with this prefix in the past. This means other users may be able to push packages starting with the same prefix. Contact account@nuget.org to reserve the prefix. Go to https://docs.microsoft.com/nuget/reference/id-prefix-reservation to learn more about Package ID prefix reservation.. + /// Looks up a localized string similar to You have not published a package with this prefix in the past. This means other users may be able to push packages starting with the same prefix. Contact account@nuget.org to reserve the prefix. Go to https://docs.microsoft.com/en-us/nuget/reference/id-prefix-reservation to learn more about Package ID prefix reservation.. /// public static string SecurityPolicy_RequirePackagePrefixReserved { get { @@ -2598,7 +2598,7 @@ public static string UploadPackage_IconUrlDeprecated { } /// - /// Looks up a localized string similar to This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID. Go to https://docs.microsoft.com/nuget/reference/id-prefix-reservation learn more about Package ID prefix reservation.. + /// Looks up a localized string similar to This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID. Go to https://docs.microsoft.com/en-us/nuget/reference/id-prefix-reservation learn more about Package ID prefix reservation.. /// public static string UploadPackage_IdNamespaceConflict { get { @@ -2607,7 +2607,7 @@ public static string UploadPackage_IdNamespaceConflict { } /// - /// Looks up a localized string similar to This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID. <a href="https://docs.microsoft.com/nuget/reference/id-prefix-reservation">Learn more about Package ID prefix reservation</a>.. + /// Looks up a localized string similar to This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID. <a href="https://docs.microsoft.com/en-us/nuget/reference/id-prefix-reservation">Learn more about Package ID prefix reservation</a>.. /// public static string UploadPackage_IdNamespaceConflictHtml { get { @@ -2841,7 +2841,7 @@ public static string UploadPackage_MissingLicenseInformation { } /// - /// Looks up a localized string similar to Readme missing. Go to https://aka.ms/nuget-include-readme learn How to include a readme file within the package.. + /// Looks up a localized string similar to Readme missing. Go to https://learn.microsoft.com/en-us/nuget/create-packages/package-authoring-best-practices#readme learn How to include a readme file within the package.. /// public static string UploadPackage_MissingReadme { get { @@ -2850,7 +2850,7 @@ public static string UploadPackage_MissingReadme { } /// - /// Looks up a localized string similar to <strong>Readme</strong> missing.<a href="https://aka.ms/nuget-include-readme"> See how to include a readme file within the package</a>, or add it as you upload.. + /// Looks up a localized string similar to <strong>Readme</strong> missing.<a href="https://learn.microsoft.com/en-us/nuget/create-packages/package-authoring-best-practices#readme"> See how to include a readme file within the package</a>, or add it as you upload.. /// public static string UploadPackage_MissingReadmeHtml { get { From fb64478193a292cb6d9912485050990ed3cf01f1 Mon Sep 17 00:00:00 2001 From: Lynn Dai Date: Tue, 24 Jan 2023 10:51:42 -0800 Subject: [PATCH 3/4] update string.desinger --- src/NuGetGallery/Strings.Designer.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NuGetGallery/Strings.Designer.cs b/src/NuGetGallery/Strings.Designer.cs index 88df3599b4..eb6aaf6c4b 100644 --- a/src/NuGetGallery/Strings.Designer.cs +++ b/src/NuGetGallery/Strings.Designer.cs @@ -2058,7 +2058,7 @@ public static string SecurityPolicy_RequireMinProtocolVersionForPush { } /// - /// Looks up a localized string similar to You have not published a package with this prefix in the past. This means other users may be able to push packages starting with the same prefix. Contact account@nuget.org to reserve the prefix. Go to https://docs.microsoft.com/en-us/nuget/reference/id-prefix-reservation to learn more about Package ID prefix reservation.. + /// Looks up a localized string similar to You have not published a package with this prefix in the past. This means other users may be able to push packages starting with the same prefix. Contact account@nuget.org to reserve the prefix. Go to https://docs.microsoft.com/nuget/reference/id-prefix-reservation to learn more about Package ID prefix reservation.. /// public static string SecurityPolicy_RequirePackagePrefixReserved { get { @@ -2598,7 +2598,7 @@ public static string UploadPackage_IconUrlDeprecated { } /// - /// Looks up a localized string similar to This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID. Go to https://docs.microsoft.com/en-us/nuget/reference/id-prefix-reservation learn more about Package ID prefix reservation.. + /// Looks up a localized string similar to This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID. Go to https://docs.microsoft.com/nuget/reference/id-prefix-reservation learn more about Package ID prefix reservation.. /// public static string UploadPackage_IdNamespaceConflict { get { @@ -2607,7 +2607,7 @@ public static string UploadPackage_IdNamespaceConflict { } /// - /// Looks up a localized string similar to This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID. <a href="https://docs.microsoft.com/en-us/nuget/reference/id-prefix-reservation">Learn more about Package ID prefix reservation</a>.. + /// Looks up a localized string similar to This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID. <a href="https://docs.microsoft.com/nuget/reference/id-prefix-reservation">Learn more about Package ID prefix reservation</a>.. /// public static string UploadPackage_IdNamespaceConflictHtml { get { @@ -2841,7 +2841,7 @@ public static string UploadPackage_MissingLicenseInformation { } /// - /// Looks up a localized string similar to Readme missing. Go to https://learn.microsoft.com/en-us/nuget/create-packages/package-authoring-best-practices#readme learn How to include a readme file within the package.. + /// Looks up a localized string similar to Readme missing. Go to https://aka.ms/nuget-include-readme learn How to include a readme file within the package.. /// public static string UploadPackage_MissingReadme { get { @@ -2850,7 +2850,7 @@ public static string UploadPackage_MissingReadme { } /// - /// Looks up a localized string similar to <strong>Readme</strong> missing.<a href="https://learn.microsoft.com/en-us/nuget/create-packages/package-authoring-best-practices#readme"> See how to include a readme file within the package</a>, or add it as you upload.. + /// Looks up a localized string similar to <strong>Readme</strong> missing.<a href="https://aka.ms/nuget-include-readme"> See how to include a readme file within the package</a>, or add it as you upload.. /// public static string UploadPackage_MissingReadmeHtml { get { From 29ca8223c28f96387cf1f13aa37e7b5377bb016f Mon Sep 17 00:00:00 2001 From: Lynn Dai Date: Mon, 30 Jan 2023 15:49:52 -0800 Subject: [PATCH 4/4] update unit test --- .../Services/PackageMetadataValidationServiceFacts.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/NuGetGallery.Facts/Services/PackageMetadataValidationServiceFacts.cs b/tests/NuGetGallery.Facts/Services/PackageMetadataValidationServiceFacts.cs index b4f5e14ed0..fc483490fd 100644 --- a/tests/NuGetGallery.Facts/Services/PackageMetadataValidationServiceFacts.cs +++ b/tests/NuGetGallery.Facts/Services/PackageMetadataValidationServiceFacts.cs @@ -1527,8 +1527,8 @@ public async Task WarnsAboutPackagesWithoutWhenEmbeddedReadmeNotEnabledAndDispla Assert.Null(result.Message); var warning = Assert.Single(result.Warnings); Assert.IsType(warning); - Assert.StartsWith("Readme missing. Go to https://learn.microsoft.com/nuget/create-packages/package-authoring-best-practices#readme learn How to include a readme file within the package.", warning.PlainTextMessage); - Assert.StartsWith("Readme missing. See how to include a readme file within the package, or add it as you upload.", warning.RawHtmlMessage); + Assert.StartsWith("Readme missing. Go to https://aka.ms/nuget-include-readme learn How to include a readme file within the package.", warning.PlainTextMessage); + Assert.StartsWith("Readme missing. See how to include a readme file within the package, or add it as you upload.", warning.RawHtmlMessage); } private async Task ValidatePackageWithReadme(string readmePath, byte[] readmeFileData)