Skip to content

Commit 6c62268

Browse files
committed
add translation to placeholders and titles
1 parent 130e0e1 commit 6c62268

File tree

10 files changed

+24
-23
lines changed

10 files changed

+24
-23
lines changed

adminforth/plugins/email-password-reset/custom/ResetPassword.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<!-- Modal header -->
3232
<div class="flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600">
3333
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">
34-
Reset your password on {{ coreStore.config?.brandName }}
34+
{{$t('Reset your password on')}} {{ coreStore.config?.brandName }}
3535
</h3>
3636
</div>
3737
<!-- Modal body -->
@@ -46,7 +46,7 @@
4646
v-model="password"
4747
@keydown.enter="passwordConfirmationInput.focus()"
4848
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"
49-
placeholder="New password" required
49+
:placeholder="$t('New password')" required
5050
/>
5151

5252
<button
@@ -67,7 +67,7 @@
6767
autocomplete="new-password"
6868
v-model="passwordConfirmation"
6969
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"
70-
placeholder="Confirm new password" required
70+
:placeholder="$t('Confirm new password')" required
7171
/>
7272

7373
<button

adminforth/plugins/open-signup/custom/SignupPage.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
v-model="password"
6161
@keydown.enter="passwordConfirmationInput?.focus()"
6262
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"
63-
placeholder="New password" required
63+
:placeholder="$t('New password')" required
6464
/>
6565

6666
<button
@@ -83,7 +83,7 @@
8383
tabindex="3"
8484
v-model="passwordConfirmation"
8585
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"
86-
placeholder="Confirm new password" required
86+
:placeholder="$t('Confirm new password')" required
8787
/>
8888

8989
<button

adminforth/plugins/upload/custom/imageGenerator.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
<!-- Modal body -->
2323
<div class="p-4 md:p-5 space-y-4">
2424
<textarea id="message" rows="3" class="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
25-
placeholder="Prompt which will be passed to AI network" v-model="prompt"
26-
title="Prompt which will be passed to AI network"
25+
:placeholder="$t('Prompt which will be passed to AI network')" v-model="prompt"
26+
:title="$t('Prompt which will be passed to AI network')"
2727
></textarea>
2828

2929
<div class="flex items-center justify-center w-full relative">

adminforth/spa/src/afcl/Select.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@input="inputInput"
1010
class="block w-full pl-3 pr-10 py-2.5 border border-gray-300 rounded-md leading-5 bg-gray-50 placeholder-gray-500 sm:text-sm transition duration-150 ease-in-out dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary"
1111
:placeholder="
12-
selectedItems.length && !multiple ? '' : (showDropdown ? 'Search' : placeholder || 'Select...')
12+
selectedItems.length && !multiple ? '' : (showDropdown ? $t('Search') : placeholder || $t('Select...'))
1313
"
1414
/>
1515

adminforth/spa/src/components/CustomDatePicker.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
<input ref="datepickerStartEl" type="text"
1313
class="bg-gray-50 border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
14-
placeholder="Select date">
14+
:placeholder="$t('Select date')"
15+
>
1516
</div>
1617
</div>
1718
</div>
@@ -33,7 +34,7 @@
3334

3435
<button type="button"
3536
class="text-lightPrimary dark:text-darkPrimary text-base font-medium hover:underline p-0 inline-flex items-center mb-2"
36-
@click="toggleTimeInputs">{{ showTimeInputs ? 'Hide time' : 'Show time' }}
37+
@click="toggleTimeInputs">{{ showTimeInputs ? $t('Hide time') : $t('Show time') }}
3738
<svg class="w-8 h-8 ms-0.5" :class="{'rotate-180': showTimeInputs}" aria-hidden="true"
3839
xmlns="http://www.w3.org/2000/svg" width="24" height="24"
3940
fill="none" viewBox="0 0 24 24">

adminforth/spa/src/components/CustomDateRangePicker.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<input ref="datepickerStartEl" type="text"
1010
class="bg-gray-50 border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
11-
placeholder="From">
11+
:placeholder="$t('From')">
1212
</div>
1313

1414
<div class="relative">
@@ -18,7 +18,7 @@
1818

1919
<input ref="datepickerEndEl" type="text"
2020
class="bg-gray-50 border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
21-
placeholder="To">
21+
:placeholder="$t('To')">
2222
</div>
2323
</div>
2424

@@ -51,7 +51,7 @@
5151

