mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-04 20:59:05 +00:00
Use null as the default locale, which resolves to the current system default locale (#1185)
This commit is contained in:
@@ -8,6 +8,7 @@ using DiscordChatExporter.Core.Discord.Data;
|
||||
using DiscordChatExporter.Core.Exporting.Filtering;
|
||||
using DiscordChatExporter.Core.Exporting.Partitioning;
|
||||
using DiscordChatExporter.Core.Utils;
|
||||
using DiscordChatExporter.Core.Utils.Extensions;
|
||||
|
||||
namespace DiscordChatExporter.Core.Exporting;
|
||||
|
||||
@@ -39,9 +40,9 @@ public partial class ExportRequest
|
||||
|
||||
public bool ShouldReuseAssets { get; }
|
||||
|
||||
public string Locale { get; }
|
||||
public string? Locale { get; }
|
||||
|
||||
public CultureInfo CultureInfo { get; }
|
||||
public CultureInfo? CultureInfo { get; }
|
||||
|
||||
public bool IsUtcNormalizationEnabled { get; }
|
||||
|
||||
@@ -58,7 +59,7 @@ public partial class ExportRequest
|
||||
bool shouldFormatMarkdown,
|
||||
bool shouldDownloadAssets,
|
||||
bool shouldReuseAssets,
|
||||
string locale,
|
||||
string? locale,
|
||||
bool isUtcNormalizationEnabled
|
||||
)
|
||||
{
|
||||
@@ -83,7 +84,7 @@ public partial class ExportRequest
|
||||
? FormatPath(assetsDirPath, Guild, Channel, After, Before)
|
||||
: $"{OutputFilePath}_Files{Path.DirectorySeparatorChar}";
|
||||
|
||||
CultureInfo = CultureInfo.GetCultureInfo(Locale);
|
||||
CultureInfo = Locale?.Pipe(CultureInfo.GetCultureInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user