Skip to content

Commit 15ed8b7

Browse files
authored
Merge pull request #3509 from yugalkaushik/settingtext-update
Improve account section terminology and labels
2 parents 14ab875 + 9cb21c2 commit 15ed8b7

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

client/modules/IDE/components/Header/Nav.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ const AuthenticatedUserMenu = () => {
378378
{t('Nav.Auth.MyAssets')}
379379
</MenubarItem>
380380
<MenubarItem id="account-settings" href="/account">
381-
{t('Preferences.Settings')}
381+
{t('Nav.Auth.MyAccount')}
382382
</MenubarItem>
383383
<MenubarItem id="account-logout" onClick={() => dispatch(logoutUser())}>
384384
{t('Nav.Auth.LogOut')}

client/modules/User/components/AccountForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function AccountForm() {
176176
</Field>
177177
)}
178178
<Button type="submit" disabled={submitting || invalid}>
179-
{t('AccountForm.SubmitSaveAllSettings')}
179+
{t('AccountForm.SaveAccountDetails')}
180180
</Button>
181181
</form>
182182
)}

client/modules/User/components/AccountForm.unit.test.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ describe('<AccountForm />', () => {
6161
it('handles form submission and calls updateSettings', async () => {
6262
subject();
6363

64-
const saveAllSettingsButton = screen.getByRole('button', {
65-
name: /save all settings/i
64+
const saveAccountDetailsButton = screen.getByRole('button', {
65+
name: /save account details/i
6666
});
6767

6868
const currentPasswordElement = screen.getByLabelText(/current password/i);
@@ -81,7 +81,7 @@ describe('<AccountForm />', () => {
8181
});
8282

8383
await act(async () => {
84-
fireEvent.click(saveAllSettingsButton);
84+
fireEvent.click(saveAccountDetailsButton);
8585
});
8686

8787
await waitFor(() => {
@@ -92,8 +92,8 @@ describe('<AccountForm />', () => {
9292
it('Save all setting button should get disabled while submitting and enable when not submitting', async () => {
9393
subject();
9494

95-
const saveAllSettingsButton = screen.getByRole('button', {
96-
name: /save all settings/i
95+
const saveAccountDetailsButton = screen.getByRole('button', {
96+
name: /save account details/i
9797
});
9898

9999
const currentPasswordElement = screen.getByLabelText(/current password/i);
@@ -110,12 +110,12 @@ describe('<AccountForm />', () => {
110110
value: 'newPassword'
111111
}
112112
});
113-
expect(saveAllSettingsButton).not.toHaveAttribute('disabled');
113+
expect(saveAccountDetailsButton).not.toHaveAttribute('disabled');
114114

115115
await act(async () => {
116-
fireEvent.click(saveAllSettingsButton);
116+
fireEvent.click(saveAccountDetailsButton);
117117
await waitFor(() => {
118-
expect(saveAllSettingsButton).toHaveAttribute('disabled');
118+
expect(saveAccountDetailsButton).toHaveAttribute('disabled');
119119
});
120120
});
121121
});

translations/locales/en-US/translations.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,13 @@
367367
"CurrentPasswordARIA": "Current Password",
368368
"NewPassword": "New Password",
369369
"NewPasswordARIA": "New Password",
370-
"SubmitSaveAllSettings": "Save All Settings"
370+
"SaveAccountDetails": "Save Account Details"
371371
},
372372
"AccountView": {
373373
"SocialLogin": "Social Login",
374374
"SocialLoginDescription": "Use your GitHub or Google account to log into the p5.js Web Editor.",
375375
"Title": "p5.js Web Editor | Account Settings",
376-
"Settings": "Account Settings",
376+
"Settings": "My Account",
377377
"AccountTab": "Account",
378378
"AccessTokensTab": "Access Tokens"
379379
},

0 commit comments

Comments
 (0)