Skip to content

Commit aeb99cd

Browse files
khangoncweitat
andauthored
feature-8787: Change the "age" field of the custom form (#8806)
* feature-8787: Change the "age" field of the custom form * feature-8787 translate text on register form for age input --------- Co-authored-by: cweitat <[email protected]>
1 parent 304d752 commit aeb99cd

File tree

23 files changed

+194
-7
lines changed

23 files changed

+194
-7
lines changed

app/components/forms/orders/order-form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ export default Component.extend(FormMixin, {
591591
}),
592592

593593
genders : orderBy(genders, 'name'),
594-
ageGroups : orderBy(ageGroups, 'age'),
594+
ageGroups : orderBy(ageGroups, 'position'),
595595
countries : orderBy(countries, 'name'),
596596
years : orderBy(years, 'year'),
597597

app/templates/components/forms/orders/order-form.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
<div class="menu">
175175
{{#each this.ageGroups as |ageGroup|}}
176176
<div class="item" data-value="{{map-value mapper ageGroup.age}}">
177-
{{ageGroup.age}}
177+
{{t ageGroup.age}}
178178
</div>
179179
{{/each}}
180180
</div>

app/utils/dictionary/age-groups.ts

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,44 @@
1+
import { tn } from '../text';
2+
13
export const ageGroups = [
24
{
3-
age: '19 or less'
5+
age: tn.t('Under 18'),
6+
position: 1
47
},
58
{
6-
age: '20 to 29'
9+
age: '18-24',
10+
position: 2
711
},
812
{
9-
age: '30 to 39'
13+
age: '25-34',
14+
position: 3
1015
},
1116
{
12-
age: '40 to 49'
17+
age: '35-44',
18+
position: 4
1319
},
1420
{
15-
age: '50 or above'
21+
age: '45-54',
22+
position: 5
23+
},
24+
{
25+
age: '55-64',
26+
position: 6
27+
},
28+
{
29+
age: '65-74',
30+
position: 7
31+
},
32+
{
33+
age: '75-84',
34+
position: 8
35+
},
36+
{
37+
age: '85+',
38+
position: 9
39+
},
40+
{
41+
age: tn.t('I prefer not to say'),
42+
position: 10
1643
}
1744
];

translations/ar.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11586,3 +11586,11 @@ msgstr ""
1158611586
#: app/utils/dictionary/payment.ts:261:13
1158711587
msgid "Swiss franc"
1158811588
msgstr ""
11589+
11590+
#: app/utils/dictionary/age-groups.ts:5:9
11591+
msgid "Under 18"
11592+
msgstr "Menores de 18 años"
11593+
11594+
#: app/utils/dictionary/age-groups.ts:41:9
11595+
msgid "I prefer not to say"
11596+
msgstr ""

translations/bn.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11150,3 +11150,11 @@ msgstr ""
1115011150
#: app/utils/dictionary/payment.ts:261:13
1115111151
msgid "Swiss franc"
1115211152
msgstr ""
11153+
11154+
#: app/utils/dictionary/age-groups.ts:5:9
11155+
msgid "Under 18"
11156+
msgstr "Bawah 18 tahun"
11157+
11158+
#: app/utils/dictionary/age-groups.ts:41:9
11159+
msgid "I prefer not to say"
11160+
msgstr ""

translations/de.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12260,3 +12260,11 @@ msgstr "Malaysischer Ringgit"
1226012260
#: app/utils/dictionary/payment.ts:261:13
1226112261
msgid "Swiss franc"
1226212262
msgstr "Schweizer Franken"
12263+
12264+
#: app/utils/dictionary/age-groups.ts:5:9
12265+
msgid "Under 18"
12266+
msgstr "Unter 18"
12267+
12268+
#: app/utils/dictionary/age-groups.ts:41:9
12269+
msgid "I prefer not to say"
12270+
msgstr ""

translations/de_DIVEO.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11827,3 +11827,11 @@ msgstr ""
1182711827
#: app/utils/dictionary/payment.ts:261:13
1182811828
msgid "Swiss franc"
1182911829
msgstr ""
11830+
11831+
#: app/utils/dictionary/age-groups.ts:5:9
11832+
msgid "Under 18"
11833+
msgstr ""
11834+
11835+
#: app/utils/dictionary/age-groups.ts:41:9
11836+
msgid "I prefer not to say"
11837+
msgstr ""

translations/en.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11595,3 +11595,11 @@ msgstr "Malaysian ringgit"
1159511595
#: app/utils/dictionary/payment.ts:261:13
1159611596
msgid "Swiss franc"
1159711597
msgstr "Swiss franc"
11598+
11599+
#: app/utils/dictionary/age-groups.ts:5:9
11600+
msgid "Under 18"
11601+
msgstr "Under 18"
11602+
11603+
#: app/utils/dictionary/age-groups.ts:41:9
11604+
msgid "I prefer not to say"
11605+
msgstr "I prefer not to say"

translations/es.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11826,3 +11826,11 @@ msgstr ""
1182611826
#: app/utils/dictionary/payment.ts:261:13
1182711827
msgid "Swiss franc"
1182811828
msgstr ""
11829+
11830+
#: app/utils/dictionary/age-groups.ts:5:9
11831+
msgid "Under 18"
11832+
msgstr "Menores de 18 años"
11833+
11834+
#: app/utils/dictionary/age-groups.ts:41:9
11835+
msgid "I prefer not to say"
11836+
msgstr ""

translations/fr.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12352,3 +12352,11 @@ msgstr ""
1235212352
#: app/utils/dictionary/payment.ts:261:13
1235312353
msgid "Swiss franc"
1235412354
msgstr ""
12355+
12356+
#: app/utils/dictionary/age-groups.ts:5:9
12357+
msgid "Under 18"
12358+
msgstr "Moins de 18 ans"
12359+
12360+
#: app/utils/dictionary/age-groups.ts:41:9
12361+
msgid "I prefer not to say"
12362+
msgstr ""

0 commit comments

Comments
 (0)