feat(install): write launcher language marker files

Some games include a language.txt marker in the unpacked local tree, similar
in spirit to account_name.txt. Installs and updates now carry the launcher
language alongside the account name so those game-provided marker files are
rewritten before staged files are promoted into local/.

The Tauri command boundary keeps the UI setting vocabulary as de/en, then maps
it to the file vocabulary expected by games: german or english. Unknown values
continue through the existing DEFAULT_LANGUAGE path, so the marker file falls
back to english just like script launch arguments fall back to en.

The transaction layer deliberately reuses the same first-match traversal helper
for both marker files. The searches stay independent, so games may place
account_name.txt and language.txt in different directories if their archive
layout requires that.

Test Plan:
- just fmt
- just test
- just frontend-test
- just clippy
- deno task build
- git diff --check

Refs: none
This commit is contained in:
2026-05-21 22:24:59 +02:00
parent e06a887da1
commit 9bafd981d7
7 changed files with 162 additions and 56 deletions
+2
View File
@@ -241,6 +241,7 @@ async fn handle_command(
file_descriptions: files,
install_after_download: *install_after_download,
account_name: None,
language: None,
})?;
Ok(json!({"queued": true, "game_id": game_id, "install": install_after_download}))
}
@@ -250,6 +251,7 @@ async fn handle_command(
sender.send(PeerCommand::InstallGame {
id: game_id.clone(),
account_name: None,
language: None,
})?;
Ok(json!({"queued": true, "game_id": game_id}))
}