Skip to content

Commit c75292f

Browse files
committed
translation for load cell configuration
1 parent 7806b6c commit c75292f

File tree

3 files changed

+85
-24
lines changed

3 files changed

+85
-24
lines changed

frontend/src/i18n/de/index.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,38 @@ export default {
374374
headline: 'Darstellung'
375375
}
376376
},
377+
load_cell_mgmt: {
378+
headline: 'Wägezelle',
379+
hardware_settings: {
380+
headline: 'Hardwareeinstellungen',
381+
enable_btn_label: 'Wägezelle aktivieren',
382+
clk_pin_label: 'CLK-Pin',
383+
dt_pin_label: 'DT-Pin',
384+
save_btn_label: 'Speichern',
385+
save_and_return_btn_label: 'Speichern & Zurück'
386+
},
387+
calibration: {
388+
headline: 'Kalibrierung',
389+
next_btn_label: 'Weiter',
390+
zero_point: {
391+
headline: 'Nullpunkt-Kalibrierung (Ohne Gewicht)',
392+
text: 'Stellen Sie sicher, dass der Ausgabebereich leer ist. Drücken Sie die Weiter-Taste, um die Nullpunktmessung der Wägezelle zu erfassen.'
393+
},
394+
known_weight: {
395+
headline: 'Kalibrierung mit bekanntem Gewicht',
396+
text: 'Platzieren Sie ein bekanntes Gewicht im Ausgabebereich. Geben Sie den Wert des Gewichts in Gramm in das Eingabefeld ein. Drücken Sie die Weiter-Taste, um die Wägezelle auf das bekannte Gewicht kalibrieren.',
397+
ref_weight_field_label: 'Referenzgewicht (in g)'
398+
},
399+
validation: {
400+
headline: 'Validierungstest',
401+
text: 'Platzieren Sie ein beliebiges Gewicht im Abgabebereich. Drücken Sie die Messen-Taste, um die Wägezelle auszulesen und ausgeben zu lassen.',
402+
measure_btn_label: 'Messen',
403+
measure_field_label: 'Messung (in g)',
404+
finish_and_return_btn_label: 'Beenden & Zurück',
405+
start_over_btn_label: 'Neustart'
406+
}
407+
}
408+
},
377409
simple_collections: {
378410
headline: 'Listen',
379411
no_collections_msg: 'Keine Listen gefunden!'

frontend/src/i18n/en_US/index.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,38 @@ export default {
379379
headline: 'Appearance'
380380
}
381381
},
382+
load_cell_mgmt: {
383+
headline: 'Load cell',
384+
hardware_settings: {
385+
headline: 'Load cell settings',
386+
enable_btn_label: 'Enable load cell',
387+
clk_pin_label: 'CLK-Pin',
388+
dt_pin_label: 'DT-Pin',
389+
save_btn_label: 'Save',
390+
save_and_return_btn_label: 'Save & Return'
391+
},
392+
calibration: {
393+
headline: 'Calibration',
394+
next_btn_label: 'Next',
395+
zero_point: {
396+
headline: 'Zero-Point Calibration (No Weight)',
397+
text: 'Ensure the dispensing area is empty. Press the Next button to record the load cell\'s zero-point measurement.'
398+
},
399+
known_weight: {
400+
headline: 'Known Weights Calibration',
401+
text: 'Place a known weight on the dispensing area. Enter the weight value in grams using the input field. Press the Next button to record the load cell\'s response to the known weight.',
402+
ref_weight_field_label: 'Reference weight (in g)'
403+
},
404+
validation: {
405+
headline: 'Validation Test',
406+
text: 'Place a random weight on the dispensing area. Press the Measure button to read the load cell\'s response to the known weight and compare it with the response.',
407+
measure_btn_label: 'Measure',
408+
measure_field_label: 'Measurement',
409+
finish_and_return_btn_label: 'Finish & Return',
410+
start_over_btn_label: 'Start over'
411+
}
412+
}
413+
},
382414
simple_collections: {
383415
headline: 'Collections',
384416
no_collections_msg: 'No collections found!'

frontend/src/pages/LoadCellSettings.vue

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<template>
22
<q-page class="page-content q-gutter-y-lg" padding>
3-
<h5>Load cell</h5>
3+
<h5>{{ $t('page.load_cell_mgmt.headline') }}</h5>
44
<q-card
55
class="q-pa-md bg-card-body text-card-body"
66
flat
77
bordered
88
>
99
<div class="row">
10-
<p class="text-weight-medium q-pb-md">Load cell settings</p>
10+
<p class="text-weight-medium q-pb-md">{{ $t('page.load_cell_mgmt.hardware_settings.headline') }}</p>
1111
</div>
1212
<q-form class="q-col-gutter-md">
1313
<div class="row">
@@ -17,7 +17,7 @@
1717
bordered
1818
>
1919
<q-toggle
20-
label="Enable load cell"
20+
:label="$t('page.load_cell_mgmt.hardware_settings.enable_btn_label')"
2121
color="green"
2222
v-model:model-value="v.form.enable.$model"
2323
/>
@@ -31,7 +31,7 @@
3131
bordered>
3232
<q-card-section>
3333
<div class="text-subtitle2">
34-
CLK-Pin
34+
{{ $t('page.load_cell_mgmt.hardware_settings.clk_pin_label') }}
3535
</div>
3636
</q-card-section>
3737
<q-separator/>
@@ -55,7 +55,7 @@
5555
bordered>
5656
<q-card-section>
5757
<div class="text-subtitle2">
58-
DT-Pin
58+
{{ $t('page.load_cell_mgmt.hardware_settings.dt_pin_label') }}
5959
</div>
6060
</q-card-section>
6161
<q-separator/>
@@ -75,12 +75,12 @@
7575
<div class="row justify-end">
7676
<div class="q-gutter-sm">
7777
<q-btn
78-
label="Save"
78+
:label="$t('page.load_cell_mgmt.hardware_settings.save_btn_label')"
7979
color="green"
8080
@click="onClickSave()"
8181
/>
8282
<q-btn
83-
label="Save & Return"
83+
:label="$t('page.load_cell_mgmt.hardware_settings.save_and_return_btn_label')"
8484
color="green"
8585
@click="onClickSave(true)"
8686
/>
@@ -95,7 +95,7 @@
9595
bordered
9696
>
9797
<div class="row">
98-
<p class="text-weight-medium q-pb-md">Calibration</p>
98+
<p class="text-weight-medium q-pb-md">{{ $t('page.load_cell_mgmt.calibration.headline') }}</p>
9999
</div>
100100
<div class="row">
101101
<q-card
@@ -111,38 +111,36 @@
111111
:dark="color.cardItemGroupDark"
112112
>
113113
<q-step
114-
title="Zero-Point Calibration (No Weight)"
114+
:title="$t('page.load_cell_mgmt.calibration.zero_point.headline')"
115115
:disable="!currentLoadCell.enable"
116116
:name="1"
117117
:done="calibration.step > 1 || currentLoadCell.calibrated"
118118
:header-nav="calibration.step > 1 || currentLoadCell.calibrated"
119119
>
120-
<p>Ensure the dispensing area is empty. Press the Next button to record the load cell's zero-point measurement.</p>
120+
<p>{{ $t('page.load_cell_mgmt.calibration.zero_point.text') }}</p>
121121
<q-stepper-navigation>
122122
<q-btn
123123
@click="onClickCalibrateZero()"
124124
color="primary"
125-
label="Next"
125+
:label="$t('page.load_cell_mgmt.calibration.next_btn_label')"
126126
:disable="!currentLoadCell.enable"
127127
/>
128128
</q-stepper-navigation>
129129
</q-step>
130130
<q-step
131-
title="Known Weight Calibration"
131+
:title="$t('page.load_cell_mgmt.calibration.known_weight.headline')"
132132
:name="2"
133133
:done="calibration.step > 2 || currentLoadCell.calibrated"
134134
:header-nav="currentLoadCell.calibrated"
135135
:disable="!currentLoadCell.enable"
136136
>
137137
<p>
138-
Place a known weight on the dispensing area.
139-
Enter the weight value in grams using the input field.
140-
Press the Next button to record the load cell's response to the known weight.
138+
{{ $t('page.load_cell_mgmt.calibration.known_weight.text') }}
141139
</p>
142140
<q-input
143141
v-model:model-value.number="calibration.referenceWeight"
144142
:disable="!currentLoadCell.enable"
145-
label="Reference weight (in g)"
143+
:label="$t('page.load_cell_mgmt.calibration.known_weight.ref_weight_field_label')"
146144
type="number"
147145
filled
148146
:dark="color.cardItemGroupDark"
@@ -153,20 +151,19 @@
153151
:disable="calibration.referenceWeight < 1 || calibration.referenceWeight == null || !currentLoadCell.enable"
154152
@click="onClickCalibrateReference(calibration.referenceWeight)"
155153
color="primary"
156-
label="Next"
154+
:label="$t('page.load_cell_mgmt.calibration.next_btn_label')"
157155
/>
158156
</q-stepper-navigation>
159157
</q-step>
160158
<q-step
161-
title="Validation Test"
159+
:title="$t('page.load_cell_mgmt.calibration.validation.headline')"
162160
:name="3"
163161
:disable="!currentLoadCell.enable"
164162
:done="currentLoadCell.calibrated"
165163
:header-nav="currentLoadCell.calibrated"
166164
>
167165
<p>
168-
Place a random weight on the dispensing area.
169-
Press the Measure button to read the load cell's response to the known weight and compare it with the response.
166+
{{ $t('page.load_cell_mgmt.calibration.validation.text') }}
170167
</p>
171168
<q-input
172169
:model-value="formattedMeasurementWeight"
@@ -177,12 +174,12 @@
177174
hide-bottom-space
178175
readonly
179176
borderless
180-
label="Measurement"
177+
:label="$t('page.load_cell_mgmt.calibration.validation.measure_field_label')"
181178
:dark="color.cardItemGroupDark"
182179
>
183180
<template v-slot:append>
184181
<q-btn
185-
label="Measure"
182+
:label="$t('page.load_cell_mgmt.calibration.validation.measure_btn_label')"
186183
color="primary"
187184
outline
188185
no-caps
@@ -198,14 +195,14 @@
198195
@click="$router.back()"
199196
:disable="!currentLoadCell.enable"
200197
color="positive"
201-
label="Finish & Return"
198+
:label="$t('page.load_cell_mgmt.calibration.validation.finish_and_return_btn_label')"
202199
/>
203200
<q-btn
204201
@click="calibration.step = 1"
205202
:disable="!currentLoadCell.enable"
206203
color="negative"
207204
:icon="mdiReload"
208-
label="Start over"
205+
:label="$t('page.load_cell_mgmt.calibration.validation.start_over_btn_label')"
209206
/>
210207
</q-stepper-navigation>
211208
</q-step>

0 commit comments

Comments
 (0)