60
60
<v-flex xs12 sm12 >
61
61
<br ><br ><br >
62
62
<v-btn large color =" blue-grey darken-1" v-on:click =" ttsdialog = true" class =" controlBtn" :disabled =" !ttsBtnEnabled" >
63
- Pronuncia
63
+ {{ $t("message.control_speak") }}
64
64
<v-icon >chat_bubble_outline</v-icon >
65
65
</v-btn >
66
66
</v-flex >
67
67
<v-flex xs12 sm12 >
68
68
<v-btn large color =" blue-grey darken-1" class =" controlBtn" v-on:click =" takePhoto()" :disabled =" !photoBtnEnabled" >
69
- Scatta foto
69
+ {{ $t("message.control_photo_take") }}
70
70
<v-icon dark >camera_alt</v-icon >
71
71
</v-btn >
72
72
</v-flex >
78
78
</v-flex >
79
79
<v-flex xs12 sm12 >
80
80
<v-btn large color =" blue-grey darken-1" class =" controlBtn" to =" /gallery" >
81
- Galleria
81
+ {{ $t("message.control_photo_gallery") }}
82
82
<v-icon dark >photo_library</v-icon >
83
83
</v-btn >
84
84
</v-flex >
90
90
</template >
91
91
<template v-else >
92
92
<br >
93
- In attesa che CoderBot torni online... <br >
93
+ {{ $t("message.coderbot_offline_1") }} <br >
94
94
<v-icon large >signal_wifi_off</v-icon >
95
95
</template >
96
96
</v-main >
97
97
<v-snackbar v-model =" snackbar" >
98
98
{{ snackText }}
99
99
<v-btn color =" pink" text @click =" snackbar = false" >
100
- Chiudi
100
+ {{ $t("message.close") }}
101
101
</v-btn >
102
102
</v-snackbar >
103
103
<v-dialog v-model =" ttsdialog" width =" 600px" >
104
104
<v-card >
105
105
<v-card-title >
106
- <span class =" headline" >Text to Speech </span >
106
+ <span class =" headline" >{{ $t("message.gallery_empty") }} </span >
107
107
</v-card-title >
108
108
<v-card-text >
109
- <v-text-field v-model =" ttstext" label =" Frase da pronunciare " solo ></v-text-field >
109
+ <v-text-field v-model =" ttstext" label =" $t('message.control_text_to_speech') " solo ></v-text-field >
110
110
</v-card-text >
111
111
<v-card-actions >
112
112
<v-spacer ></v-spacer >
113
- <v-btn color =" gray darken-1" text =" text" @click =" ttsdialog=false" >Annulla </v-btn >
114
- <v-btn color =" green darken-1" text =" text" @click =" say()" >Pronuncia </v-btn >
113
+ <v-btn color =" gray darken-1" text =" text" @click =" ttsdialog=false" >{{ $t("message.cancel") }} </v-btn >
114
+ <v-btn color =" green darken-1" text =" text" @click =" say()" >{{ $t("message.control_speak") }} </v-btn >
115
115
</v-card-actions >
116
116
</v-card >
117
117
</v-dialog >
120
120
<script >
121
121
import sidebar from ' ../components/Sidebar' ;
122
122
123
+ console .log (process .env .CB_ENDPOINT + process .env .APIv1 );
124
+
123
125
export default {
124
126
components: { sidebar },
125
127
name: ' Control' ,
@@ -131,7 +133,7 @@ export default {
131
133
.then (() => {
132
134
this .ttsBtnEnabled = false ;
133
135
this .ttsdialog = false ;
134
- this .snackText = ' Sto pronunciando ' ;
136
+ this .snackText = this . $i18n . t ( ' message.control_speaking ' ) ;
135
137
this .snackbar = true ;
136
138
setTimeout (() => {
137
139
this .ttsBtnEnabled = true ;
@@ -143,7 +145,7 @@ export default {
143
145
const axios = this .$axios ;
144
146
axios .get (` ${ CBv1} /bot` , { params: { cmd: ' take_photo' } })
145
147
.then (() => {
146
- this .snackText = ' Foto scattata ' ;
148
+ this .snackText = this . $i18n . t ( ' message.control_photo_taken ' ) ;
147
149
this .snackbar = true ;
148
150
this .photoBtnEnabled = false ;
149
151
setTimeout (() => {
@@ -158,7 +160,7 @@ export default {
158
160
.then (() => {
159
161
this .ttsBtnEnabled = false ;
160
162
this .ttsdialog = false ;
161
- this .snackText = ' Nota in riproduzione ' ;
163
+ this .snackText = this . $i18n . t ( ' message.control_sount_playing ' ) ;
162
164
this .snackbar = true ;
163
165
setTimeout (() => {
164
166
this .ttsBtnEnabled = true ;
@@ -175,10 +177,10 @@ export default {
175
177
const axios = this .$axios ;
176
178
axios .get (` ${ CBv1} /bot` , { params: { cmd: ' video_rec' } })
177
179
.then (() => {
178
- this .snackText = ' Registrazione Avviata ' ;
180
+ this .snackText = this . $i18n . t ( ' message.control_video_rec_started ' ) ;
179
181
this .snackbar = true ;
180
182
this .photoBtnEnabled = false ;
181
- this .videoBtn .text = ' Ferma registrazione video ' ;
183
+ this .videoBtn .text = this . $i18n . t ( ' message.control_video_rec_started ' ) ;
182
184
this .videoBtn .icon = ' stop' ;
183
185
this .videoBtn .action = ' stop' ;
184
186
});
@@ -188,13 +190,13 @@ export default {
188
190
const axios = this .$axios ;
189
191
axios .get (` ${ CBv1} /bot` , { params: { cmd: ' video_stop' } })
190
192
.then (() => {
191
- this .snackText = ' Registrazione terminata ' ;
193
+ this .snackText = this . $i18n . t ( ' message.control_video_rec_stopped ' ) ;
192
194
this .snackbar = true ;
193
195
this .videoBtn .enabled = false ;
194
196
this .videoBtn .action = ' record' ;
195
197
setTimeout (() => {
196
198
this .videoBtn .enabled = true ;
197
- this .videoBtn .text = ' Registra Video ' ;
199
+ this .videoBtn .text = this . $i18n . t ( ' message.control_video_rec ' ) ;
198
200
this .videoBtn .icon = ' videocam' ;
199
201
this .photoBtnEnabled = true ;
200
202
}, 1000 );
@@ -206,7 +208,7 @@ export default {
206
208
axios .get (` ${ CB } /status` )
207
209
.then ((response ) => {
208
210
if (this .status == 0 && response .status ) {
209
- this .snackText = ' CoderBot è tornato online ' ;
211
+ this .snackText = this . $i18n . t ( ' message.coderbot_online ' ) ;
210
212
this .snackbar = true ;
211
213
}
212
214
@@ -219,7 +221,7 @@ export default {
219
221
console .log (error);
220
222
221
223
if (this .status ) {
222
- this .snackText = ' CoderBot irrangiungibile ' ;
224
+ this .snackText = this . $i18n . t ( ' message.coderbot_offline_2 ' ) ;
223
225
this .snackbar = true ;
224
226
}
225
227
this .status = 0 ;
@@ -316,7 +318,7 @@ export default {
316
318
ttsBtnEnabled: true ,
317
319
photoBtnEnabled: true ,
318
320
videoBtn: {
319
- text: ' Registra Video ' ,
321
+ text: this . $i18n . t ( ' message.control_video_rec ' ) ,
320
322
icon: ' videocam' ,
321
323
enabled: ' true' ,
322
324
action: ' record' ,
0 commit comments