diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/game/OAuthServer.java b/HMCL/src/main/java/org/jackhuang/hmcl/game/OAuthServer.java index de7849c3a..6825290fb 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/game/OAuthServer.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/game/OAuthServer.java @@ -30,6 +30,7 @@ import org.jackhuang.hmcl.util.io.NetworkUtils; import java.io.IOException; import java.util.HashMap; +import java.util.Locale; import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -103,6 +104,7 @@ public final class OAuthServer extends NanoHTTPD implements OAuth.Session { String html; try { html = IOUtils.readFullyAsString(OAuthServer.class.getResourceAsStream("/assets/microsoft_auth.html")) + .replace("%lang%", Locale.getDefault().toLanguageTag()) .replace("%close-page%", i18n("account.methods.microsoft.close_page")); } catch (IOException e) { LOG.error("Failed to load html", e); diff --git a/HMCL/src/main/resources/assets/microsoft_auth.html b/HMCL/src/main/resources/assets/microsoft_auth.html index f9de67484..0cda2b351 100644 --- a/HMCL/src/main/resources/assets/microsoft_auth.html +++ b/HMCL/src/main/resources/assets/microsoft_auth.html @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . --> - +