mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Trim & Bug fix
This commit is contained in:
parent
f538b9e948
commit
2e18317f3f
9 changed files with 102 additions and 196 deletions
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
|
@ -18,7 +17,6 @@ namespace MinecraftClient
|
|||
{
|
||||
private static readonly Dictionary<string, string> translations = new();
|
||||
private static readonly string translationFilePath = "lang" + Path.DirectorySeparatorChar + "mcc";
|
||||
private static readonly string defaultTranslation = "en.ini";
|
||||
private static readonly Regex translationKeyRegex = new(@"\(\[(.*?)\]\)", RegexOptions.Compiled); // Extract string inside ([ ])
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -645,18 +643,6 @@ namespace MinecraftClient
|
|||
return translations;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write the default translation file (English) to the disk.
|
||||
/// </summary>
|
||||
private static void WriteDefaultTranslation()
|
||||
{
|
||||
string defaultPath = AppDomain.CurrentDomain.BaseDirectory + Path.DirectorySeparatorChar + translationFilePath + Path.DirectorySeparatorChar + defaultTranslation;
|
||||
|
||||
if (!Directory.Exists(translationFilePath))
|
||||
Directory.CreateDirectory(translationFilePath);
|
||||
File.WriteAllText(defaultPath, DefaultConfigResource.Translation_en, Encoding.UTF8);
|
||||
}
|
||||
|
||||
public static void TrimAllTranslations()
|
||||
{
|
||||
string[] transEn = DefaultConfigResource.ResourceManager.GetString("Translation_en")!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue