Skip to content

Commit

Permalink
Address more comments for string resouces.
Browse files Browse the repository at this point in the history
  • Loading branch information
erdembayar committed Feb 1, 2021
1 parent c5c3ebf commit 49cc7eb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/NuGet.Core/NuGet.Packaging.Extraction/Strings.resx
Expand Up @@ -866,8 +866,8 @@ Valid from:</comment>
<comment>0 - property name</comment>
</data>
<data name="ZipFileTimeStampModified" xml:space="preserve">
<value>Last write timestamp for '{0}' changed from '{1}' to '{2}' because the zip file format does not support timestamp values before 1980 or after 2107.</value>
<comment>0 - Entry name
<value>File '{0}' was last modified on '{1}', which is out of range of what the zip format supports. Using '{2}' instead.</value>
<comment>0 - File name
1 - Original last write timestamp
2 - Updated last write timestamp</comment>
</data>
Expand Down
Expand Up @@ -925,7 +925,7 @@ private ZipArchiveEntry CreatePackageFileEntry(ZipArchive package, string entryN
}
else if (timeOffset.UtcDateTime > ZipFormatMaxDate)
{
warningMessage.AppendLine(StringFormatter.ZipFileTimeStampModified(entryName, timeOffset.DateTime.ToShortDateString(), ZipFormatMinDate.ToShortDateString()));
warningMessage.AppendLine(StringFormatter.ZipFileTimeStampModified(entryName, timeOffset.DateTime.ToShortDateString(), ZipFormatMaxDate.ToShortDateString()));
entry.LastWriteTime = ZipFormatMaxDate;
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/NuGet.Core/NuGet.Packaging/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/NuGet.Core/NuGet.Packaging/Strings.resx
Expand Up @@ -866,8 +866,8 @@ Valid from:</comment>
<comment>0 - property name</comment>
</data>
<data name="ZipFileTimeStampModified" xml:space="preserve">
<value>Last write timestamp for '{0}' changed from '{1}' to '{2}' because the zip file format does not support timestamp values before 1980 or after 2107.</value>
<comment>0 - Entry name
<value>File '{0}' was last modified on '{1}', which is out of range of what the zip format supports. Using '{2}' instead.</value>
<comment>0 - File name
1 - Original last write timestamp
2 - Updated last write timestamp</comment>
</data>
Expand Down
Expand Up @@ -3073,7 +3073,7 @@ public void PackageBuilder_CorrectLastWriteTimeBeforeYear1980_Succeeds()
Assert.True(numberOfDateCorrectedFiles == 5);
Assert.Equal(innerLogger.LogMessages.Count, 1);
string[] logMessages = innerLogger.LogMessages.First().Message.Split('\n');
Assert.Equal(logMessages.Count(l => l.Contains("because the zip file format does not support timestamp values")), 5);
Assert.Equal(logMessages.Count(l => l.Contains("which is out of range of what the zip format supports.")), 5);
}
}

Expand Down Expand Up @@ -3164,7 +3164,7 @@ public void PackageBuilder_CorrectTestWriteTimeAfterYear2107_Succeeds()
Assert.True(numberOfDateCorrectedFiles == 5);
Assert.Equal(innerLogger.LogMessages.Count, 1);
string[] logMessages = innerLogger.LogMessages.First().Message.Split('\n');
Assert.Equal(logMessages.Count(l => l.Contains("because the zip file format does not support timestamp values")), 5);
Assert.Equal(logMessages.Count(l => l.Contains("which is out of range of what the zip format supports.")), 5);
}
}

Expand Down

0 comments on commit 49cc7eb

Please sign in to comment.