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
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: `Ändern`,
logout: `Abmelden`,

View File

@ -1,41 +1,48 @@
dict = {
server_host: `Server Host`,
server_host_submit: `Change`,
logout: `Logout`,
high_damage_numbers_patch: `High Damage Numbers Patch`,
skip_mission_start_timer: `Skip Mission Start Timer`,
simulacrum_blacklisted: `Blacklisted Enemies in Simulacrum`,
simulacrum_whitelisted: `Whitelisted Enemies in Simulacrum`,
pause_always_stops_time: `Pause Always Stops Time`,
ee_log_in_console: `EE.log in Console`,
fov_override: `FOV Override (0 = disabled)`,
save_config: `Save changes to client_config.json`,
camtype: `Camera Type`,
gamecam: `Normal`,
freecam: `Freecam`,
lockcam: `Locked In Place`,
pos: `Position`,
tp_submit: `Teleport To`,
custom: `Custom`,
marker: `|TYPE| in |DIST|m`,
marker_unk: `Marker`,
marker_obj: `Objective`,
marker_target: `Target`,
marker_surcap: `Life Support Capsule`,
marker_surpup: `Life Support Module`,
marker_a: `A`,
marker_b: `B`,
marker_c: `C`,
marker_wp: `Waypoint`,
marker_focus: `Focus`,
marker_extract: `Extraction`,
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.`,
dict = {
checking_updates: `Checking for updates...`,
update_check_fail: `Failed to check for updates.`,
no_update: `You are running OpenWF Bootstrapper v<span class="local-version-full"></span>. No updates are available right now.`,
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.`,
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.`,
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.`,
server_host: `Server Host`,
server_host_submit: `Change`,
logout: `Logout`,
high_damage_numbers_patch: `High Damage Numbers Patch`,
skip_mission_start_timer: `Skip Mission Start Timer`,
simulacrum_blacklisted: `Blacklisted Enemies in Simulacrum`,
simulacrum_whitelisted: `Whitelisted Enemies in Simulacrum`,
pause_always_stops_time: `Pause Always Stops Time`,
ee_log_in_console: `EE.log in Console`,
fov_override: `FOV Override (0 = disabled)`,
save_config: `Save changes to client_config.json`,
camtype: `Camera Type`,
gamecam: `Normal`,
freecam: `Freecam`,
lockcam: `Locked In Place`,
pos: `Position`,
tp_submit: `Teleport To`,
custom: `Custom`,
marker: `|TYPE| in |DIST|m`,
marker_unk: `Marker`,
marker_obj: `Objective`,
marker_target: `Target`,
marker_surcap: `Life Support Capsule`,
marker_surpup: `Life Support Module`,
marker_a: `A`,
marker_b: `B`,
marker_c: `C`,
marker_wp: `Waypoint`,
marker_focus: `Focus`,
marker_extract: `Extraction`,
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.)
dict = {
server_host: `Hôte (serveur)`,
server_host_submit: `Modifier`,
logout: `Déconnexion`,
high_damage_numbers_patch: `Patch du cap de dégâts`,
skip_mission_start_timer: `Passer le compte à rebours du début de mission`,
simulacrum_blacklisted: `Liste noir des ennemis en Simulacre`,
simulacrum_whitelisted: `Liste blanche des ennemis en Simulacre`,
pause_always_stops_time: `Pause arrête le temps`,
ee_log_in_console: `La console affiche le EE.log`,
fov_override: `Override du champ de vision (0 = désactivé)`,
save_config: `Sauvegarder les paramètres dans client_config.json`,
camtype: `Type de caméra`,
gamecam: `Normal`,
freecam: `Caméra libre`,
lockcam: `Caméra bloquée sur place`,
pos: `Position`,
tp_submit: `Se teleporter vers`,
custom: `Personnalisé`,
marker: `|TYPE| in |DIST|m`,
marker_unk: `Marker`,
marker_obj: `Objectif`,
marker_target: `Cible`,
marker_surcap: `Capsule de survie`,
marker_surpup: `Module de survie`,
marker_a: `A`,
marker_b: `B`,
marker_c: `C`,
marker_wp: `Marqueur`,
marker_focus: `Focus`,
marker_extract: `Extraction`,
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.`,
}
// French translation by Vitruvio (zexal.)
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: `Hôte (serveur)`,
server_host_submit: `Modifier`,
logout: `Déconnexion`,
high_damage_numbers_patch: `Patch du cap de dégâts`,
skip_mission_start_timer: `Passer le compte à rebours du début de mission`,
simulacrum_blacklisted: `Liste noir des ennemis en Simulacre`,
simulacrum_whitelisted: `Liste blanche des ennemis en Simulacre`,
pause_always_stops_time: `Pause arrête le temps`,
ee_log_in_console: `La console affiche le EE.log`,
fov_override: `Override du champ de vision (0 = désactivé)`,
save_config: `Sauvegarder les paramètres dans client_config.json`,
camtype: `Type de caméra`,
gamecam: `Normal`,
freecam: `Caméra libre`,
lockcam: `Caméra bloquée sur place`,
pos: `Position`,
tp_submit: `Se teleporter vers`,
custom: `Personnalisé`,
marker: `|TYPE| in |DIST|m`,
marker_unk: `Marker`,
marker_obj: `Objectif`,
marker_target: `Cible`,
marker_surcap: `Capsule de survie`,
marker_surpup: `Module de survie`,
marker_a: `A`,
marker_b: `B`,
marker_c: `C`,
marker_wp: `Marqueur`,
marker_focus: `Focus`,
marker_extract: `Extraction`,
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
dict = {
server_host: `Хост Сервера`,
server_host_submit: `Изменить`,
logout: `Выход`,
high_damage_numbers_patch: `Патч Высоких Значений Урона`,
skip_mission_start_timer: `Пропустить Таймер Запуска Миссии`,
simulacrum_blacklisted: `Враги из черного списка в Симулякруме`,
simulacrum_whitelisted: `Враги из белого списка в Симулякруме`,
pause_always_stops_time: `Пауза Всегда Останавливает Время`,
ee_log_in_console: `EE.log в Консоль`,
fov_override: `Перезапись FOV (0 = отключена)`,
save_config: `Сохранить изменения в client_config.json`,
camtype: `Тип Камеры`,
gamecam: `Нормальная`,
freecam: `Свободная`,
lockcam: `Фиксированная`,
pos: `Позиция`,
tp_submit: `Телепортироваться к`,
custom: `Пользовательское`,
marker: `|TYPE| через |DIST|м`,
marker_unk: `Метка`,
marker_obj: `Цель`,
marker_target: `Цель`,
marker_surcap: `Капсула Жизнеобеспечения`,
marker_surpup: `Модуль Жизнеобеспечения`,
marker_a: `A`,
marker_b: `B`,
marker_c: `C`,
marker_wp: `Метка`,
marker_focus: `Фокус`,
marker_extract: `Эвакуация`,
enable_auto_start: `Включить Авто Запуск`,
disable_auto_start: `Отключить Авто Запуск`,
clear_script_log: `Очистить Лог Скриптов`,
console: `Консоль`,
err: `Соединение с DLL потеряно.`,
err_retry: `Попытка восстановить соединение.`,
}
// Russian translation by azdful
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_submit: `Изменить`,
logout: `Выход`,
high_damage_numbers_patch: `Патч Высоких Значений Урона`,
skip_mission_start_timer: `Пропустить Таймер Запуска Миссии`,
simulacrum_blacklisted: `Враги из черного списка в Симулякруме`,
simulacrum_whitelisted: `Враги из белого списка в Симулякруме`,
pause_always_stops_time: `Пауза Всегда Останавливает Время`,
ee_log_in_console: `EE.log в Консоль`,
fov_override: `Перезапись FOV (0 = отключена)`,
save_config: `Сохранить изменения в client_config.json`,
camtype: `Тип Камеры`,
gamecam: `Нормальная`,
freecam: `Свободная`,
lockcam: `Фиксированная`,
pos: `Позиция`,
tp_submit: `Телепортироваться к`,
custom: `Пользовательское`,
marker: `|TYPE| через |DIST|м`,
marker_unk: `Метка`,
marker_obj: `Цель`,
marker_target: `Цель`,
marker_surcap: `Капсула Жизнеобеспечения`,
marker_surpup: `Модуль Жизнеобеспечения`,
marker_a: `A`,
marker_b: `B`,
marker_c: `C`,
marker_wp: `Метка`,
marker_focus: `Фокус`,
marker_extract: `Эвакуация`,
enable_auto_start: `Включить Авто Запуск`,
disable_auto_start: `Отключить Авто Запуск`,
clear_script_log: `Очистить Лог Скриптов`,
console: `Консоль`,
err: `Соединение с DLL потеряно.`,
err_retry: `Попытка восстановить соединение.`,
}

View File

@ -1,5 +1,12 @@
// Chinese translation by 喜欢 (wxhn1225)
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_submit: `更改`,
logout: `注销`,
@ -39,4 +46,4 @@ dict = {
err: `与DLL连接丢失。`,
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");
}
}
}
}