Add initial translations for bootstrapper core stuff

This commit is contained in:
Sainan 2025-10-21 14:37:06 +02:00
parent 31bf60f944
commit 284ff85fac
9 changed files with 46 additions and 22 deletions

View File

@ -0,0 +1,21 @@
toonew: Your game version is too new and not (yet) supported by the bootstrapper. Please refer to the openwf.io website for further guidance.
sigfailbad: A mandatory pattern scan has failed. The program will crash now.
sigfailenc: Failed to disable request encryption. This is required for 38.5.0 and above.
sigfailimp: An important pattern scan has failed. The game will likely fail to start.
sigfailopt: An optional pattern scan has failed. Functionality may be limited beyond core precepts.
sigfailsmst: Failed to bring up "skip mission start timer". This option will be non-functional.
sigfailhdnp: Failed to bring up "high damage numbers patch". This option will be non-functional.
sigfailnrs: Failed to bring up "disable NRS connection". This option will be non-functional.
sigfailfpd: Failed to bring up "forced profile dir". This option will be non-functional.
sigfailswb: Failed to bring up "simulacrum whitelisted/blacklisted". This option will be non-functional.
sigfailpast: Failed to bring up "pause always stops time". This option will be non-functional.
sigfaillorf: Failed to bring up "logout on request failure". This option will be non-functional.
sigfaillr: Failed to bring up Label Replacements.
sigfailmp: Failed to bring up Metadata Patches.
sigfailxp: Failed to disable XP-based level cap.
sigfaillegacy: An important pattern scan has failed. You may experience stuttering.
appmdll: Ensure that only one of the DLLs in your game folder is the bootstrapper.
gotsh: Redirecting requests to |HOST|
alpend: Will automatically log in

View File

@ -10,36 +10,39 @@ function extract_strings($cont)
return $strings;
}
$source = file_get_contents("bootstrapper/en.cat.txt");
$source_strings = extract_strings($source);
$source_lines = explode("\n", $source);
foreach (scandir("bootstrapper") as $file)
foreach (["bootstrapper-core", "bootstrapper-webui"] as $folder)
{
if (is_file("bootstrapper/$file") && $file != "en.cat.txt")
$source = file_get_contents("$folder/en.cat.txt");
$source_strings = extract_strings($source);
$source_lines = explode("\n", $source);
foreach (scandir("$folder") as $file)
{
$cont = file_get_contents("bootstrapper/$file");
$target_strings = extract_strings($cont);
$fh = fopen("bootstrapper/$file", "wb");
foreach ($source_lines as $line)
if (is_file("$folder/$file") && $file != "en.cat.txt")
{
if ($strings = extract_strings($line))
$cont = file_get_contents("$folder/$file");
$target_strings = extract_strings($cont);
$fh = fopen("$folder/$file", "wb");
foreach ($source_lines as $line)
{
foreach ($strings as $key => $value)
if ($strings = extract_strings($line))
{
if (array_key_exists($key, $target_strings))
foreach ($strings as $key => $value)
{
fwrite($fh, "$key: $target_strings[$key]\n");
}
else
{
fwrite($fh, "$key: [UNTRANSLATED] $value\n");
if (array_key_exists($key, $target_strings))
{
fwrite($fh, "$key: $target_strings[$key]\n");
}
else
{
fwrite($fh, "$key: [UNTRANSLATED] $value\n");
}
}
}
}
else
{
fwrite($fh, $line."\n");
else
{
fwrite($fh, $line."\n");
}
}
}
}