Compare commits

..

3 Commits

Author SHA1 Message Date
704bbce9bb Add strings for update checker 2025-02-04 20:34:33 +01:00
29a38530a2 Add update script 2025-02-04 20:27:57 +01:00
388a884343 Normalise line endings 2025-02-04 20:20:25 +01:00
7 changed files with 208 additions and 125 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.js text eof=lf

View File

@ -1,5 +1,12 @@
// German translation by Animan8000 // German translation by Animan8000
dict = { dict = {
checking_updates: `[UNTRANSLATED] Checking for updates...`,
update_check_fail: `[UNTRANSLATED] Failed to check for updates.`,
no_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version-full"></span>. No updates are available right now.`,
dll_to_dll_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version"></span>. This is not the latest version, but updating would require you to close the game, so don't worry about it right now.`,
dll_to_hotfix_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version"></span>. The latest hotfix for this DLL is <b class="hotfix-available"></b>. If you want, I can <a href="#" onclick="fetch('/download_latest_hotfix')">download and apply it now</a> — no restart required.`,
hotfix_to_hotfix_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version-full"></span>. The latest hotfix is <b class="hotfix-available"></b>. If you want, I can <a href="#" onclick="fetch('/download_latest_hotfix')">download and apply it now</a> — no restart required.`,
server_host: `Server-Host`, server_host: `Server-Host`,
server_host_submit: `Ändern`, server_host_submit: `Ändern`,
logout: `Abmelden`, logout: `Abmelden`,

View File

@ -1,41 +1,48 @@
dict = { dict = {
server_host: `Server Host`, checking_updates: `Checking for updates...`,
server_host_submit: `Change`, update_check_fail: `Failed to check for updates.`,
logout: `Logout`, no_update: `You are running OpenWF Bootstrapper v<span class="local-version-full"></span>. No updates are available right now.`,
high_damage_numbers_patch: `High Damage Numbers Patch`, dll_to_dll_update: `You are running OpenWF Bootstrapper v<span class="local-version"></span>. This is not the latest version, but updating would require you to close the game, so don't worry about it right now.`,
skip_mission_start_timer: `Skip Mission Start Timer`, dll_to_hotfix_update: `You are running OpenWF Bootstrapper v<span class="local-version"></span>. The latest hotfix for this DLL is <b class="hotfix-available"></b>. If you want, I can <a href="#" onclick="fetch('/download_latest_hotfix')">download and apply it now</a> — no restart required.`,
simulacrum_blacklisted: `Blacklisted Enemies in Simulacrum`, hotfix_to_hotfix_update: `You are running OpenWF Bootstrapper v<span class="local-version-full"></span>. The latest hotfix is <b class="hotfix-available"></b>. If you want, I can <a href="#" onclick="fetch('/download_latest_hotfix')">download and apply it now</a> — no restart required.`,
simulacrum_whitelisted: `Whitelisted Enemies in Simulacrum`,
pause_always_stops_time: `Pause Always Stops Time`, server_host: `Server Host`,
ee_log_in_console: `EE.log in Console`, server_host_submit: `Change`,
fov_override: `FOV Override (0 = disabled)`, logout: `Logout`,
save_config: `Save changes to client_config.json`, high_damage_numbers_patch: `High Damage Numbers Patch`,
skip_mission_start_timer: `Skip Mission Start Timer`,
camtype: `Camera Type`, simulacrum_blacklisted: `Blacklisted Enemies in Simulacrum`,
gamecam: `Normal`, simulacrum_whitelisted: `Whitelisted Enemies in Simulacrum`,
freecam: `Freecam`, pause_always_stops_time: `Pause Always Stops Time`,
lockcam: `Locked In Place`, ee_log_in_console: `EE.log in Console`,
pos: `Position`, fov_override: `FOV Override (0 = disabled)`,
tp_submit: `Teleport To`, save_config: `Save changes to client_config.json`,
custom: `Custom`,
marker: `|TYPE| in |DIST|m`, camtype: `Camera Type`,
marker_unk: `Marker`, gamecam: `Normal`,
marker_obj: `Objective`, freecam: `Freecam`,
marker_target: `Target`, lockcam: `Locked In Place`,
marker_surcap: `Life Support Capsule`, pos: `Position`,
marker_surpup: `Life Support Module`, tp_submit: `Teleport To`,
marker_a: `A`, custom: `Custom`,
marker_b: `B`, marker: `|TYPE| in |DIST|m`,
marker_c: `C`, marker_unk: `Marker`,
marker_wp: `Waypoint`, marker_obj: `Objective`,
marker_focus: `Focus`, marker_target: `Target`,
marker_extract: `Extraction`, marker_surcap: `Life Support Capsule`,
marker_surpup: `Life Support Module`,
enable_auto_start: `Enable Auto Start`, marker_a: `A`,
disable_auto_start: `Disable Auto Start`, marker_b: `B`,
clear_script_log: `Clear Script Log`, marker_c: `C`,
console: `Console`, marker_wp: `Waypoint`,
marker_focus: `Focus`,
err: `Connection to DLL lost.`, marker_extract: `Extraction`,
err_retry: `Attempt to reconnect.`,
enable_auto_start: `Enable Auto Start`,
disable_auto_start: `Disable Auto Start`,
clear_script_log: `Clear Script Log`,
console: `Console`,
err: `Connection to DLL lost.`,
err_retry: `Attempt to reconnect.`,
} }

View File

@ -1,42 +1,49 @@
// French translation by Vitruvio (zexal.) // French translation by Vitruvio (zexal.)
dict = { dict = {
server_host: `Hôte (serveur)`, checking_updates: `[UNTRANSLATED] Checking for updates...`,
server_host_submit: `Modifier`, update_check_fail: `[UNTRANSLATED] Failed to check for updates.`,
logout: `Déconnexion`, no_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version-full"></span>. No updates are available right now.`,
high_damage_numbers_patch: `Patch du cap de dégâts`, dll_to_dll_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version"></span>. This is not the latest version, but updating would require you to close the game, so don't worry about it right now.`,
skip_mission_start_timer: `Passer le compte à rebours du début de mission`, dll_to_hotfix_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version"></span>. The latest hotfix for this DLL is <b class="hotfix-available"></b>. If you want, I can <a href="#" onclick="fetch('/download_latest_hotfix')">download and apply it now</a> — no restart required.`,
simulacrum_blacklisted: `Liste noir des ennemis en Simulacre`, hotfix_to_hotfix_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version-full"></span>. The latest hotfix is <b class="hotfix-available"></b>. If you want, I can <a href="#" onclick="fetch('/download_latest_hotfix')">download and apply it now</a> — no restart required.`,
simulacrum_whitelisted: `Liste blanche des ennemis en Simulacre`,
pause_always_stops_time: `Pause arrête le temps`, server_host: `Hôte (serveur)`,
ee_log_in_console: `La console affiche le EE.log`, server_host_submit: `Modifier`,
fov_override: `Override du champ de vision (0 = désactivé)`, logout: `Déconnexion`,
save_config: `Sauvegarder les paramètres dans client_config.json`, high_damage_numbers_patch: `Patch du cap de dégâts`,
skip_mission_start_timer: `Passer le compte à rebours du début de mission`,
camtype: `Type de caméra`, simulacrum_blacklisted: `Liste noir des ennemis en Simulacre`,
gamecam: `Normal`, simulacrum_whitelisted: `Liste blanche des ennemis en Simulacre`,
freecam: `Caméra libre`, pause_always_stops_time: `Pause arrête le temps`,
lockcam: `Caméra bloquée sur place`, ee_log_in_console: `La console affiche le EE.log`,
pos: `Position`, fov_override: `Override du champ de vision (0 = désactivé)`,
tp_submit: `Se teleporter vers`, save_config: `Sauvegarder les paramètres dans client_config.json`,
custom: `Personnalisé`,
marker: `|TYPE| in |DIST|m`, camtype: `Type de caméra`,
marker_unk: `Marker`, gamecam: `Normal`,
marker_obj: `Objectif`, freecam: `Caméra libre`,
marker_target: `Cible`, lockcam: `Caméra bloquée sur place`,
marker_surcap: `Capsule de survie`, pos: `Position`,
marker_surpup: `Module de survie`, tp_submit: `Se teleporter vers`,
marker_a: `A`, custom: `Personnalisé`,
marker_b: `B`, marker: `|TYPE| in |DIST|m`,
marker_c: `C`, marker_unk: `Marker`,
marker_wp: `Marqueur`, marker_obj: `Objectif`,
marker_focus: `Focus`, marker_target: `Cible`,
marker_extract: `Extraction`, marker_surcap: `Capsule de survie`,
marker_surpup: `Module de survie`,
enable_auto_start: `Activer le lancement auto`, marker_a: `A`,
disable_auto_start: `Désactiver le lancement auto`, marker_b: `B`,
clear_script_log: `Vider le log du script`, marker_c: `C`,
console: `Console`, marker_wp: `Marqueur`,
marker_focus: `Focus`,
err: `Connexion au DLL perdue.`, marker_extract: `Extraction`,
err_retry: `Tentative de reconnexion.`,
} enable_auto_start: `Activer le lancement auto`,
disable_auto_start: `Désactiver le lancement auto`,
clear_script_log: `Vider le log du script`,
console: `Console`,
err: `Connexion au DLL perdue.`,
err_retry: `Tentative de reconnexion.`,
}

View File

@ -1,42 +1,49 @@
// Russian translation by azdful // Russian translation by azdful
dict = { dict = {
server_host: `Хост Сервера`, checking_updates: `[UNTRANSLATED] Checking for updates...`,
server_host_submit: `Изменить`, update_check_fail: `[UNTRANSLATED] Failed to check for updates.`,
logout: `Выход`, no_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version-full"></span>. No updates are available right now.`,
high_damage_numbers_patch: `Патч Высоких Значений Урона`, dll_to_dll_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version"></span>. This is not the latest version, but updating would require you to close the game, so don't worry about it right now.`,
skip_mission_start_timer: `Пропустить Таймер Запуска Миссии`, dll_to_hotfix_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version"></span>. The latest hotfix for this DLL is <b class="hotfix-available"></b>. If you want, I can <a href="#" onclick="fetch('/download_latest_hotfix')">download and apply it now</a> — no restart required.`,
simulacrum_blacklisted: `Враги из черного списка в Симулякруме`, hotfix_to_hotfix_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version-full"></span>. The latest hotfix is <b class="hotfix-available"></b>. If you want, I can <a href="#" onclick="fetch('/download_latest_hotfix')">download and apply it now</a> — no restart required.`,
simulacrum_whitelisted: `Враги из белого списка в Симулякруме`,
pause_always_stops_time: `Пауза Всегда Останавливает Время`, server_host: `Хост Сервера`,
ee_log_in_console: `EE.log в Консоль`, server_host_submit: `Изменить`,
fov_override: `Перезапись FOV (0 = отключена)`, logout: `Выход`,
save_config: `Сохранить изменения в client_config.json`, high_damage_numbers_patch: `Патч Высоких Значений Урона`,
skip_mission_start_timer: `Пропустить Таймер Запуска Миссии`,
camtype: `Тип Камеры`, simulacrum_blacklisted: `Враги из черного списка в Симулякруме`,
gamecam: `Нормальная`, simulacrum_whitelisted: `Враги из белого списка в Симулякруме`,
freecam: `Свободная`, pause_always_stops_time: `Пауза Всегда Останавливает Время`,
lockcam: `Фиксированная`, ee_log_in_console: `EE.log в Консоль`,
pos: `Позиция`, fov_override: `Перезапись FOV (0 = отключена)`,
tp_submit: `Телепортироваться к`, save_config: `Сохранить изменения в client_config.json`,
custom: `Пользовательское`,
marker: `|TYPE| через |DIST|м`, camtype: `Тип Камеры`,
marker_unk: `Метка`, gamecam: `Нормальная`,
marker_obj: `Цель`, freecam: `Свободная`,
marker_target: `Цель`, lockcam: `Фиксированная`,
marker_surcap: `Капсула Жизнеобеспечения`, pos: `Позиция`,
marker_surpup: `Модуль Жизнеобеспечения`, tp_submit: `Телепортироваться к`,
marker_a: `A`, custom: `Пользовательское`,
marker_b: `B`, marker: `|TYPE| через |DIST|м`,
marker_c: `C`, marker_unk: `Метка`,
marker_wp: `Метка`, marker_obj: `Цель`,
marker_focus: `Фокус`, marker_target: `Цель`,
marker_extract: `Эвакуация`, marker_surcap: `Капсула Жизнеобеспечения`,
marker_surpup: `Модуль Жизнеобеспечения`,
enable_auto_start: `Включить Авто Запуск`, marker_a: `A`,
disable_auto_start: `Отключить Авто Запуск`, marker_b: `B`,
clear_script_log: `Очистить Лог Скриптов`, marker_c: `C`,
console: `Консоль`, marker_wp: `Метка`,
marker_focus: `Фокус`,
err: `Соединение с DLL потеряно.`, marker_extract: `Эвакуация`,
err_retry: `Попытка восстановить соединение.`,
} enable_auto_start: `Включить Авто Запуск`,
disable_auto_start: `Отключить Авто Запуск`,
clear_script_log: `Очистить Лог Скриптов`,
console: `Консоль`,
err: `Соединение с DLL потеряно.`,
err_retry: `Попытка восстановить соединение.`,
}

View File

@ -1,5 +1,12 @@
// Chinese translation by 喜欢 (wxhn1225) // Chinese translation by 喜欢 (wxhn1225)
dict = { dict = {
checking_updates: `[UNTRANSLATED] Checking for updates...`,
update_check_fail: `[UNTRANSLATED] Failed to check for updates.`,
no_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version-full"></span>. No updates are available right now.`,
dll_to_dll_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version"></span>. This is not the latest version, but updating would require you to close the game, so don't worry about it right now.`,
dll_to_hotfix_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version"></span>. The latest hotfix for this DLL is <b class="hotfix-available"></b>. If you want, I can <a href="#" onclick="fetch('/download_latest_hotfix')">download and apply it now</a> — no restart required.`,
hotfix_to_hotfix_update: `[UNTRANSLATED] You are running OpenWF Bootstrapper v<span class="local-version-full"></span>. The latest hotfix is <b class="hotfix-available"></b>. If you want, I can <a href="#" onclick="fetch('/download_latest_hotfix')">download and apply it now</a> — no restart required.`,
server_host: `服务器主机`, server_host: `服务器主机`,
server_host_submit: `更改`, server_host_submit: `更改`,
logout: `注销`, logout: `注销`,
@ -39,4 +46,4 @@ dict = {
err: `与DLL连接丢失。`, err: `与DLL连接丢失。`,
err_retry: `尝试重连。`, err_retry: `尝试重连。`,
} }

47
update.php Normal file
View File

@ -0,0 +1,47 @@
<?php
function extract_strings($cont)
{
preg_match_all("/([a-z_]+): `([^`]*)`,/", $cont, $matches, PREG_SET_ORDER, 0);
$strings = [];
foreach ($matches as $match)
{
$strings[$match[1]] = $match[2];
}
return $strings;
}
$source = file_get_contents("client-webui/en.js");
$source_strings = extract_strings($source);
$source_lines = explode("\n", $source);
foreach (scandir("client-webui") as $file)
{
if (is_file("client-webui/$file") && $file != "en.js")
{
$cont = file_get_contents("client-webui/$file");
$target_strings = extract_strings($cont);
$fh = fopen("client-webui/$file", "wb");
fwrite($fh, explode("\n", $cont)[0]."\n");
foreach ($source_lines as $line)
{
if ($strings = extract_strings($line))
{
foreach ($strings as $key => $value)
{
if (array_key_exists($key, $target_strings))
{
fwrite($fh, "\t$key: `$target_strings[$key]`,\n");
}
else
{
fwrite($fh, "\t$key: `[UNTRANSLATED] $value`,\n");
}
}
}
else
{
fwrite($fh, $line."\n");
}
}
}
}