Localization Issues (#3653)
Co-authored-by: Amelia <77553571+Fesaa@users.noreply.github.com>
This commit is contained in:
parent
98a2b9d3ed
commit
0f72f63b35
15 changed files with 25 additions and 21 deletions
|
|
@ -100,7 +100,7 @@ public static class FilterFieldValueConverter
|
|||
.ToList(),
|
||||
FilterField.WantToRead => bool.Parse(value),
|
||||
FilterField.ReadProgress => string.IsNullOrEmpty(value) ? 0f : value.AsFloat(),
|
||||
FilterField.ReadingDate => DateTime.Parse(value),
|
||||
FilterField.ReadingDate => DateTime.Parse(value, CultureInfo.InvariantCulture),
|
||||
FilterField.ReadLast => int.Parse(value),
|
||||
FilterField.Formats => value.Split(',')
|
||||
.Select(x => (MangaFormat) Enum.Parse(typeof(MangaFormat), x))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Globalization;
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Linq;
|
||||
|
||||
|
|
@ -19,7 +20,7 @@ public static class JwtHelper
|
|||
var token = jwtHandler.ReadJwtToken(jwtToken);
|
||||
var exp = token.Claims.FirstOrDefault(c => c.Type == "exp")?.Value;
|
||||
|
||||
if (long.TryParse(exp, out var expSeconds))
|
||||
if (long.TryParse(exp, CultureInfo.InvariantCulture, out var expSeconds))
|
||||
{
|
||||
return DateTimeOffset.FromUnixTimeSeconds(expSeconds).UtcDateTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class PdfComicInfoExtractor : IPdfComicInfoExtractor
|
|||
{
|
||||
if (string.IsNullOrEmpty(text)) return null;
|
||||
|
||||
if (float.TryParse(text, out var value)) return value;
|
||||
if (float.TryParse(text, CultureInfo.InvariantCulture, out var value)) return value;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ public class PdfComicInfoExtractor : IPdfComicInfoExtractor
|
|||
|
||||
// Dates stored in the XMP metadata stream (PDF Spec 14.3.2)
|
||||
// are stored in ISO 8601 format, which is handled by C# out of the box
|
||||
if (DateTime.TryParse(text, out var date)) return date;
|
||||
if (DateTime.TryParse(text, CultureInfo.InvariantCulture, out var date)) return date;
|
||||
|
||||
// Dates stored in the document information directory (PDF Spec 14.3.3)
|
||||
// are stored in a proprietary format (PDF Spec 7.9.4) that needs to be
|
||||
|
|
@ -71,7 +71,7 @@ public class PdfComicInfoExtractor : IPdfComicInfoExtractor
|
|||
|
||||
foreach(var format in _pdfDateFormats)
|
||||
{
|
||||
if (DateTime.TryParseExact(text, format, null, System.Globalization.DateTimeStyles.None, out var pdfDate)) return pdfDate;
|
||||
if (DateTime.TryParseExact(text, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out var pdfDate)) return pdfDate;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue