From 70130210bae48ffef3ab16ccc715108fdd490460 Mon Sep 17 00:00:00 2001 From: Kamesuta Date: Sat, 2 Sep 2023 14:03:51 +0900 Subject: [PATCH] i18n for login.js --- app/assets/js/scripts/login.js | 5 +---- app/assets/lang/en_US.json | 27 ++------------------------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/app/assets/js/scripts/login.js b/app/assets/js/scripts/login.js index 96ec9234..30ff8937 100644 --- a/app/assets/js/scripts/login.js +++ b/app/assets/js/scripts/login.js @@ -220,10 +220,7 @@ loginButton.addEventListener('click', () => { } else { // Uh oh. msftLoginLogger.error('Unhandled error during login.', displayableError) - actualDisplayableError = { - title: 'Unknown Error During Login', - desc: 'An unknown error has occurred. Please see the console for details.' - } + actualDisplayableError = Lang.queryJS('login.error.unknown') } setOverlayContent(actualDisplayableError.title, actualDisplayableError.desc, Lang.queryJS('login.tryAgain')) diff --git a/app/assets/lang/en_US.json b/app/assets/lang/en_US.json index e2921c76..ce635c08 100644 --- a/app/assets/lang/en_US.json +++ b/app/assets/lang/en_US.json @@ -174,32 +174,9 @@ "error": { "invalidValue": "* Invalid Value", "requiredValue": "* Required", - "userMigrated": { - "title": "Error During Login:
Invalid Credentials", - "desc": "You've attempted to login with a migrated account. Try again using the account email as the username." - }, - "invalidCredentials": { - "title": "Error During Login:
Invalid Credentials", - "desc": "The email or password you've entered is incorrect. Please try again." - }, - "rateLimit": { - "title": "Error During Login:
Too Many Attempts", - "desc": "There have been too many login attempts with this account recently. Please try again later." - }, - "noInternet": { - "title": "Error During Login:
No Internet Connection", - "desc": "You must be connected to the internet in order to login. Please connect and try again." - }, - "authDown": { - "title": "Error During Login:
Authentication Server Offline", - "desc": "Mojang's authentication server is currently offline or unreachable. Please wait a bit and try again. You can check the status of the server on Mojang's help portal." - }, - "notPaid": { - "title": "Error During Login:
Game Not Purchased", - "desc": "The account you are trying to login with has not purchased a copy of Minecraft.
You may purchase a copy on Minecraft.net" - }, "unknown": { - "title": "Error During Login:
Unknown Error" + "title": "Unknown Error During Login", + "desc": "An unknown error has occurred. Please see the console for details." } }, "login": "LOGIN",