Skip to content

Commit 81c156d

Browse files
committed
i18n
1 parent 9262eb4 commit 81c156d

File tree

11 files changed

+330
-230
lines changed

11 files changed

+330
-230
lines changed

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"typeface-space-mono": "^1.1.13",
3333
"typeface-ubuntu-mono": "^1.1.13",
3434
"vue": "^2.6.14",
35+
"vue-i18n": "^8.27.0",
3536
"vue-prism-component": "^1.2.0",
3637
"vue-router": "^3.5.3",
3738
"vue-swatches": "^2.1.1",

src/assets/js/blockly/blocks.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Blockly = require('blockly');
2020
Blockly.HSV_SATURATION = 0.99;
2121
Blockly.HSV_VALUE = 0.99;
2222

23+
const sbsPrefix = '';
24+
2325
// Extensions to Blockly's language and Python generator.
2426

2527
Blockly.Blocks.CoderBotSettings = {};

src/components/Activity.vue

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<v-dialog v-model="runtimeDialog" width="500">
5454
<v-card>
5555
<v-card-title class="headline grey lighten-2" primary-title>
56-
Esecuzione
56+
{{ $t("message.running") }}
5757
</v-card-title>
5858
<template v-if="activity.exec.camera">
5959
<v-card-text v-if="runtimeDialog">
@@ -67,7 +67,7 @@
6767
<v-card-actions>
6868
<v-spacer></v-spacer>
6969
<v-btn color="primary" text @click="runtimeDialog = false; stopProgram()">
70-
Chiudi
70+
{{ $t("message.close") }}
7171
</v-btn>
7272
</v-card-actions>
7373
</v-card>
@@ -76,7 +76,7 @@
7676
<v-dialog v-model="carica" max-width="290">
7777
<v-card>
7878
<v-card-title class="headline">
79-
Lista Programmi
79+
{{ $t("message.program_list") }}
8080
</v-card-title>
8181
<v-list>
8282
<v-list-item v-for="program in programList" :key="program.el" @click="{}">
@@ -91,7 +91,7 @@
9191
<v-card-actions>
9292
<v-spacer></v-spacer>
9393
<v-btn color="green darken-1" text="text" @click="carica = false">
94-
Annulla
94+
{{ $t("message.cancel") }}
9595
</v-btn>
9696
</v-card-actions>
9797
</v-card>
@@ -100,18 +100,18 @@
100100
<v-dialog v-model="salva" max-width="430">
101101
<v-card>
102102
<v-card-title class="headline">
103-
Salva con nome
103+
{{ $t("message.save_as") }}
104104
</v-card-title>
105105
<v-card-actions>
106106
<v-spacer></v-spacer>
107107
<v-card-text>
108108
<v-text-field v-model="newProgramName" label="Nome del programma" v-if="salva" onClick="this.select()" v-on:keyup.enter="saveProgramAs(), salva = false" v-on:keyup.esc="salva = false" autofocus></v-text-field>
109109
</v-card-text>
110110
<v-btn color="red darken-1" text="text" @click="salva = false">
111-
Annulla
111+
{{ $t("message.cancel") }}
112112
</v-btn>
113113
<v-btn color="green darken-1" text="text" @click="saveProgramAs(), salva = false">
114-
Ok
114+
{{ $t("message.ok") }}
115115
</v-btn>
116116
</v-card-actions>
117117
</v-card>
@@ -121,7 +121,7 @@
121121
<v-card>
122122
<v-card-title class="headline">Error</v-card-title>
123123
<v-card-text>
124-
Il nome del programma non può essere vuoto.
124+
{{ $t("message.program_name_must_be_filled") }}
125125
</v-card-text>
126126
<v-card-actions>
127127
<v-btn color="green darken-1" text="text" @click="unvalidName = false, salva = true">
@@ -135,11 +135,11 @@
135135
<v-card>
136136
<v-card-title class="headline">Error</v-card-title>
137137
<v-card-text>
138-
Impossibile sovrascrivere un programma di default, cambiare il nome.
138+
{{ $t("message.cannot_overwrite_default_program") }}
139139
</v-card-text>
140140
<v-card-actions>
141141
<v-btn color="green darken-1" text="text" @click="CannotOverwrite = false, salva = true">
142-
Ok
142+
{{ $t("message.ok") }}
143143
</v-btn>
144144
</v-card-actions>
145145
</v-card>
@@ -148,17 +148,17 @@
148148
<v-dialog v-model="overwriteDialog" max-width="500">
149149
<v-card>
150150
<v-card-title class="headline">
151-
Sovrascrivi
151+
{{ $t("message.overwrite") }}
152152
</v-card-title>
153153
<v-card-actions>
154154
<v-card-text>
155-
Esiste già un programma con nome : "{{programName}}" vuoi sovrascriverlo?
155+
{{ $t('message.program_exists_overwrite', { programName: programName }) }}
156156
</v-card-text>
157157
<v-btn color="red darken-1" text="text" @click="overwriteDialog = false, salva = true">
158-
No
158+
{{ $t("message.no") }}
159159
</v-btn>
160160
<v-btn color="green darken-1" text="text" @click="overwrite = 1, overwriteDialog = false, saveProgram()">
161-
Si
161+
{{ $t("message.yes") }}
162162
</v-btn>
163163
</v-card-actions>
164164
</v-card>
@@ -167,17 +167,17 @@
167167
<v-dialog v-model="del" max-width="500">
168168
<v-card>
169169
<v-card-title class="headline">
170-
Cancella
170+
{{ $t("message.delete") }}
171171
</v-card-title>
172172
<v-card-actions>
173173
<v-card-text>
174-
Sei sicuro di voler cancellare: "{{newProgramName}}"?
174+
{{ $t('message.delete_sure', { programName: programName }) }}
175175
</v-card-text>
176176
<v-btn color="red darken-1" text="text" @click="del = false">
177-
No
177+
{{ $t("message.no") }}
178178
</v-btn>
179179
<v-btn color="green darken-1" text="text" @click="del = false, carica = false, deleteProgram(newProgramName)">
180-
Si
180+
{{ $t("message.yes") }}
181181
</v-btn>
182182
</v-card-actions>
183183
</v-card>
@@ -193,22 +193,22 @@
193193
<v-card-actions>
194194
<v-spacer></v-spacer>
195195
<v-btn color="green darken-1" text="text" @click="dialogCode = false">
196-
Ok
196+
{{ $t("message.ok") }}
197197
</v-btn>
198198
</v-card-actions>
199199
</v-card>
200200
</v-dialog>
201201
<!-- Status -->
202202
<v-dialog v-model="dialog" max-width="290">
203203
<v-card>
204-
<v-card-title class="headline">Stato del Coderbot</v-card-title>
204+
<v-card-title class="headline">{{ $t("message.coderbot_state") }}</v-card-title>
205205
<v-card-text>
206206
{{ statusText }}
207207
</v-card-text>
208208
<v-card-actions>
209209
<v-spacer></v-spacer>
210210
<v-btn color="green darken-1" text="text" @click="dialog = false">
211-
Ok
211+
{{ $t("message.ok") }}
212212
</v-btn>
213213
</v-card-actions>
214214
</v-card>
@@ -223,7 +223,7 @@
223223
<v-card-actions>
224224
<v-spacer></v-spacer>
225225
<v-btn color="green darken-1" text="text" @click="generalDialog = false">
226-
Ok
226+
{{ $t("message.ok") }}
227227
</v-btn>
228228
</v-card-actions>
229229
</v-card>
@@ -232,7 +232,7 @@
232232
<v-snackbar v-model="snackbar">
233233
{{ snackText }}
234234
<v-btn color="pink" text @click="snackbar = false">
235-
Chiudi
235+
{{ $t("message.close") }}
236236
</v-btn>
237237
</v-snackbar>
238238
</v-app>

src/components/Landing.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</v-app-bar>
99
<v-main>
1010
<br>
11-
<div style="font-size: 24px;"> Benvenuto in </div>
11+
<div style="font-size: 24px;"> {{ $t("message.welcome") }} </div>
1212
<div class="logo">CoderBot</div>
1313
<v-flex xs12 md8 offset-md2>
1414
<v-carousel interval="10000" hide-delimiters>
@@ -17,18 +17,18 @@
1717
</v-carousel>
1818
</v-flex>
1919
<br>
20-
<div style="font-size: 18px;"> Scegli un'azione per iniziare! </div>
20+
<div style="font-size: 18px;"> {{ $t("message.choose_action") }} </div>
2121
<v-container grid-list-md text-xs-center>
2222
<v-layout row wrap>
2323
<v-flex xs12 md6 offset-md3>
2424
<v-btn text large color="primary" to="program">
25-
<v-icon left dark>flip_to_front</v-icon>Programma
25+
<v-icon left dark>flip_to_front</v-icon>{{ $t("message.program") }}
2626
</v-btn> <br>
2727
<v-btn text large color="primary" target="_blank" href="/docs">
28-
<v-icon left dark>help</v-icon>Documentazione
28+
<v-icon left dark>help</v-icon>{{ $t("message.docs") }}
2929
</v-btn> <br>
3030
<v-btn text large color="primary" to="control">
31-
<v-icon left dark>games</v-icon>Controlla
31+
<v-icon left dark>games</v-icon>{{ $t("message.control") }}
3232
</v-btn> <br>
3333
<!--
3434
<v-btn text large color="primary">
@@ -39,7 +39,7 @@
3939
</v-btn> <br>
4040
-->
4141
<v-btn text large color="primary" to="settings">
42-
<v-icon left dark>settings</v-icon>Impostazioni
42+
<v-icon left dark>settings</v-icon>{{ $t("message.settings") }}
4343
</v-btn> <br>
4444
<!--
4545
<v-btn text large color="primary">

0 commit comments

Comments
 (0)