Skip to content

Commit d011ed1

Browse files
tamlokCopilot
andcommitted
Unify Settings/dialog label casing to sentence case
Convert content strings (form/body labels, checkbox/radio labels, combobox items, tooltips, placeholders) in the new-architecture Settings pages and *Dialog2 dialogs from Title Case to sentence case. Buttons, window/dialog titles, and settings page/section titles remain Title Case. Proper nouns, acronyms, key names, and Personal Access Token/Remote URL keep their casing. Update dialogs/AGENTS.md convention table accordingly and mark the capitalization cleanup backlog as completed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3061a5f commit d011ed1

16 files changed

Lines changed: 129 additions & 145 deletions

src/widgets/dialogs/AGENTS.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ VNote dialogs use a mixed capitalization scheme. The rules below are the project
1616
| **Window / dialog titles** (`setWindowTitle`, `QFileDialog` title) | **Title Case** | `"Open Notebook"`, `"Select Local Root Folder"`, `"Manage Notebooks"` |
1717
| **Tooltips** | sentence form, **end with a period** | `"Remote git URL. Only HTTPS and file:// schemes are supported."` |
1818
| **Banner / info-text messages** (`setInformationText`) | sentence form, **end with a period** | `"Local root folder must be empty (contains 3 item(s))."`, `"Cloning..."` |
19-
| **Radio button / checkbox labels** | **Title Case** | `"Local Folder"`, `"Remote URL"` |
19+
| **Radio button / checkbox labels** | **sentence case** | `"Local folder"`, `"Keep both"`, `"Expand Tab"` |
20+
| **ComboBox item labels** | **sentence case** (first word only) | `"Bundled notebook"`, `"No wrap"`, `"Web service"`, `"Local JAR"` |
2021

2122
### Why these rules
2223

@@ -63,25 +64,19 @@ Use this pattern when the dialog has both keystroke-driven validation (noisy) an
6364
| `NewQuickAccessItemDialog` | (inline) | Add a quick-access entry (used inside Settings) |
6465
| `SnippetInfoWidget2` / snippet dialogs | `SnippetController` | Snippet metadata |
6566

66-
## Known Inconsistencies (Cleanup Backlog)
67+
## Capitalization Cleanup (Completed)
6768

68-
These labels violate the sentence-case convention and SHOULD be normalized in a focused follow-up plan. Listed here so a future contributor doesn't accidentally copy the wrong style:
69+
The sentence-case sweep across the new-architecture Settings pages
70+
(`settings/`, `settingswidget.cpp`) and the `*Dialog2` dialogs has been completed.
71+
Content strings — form labels, checkbox/radio labels, combobox items, group/section
72+
body labels, tooltips, and placeholders — use sentence case. Buttons, window/dialog
73+
titles, settings page titles, and `SettingsPageHelper::addSection` card titles remain
74+
Title Case. Proper nouns / product names (PlantUml, MathJax, Graphviz, VNote, Vi, Git),
75+
initialisms (URL, PAT, JSON, JAR, HTML, PDF), keyboard key names (Tab, Ctrl), and the
76+
established terms `Personal Access Token` and `Remote URL` keep their canonical casing.
6977

70-
| File | Line | Current | Target |
71-
|---|---|---|---|
72-
| `newnotebookdialog2.cpp` | 72 | `"Root Folder:"` | `"Root folder:"` |
73-
| `newnotebookdialog2.cpp` | 107 | `"Sync Method:"` | `"Sync method:"` |
74-
| `newnotebookdialog2.cpp` | 169 | `"Assets Folder:"` | `"Assets folder:"` |
75-
| `managenotebooksdialog2.cpp` | 89 | `"Root Folder:"` | `"Root folder:"` |
76-
| `openvnote3notebookdialog2.cpp` | 35 | `"Source Folder:"` | `"Source folder:"` |
77-
| `openvnote3notebookdialog2.cpp` | 41 | `"Destination Folder:"` | `"Destination folder:"` |
78-
| `openvnote3notebookdialog2.cpp` | 43 | `"Notebook Name:"` | `"Notebook name:"` |
79-
| `notebooksyncinfodialog2.cpp` | 220 | `"Last Sync:"` | `"Last sync:"` |
80-
| `notebooksyncinfodialog2.cpp` | 226 | `"Current State:"` | `"Current state:"` |
81-
82-
`"Personal Access Token:"` and `"Remote URL:"` are NOT in this list — they are correctly preserved per the proper-noun / initialism rules above.
83-
84-
The cleanup should also update each dialog's translation `.ts` entries (`translations/`) and re-run `lupdate`. A single PR is fine because each change is a one-line label edit with no behavior change.
78+
Translation `.ts` files in `src/data/core/translations/` were intentionally left
79+
untouched; a future `lupdate` pass will refresh the source entries.
8580

8681
## Related Modules
8782

src/widgets/dialogs/exportdialog2.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,30 +93,30 @@ QString sourceText(ExportSource p_source, const ExportContext &p_context) {
9393
switch (p_source) {
9494
case ExportSource::CurrentBuffer:
9595
if (!p_context.bufferName.isEmpty()) {
96-
return ExportDialog2::tr("Current Buffer (%1)").arg(p_context.bufferName);
96+
return ExportDialog2::tr("Current buffer (%1)").arg(p_context.bufferName);
9797
}
98-
return ExportDialog2::tr("Current Buffer");
98+
return ExportDialog2::tr("Current buffer");
9999

100100
case ExportSource::CurrentNote:
101101
if (p_context.currentNodeId.isValid()) {
102-
return ExportDialog2::tr("Current Note (%1)").arg(p_context.currentNodeId.relativePath);
102+
return ExportDialog2::tr("Current note (%1)").arg(p_context.currentNodeId.relativePath);
103103
}
104-
return ExportDialog2::tr("Current Note");
104+
return ExportDialog2::tr("Current note");
105105

106106
case ExportSource::CurrentFolder:
107107
if (p_context.currentFolderId.isValid()) {
108-
return ExportDialog2::tr("Current Folder (%1)").arg(p_context.currentFolderId.relativePath);
108+
return ExportDialog2::tr("Current folder (%1)").arg(p_context.currentFolderId.relativePath);
109109
}
110-
return ExportDialog2::tr("Current Folder");
110+
return ExportDialog2::tr("Current folder");
111111

112112
case ExportSource::CurrentNotebook:
113113
if (!p_context.notebookId.isEmpty()) {
114-
return ExportDialog2::tr("Current Notebook (%1)").arg(p_context.notebookId);
114+
return ExportDialog2::tr("Current notebook (%1)").arg(p_context.notebookId);
115115
}
116-
return ExportDialog2::tr("Current Notebook");
116+
return ExportDialog2::tr("Current notebook");
117117
}
118118

119-
return ExportDialog2::tr("Unknown Source");
119+
return ExportDialog2::tr("Unknown source");
120120
}
121121

