Skip to content

Commit d22fb2d

Browse files
dvbthiendvbthien
and
dvbthien
authored
fix(web): enhance face tagging confirmation and fix #18605 (#18610)
* Fix: enhance face tagging confirmation and fix double label in checkboxes * fix code formatting --------- Co-authored-by: dvbthien <[email protected]>
1 parent c4df96b commit d22fb2d

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

i18n/en.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,9 @@
301301
"transcoding_encoding_options": "Encoding Options",
302302
"transcoding_encoding_options_description": "Set codecs, resolution, quality and other options for the encoded videos",
303303
"transcoding_hardware_acceleration": "Hardware Acceleration",
304-
"transcoding_hardware_acceleration_description": "Experimental; much faster, but will have lower quality at the same bitrate",
304+
"transcoding_hardware_acceleration_description": "Experimental: faster transcoding but may reduce quality at same bitrate",
305305
"transcoding_hardware_decoding": "Hardware decoding",
306306
"transcoding_hardware_decoding_setting_description": "Enables end-to-end acceleration instead of only accelerating encoding. May not work on all videos.",
307-
"transcoding_hevc_codec": "HEVC codec",
308307
"transcoding_max_b_frames": "Maximum B-frames",
309308
"transcoding_max_b_frames_description": "Higher values improve compression efficiency, but slow down encoding. May not be compatible with hardware acceleration on older devices. 0 disables B-frames, while -1 sets this value automatically.",
310309
"transcoding_max_bitrate": "Maximum bitrate",
@@ -662,6 +661,8 @@
662661
"confirm_keep_this_delete_others": "All other assets in the stack will be deleted except for this asset. Are you sure you want to continue?",
663662
"confirm_new_pin_code": "Confirm new PIN code",
664663
"confirm_password": "Confirm password",
664+
"confirm_tag_face": "Do you want to tag this face as {name}?",
665+
"confirm_tag_face_unnamed": "Do you want to tag this face?",
665666
"connected_to": "Connected to",
666667
"contain": "Contain",
667668
"context": "Context",
@@ -840,6 +841,7 @@
840841
"error_delete_face": "Error deleting face from asset",
841842
"error_loading_image": "Error loading image",
842843
"error_saving_image": "Error: {error}",
844+
"error_tag_face_bounding_box": "Error tagging face - cannot get bounding box coordinates",
843845
"error_title": "Error - Something went wrong",
844846
"errors": {
845847
"cannot_navigate_next_asset": "Cannot navigate to the next asset",
@@ -978,7 +980,6 @@
978980
"exif_bottom_sheet_location": "LOCATION",
979981
"exif_bottom_sheet_people": "PEOPLE",
980982
"exif_bottom_sheet_person_add_person": "Add name",
981-
"exif_bottom_sheet_person_age": "Age {age}",
982983
"exif_bottom_sheet_person_age_months": "Age {months} months",
983984
"exif_bottom_sheet_person_age_year_months": "Age 1 year, {months} months",
984985
"exif_bottom_sheet_person_age_years": "Age {years}",

web/src/lib/components/asset-viewer/face-editor/face-editor.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,17 @@
279279
const data = getFaceCroppedCoordinates();
280280
if (!data) {
281281
notificationController.show({
282-
message: 'Error tagging face - cannot get bounding box coordinates',
282+
message: $t('error_tag_face_bounding_box'),
283283
});
284284
return;
285285
}
286286
287-
const isConfirmed = await modalManager.showDialog({ prompt: `Do you want to tag this face as ${person.name}?` });
287+
const isConfirmed = await modalManager.showDialog({
288+
prompt: person.name
289+
? $t('confirm_tag_face', { values: { name: person.name } })
290+
: $t('confirm_tag_face_unnamed'),
291+
});
292+
288293
if (!isConfirmed) {
289294
return;
290295
}

web/src/lib/components/shared-components/settings/setting-checkboxes.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@
6060
{disabled}
6161
onCheckedChange={() => handleCheckboxChange(option.value)}
6262
/>
63-
<Label label={option.text} for="{option.value}-checkbox">
64-
{option.text}
65-
</Label>
63+
<Label label={option.text} for="{option.value}-checkbox" />
6664
</div>
6765
{/each}
6866
</div>

0 commit comments

Comments
 (0)