|
1 | | -<template> |
| 1 | +<template> |
2 | 2 | <v-dialog :model-value="modelValue" max-width="560px" @update:model-value="emit('update:modelValue', $event)"> |
3 | 3 | <v-card class="rounded-lg" :style="interfaceStore.globalGlassMenuStyles"> |
4 | 4 | <v-card-title class="text-h6 font-weight-bold py-4 text-center"> |
5 | | - {{ editMode ? 'Edit Variable' : 'New Variable' }} |
| 5 | + {{ |
| 6 | + editMode |
| 7 | + ? $t('components.DataLakeVariableDialog.editVariable') |
| 8 | + : $t('components.DataLakeVariableDialog.newVariable') |
| 9 | + }} |
6 | 10 | </v-card-title> |
7 | 11 | <v-card-text class="px-8"> |
8 | 12 | <div class="flex flex-col gap-4"> |
9 | 13 | <div class="flex items-center gap-2"> |
10 | 14 | <v-text-field |
11 | 15 | v-model="variable.id" |
12 | | - label="Variable ID" |
| 16 | + :label="$t('components.DataLakeVariableDialog.variableId')" |
13 | 17 | variant="outlined" |
14 | 18 | :disabled="editMode || !isManualIdEnabled" |
15 | 19 | :rules="[(v) => !!v || 'ID is required']" |
|
29 | 33 | </div> |
30 | 34 | <v-text-field |
31 | 35 | v-model="variable.name" |
32 | | - label="Variable Name" |
| 36 | + :label="$t('components.DataLakeVariableDialog.variableName')" |
33 | 37 | variant="outlined" |
34 | 38 | :rules="[(v) => !!v || 'Name is required']" |
35 | 39 | density="compact" |
36 | 40 | hide-details |
37 | 41 | /> |
38 | 42 | <div class="flex items-center gap-2"> |
39 | | - <label class="text-sm">Variable Type: </label> |
| 43 | + <label class="text-sm">{{ $t('components.DataLakeVariableDialog.variableType') }}: </label> |
40 | 44 | <v-radio-group |
41 | 45 | v-model="variable.type" |
42 | 46 | :rules="[(v) => !!v || 'Type is required']" |
43 | 47 | density="compact" |
44 | 48 | hide-details |
45 | 49 | inline |
46 | 50 | > |
47 | | - <v-radio class="ml-3 mr-4" label="String" value="string" /> |
48 | | - <v-radio class="ml-3 mr-4" label="Number" value="number" /> |
49 | | - <v-radio class="ml-3 mr-4" label="Boolean" value="boolean" /> |
| 51 | + <v-radio class="ml-3 mr-4" :label="$t('components.DataLakeVariableDialog.types.string')" value="string" /> |
| 52 | + <v-radio class="ml-3 mr-4" :label="$t('components.DataLakeVariableDialog.types.number')" value="number" /> |
| 53 | + <v-radio |
| 54 | + class="ml-3 mr-4" |
| 55 | + :label="$t('components.DataLakeVariableDialog.types.boolean')" |
| 56 | + value="boolean" |
| 57 | + /> |
50 | 58 | </v-radio-group> |
51 | 59 | </div> |
52 | 60 | <v-text-field |
|
60 | 68 | /> |
61 | 69 | <v-textarea |
62 | 70 | v-model="variable.description" |
63 | | - label="Description" |
| 71 | + :label="$t('common.description')" |
64 | 72 | variant="outlined" |
65 | | - placeholder="Optional description of what this variable is used for" |
| 73 | + :placeholder="$t('components.DataLakeVariableDialog.descriptionPlaceholder')" |
66 | 74 | rows="1" |
67 | 75 | density="compact" |
68 | 76 | hide-details |
69 | 77 | /> |
70 | 78 | <v-checkbox |
71 | 79 | v-model="variable.persistent" |
72 | | - label="Persist variable between boots" |
| 80 | + :label="$t('components.DataLakeVariableDialog.persistBetweenBoots')" |
73 | 81 | hide-details |
74 | 82 | class="-mb-4 -mt-2" |
75 | 83 | /> |
76 | 84 | <v-checkbox |
77 | 85 | v-model="variable.persistValue" |
78 | 86 | class="-my-4" |
79 | 87 | hide-details |
80 | | - label="Save variable value between boots" |
| 88 | + :label="$t('components.DataLakeVariableDialog.saveValueBetweenBoots')" |
81 | 89 | :disabled="!variable.persistent" |
82 | 90 | /> |
83 | 91 | </div> |
84 | 92 | </v-card-text> |
85 | 93 | <v-divider class="mx-10" /> |
86 | 94 | <v-card-actions> |
87 | 95 | <div class="flex justify-between items-center pa-2 w-full h-full"> |
88 | | - <v-btn color="white" variant="text" @click="closeDialog">Cancel</v-btn> |
89 | | - <v-btn color="white" :disabled="!isValid" @click="saveVariable">Save</v-btn> |
| 96 | + <v-btn color="white" variant="text" @click="closeDialog">{{ $t('common.cancel') }}</v-btn> |
| 97 | + <v-btn color="white" :disabled="!isValid" @click="saveVariable">{{ $t('common.save') }}</v-btn> |
90 | 98 | </div> |
91 | 99 | </v-card-actions> |
92 | 100 | </v-card> |
|
0 commit comments