Skip to content

Commit b075e4c

Browse files
committed
more test
1 parent aac5448 commit b075e4c

18 files changed

Lines changed: 176 additions & 139 deletions

File tree

src/NuGet.Core/NuGet.CommandLine.XPlat/Commands/Package/Download/PackageDownloadCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static void Register(Command packageCommand, Option<bool> interactiveOpti
2020
{
2121
var downloadCommand = new DocumentedCommand(
2222
"download",
23-
Strings.PackageDownloadCommand_descritpion,
23+
Strings.PackageDownloadCommand_Description,
2424
"https://aka.ms/dotnet/package/download");
2525

2626
// Arguments
@@ -34,7 +34,7 @@ public static void Register(Command packageCommand, Option<bool> interactiveOpti
3434
// Options
3535
var allowInsecureConnections = new Option<bool>("--allow-insecure-connections")
3636
{
37-
Description = Strings.PackageDownloadCommand_AllowInsecureConnectionsDescritption,
37+
Description = Strings.PackageDownloadCommand_AllowInsecureConnectionsDescription,
3838
Arity = ArgumentArity.Zero
3939
};
4040

src/NuGet.Core/NuGet.CommandLine.XPlat/Commands/Package/Download/PackageDownloadRunner.cs

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ await ResolvePackageDownloadVersion(
8686
}
8787

8888
bool success = await DownloadPackageAsync(
89-
package.Id,
90-
version,
91-
downloadRepository,
92-
cache,
93-
settings,
94-
outputDirectory,
95-
logger,
96-
token);
89+
package.Id,
90+
version,
91+
downloadRepository,
92+
cache,
93+
settings,
94+
outputDirectory,
95+
logger,
96+
token);
9797

9898
if (success)
9999
{
@@ -211,11 +211,11 @@ private static async Task<bool> DownloadPackageAsync(
211211
if (userPackageFolder.Exists(id, version))
212212
{
213213
logger.LogMinimal(string.Format(
214-
CultureInfo.CurrentCulture,
215-
Strings.PackageDownloadCommand_AlreadyInstalled,
216-
id,
217-
version.ToNormalizedString(),
218-
outputDirectory));
214+
CultureInfo.CurrentCulture,
215+
Strings.PackageDownloadCommand_AlreadyInstalled,
216+
id,
217+
version.ToNormalizedString(),
218+
outputDirectory));
219219

220220
return true;
221221
}
@@ -224,14 +224,15 @@ private static async Task<bool> DownloadPackageAsync(
224224
var provider = new SourceRepositoryDependencyProvider(sourceRepository: repo, logger: logger, cacheContext: cache, ignoreFailedSources: false, ignoreWarning: false);
225225
using var downloader = await provider.GetPackageDownloaderAsync(packageIdentity, cache, logger, token);
226226
bool success = await PackageExtractor.InstallFromSourceAsync(packageIdentity, downloader, resolver, extractionContext, token);
227+
227228
if (!success)
228229
{
229230
logger.LogError(string.Format(
230-
CultureInfo.CurrentCulture,
231-
Strings.PackageDownloadCommand_UnableToDownload,
232-
id,
233-
version.ToNormalizedString(),
234-
repo.PackageSource.Source));
231+
CultureInfo.CurrentCulture,
232+
Strings.PackageDownloadCommand_UnableToDownload,
233+
id,
234+
version.ToNormalizedString(),
235+
repo.PackageSource.Source));
235236
return false;
236237
}
237238

src/NuGet.Core/NuGet.CommandLine.XPlat/Strings.Designer.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/NuGet.Core/NuGet.CommandLine.XPlat/Strings.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,13 +1108,13 @@ Do not translate "PackageVersion"</comment>
11081108
<value>Invalid version value '{0}'.</value>
11091109
<comment>0 - package version</comment>
11101110
</data>
1111-
<data name="PackageDownloadCommand_descritpion" xml:space="preserve">
1111+
<data name="PackageDownloadCommand_Description" xml:space="preserve">
11121112
<value>Downloads a NuGet package to a local folder without requiring a project file.</value>
11131113
</data>
11141114
<data name="PackageDownloadCommand_PackageIdDescription" xml:space="preserve">
11151115
<value>Package identifier (e.g. 'Newtonsoft.Json').</value>
11161116
</data>
1117-
<data name="PackageDownloadCommand_AllowInsecureConnectionsDescritption" xml:space="preserve">
1117+
<data name="PackageDownloadCommand_AllowInsecureConnectionsDescription" xml:space="preserve">
11181118
<value>Allows downloading from HTTP (non-HTTPS) package sources.</value>
11191119
</data>
11201120
<data name="PackageDownloadCommand_OutputDirectoryDescription" xml:space="preserve">

src/NuGet.Core/NuGet.CommandLine.XPlat/xlf/Strings.cs.xlf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ Další informace najdete tady: https://docs.nuget.org/docs/reference/command-li
891891
<note>{0}: App full name
892892
{1}: App version</note>
893893
</trans-unit>
894-
<trans-unit id="PackageDownloadCommand_AllowInsecureConnectionsDescritption">
894+
<trans-unit id="PackageDownloadCommand_AllowInsecureConnectionsDescription">
895895
<source>Allows downloading from HTTP (non-HTTPS) package sources.</source>
896896
<target state="new">Allows downloading from HTTP (non-HTTPS) package sources.</target>
897897
<note />
@@ -903,6 +903,11 @@ Další informace najdete tady: https://docs.nuget.org/docs/reference/command-li
903903
1 - version
904904
2 - directory path where the package was downloaded</note>
905905
</trans-unit>
906+
<trans-unit id="PackageDownloadCommand_Description">
907+
<source>Downloads a NuGet package to a local folder without requiring a project file.</source>
908+
<target state="new">Downloads a NuGet package to a local folder without requiring a project file.</target>
909+
<note />
910+
</trans-unit>
906911
<trans-unit id="PackageDownloadCommand_Failed">
907912
<source>Package '{0}' ({1}) failed to download.</source>
908913
<target state="new">Package '{0}' ({1}) failed to download.</target>
@@ -949,11 +954,6 @@ Další informace najdete tady: https://docs.nuget.org/docs/reference/command-li
949954
1 package version
950955
2 package source</note>
951956
</trans-unit>
952-
<trans-unit id="PackageDownloadCommand_descritpion">
953-
<source>Downloads a NuGet package to a local folder without requiring a project file.</source>
954-
<target state="new">Downloads a NuGet package to a local folder without requiring a project file.</target>
955-
<note />
956-
</trans-unit>
957957
<trans-unit id="PackageUpdateCommand_Description">
958958
<source>Update referenced packages in a project or solution.</source>
959959
<target state="translated">Aktualizujte odkazované balíčky v projektu nebo řešení.</target>

src/NuGet.Core/NuGet.CommandLine.XPlat/xlf/Strings.de.xlf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ Weitere Informationen finden Sie unter: https://docs.nuget.org/docs/reference/co
891891
<note>{0}: App full name
892892
{1}: App version</note>
893893
</trans-unit>
894-
<trans-unit id="PackageDownloadCommand_AllowInsecureConnectionsDescritption">
894+
<trans-unit id="PackageDownloadCommand_AllowInsecureConnectionsDescription">
895895
<source>Allows downloading from HTTP (non-HTTPS) package sources.</source>
896896
<target state="new">Allows downloading from HTTP (non-HTTPS) package sources.</target>
897897
<note />
@@ -903,6 +903,11 @@ Weitere Informationen finden Sie unter: https://docs.nuget.org/docs/reference/co
903903
1 - version
904904
2 - directory path where the package was downloaded</note>
905905
</trans-unit>
906+
<trans-unit id="PackageDownloadCommand_Description">
907+
<source>Downloads a NuGet package to a local folder without requiring a project file.</source>
908+
<target state="new">Downloads a NuGet package to a local folder without requiring a project file.</target>
909+
<note />
910+
</trans-unit>
906911
<trans-unit id="PackageDownloadCommand_Failed">
907912
<source>Package '{0}' ({1}) failed to download.</source>
908913
<target state="new">Package '{0}' ({1}) failed to download.</target>
@@ -949,11 +954,6 @@ Weitere Informationen finden Sie unter: https://docs.nuget.org/docs/reference/co
949954
1 package version
950955
2 package source</note>
951956
</trans-unit>
952-
<trans-unit id="PackageDownloadCommand_descritpion">
953-
<source>Downloads a NuGet package to a local folder without requiring a project file.</source>
954-
<target state="new">Downloads a NuGet package to a local folder without requiring a project file.</target>
955-
<note />
956-
</trans-unit>
957957
<trans-unit id="PackageUpdateCommand_Description">
958958
<source>Update referenced packages in a project or solution.</source>
959959
<target state="translated">Referenzierte Pakete in einem Projekt oder einer Projektmappe aktualisieren.</target>

src/NuGet.Core/NuGet.CommandLine.XPlat/xlf/Strings.es.xlf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ Para obtener más información, visite https://docs.nuget.org/docs/reference/com
891891
<note>{0}: App full name
892892
{1}: App version</note>
893893
</trans-unit>
894-
<trans-unit id="PackageDownloadCommand_AllowInsecureConnectionsDescritption">
894+
<trans-unit id="PackageDownloadCommand_AllowInsecureConnectionsDescription">
895895
<source>Allows downloading from HTTP (non-HTTPS) package sources.</source>
896896
<target state="new">Allows downloading from HTTP (non-HTTPS) package sources.</target>
897897
<note />
@@ -903,6 +903,11 @@ Para obtener más información, visite https://docs.nuget.org/docs/reference/com
903903
1 - version
904904
2 - directory path where the package was downloaded</note>
905905
</trans-unit>
906+
<trans-unit id="PackageDownloadCommand_Description">
907+
<source>Downloads a NuGet package to a local folder without requiring a project file.</source>
908+
<target state="new">Downloads a NuGet package to a local folder without requiring a project file.</target>
909+
<note />
910+
</trans-unit>
906911
<trans-unit id="PackageDownloadCommand_Failed">
907912
<source>Package '{0}' ({1}) failed to download.</source>
908913
<target state="new">Package '{0}' ({1}) failed to download.</target>
@@ -949,11 +954,6 @@ Para obtener más información, visite https://docs.nuget.org/docs/reference/com
949954
1 package version
950955
2 package source</note>
951956
</trans-unit>
952-
<trans-unit id="PackageDownloadCommand_descritpion">
953-
<source>Downloads a NuGet package to a local folder without requiring a project file.</source>
954-
<target state="new">Downloads a NuGet package to a local folder without requiring a project file.</target>
955-
<note />
956-
</trans-unit>
957957
<trans-unit id="PackageUpdateCommand_Description">
958958
<source>Update referenced packages in a project or solution.</source>
959959
<target state="translated">Actualizar los paquetes a los que se hace referencia en un proyecto o solución.</target>

src/NuGet.Core/NuGet.CommandLine.XPlat/xlf/Strings.fr.xlf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ Pour plus d'informations, visitez https://docs.nuget.org/docs/reference/command-
891891
<note>{0}: App full name
892892
{1}: App version</note>
893893
</trans-unit>
894-
<trans-unit id="PackageDownloadCommand_AllowInsecureConnectionsDescritption">
894+
<trans-unit id="PackageDownloadCommand_AllowInsecureConnectionsDescription">
895895
<source>Allows downloading from HTTP (non-HTTPS) package sources.</source>
896896
<target state="new">Allows downloading from HTTP (non-HTTPS) package sources.</target>
897897
<note />
@@ -903,6 +903,11 @@ Pour plus d'informations, visitez https://docs.nuget.org/docs/reference/command-
903903
1 - version
904904
2 - directory path where the package was downloaded</note>
905905
</trans-unit>
906+
<trans-unit id="PackageDownloadCommand_Description">
907+
<source>Downloads a NuGet package to a local folder without requiring a project file.</source>
908+
<target state="new">Downloads a NuGet package to a local folder without requiring a project file.</target>
909+
<note />
910+
</trans-unit>
906911
<trans-unit id="PackageDownloadCommand_Failed">
907912
<source>Package '{0}' ({1}) failed to download.</source>
908913
<target state="new">Package '{0}' ({1}) failed to download.</target>
@@ -949,11 +954,6 @@ Pour plus d'informations, visitez https://docs.nuget.org/docs/reference/command-
949954
1 package version
950955
2 package source</note>
951956
</trans-unit>
952-
<trans-unit id="PackageDownloadCommand_descritpion">
953-
<source>Downloads a NuGet package to a local folder without requiring a project file.</source>
954-
<target state="new">Downloads a NuGet package to a local folder without requiring a project file.</target>
955-
<note />
956-
</trans-unit>
957957
<trans-unit id="PackageUpdateCommand_Description">
958958
<source>Update referenced packages in a project or solution.</source>
959959
<target state="translated">Mettre à jour les packages référencés dans un projet ou une solution.</target>

src/NuGet.Core/NuGet.CommandLine.XPlat/xlf/Strings.it.xlf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ Per altre informazioni, vedere https://docs.nuget.org/docs/reference/command-lin
891891
<note>{0}: App full name
892892
{1}: App version</note>
893893
</trans-unit>
894-
<trans-unit id="PackageDownloadCommand_AllowInsecureConnectionsDescritption">
894+
<trans-unit id="PackageDownloadCommand_AllowInsecureConnectionsDescription">
895895
<source>Allows downloading from HTTP (non-HTTPS) package sources.</source>
896896
<target state="new">Allows downloading from HTTP (non-HTTPS) package sources.</target>
897897
<note />
@@ -903,6 +903,11 @@ Per altre informazioni, vedere https://docs.nuget.org/docs/reference/command-lin
903903
1 - version
904904
2 - directory path where the package was downloaded</note>
905905
</trans-unit>
906+
<trans-unit id="PackageDownloadCommand_Description">
907+
<source>Downloads a NuGet package to a local folder without requiring a project file.</source>
908+
<target state="new">Downloads a NuGet package to a local folder without requiring a project file.</target>
909+
<note />
910+
</trans-unit>
906911
<trans-unit id="PackageDownloadCommand_Failed">
907912
<source>Package '{0}' ({1}) failed to download.</source>
908913
<target state="new">Package '{0}' ({1}) failed to download.</target>
@@ -949,11 +954,6 @@ Per altre informazioni, vedere https://docs.nuget.org/docs/reference/command-lin
949954
1 package version
950955
2 package source</note>
951956
</trans-unit>
952-
<trans-unit id="PackageDownloadCommand_descritpion">
953-
<source>Downloads a NuGet package to a local folder without requiring a project file.</source>
954-
<target state="new">Downloads a NuGet package to a local folder without requiring a project file.</target>
955-
<note />
956-
</trans-unit>
957957
<trans-unit id="PackageUpdateCommand_Description">
958958
<source>Update referenced packages in a project or solution.</source>
959959
<target state="translated">Aggiorna i pacchetti referenziati in un progetto o in una soluzione.</target>

src/NuGet.Core/NuGet.CommandLine.XPlat/xlf/Strings.ja.xlf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ For more information, visit https://docs.nuget.org/docs/reference/command-line-r
891891
<note>{0}: App full name
892892
{1}: App version</note>
893893
</trans-unit>
894-
<trans-unit id="PackageDownloadCommand_AllowInsecureConnectionsDescritption">
894+
<trans-unit id="PackageDownloadCommand_AllowInsecureConnectionsDescription">
895895
<source>Allows downloading from HTTP (non-HTTPS) package sources.</source>
896896
<target state="new">Allows downloading from HTTP (non-HTTPS) package sources.</target>
897897
<note />
@@ -903,6 +903,11 @@ For more information, visit https://docs.nuget.org/docs/reference/command-line-r
903903
1 - version
904904
2 - directory path where the package was downloaded</note>
905905
</trans-unit>
906+
<trans-unit id="PackageDownloadCommand_Description">
907+
<source>Downloads a NuGet package to a local folder without requiring a project file.</source>
908+
<target state="new">Downloads a NuGet package to a local folder without requiring a project file.</target>
909+
<note />
910+
</trans-unit>
906911
<trans-unit id="PackageDownloadCommand_Failed">
907912
<source>Package '{0}' ({1}) failed to download.</source>
908913
<target state="new">Package '{0}' ({1}) failed to download.</target>
@@ -949,11 +954,6 @@ For more information, visit https://docs.nuget.org/docs/reference/command-line-r
949954
1 package version
950955
2 package source</note>
951956
</trans-unit>
952-
<trans-unit id="PackageDownloadCommand_descritpion">
953-
<source>Downloads a NuGet package to a local folder without requiring a project file.</source>
954-
<target state="new">Downloads a NuGet package to a local folder without requiring a project file.</target>
955-
<note />
956-
</trans-unit>
957957
<trans-unit id="PackageUpdateCommand_Description">
958958
<source>Update referenced packages in a project or solution.</source>
959959
<target state="translated">プロジェクトまたはソリューションで参照されているパッケージを更新します。</target>

0 commit comments

Comments
 (0)