From 86b5d7ac9541f0ef4fe17f84128db323dff3d95b Mon Sep 17 00:00:00 2001 From: Shane Ringrose Date: Fri, 12 Jun 2026 05:34:20 +1200 Subject: [PATCH] Element editor Save As: label the field as a file name, not element name (#469) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Save As 'location' dialog used a QFileNameEdit (accepts only [0-9a-z_-.]) but labelled it 'New element name', which is confusing — QET also has a separate, translatable display name shown in the collection. Users reasonably tried to type a display name (spaces, capitals) and it was rejected. Rename the placeholder to 'Element file name' and add a tooltip noting the accepted characters and that the display name is edited separately in the element properties. Updates the English translation; other languages fall back until re-translated. Fixes #469. --- lang/qet_en.ts | 15 ++++++++++++--- sources/elementdialog.cpp | 12 +++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/lang/qet_en.ts b/lang/qet_en.ts index 79e43bb6c..5b73296b4 100644 --- a/lang/qet_en.ts +++ b/lang/qet_en.ts @@ -1833,9 +1833,18 @@ Note: these options DO NOT allow or block auto numberings, only their update pol Name of the new template - - Nom du nouvel élément - New element name + + Nom de fichier de l'élément + placeholder: the element's file name, not its display name + Element file name + + + + Nom de fichier de l'élément : chiffres, minuscules, « - », « _ » et « . » uniquement. +Le nom affiché de l'élément se modifie séparément dans les propriétés de l'élément. + tooltip for the element file-name field + The element's file name: digits, lowercase letters, '-', '_' and '.' only. +The element's display name is edited separately in the element properties. diff --git a/sources/elementdialog.cpp b/sources/elementdialog.cpp index 155a64bac..2cc2e6c34 100644 --- a/sources/elementdialog.cpp +++ b/sources/elementdialog.cpp @@ -124,7 +124,17 @@ void ElementDialog::setUpWidget() } else if (m_mode == SaveTemplate) { m_text_field->setPlaceholderText(tr("Nom du nouveau template")); } else { - m_text_field->setPlaceholderText(tr("Nom du nouvel élément")); + // This is the element's file name, not its display name: the field + // only accepts file-name characters (QFileNameEdit). The visible + // element name is edited separately in the element properties. + m_text_field->setPlaceholderText( + tr("Nom de fichier de l'élément", + "placeholder: the element's file name, not its display name")); + m_text_field->setToolTip( + tr("Nom de fichier de l'élément : chiffres, minuscules, « - », " + "« _ » et « . » uniquement.\nLe nom affiché de l'élément se " + "modifie séparément dans les propriétés de l'élément.", + "tooltip for the element file-name field")); } layout->addWidget(m_text_field);