shift-shell/containments/homescreens/folio/qml/private/ConfirmDeleteFolderDialogLoader.qml
Devin Lin c76e19037c Ensure i18n is used with double quotes and add CI check
Apparently i18n doesn't support string literals with single quotes as
parameters. Fix occurrences of this and add a CI check to ensure this
won't happen in the future.
2025-08-11 18:19:41 -04:00

41 lines
978 B
QML

// SPDX-FileCopyrightText: 2024 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: LGPL-2.0-or-later
import QtQuick
import QtQuick.Controls as QQC2
import QtQuick.Window
import QtQuick.Layouts
import org.kde.plasma.components 3.0 as PC3
import org.kde.kirigami as Kirigami
Loader {
id: root
active: false
// we expect the parent to be set to the homescreen, otherwise the dialog opens with no size
anchors.fill: parent
signal accepted()
function open() {
root.active = true;
root.item.open();
}
function close() {
if (root.item) {
root.item.close();
}
}
sourceComponent: Kirigami.PromptDialog {
id: menu
title: i18n("Confirm Folder Deletion")
subtitle: i18n("Are you sure you want to delete this folder?")
standardButtons: Kirigami.Dialog.Yes | Kirigami.Dialog.Cancel
onAccepted: root.accepted()
onClosed: root.active = false
}
}