Skip to content

Commit f946de6

Browse files
author
Lasim
committed
feat(frontend): add login and registration localization support
1 parent 39a32eb commit f946de6

File tree

4 files changed

+55
-67
lines changed

4 files changed

+55
-67
lines changed

services/frontend/src/i18n/locales/en/auth.ts

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -4,69 +4,4 @@ export default {
44
title: 'Logout',
55
inProgressMessage: 'Logout in Progress... Redirecting to login.',
66
},
7-
login: {
8-
title: 'Login',
9-
form: {
10-
email: {
11-
label: 'Email',
12-
placeholder: 'Enter your email',
13-
},
14-
password: {
15-
label: 'Password',
16-
placeholder: 'Enter your password',
17-
},
18-
forgotPassword: 'Forgot password?',
19-
},
20-
buttons: {
21-
submit: 'Login',
22-
// Assuming login might also have a loading state, adding for consistency
23-
loading: 'Logging in...',
24-
},
25-
noAccount: "Don't have an account?",
26-
createAccount: 'Create account',
27-
oauth: {
28-
divider: 'or',
29-
github: {
30-
button: 'Login with GitHub',
31-
signup: 'Sign up with GitHub',
32-
unavailable: 'GitHub login is currently unavailable'
33-
}
34-
},
35-
errors: { // Added based on Login.vue structure, using placeholders
36-
title: 'Login Error',
37-
networkError: 'Network error. Please check your connection or try again later.',
38-
invalidCredentials: 'Invalid email or password.',
39-
serverError: 'Server error. Please try again later.',
40-
timeout: 'The request timed out. Please try again.',
41-
unknownError: 'An unknown error occurred during login.',
42-
githubOAuthError: 'GitHub login failed. Please try again.'
43-
}
44-
},
45-
register: {
46-
title: 'Register',
47-
form: {
48-
name: {
49-
label: 'Name',
50-
placeholder: 'Enter your name',
51-
},
52-
email: {
53-
label: 'Email',
54-
placeholder: 'Enter your email',
55-
},
56-
password: {
57-
label: 'Password',
58-
placeholder: 'Choose a password',
59-
},
60-
confirmPassword: {
61-
label: 'Confirm Password',
62-
placeholder: 'Confirm your password',
63-
},
64-
},
65-
buttons: {
66-
submit: 'Create Account',
67-
loading: 'Creating Account...',
68-
},
69-
haveAccount: 'Already have an account?',
70-
signIn: 'Sign In',
71-
},
727
}

services/frontend/src/i18n/locales/en/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import mcpCatalogMessages from './mcp-catalog'
1616
import mcpCategoriesMessages from './mcp-categories'
1717
import mcpInstallationsMessages from './mcp-installations'
1818
import oauthMessages from './oauth'
19+
import registerMessages from './register'
20+
import loginMessages from './login'
1921

2022
export default {
2123
...commonMessages,
@@ -35,6 +37,8 @@ export default {
3537
mcpCatalog: mcpCatalogMessages,
3638
mcpInstallations: mcpInstallationsMessages,
3739
oauth: oauthMessages,
40+
register: registerMessages,
41+
login: loginMessages,
3842
// If there are any top-level keys directly under 'en', they can be added here.
3943
// For example, if you had a global 'appName': 'My Application'
4044
// appName: 'DeployStack Application',
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
export default {
2+
title: 'Sign in to your account',
3+
form: {
4+
email: {
5+
label: 'Email address',
6+
placeholder: 'Enter your email address',
7+
},
8+
password: {
9+
label: 'Password',
10+
placeholder: 'Enter your password',
11+
},
12+
forgotPassword: 'Forgot password?',
13+
},
14+
buttons: {
15+
submit: 'Sign in',
16+
loading: 'Signing in...',
17+
},
18+
noAccount: "Don't have an account?",
19+
createAccount: 'Create account',
20+
oauth: {
21+
divider: 'or',
22+
github: {
23+
button: 'Continue with GitHub',
24+
signup: 'Sign up with GitHub',
25+
unavailable: 'GitHub login is currently unavailable'
26+
}
27+
},
28+
errors: {
29+
title: 'Sign In Error',
30+
networkError: 'Unable to connect to server. Please check your connection or try again later.',
31+
invalidCredentials: 'Invalid email or password.',
32+
serverError: 'Server error occurred. Please try again later.',
33+
timeout: 'Request timed out. Please try again.',
34+
unknownError: 'An unexpected error occurred during sign in.',
35+
githubOAuthError: 'GitHub sign in failed. Please try again.'
36+
}
37+
}

services/frontend/src/i18n/locales/en/register.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ export default {
22
title: 'Create an account',
33
form: {
44
name: {
5-
label: 'Full name',
6-
placeholder: 'John Doe',
5+
label: 'Username',
6+
placeholder: 'Enter username (letters, numbers, underscores, dots, hyphens only)',
77
},
88
email: {
99
label: 'Email address',
@@ -25,4 +25,16 @@ export default {
2525
haveAccount: 'Already have an account?',
2626
signIn: 'Sign in',
2727
termsAgreement: 'By creating an account, you agree to our Terms of Service and Privacy Policy',
28+
success: {
29+
title: 'Account created successfully!',
30+
description: 'You can now sign in with your credentials.'
31+
},
32+
errors: {
33+
title: 'Registration Error',
34+
networkError: 'Unable to connect to server. Please try again later.',
35+
conflict: 'Username or email already exists.',
36+
serverError: 'Server error occurred. Please try again later.',
37+
timeout: 'Request timed out. Please try again.',
38+
unknownError: 'An unexpected error occurred during registration.'
39+
}
2840
}

0 commit comments

Comments
 (0)