5252
<button type="button"
5353
class="text-lightPrimary dark:text-darkPrimary text-base font-medium hover:underline p-0 inline-flex items-center mb-2"
54-
@click="toggleTimeInputs">{{ showTimeInputs ? 'Hide time' : 'Show time' }}
54+
@click="toggleTimeInputs">{{ showTimeInputs ? $t('Hide time') : $t('Show time') }}
5555
<svg class="w-8 h-8 ms-0.5 relative top-px" :class="{'rotate-180': showTimeInputs}" aria-hidden="true"
5656
xmlns="http://www.w3.org/2000/svg" width="24" height="24"
5757
fill="none" viewBox="0 0 24 24">

adminforth/spa/src/components/CustomRangePicker.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:max="maxFormatted"
66
type="number" aria-describedby="helper-text-explanation"
77
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-20 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
8-
placeholder="From"
8+
:placeholder="$t('From')"
99
v-model="start"
1010
>
1111

@@ -14,7 +14,7 @@
1414
:max="maxFormatted"
1515
type="number" aria-describedby="helper-text-explanation"
1616
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-20 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
17-
placeholder="To"
17+
:placeholder="$t('To')"
1818
v-model="end"
1919
>
2020

adminforth/spa/src/components/Filters.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<input
5252
v-else-if="[ 'string', 'text' ].includes(c.type)"
5353
type="text" class="w-full py-1 px-2 border border-gray-300 rounded-md dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
54-
placeholder="Search"
54+
:placeholder="$t('Search')"
5555
@input="setFilterItem({ column: c, operator: 'ilike', value: $event.target.value || undefined })"
5656
:value="getFilterItem({ column: c, operator: 'ilike' })"
5757
>
@@ -68,7 +68,7 @@
6868
<input
6969
v-else-if="[ 'date', 'time' ].includes(c.type)"
7070
type="text" class="w-full py-1 px-2 border border-gray-300 rounded-md"
71-
placeholder="Search datetime"
71+
:placeholder="$t('Search datetime')"
7272
@input="setFilterItem({ column: c, operator: 'ilike', value: $event.target.value || undefined })"
7373
:value="getFilterItem({ column: c, operator: 'ilike' })"
7474
>
@@ -87,14 +87,14 @@
8787
<input
8888
type="number" aria-describedby="helper-text-explanation"
8989
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-20 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
90-
placeholder="From"
90+
:placeholder="$t('From')"
9191
@input="setFilterItem({ column: c, operator: 'gte', value: $event.target.value || undefined })"
9292
:value="getFilterItem({ column: c, operator: 'gte' })"
9393
>
9494
<input
9595
type="number" aria-describedby="helper-text-explanation"
9696
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-20 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
97-
placeholder="To"
97+
:placeholder="$t('To')"
9898
@input="setFilterItem({ column: c, operator: 'lte', value: $event.target.value || undefined})"
9999
:value="getFilterItem({ column: c, operator: 'lte' })"
100100
>

adminforth/spa/src/components/GroupsTable.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@
103103
<textarea
104104
v-else-if="['text', 'richtext'].includes(column.type)"
105105
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
106-
placeholder="Text"
106+
:placeholder="$t('Text')"
107107
:value="currentValues[column.name]"
108108
@input="setCurrentValue(column.name, $event.target.value)"
109109
>
110110
</textarea>
111111
<textarea
112112
v-else-if="['json'].includes(column.type)"
113113
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
114-
placeholder="Text"
114+
:placeholder="$t('Text')"
115115
:value="currentValues[column.name]"
116116
@input="setCurrentValue(column.name, $event.target.value)"
117117
>
@@ -120,7 +120,7 @@
120120
v-else
121121
:type="!column.masked || unmasked[column.name] ? 'text' : 'password'"
122122
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
123-
placeholder="Text"
123+
:placeholder="$t('Text')"
124124
:value="currentValues[column.name]"
125125
@input="setCurrentValue(column.name, $event.target.value)"
126126
autocomplete="false"

adminforth/spa/src/views/LoginView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
<div v-if="coreStore.config.rememberMeDays"
6565
class="flex items-start mb-5"
66-
:title="`Stay logged in for ${coreStore.config.rememberMeDays} days`"
66+
:title="$t(`Stay logged in for {days} days`, {days: coreStore.config.rememberMeDays})"
6767
>
6868
<Checkbox v-model="rememberMeValue" class="mr-2">
6969
{{ $t('Remember me') }}

0 commit comments

Comments
 (0)