Merge pull request #23125 from overleaf/mf-change-case-settings-page-form

[web] Change settings page form labels to sentence case (instead of capitalizing each word)

GitOrigin-RevId: 70cc94c2883e782928b5cfdf81ea5ed2d4ff4363
This commit is contained in:
M Fahru
2025-01-28 07:01:08 -07:00
committed by Copybot
parent 33bbb32d07
commit 51bf63a32a
5 changed files with 22 additions and 27 deletions
@@ -47,7 +47,7 @@ block content
input(type="text" hidden name="email" autocomplete="username" value=email)
.form-group.mb-3
label.form-label(for='passwordField', data-ol-hide-on-error-message="token-expired") #{translate("new_password_sentence_case")}
label.form-label(for='passwordField', data-ol-hide-on-error-message="token-expired") #{translate("new_password")}
input.form-control#passwordField(
type='password'
name='password'
@@ -533,7 +533,6 @@
"find_out_more_nt": "",
"finding_a_fix": "",
"first_name": "",
"first_name_sentence_case": "",
"fit_to_height": "",
"fit_to_width": "",
"fixed_width": "",
@@ -824,7 +823,6 @@
"last_logged_in": "",
"last_modified": "",
"last_name": "",
"last_name_sentence_case": "",
"last_resort_trouble_shooting_guide": "",
"last_suggested_fix": "",
"last_updated_date_by_x": "",
+5 -8
View File
@@ -373,7 +373,7 @@
"confirm_affiliation_to_relink_dropbox": "Please confirm you are still at the institution and on their license, or upgrade your account in order to relink your Dropbox account.",
"confirm_delete_user_type_email_address": "To confirm you want to delete __userName__ please type the email address associated with their account",
"confirm_email": "Confirm Email",
"confirm_new_password": "Confirm New Password",
"confirm_new_password": "Confirm new password",
"confirm_primary_email_change": "Confirm primary email change",
"confirm_reject_selected_changes": "Are you sure you want to reject the selected change?",
"confirm_reject_selected_changes_plural": "Are you sure you want to reject the selected __count__ changes?",
@@ -434,7 +434,7 @@
"currency": "Currency",
"current_file": "Current file",
"current_page_page": "Current Page, Page __page__",
"current_password": "Current Password",
"current_password": "Current password",
"current_price": "Current price",
"current_session": "Current Session",
"currently_seeing_only_24_hrs_history": "Youre currently seeing the last 24 hours of changes in this project.",
@@ -706,8 +706,7 @@
"find_out_more_about_the_file_outline": "Find out more about the file outline",
"find_out_more_nt": "Find out more.",
"finding_a_fix": "Finding a fix",
"first_name": "First Name",
"first_name_sentence_case": "First name",
"first_name": "First name",
"fit_to_height": "Fit to height",
"fit_to_width": "Fit to width",
"fixed_width": "Fixed width",
@@ -1090,8 +1089,7 @@
"last_edit": "Last edit",
"last_logged_in": "Last logged in",
"last_modified": "Last Modified",
"last_name": "Last Name",
"last_name_sentence_case": "Last name",
"last_name": "Last name",
"last_resort_trouble_shooting_guide": "If that doesnt help, follow our <0>troubleshooting guide</0>.",
"last_suggested_fix": "Last suggested fix",
"last_updated": "Last Updated",
@@ -1323,8 +1321,7 @@
"new_folder": "New folder",
"new_font_open_dyslexic": "New font: OpenDyslexic Mono is designed to improve readability for those with dyslexia.",
"new_name": "New Name",
"new_password": "New Password",
"new_password_sentence_case": "New password",
"new_password": "New password",
"new_project": "New Project",
"new_snippet_project": "Untitled",
"new_subscription_will_be_billed_immediately": "Your new subscription will be billed immediately to your current payment method.",
@@ -39,10 +39,10 @@ describe('<AccountInfoSection />', function () {
fireEvent.change(screen.getByLabelText('Email'), {
target: { value: 'john@watson.co.uk' },
})
fireEvent.change(screen.getByLabelText('First Name'), {
fireEvent.change(screen.getByLabelText('First name'), {
target: { value: 'John' },
})
fireEvent.change(screen.getByLabelText('Last Name'), {
fireEvent.change(screen.getByLabelText('Last name'), {
target: { value: 'Watson' },
})
fireEvent.click(
@@ -173,11 +173,11 @@ describe('<AccountInfoSection />', function () {
renderSectionWithUserProvider()
expect(screen.getByLabelText('Email')).to.have.property('readOnly', true)
expect(screen.getByLabelText('First Name')).to.have.property(
expect(screen.getByLabelText('First name')).to.have.property(
'readOnly',
false
)
expect(screen.getByLabelText('Last Name')).to.have.property(
expect(screen.getByLabelText('Last name')).to.have.property(
'readOnly',
false
)
@@ -201,11 +201,11 @@ describe('<AccountInfoSection />', function () {
renderSectionWithUserProvider()
expect(screen.getByLabelText('Email')).to.have.property('readOnly', false)
expect(screen.getByLabelText('First Name')).to.have.property(
expect(screen.getByLabelText('First name')).to.have.property(
'readOnly',
true
)
expect(screen.getByLabelText('Last Name')).to.have.property(
expect(screen.getByLabelText('Last name')).to.have.property(
'readOnly',
true
)
@@ -75,23 +75,23 @@ describe('<PasswordSection />', function () {
}) as HTMLButtonElement
expect(button.disabled).to.be.true
fireEvent.change(screen.getByLabelText('Current Password'), {
fireEvent.change(screen.getByLabelText('Current password'), {
target: { value: 'foobar' },
})
expect(button.disabled).to.be.true
fireEvent.change(screen.getByLabelText('New Password'), {
fireEvent.change(screen.getByLabelText('New password'), {
target: { value: 'barbaz' },
})
expect(button.disabled).to.be.true
fireEvent.change(screen.getByLabelText('Confirm New Password'), {
fireEvent.change(screen.getByLabelText('Confirm new password'), {
target: { value: 'bar' },
})
screen.getByText('Doesnt match')
expect(button.disabled).to.be.true
fireEvent.change(screen.getByLabelText('Confirm New Password'), {
fireEvent.change(screen.getByLabelText('Confirm new password'), {
target: { value: 'barbaz' },
})
expect(button.disabled).to.be.false
@@ -106,13 +106,13 @@ describe('<PasswordSection />', function () {
render(<PasswordSection />)
const currentPasswordInput = screen.getByLabelText(
'Current Password'
'Current password'
) as HTMLInputElement
const newPassword1Input = screen.getByLabelText(
'New Password'
'New password'
) as HTMLInputElement
const newPassword2Input = screen.getByLabelText(
'Confirm New Password'
'Confirm new password'
) as HTMLInputElement
expect(newPassword1Input.minLength).to.equal(3)
@@ -196,13 +196,13 @@ describe('<PasswordSection />', function () {
})
function submitValidForm() {
fireEvent.change(screen.getByLabelText('Current Password'), {
fireEvent.change(screen.getByLabelText('Current password'), {
target: { value: 'foobar' },
})
fireEvent.change(screen.getByLabelText('New Password'), {
fireEvent.change(screen.getByLabelText('New password'), {
target: { value: 'barbaz' },
})
fireEvent.change(screen.getByLabelText('Confirm New Password'), {
fireEvent.change(screen.getByLabelText('Confirm new password'), {
target: { value: 'barbaz' },
})
fireEvent.click(