mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
[README] Calculates the translation status in characters.
This commit is contained in:
parent
d4f8dd0bfb
commit
8fb74c63a6
2 changed files with 12 additions and 12 deletions
|
|
@ -683,6 +683,7 @@ namespace MinecraftClient
|
||||||
}
|
}
|
||||||
StringBuilder sb = new();
|
StringBuilder sb = new();
|
||||||
int total = 0, translated = 0;
|
int total = 0, translated = 0;
|
||||||
|
int total_char = 0, translated_char = 0;
|
||||||
for (int i = 0; i < transEn.Length; ++i)
|
for (int i = 0; i < transEn.Length; ++i)
|
||||||
{
|
{
|
||||||
string line = transEn[i].Trim();
|
string line = transEn[i].Trim();
|
||||||
|
|
@ -693,23 +694,22 @@ namespace MinecraftClient
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
int en_value_len = line.Length - index;
|
||||||
string key = line[..index];
|
string key = line[..index];
|
||||||
sb.Append(key).Append('=');
|
sb.Append(key).Append('=');
|
||||||
if (trans.TryGetValue(key, out string? value))
|
if (trans.TryGetValue(key, out string? value))
|
||||||
{
|
{
|
||||||
sb.Append(value.Replace("\n", "\\n"));
|
sb.Append(value.Replace("\n", "\\n"));
|
||||||
++total;
|
|
||||||
++translated;
|
++translated;
|
||||||
|
translated_char += en_value_len;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
++total;
|
++total;
|
||||||
}
|
total_char += en_value_len;
|
||||||
}
|
}
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
}
|
}
|
||||||
File.WriteAllText(fileName, sb.ToString(), Encoding.Unicode);
|
File.WriteAllText(fileName, sb.ToString(), Encoding.Unicode);
|
||||||
ConsoleIO.WriteLine(string.Format("Language {0}: Translated {1} of {2}, {3:0.00}%", lang, translated, total, 100.0 * (double)translated / total));
|
ConsoleIO.WriteLine(string.Format("Language {0}: Translated {1} of {2}, {3:0.00}%", lang, translated, total, 100.0 * translated_char / total_char));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
12
README.md
12
README.md
|
|
@ -52,13 +52,13 @@ If you'd like to contribute to Minecraft Console Client, great, just fork the re
|
||||||
Check out: [How to update or add translations for MCC](https://mccteam.github.io/guide/contibuting.html#translations).
|
Check out: [How to update or add translations for MCC](https://mccteam.github.io/guide/contibuting.html#translations).
|
||||||
|
|
||||||
MCC now supports the following languages (Alphabetical order) :
|
MCC now supports the following languages (Alphabetical order) :
|
||||||
* `de.ini` (48.28% translated) : Deutsch - German
|
* `de.ini` (30.21% translated) : Deutsch - German
|
||||||
* `en.ini` : English - English
|
* `en.ini` : English - English
|
||||||
* `fr.ini` (48.28% translated) : Français (France) - French
|
* `fr.ini` (30.21% translated) : Français (France) - French
|
||||||
* `ru.ini` (47.49% translated) : Русский (Russkiy) - Russian
|
* `ru.ini` (29.65% translated) : Русский (Russkiy) - Russian
|
||||||
* `vi.ini` (47.49% translated) : Tiếng Việt (Việt Nam) - Vietnamese
|
* `vi.ini` (29.65% translated) : Tiếng Việt (Việt Nam) - Vietnamese
|
||||||
* `zh-Hans.ini` (92.20% translated) : 简体中文 - Chinese Simplified
|
* `zh-Hans.ini` (87.08% translated) : 简体中文 - Chinese Simplified
|
||||||
* `zh-Hant.ini` (92.20% translated) : 繁體中文 - Chinese Traditional
|
* `zh-Hant.ini` (87.08% translated) : 繁體中文 - Chinese Traditional
|
||||||
|
|
||||||
## Building from the source 🏗️
|
## Building from the source 🏗️
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue