Skip to content

Commit 46d3891

Browse files
feat(customers): CUST-4055 Add backend based static translations for 4 fields on the account edit page (#2606)
* feat(customers): CUST-4055 Add backend based static translations for 4 fields on the account edit page * chore(customers): CUST-4055 Add PR link in the changelog
1 parent f34af7e commit 46d3891

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## Draft
8+
- CUST-4055 Add backend-based static translations for account edit page form fields [#2606](https://github.com/bigcommerce/cornerstone/pull/2606)
89
- Out of Stock banner is duplicated and overlaps Add to cart button on PDP [#2601](https://github.com/bigcommerce/cornerstone/pull/2601)
910
- Fixed YouTube video playback in Safari by adding widget_referrer and origin parameters [#2598](https://github.com/bigcommerce/cornerstone/pull/2598)
1011

templates/components/account/edit-account.html

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,43 @@
77
<div class="form-row form-row--half">
88
<div class="form-field" id="account_firstname_id">
99
<label class="form-label" for="account_firstname">
10-
{{lang 'account.settings.first_name' }}
10+
{{#if (lang 'account.settings.first_name') '!==' 'First Name'}}
11+
{{lang 'account.settings.first_name'}}
12+
{{else}}
13+
{{forms.edit_account.first_name_label}}
14+
{{/if}}
1115
<small>{{lang 'common.required' }}</small>
1216
</label>
1317
<input aria-labelledby="account_firstname_id" aria-live="polite" autocomplete="given-name" type="text" class="form-input" name="account_firstname" id="account_firstname" value="{{forms.edit_account.first_name}}">
1418
</div>
1519
<div class="form-field" id="account_lastname_id">
1620
<label class="form-label" for="account_lastname">
17-
{{lang 'account.settings.last_name' }}
21+
{{#if (lang 'account.settings.last_name') '!==' 'Last Name'}}
22+
{{lang 'account.settings.last_name'}}
23+
{{else}}
24+
{{forms.edit_account.last_name_label}}
25+
{{/if}}
1826
<small>{{lang 'common.required' }}</small>
1927
</label>
2028
<input aria-labelledby="account_lastname_id" aria-live="polite" autocomplete="family-name" type="text" class="form-input" name="account_lastname" id="account_lastname" value="{{forms.edit_account.last_name}}">
2129
</div>
2230
<div class="form-field" id="account_companyname_id">
2331
<label class="form-label" for="account_companyname">
24-
{{lang 'account.settings.company' }}
32+
{{#if (lang 'account.settings.company') '!==' 'Company'}}
33+
{{lang 'account.settings.company'}}
34+
{{else}}
35+
{{forms.edit_account.company_label}}
36+
{{/if}}
2537
</label>
2638
<input aria-labelledby="account_companyname_id" aria-live="polite" autocomplete="organization" type="text" class="form-input" name="account_companyname" id="account_companyname" value="{{forms.edit_account.company_name}}">
2739
</div>
2840
<div class="form-field" id="account_phone_id">
2941
<label class="form-label" for="account_phone">
30-
{{lang 'account.settings.phone' }}
42+
{{#if (lang 'account.settings.phone') '!==' 'Phone Number'}}
43+
{{lang 'account.settings.phone'}}
44+
{{else}}
45+
{{forms.edit_account.phone_label}}
46+
{{/if}}
3147
</label>
3248
<input aria-labelledby="account_phone_id" aria-live="polite" autocomplete="tel" type="text" class="form-input" name="account_phone" id="account_phone" value="{{forms.edit_account.phone}}">
3349
</div>

0 commit comments

Comments
 (0)