122122
bool sourceAvailable(ExportSource p_source, const ExportContext &p_context) {
@@ -273,8 +273,8 @@ void ExportDialog2::setupUI() {
273273
&QStackedLayout::setCurrentIndex);
274274
connect(m_formatCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
275275
[this](int p_idx) {
276-
const QString titles[] = {tr("Markdown Options"), tr("HTML Options"), tr("PDF Options"),
277-
tr("Custom Options")};
276+
const QString titles[] = {tr("Markdown options"), tr("HTML options"), tr("PDF options"),
277+
tr("Custom options")};
278278
if (p_idx >= 0 && p_idx < 4) {
279279
m_formatGroupBox->setTitle(titles[p_idx]);
280280
}
@@ -373,7 +373,7 @@ void ExportDialog2::setupUI() {
373373
m_wkhtmltopdfArgsEdit = WidgetsFactory::createLineEdit(page);
374374
layout->addRow(tr("Wkhtmltopdf arguments:"), m_wkhtmltopdfArgsEdit);
375375

376-
m_pdfAllInOneCheck = WidgetsFactory::createCheckBox(tr("All-in-One"), page);
376+
m_pdfAllInOneCheck = WidgetsFactory::createCheckBox(tr("All-in-one"), page);
377377
m_pdfAllInOneCheck->setToolTip(tr("Export all source files into one file"));
378378
layout->addRow(m_pdfAllInOneCheck);
379379

@@ -412,7 +412,7 @@ void ExportDialog2::setupUI() {
412412
m_useHtmlInputCheck = WidgetsFactory::createCheckBox(tr("Use HTML input"), page);
413413
layout->addRow(m_useHtmlInputCheck);
414414

415-
m_customAllInOneCheck = WidgetsFactory::createCheckBox(tr("All-in-One"), page);
415+
m_customAllInOneCheck = WidgetsFactory::createCheckBox(tr("All-in-one"), page);
416416
m_customAllInOneCheck->setToolTip(tr("Export all source files into one file"));
417417
layout->addRow(m_customAllInOneCheck);
418418

@@ -429,7 +429,7 @@ void ExportDialog2::setupUI() {
429429
m_stackedLayout->addWidget(page);
430430
}
431431

432-
m_formatGroupBox = new QGroupBox(tr("Markdown Options"), mainWidget);
432+
m_formatGroupBox = new QGroupBox(tr("Markdown options"), mainWidget);
433433
auto *groupBoxLayout = new QVBoxLayout(m_formatGroupBox);
434434
groupBoxLayout->setContentsMargins(0, 0, 0, 0);
435435
groupBoxLayout->addWidget(stackedScrollWidget);

src/widgets/dialogs/managenotebooksdialog2.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void ManageNotebooksDialog2::setupUI() {
8686
&ManageNotebooksDialog2::openRootFolderInExplorer);
8787

8888
rootFolderWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
89-
formLayout->addRow(tr("Root Folder:"), rootFolderWidget);
89+
formLayout->addRow(tr("Root folder:"), rootFolderWidget);
9090

9191
// Notebook type (read-only label).
9292
m_typeLabel = new QLabel(infoWidget);
@@ -104,8 +104,7 @@ void ManageNotebooksDialog2::setupUI() {
104104
m_closeBtn = new QPushButton(tr("Close Notebook"), infoWidget);
105105
m_closeBtn->setEnabled(false);
106106
btnLayout->addWidget(m_closeBtn);
107-
connect(m_closeBtn, &QPushButton::clicked, this,
108-
&ManageNotebooksDialog2::closeSelectedNotebook);
107+
connect(m_closeBtn, &QPushButton::clicked, this, &ManageNotebooksDialog2::closeSelectedNotebook);
109108

110109
setDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Reset |
111110
QDialogButtonBox::Cancel);
@@ -272,9 +271,7 @@ void ManageNotebooksDialog2::acceptedButtonClicked() {
272271
}
273272
}
274273

275-
void ManageNotebooksDialog2::resetButtonClicked() {
276-
selectNotebook(m_currentNotebookId);
277-
}
274+
void ManageNotebooksDialog2::resetButtonClicked() { selectNotebook(m_currentNotebookId); }
278275

279276
void ManageNotebooksDialog2::appliedButtonClicked() {
280277
if (saveChangesToNotebook()) {

src/widgets/dialogs/marknodedialog2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,20 @@ void MarkNodeDialog2::setupUI() {
5858
auto *layout = new QVBoxLayout(mainWidget);
5959

6060
// Text color section.
61-
auto *textSection = buildColorSection(tr("Text Color"), m_textColor, m_textSwatches,
61+
auto *textSection = buildColorSection(tr("Text color"), m_textColor, m_textSwatches,
6262
c_swatchCount, m_textColorIndicator, m_textColor);
6363
layout->addWidget(textSection);
6464

6565
// Background color section.
66-
auto *bgSection = buildColorSection(tr("Background Color"), m_bgColor, m_bgSwatches,
66+
auto *bgSection = buildColorSection(tr("Background color"), m_bgColor, m_bgSwatches,
6767
c_swatchCount, m_bgColorIndicator, m_bgColor);
6868
layout->addWidget(bgSection);
6969

7070
// Preview section.
7171
auto *previewGroup = new QLabel(tr("Preview"), mainWidget);
7272
layout->addWidget(previewGroup);
7373

74-
m_previewLabel = new QLabel(tr("Sample Text"), mainWidget);
74+
m_previewLabel = new QLabel(tr("Sample text"), mainWidget);
7575
m_previewLabel->setAlignment(Qt::AlignCenter);
7676
m_previewLabel->setMinimumHeight(48);
7777
m_previewLabel->setAutoFillBackground(true);

src/widgets/dialogs/newnotebookdialog2.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ void NewNotebookDialog2::setupUI() {
6969
m_rootFolderInput->setPlaceholderText(tr("Select a folder as notebook root"));
7070
connect(m_rootFolderInput, &LocationInputWithBrowseButton::textChanged, this,
7171
&NewNotebookDialog2::handleRootFolderPathChanged);
72-
layout->addRow(tr("Root Folder:"), m_rootFolderInput);
72+
layout->addRow(tr("Root folder:"), m_rootFolderInput);
7373

7474
// Notebook type combo.
7575
m_typeCombo = WidgetsFactory::createComboBox(mainWidget);
76-
m_typeCombo->addItem(tr("Bundled Notebook"), static_cast<int>(NotebookType::Bundled));
77-
m_typeCombo->addItem(tr("Raw Notebook"), static_cast<int>(NotebookType::Raw));
78-
m_typeCombo->setToolTip(tr("Bundled: Notebook with metadata stored in config files.\n"
79-
"Raw: Plain folder structure with minimal VNote metadata."));
76+
m_typeCombo->addItem(tr("Bundled notebook"), static_cast<int>(NotebookType::Bundled));
77+
m_typeCombo->addItem(tr("Raw notebook"), static_cast<int>(NotebookType::Raw));
78+
m_typeCombo->setToolTip(tr("Bundled: notebook with metadata stored in config files.\n"
79+
"Raw: plain folder structure with minimal VNote metadata."));
8080
layout->addRow(tr("Type:"), m_typeCombo);
8181

8282
// Update root folder tooltip based on selected notebook type.
@@ -104,13 +104,13 @@ void NewNotebookDialog2::setupUI() {
104104
// For Git sync, the actual remote URL + PAT are collected BEFORE notebook
105105
// creation via the Configure... button (pre-create flow per
106106
// notebook-sync-config-pre-create plan).
107-
m_syncMethodLabel = new QLabel(tr("Sync Method:"), mainWidget);
107+
m_syncMethodLabel = new QLabel(tr("Sync method:"), mainWidget);
108108
m_syncMethodLabel->setObjectName(QStringLiteral("syncMethodLabel"));
109109
m_syncMethodCombo = WidgetsFactory::createComboBox(mainWidget);
110110
m_syncMethodCombo->setObjectName(QStringLiteral("syncMethodCombo"));
111111
m_syncMethodCombo->addItem(tr("None"), QStringLiteral("none"));
112112
m_syncMethodCombo->addItem(tr("Git"), QStringLiteral("git"));
113-
m_syncMethodCombo->setToolTip(tr("Git sync is supported only for Bundled notebooks. "
113+
m_syncMethodCombo->setToolTip(tr("Git sync is supported only for bundled notebooks. "
114114
"Sync settings are configured immediately via the "
115115
"Configure... button before notebook creation."));
116116

@@ -166,7 +166,7 @@ void NewNotebookDialog2::setupUI() {
166166
tr("Name or path for the assets folder.\n"
167167
"Can be a folder name (vx_assets), relative path, or absolute path.\n"
168168
"Relative paths resolve against each note file's parent directory."));
169-
advancedLayout->addRow(tr("Assets Folder:"), m_assetsFolderEdit);
169+
advancedLayout->addRow(tr("Assets folder:"), m_assetsFolderEdit);
170170

171171
m_advancedSection->setVisible(false);
172172
layout->addRow(m_advancedSection);

src/widgets/dialogs/notebooksyncinfodialog2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,13 @@ void NotebookSyncInfoDialog2::setupUI() {
217217
m_lastSyncLabel->setObjectName(QString::fromLatin1(kLastSyncLabelName));
218218
m_lastSyncLabel->setText(tr("Never"));
219219
m_lastSyncLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
220-
formLayout->addRow(tr("Last Sync:"), m_lastSyncLabel);
220+
formLayout->addRow(tr("Last sync:"), m_lastSyncLabel);
221221

222222
// 5. Current State (read-only, color-coded).
223223
m_currentStateLabel = new QLabel(centralWidget);
224224
m_currentStateLabel->setObjectName(QString::fromLatin1(kCurrentStateLabelName));
225225
m_currentStateLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
226-
formLayout->addRow(tr("Current State:"), m_currentStateLabel);
226+
formLayout->addRow(tr("Current state:"), m_currentStateLabel);
227227

228228
// Action button row above the standard dialog button box.
229229
auto *actionRow = new QWidget(centralWidget);

src/widgets/dialogs/opennotebookdialog2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void OpenNotebookDialog2::setupUI() {
7979

8080
// Top: mode selector radios.
8181
auto *modeRow = new QHBoxLayout();
82-
m_localModeRadio = new QRadioButton(tr("Local Folder"), mainWidget);
82+
m_localModeRadio = new QRadioButton(tr("Local folder"), mainWidget);
8383
m_localModeRadio->setObjectName(QLatin1String(kLocalModeRadioName));
8484
m_localModeRadio->setToolTip(tr("Open an existing VNote notebook from a local folder on disk."));
8585
m_localModeRadio->setChecked(true);

src/widgets/dialogs/openvnote3notebookdialog2.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
#include <QApplication>
44
#include <QCheckBox>
55
#include <QCoreApplication>
6-
#include <QProgressDialog>
76
#include <QDialogButtonBox>
87
#include <QDir>
98
#include <QFormLayout>
109
#include <QLabel>
10+
#include <QProgressDialog>
1111

1212
#include <controllers/openvnote3notebookcontroller.h>
1313
#include <core/servicelocator.h>
@@ -32,15 +32,15 @@ void OpenVNote3NotebookDialog2::setupUI() {
3232
m_sourceInput = new LocationInputWithBrowseButton(mainWidget);
3333
m_sourceInput->setBrowseType(LocationInputWithBrowseButton::Folder, tr("Select Source Folder"));
3434
m_sourceInput->setPlaceholderText(tr("Select the VNote3 notebook root folder"));
35-
layout->addRow(tr("Source Folder:"), m_sourceInput);
35+
layout->addRow(tr("Source folder:"), m_sourceInput);
3636

3737
m_destinationInput = new LocationInputWithBrowseButton(mainWidget);
3838
m_destinationInput->setBrowseType(LocationInputWithBrowseButton::Folder,
3939
tr("Select Destination Folder"));
4040
m_destinationInput->setPlaceholderText(tr("Select the destination root folder"));
41-
layout->addRow(tr("Destination Folder:"), m_destinationInput);
41+
layout->addRow(tr("Destination folder:"), m_destinationInput);
4242

43-
m_nameTitleLabel = new QLabel(tr("Notebook Name:"), mainWidget);
43+
m_nameTitleLabel = new QLabel(tr("Notebook name:"), mainWidget);
4444
m_nameLabel = new QLabel(mainWidget);
4545
m_nameTitleLabel->hide();
4646
m_nameLabel->hide();
@@ -53,9 +53,10 @@ void OpenVNote3NotebookDialog2::setupUI() {
5353
m_descriptionLabel->hide();
5454
layout->addRow(m_descriptionTitleLabel, m_descriptionLabel);
5555

56-
m_confirmCheckBox = new QCheckBox(
57-
tr("I understand this will copy the notebook to the destination folder.\n"
58-
"The legacy notebook would be kept for data backup."), mainWidget);
56+
m_confirmCheckBox =
57+
new QCheckBox(tr("I understand this will copy the notebook to the destination folder.\n"
58+
"The legacy notebook would be kept for data backup."),
59+
mainWidget);
5960
layout->addRow(QString(), m_confirmCheckBox);
6061

6162
setCentralWidget(mainWidget);
@@ -169,8 +170,8 @@ void OpenVNote3NotebookDialog2::acceptedButtonClicked() {
169170
progress.show();
170171
QCoreApplication::processEvents();
171172

172-
connect(m_controller, &OpenVNote3NotebookController::progressUpdated,
173-
this, [&progress](int p_val, int p_maximum, const QString &p_message) {
173+
connect(m_controller, &OpenVNote3NotebookController::progressUpdated, this,
174+
[&progress](int p_val, int p_maximum, const QString &p_message) {
174175
progress.setMaximum(p_maximum);
175176
progress.setValue(p_val);
176177
progress.setLabelText(p_message);

0 commit comments

Comments
 (0)