mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 13:55:58 +00:00
chore: remove source comments and unused code, translate every missing string (#1965)
* chore(i18n): translate every missing string in all locales Adds the 87 strings the bottom-screen Dashboard and in-game stats pages introduced to all 32 locales, plus the 51 older settings strings Japanese and the 50 Chinese locales were still missing. Every locale now has all 3456 translatable strings with the same placeholders as English. Also translates 36 entries that were still English where the language does not use the English word, and makes es-419 touch_app_id use the same %1$s placeholder as English. * chore(patches): drop comments from the lines downstream patches add Removes comment lines and trailing comments from lines our patches add, with hunk headers recounted. Lines that a later patch uses as context and the upstream backport 0123 are left as they are. The gamescope, FEX, proot and xodus series still apply to their pinned sources, and the patched trees differ only in those comments. test_hud_frames now finds the HUD writer by its first declaration. * docs: credit Greenlight, Better xCloud, viture-v2, GameNative and DiRTTelemetryErrorFix These were credited only in source headers and NOTICE files. * chore: remove source comments and unused functions Removes explanatory comments from first-party Kotlin, Java, C, C++, Rust, TypeScript, Python, shell, Gradle, CMake and workflow files. License and attribution headers stay, and vendored third-party trees, generated files and license files are untouched. A shellcheck directive is kept, and udevmon's fallthrough comments became fallthrough attributes. Syntax trees and token streams match the previous sources apart from the comments and Python docstrings. Module docstrings that argparse prints are kept, and device-smoke.sh prints the same --help text from a heredoc. Also removes 37 functions and 4 fields that nothing referenced. * chore: remove comments from the Syncthing integration and the latest main sources * docs: credit Syncthing and the syncthing-android fork * chore(i18n): translate the Syncthing strings in all locales The 107 strings the Syncthing integration added are now in all 32 locales. sync_web_path_locked names the Syncthing tab by its label. * docs: credit @xXJSONDeruloXx for the HUD metric readers The CPU, GPU load, thermal and battery readers come from their PerformanceHudView pull requests #777, #877, #991, #1406 and #1573. The FusionHUD credit line is unchanged. * docs: credit the HUD metric readers to @xXJSONDeruloXx's work
This commit is contained in:
1 parent
d730f0fa8b
commit
c5577478ca
511 files changed
+6813
-4068
No files matched your search
@@ -37,11 +37,7 @@
|
||||
SubCommand::Achievements { title_id, json } => commands::achievements::run(&tokens, title_id, json).await,
|
||||
--- /dev/null
|
||||
+++ b/crates/xodus-cli/src/commands/cloud_token.rs
|
||||
@@ -0,0 +1,237 @@
|
||||
+//! Xbox Cloud Gaming streaming token for the stored account (DroidDeck). Same bearer
|
||||
+//! RPS -> Xbox user -> XSTS exchange as the profile read, for the cloud gaming relying party,
|
||||
+//! then the streaming service's user login (as xbox.com and Greenlight's xal-node do).
|
||||
+//! Never provisions a device or opens login.
|
||||
@@ -0,0 +1,226 @@
|
||||
+use std::{process::ExitCode, time::Duration};
|
||||
+use serde_json::{Value, json};
|
||||
+use xodus::{models::{live::ExchangeUserTokenOutcome, secrets::Token, soap}, tokens::TokenManager};
|
||||
@@ -49,7 +45,6 @@
|
||||
+const GSSV_RELYING_PARTY: &str = "http://gssv.xboxlive.com/";
|
||||
+const OFFERINGS: [&str; 2] = ["xgpuweb", "xgpuwebf2p"];
|
||||
+
|
||||
+/// The stored account's compact Microsoft account ticket for one service target and policy.
|
||||
+async fn ticket(tokens: &TokenManager, client: &reqwest::Client, target: &str, policy: soap::PolicyReference) -> Result<(String, String), &'static str> {
|
||||
+ let (account, device, user) = super::session::prepare(tokens, client).await.map_err(|stage| {
|
||||
+ super::session::diagnostic(stage); stage
|
||||
@@ -63,9 +58,6 @@
|
||||
+ ExchangeUserTokenOutcome::Issued(soap::BodyContent::RequestSecurityTokenResponse(response)) => *response,
|
||||
+ _ => return Err("msa-response"),
|
||||
+ };
|
||||
+ // Only accept compact forms here and reject incomplete token responses. The cloud
|
||||
+ // transfer purpose answers with a login proof token, which is what /connect takes (Greenlight
|
||||
+ // sends the MSAL response's "lpt").
|
||||
+ let kind = response.token_type.clone();
|
||||
+ if kind == "urn:passport:loginprooftoken" {
|
||||
+ let shape = match (&response.requested_security_token.binary_security_token, &response.requested_security_token.encrypted_data) {
|
||||
@@ -97,8 +89,6 @@
|
||||
+ Ok((account, xsts.token))
|
||||
+}
|
||||
+
|
||||
+/// The Microsoft account token a cloud session's /connect step takes (xbox.com asks MSAL for
|
||||
+/// "service::http://Passport.NET/purpose::PURPOSE_XBOX_CLOUD_CONSOLE_TRANSFER_TOKEN").
|
||||
+async fn transfer_token(tokens: &TokenManager, client: &reqwest::Client) -> Result<String, &'static str> {
|
||||
+ let policy = soap::PolicyReference { uri: "PURPOSE_XBOX_CLOUD_CONSOLE_TRANSFER_TOKEN".into(), val: String::default() };
|
||||
+ Ok(ticket(tokens, client, "http://Passport.NET/purpose", policy).await?.1)
|
||||
@@ -153,7 +143,6 @@
|
||||
+ let xsts = &xsts;
|
||||
+ async move { request_offering(client, &endpoint, xsts, offering).await }
|
||||
+ }).await?;
|
||||
+ // Diagnostic lines are letters and dashes only (the app's allow-list).
|
||||
+ eprintln!("NEXUS_SESSION_DIAGNOSTIC_V1 gssv-login-ok-{}", if offering == "xgpuweb" { "gamepass" } else { "free" });
|
||||
+ let transfer = transfer_token(tokens, &client).await;
|
||||
+ eprintln!("NEXUS_SESSION_DIAGNOSTIC_V1 transfer-token-{}", if transfer.is_ok() { "ok" } else { "missing" });
|
||||
|
||||
Reference in new issue
Block a user