-
+
-
+
-
+
-
+
@@ -79,12 +99,12 @@ const ResetPasswordForm = ({ onSubmit, userName }) => {
{errorMessage && (
- Password reset failed
+ { t('ResetPasswordForm.error') }
)}
)}
diff --git a/webclient/src/i18n-default.json b/webclient/src/i18n-default.json
index 690e5780..a40915ac 100644
--- a/webclient/src/i18n-default.json
+++ b/webclient/src/i18n-default.json
@@ -1 +1 @@
-{"Common":{"language":"Translate into English.","disconnect":"Disconnect"},"LoginContainer":{"title":"Login","subtitle":"A cross-platform virtual tabletop for multiplayer card games."}}
\ No newline at end of file
+{"Common":{"language":"Translate into English.","disconnect":"Disconnect","label":{"confirmPassword":"Confirm Password","confirmSure":"Are you sure?","country":"Country","delete":"Delete","email":"Email","hostName":"Host Name","hostAddress":"Host Address","password":"Password","passwordAgain":"Password Again","port":"Port","realName":"Real Name","saveChanges":"Save Changes","token":"Token","username":"Username"},"validation":{"minChars":"Minimum of {count} {count, plural, one {character} other {characters}} required","passwordsMustMatch":"Passwords don't match","required":"Required"}},"KnownHosts":{"label":"Host","add":"Add new host","toast":"Host successfully {mode, select, created {created} deleted {deleted} other {edited}}."},"InitializeContainer":{"title":"DID YOU KNOW","subtitle":"<1>Cockatrice is run by volunteers1><1>that love card games!1>"},"LoginContainer":{"header":{"title":"Login","subtitle":"A cross-platform virtual tabletop for multiplayer card games."},"footer":{"registerPrompt":"Not registered yet?","registerAction":"Create an account","credit":"Cockatrice is an open source project","version":"Version"},"content":{"subtitle1":"Play multiplayer card games online.","subtitle2":"Cross-platform virtual tabletop for multiplayer card games. Forever free."},"toasts":{"passwordResetSuccessToast":"Password Reset Successfully","accountActivationSuccess":"Account Activated Successfully"}},"UnsupportedContainer":{"title":"Unsupported Browser","subtitle1":"Please update your browser and/or check your permissions.","subtitle2":"Note: Private browsing causes some browsers to disable certain permissions or features."},"AccountActivationDialog":{"title":"Account Activation","subtitle1":"Your account has not been activated yet.","subtitle2":"You need to provide the activation token received in the activation email."},"KnownHostDialog":{"title":"{mode, select, edit {Edit} other {Add}} Known Host","subtitle":"Adding a new host allows you to connect to different servers. Enter the details below to your host list."},"RegistrationDialog":{"title":"Create New Account"},"RequestPasswordResetDialog":{"title":"Request Password Reset"},"ResetPasswordDialog":{"title":"Reset Password"},"AccountActivationForm":{"error":{"failed":"Account activation failed"},"label":{"activate":"Activate Account"}},"KnownHostForm":{"help":"Need help adding a new host?","label":{"add":"Add Host","find":"Find Host"}},"LoginForm":{"label":{"autoConnect":"Auto Connect","forgot":"Forgot Password","login":"Login","savePassword":"Save Password","savedPassword":"Saved Password"}},"RegisterForm":{"label":{"register":"Register"},"toast":{"registerSuccess":"Registration Successful!"}},"RequestPasswordResetForm":{"error":"Request password reset failed","mfaEnabled":"Server has multi-factor authentication enabled","request":"Request Reset Token","skipRequest":"I already have a reset token"},"ResetPasswordForm":{"error":"Password reset failed","label":{"reset":"Reset Password"}}}
\ No newline at end of file
diff --git a/webclient/src/i18n.ts b/webclient/src/i18n.ts
index 8c805354..ef188596 100644
--- a/webclient/src/i18n.ts
+++ b/webclient/src/i18n.ts
@@ -1,5 +1,6 @@
import i18n from 'i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
+import ICU from 'i18next-icu';
import { initReactI18next } from 'react-i18next';
import { Language } from 'types';
@@ -10,6 +11,7 @@ import I18nBackend from './i18n-backend';
import translation from './i18n-default.json';
i18n
+ .use(ICU)
.use(I18nBackend)
.use(LanguageDetector)
.use(initReactI18next)
@@ -24,7 +26,7 @@ i18n
interpolation: {
// not needed for react as it escapes by default
escapeValue: false,
- },
+ }
});
export default i18n;