mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
Audit culture bugs (#7707)
* Added comments and fixed CultureInfo / StringComparison where appropriate * Addressed comments * Fixed comment
This commit is contained in:
@@ -189,6 +189,7 @@ namespace ImageResizer.Models
|
||||
extension = supportedExtensions.FirstOrDefault();
|
||||
}
|
||||
|
||||
// Using CurrentCulture since this is user facing
|
||||
var fileName = string.Format(
|
||||
CultureInfo.CurrentCulture,
|
||||
_settings.FileNameFormat,
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace ImageResizer.Properties
|
||||
|
||||
public IEnumerable<ResizeSize> AllSizes { get; set; }
|
||||
|
||||
// Using OrdinalIgnoreCase since this is internal and used for comparison with symbols
|
||||
public string FileNameFormat
|
||||
=> _fileNameFormat
|
||||
?? (_fileNameFormat = FileName
|
||||
@@ -111,6 +112,7 @@ namespace ImageResizer.Properties
|
||||
|
||||
if (JpegQualityLevel < 1 || JpegQualityLevel > 100)
|
||||
{
|
||||
// Using CurrentCulture since this is user facing
|
||||
return string.Format(CultureInfo.CurrentCulture, Resources.ValueMustBeBetween, 1, 100);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user