Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Commit 6293d1b

Browse files
feat: i18n contact us form
Resolves #5
1 parent 11e1df1 commit 6293d1b

File tree

3 files changed

+35
-10
lines changed

3 files changed

+35
-10
lines changed

components/ContactUsModal.vue

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
v-show="$v.name.$error"
3838
class="text-sm self-start ml-2 mb-4 text-red-light"
3939
>
40-
Please type a valid name
40+
{{ $t('contact.errors.name') }}
4141
</span>
4242
<div
4343
:class="{'shadow-white': focusedElement === 'email', 'shadow-red': $v.email.$error}"
@@ -62,7 +62,7 @@
6262
v-show="$v.email.$error"
6363
class="text-sm self-start ml-2 mb-4 text-red-light"
6464
>
65-
Please insert a valid E-Mail
65+
{{ $t('contact.errors.email') }}
6666
</span>
6767
<div
6868
:class="{'shadow-white': focusedElement === 'msg', 'shadow-red': $v.msg.$error}"
@@ -87,17 +87,16 @@
8787
v-show="$v.msg.$error"
8888
class="text-xm self-start ml-2 mb-4 text-red-light"
8989
>
90-
Please provide a valid message with at least 25 characters
90+
{{ $t('contact.errors.message') }}
9191
</span>
9292
<p class="text-xs md:text-base my-4 px-2 text-grey-light">
93-
We use the data you provide us through this form only to process your contact request! You
94-
find more information in our
93+
{{ $t('contact.privacy.text') }}
9594
<NuxtLink
9695
:to="localePath('privacy')"
9796
tabindex="-1"
9897
class="text-white hover:text-developmint-lighter"
9998
>
100-
Privacy Policy
99+
{{ $t('contact.privacy.policy') }}
101100
</NuxtLink>
102101
</p>
103102
<div class="flex justify-between lg:block lg:ml-auto">
@@ -120,13 +119,13 @@
120119
v-show="isSubmitted"
121120
class="text-2xl text-developmint"
122121
>
123-
Thanks for your submission!
122+
{{ $t('contact.message.success') }}
124123
</div>
125124
<div
126125
v-if="error"
127126
class="text-2xl text-red-dark"
128127
>
129-
An error occurred!
128+
{{ $t('contact.message.error') }}
130129
</div>
131130
</div>
132131
</div>

i18n/de.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,24 @@ module.exports = {
1818
contact: {
1919
heading: 'Kommen Sie ihrem Ziel einen Schritt näher',
2020
fields: {
21-
tell: 'Erzählen Sie uns mehr!'
21+
tell: 'Wie können wir Ihnen weiterhelfen?'
2222
},
2323
buttons: {
2424
back: 'Zurück',
2525
submit: 'Absenden'
26+
},
27+
error: {
28+
name: 'Bitte geben Sie einen gültigen Namen (Vor- und Nachnamen) ein.',
29+
email: 'Bitte nutzen Sie eine valide E-Mail.',
30+
message: 'Bitte geben Sie eine gültige Nachricht mit mindestens 25 Zeichen ein.'
31+
},
32+
privacy: {
33+
text: `Wir nutzen die von Ihnen hier eingegebenen Daten nur um die Kontaktanfrage zu verarbeiten. Mehr Informationen finde Sie in unserer`,
34+
policy: 'Datenschutzbestimmung'
35+
},
36+
message: {
37+
success: 'Danke für die Anfrage! Wir werden Sie schnellstmöglich kontaktieren.',
38+
error: `Ein unbekannter Fehler ist aufgetreten. Das sollte nicht passieren, aber wir wurden bereits informiert.`
2639
}
2740
},
2841
index: {

i18n/en.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,24 @@ module.exports = {
1818
contact: {
1919
heading: 'One step closer to your goal',
2020
fields: {
21-
tell: 'Tell us more!'
21+
tell: 'Tell us more about your inquiry!'
2222
},
2323
buttons: {
2424
back: 'Back',
2525
submit: 'Submit'
26+
},
27+
error: {
28+
name: 'Please type in a valid name.',
29+
email: 'Please insert a valid email.',
30+
message: 'Please provide a valid message with at least 25 characters.'
31+
},
32+
privacy: {
33+
text: `We use the data you provide us through this form only to process your contact request! You can find more information in our`,
34+
policy: 'Privacy Policy'
35+
},
36+
message: {
37+
success: 'Thanks for your submission! We will contact you as soon as possible.',
38+
error: 'An unknown error occurred. This should not happen, but we were already notified.'
2639
}
2740
},
2841
index: {

0 commit comments

Comments
 (0)