v0.8.4.1 - Hotfix (#3419)
Co-authored-by: Weblate (bot) <hosted@weblate.org> Co-authored-by: Adam Beneš <toohka@protonmail.com> Co-authored-by: Dark77 <Dark77@pobox.sk> Co-authored-by: Frozehunter <frozehunter@me.com> Co-authored-by: Havokdan <havokdan@yahoo.com.br> Co-authored-by: Yoan Jacquemin <yoanjacquemin@gmail.com> Co-authored-by: aleixcox <18121624@qq.com> Co-authored-by: mag37 <robin.ivehult@gmail.com>
This commit is contained in:
parent
d4028a8d68
commit
ac47cbd75f
24 changed files with 300 additions and 128 deletions
|
@ -192,22 +192,32 @@ public class Chapter : IEntityDate, IHasReadTimeEstimate, IHasCoverImage
|
|||
/// <returns></returns>
|
||||
public string GetNumberTitle()
|
||||
{
|
||||
if (MinNumber.Is(MaxNumber))
|
||||
// BUG: TODO: On non-english locales, for floats, the range will be 20,5 but the NumberTitle will return 20.5
|
||||
// Have I fixed this with TryParse CultureInvariant
|
||||
try
|
||||
{
|
||||
if (MinNumber.Is(Parser.DefaultChapterNumber) && IsSpecial)
|
||||
if (MinNumber.Is(MaxNumber))
|
||||
{
|
||||
return Parser.RemoveExtensionIfSupported(Title);
|
||||
if (MinNumber.Is(Parser.DefaultChapterNumber) && IsSpecial)
|
||||
{
|
||||
return Parser.RemoveExtensionIfSupported(Title);
|
||||
}
|
||||
|
||||
if (MinNumber.Is(0f) && !float.TryParse(Range, CultureInfo.InvariantCulture, out _))
|
||||
{
|
||||
return $"{Range.ToString(CultureInfo.InvariantCulture)}";
|
||||
}
|
||||
|
||||
return $"{MinNumber.ToString(CultureInfo.InvariantCulture)}";
|
||||
|
||||
}
|
||||
|
||||
if (MinNumber.Is(0) && !float.TryParse(Range, CultureInfo.InvariantCulture, out _))
|
||||
{
|
||||
return $"{Range}";
|
||||
}
|
||||
|
||||
return $"{MinNumber}";
|
||||
|
||||
return $"{MinNumber.ToString(CultureInfo.InvariantCulture)}-{MaxNumber.ToString(CultureInfo.InvariantCulture)}";
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return MinNumber.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
return $"{MinNumber}-{MaxNumber}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue