6060 <v-flex xs12 sm12 >
6161 <br ><br ><br >
6262 <v-btn large color =" blue-grey darken-1" v-on:click =" ttsdialog = true" class =" controlBtn" :disabled =" !ttsBtnEnabled" >
63- Pronuncia
63+ {{ $t("message.control_speak") }}
6464 <v-icon >chat_bubble_outline</v-icon >
6565 </v-btn >
6666 </v-flex >
6767 <v-flex xs12 sm12 >
6868 <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") }}
7070 <v-icon dark >camera_alt</v-icon >
7171 </v-btn >
7272 </v-flex >
7878 </v-flex >
7979 <v-flex xs12 sm12 >
8080 <v-btn large color =" blue-grey darken-1" class =" controlBtn" to =" /gallery" >
81- Galleria
81+ {{ $t("message.control_photo_gallery") }}
8282 <v-icon dark >photo_library</v-icon >
8383 </v-btn >
8484 </v-flex >
9090 </template >
9191 <template v-else >
9292 <br >
93- In attesa che CoderBot torni online... <br >
93+ {{ $t("message.coderbot_offline_1") }} <br >
9494 <v-icon large >signal_wifi_off</v-icon >
9595 </template >
9696 </v-main >
9797 <v-snackbar v-model =" snackbar" >
9898 {{ snackText }}
9999 <v-btn color =" pink" text @click =" snackbar = false" >
100- Chiudi
100+ {{ $t("message.close") }}
101101 </v-btn >
102102 </v-snackbar >
103103 <v-dialog v-model =" ttsdialog" width =" 600px" >
104104 <v-card >
105105 <v-card-title >
106- <span class =" headline" >Text to Speech </span >
106+ <span class =" headline" >{{ $t("message.gallery_empty") }} </span >
107107 </v-card-title >
108108 <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 >
110110 </v-card-text >
111111 <v-card-actions >
112112 <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 >
115115 </v-card-actions >
116116 </v-card >
117117 </v-dialog >
120120<script >
121121import sidebar from ' ../components/Sidebar' ;
122122
123+ console .log (process .env .CB_ENDPOINT + process .env .APIv1 );
124+
123125export default {
124126 components: { sidebar },
125127 name: ' Control' ,
@@ -131,7 +133,7 @@ export default {
131133 .then (() => {
132134 this .ttsBtnEnabled = false ;
133135 this .ttsdialog = false ;
134- this .snackText = ' Sto pronunciando ' ;
136+ this .snackText = this . $i18n . t ( ' message.control_speaking ' ) ;
135137 this .snackbar = true ;
136138 setTimeout (() => {
137139 this .ttsBtnEnabled = true ;
@@ -143,7 +145,7 @@ export default {
143145 const axios = this .$axios ;
144146 axios .get (` ${ CBv1} /bot` , { params: { cmd: ' take_photo' } })
145147 .then (() => {
146- this .snackText = ' Foto scattata ' ;
148+ this .snackText = this . $i18n . t ( ' message.control_photo_taken ' ) ;
147149 this .snackbar = true ;
148150 this .photoBtnEnabled = false ;
149151 setTimeout (() => {
@@ -158,7 +160,7 @@ export default {
158160 .then (() => {
159161 this .ttsBtnEnabled = false ;
160162 this .ttsdialog = false ;
161- this .snackText = ' Nota in riproduzione ' ;
163+ this .snackText = this . $i18n . t ( ' message.control_sount_playing ' ) ;
162164 this .snackbar = true ;
163165 setTimeout (() => {
164166 this .ttsBtnEnabled = true ;
@@ -175,10 +177,10 @@ export default {
175177 const axios = this .$axios ;
176178 axios .get (` ${ CBv1} /bot` , { params: { cmd: ' video_rec' } })
177179 .then (() => {
178- this .snackText = ' Registrazione Avviata ' ;
180+ this .snackText = this . $i18n . t ( ' message.control_video_rec_started ' ) ;
179181 this .snackbar = true ;
180182 this .photoBtnEnabled = false ;
181- this .videoBtn .text = ' Ferma registrazione video ' ;
183+ this .videoBtn .text = this . $i18n . t ( ' message.control_video_rec_started ' ) ;
182184 this .videoBtn .icon = ' stop' ;
183185 this .videoBtn .action = ' stop' ;
184186 });
@@ -188,13 +190,13 @@ export default {
188190 const axios = this .$axios ;
189191 axios .get (` ${ CBv1} /bot` , { params: { cmd: ' video_stop' } })
190192 .then (() => {
191- this .snackText = ' Registrazione terminata ' ;
193+ this .snackText = this . $i18n . t ( ' message.control_video_rec_stopped ' ) ;
192194 this .snackbar = true ;
193195 this .videoBtn .enabled = false ;
194196 this .videoBtn .action = ' record' ;
195197 setTimeout (() => {
196198 this .videoBtn .enabled = true ;
197- this .videoBtn .text = ' Registra Video ' ;
199+ this .videoBtn .text = this . $i18n . t ( ' message.control_video_rec ' ) ;
198200 this .videoBtn .icon = ' videocam' ;
199201 this .photoBtnEnabled = true ;
200202 }, 1000 );
@@ -206,7 +208,7 @@ export default {
206208 axios .get (` ${ CB } /status` )
207209 .then ((response ) => {
208210 if (this .status == 0 && response .status ) {
209- this .snackText = ' CoderBot è tornato online ' ;
211+ this .snackText = this . $i18n . t ( ' message.coderbot_online ' ) ;
210212 this .snackbar = true ;
211213 }
212214
@@ -219,7 +221,7 @@ export default {
219221 console .log (error);
220222
221223 if (this .status ) {
222- this .snackText = ' CoderBot irrangiungibile ' ;
224+ this .snackText = this . $i18n . t ( ' message.coderbot_offline_2 ' ) ;
223225 this .snackbar = true ;
224226 }
225227 this .status = 0 ;
@@ -316,7 +318,7 @@ export default {
316318 ttsBtnEnabled: true ,
317319 photoBtnEnabled: true ,
318320 videoBtn: {
319- text: ' Registra Video ' ,
321+ text: this . $i18n . t ( ' message.control_video_rec ' ) ,
320322 icon: ' videocam' ,
321323 enabled: ' true' ,
322324 action: ' record' ,
0 commit comments