Skip to content

Commit cf51d50

Browse files
committed
Update texts
1 parent 3f109c4 commit cf51d50

21 files changed

Lines changed: 341 additions & 175 deletions

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ cmake --build build --target <plugin>_translations_lupdate
125125
cmake --build build --target <plugin>_translations_lrelease
126126
```
127127

128+
Write user-facing window, dialog, and page titles, button text, and menu text in Title Case. Use sentence case for all other general user-facing text. Format numbers for the user's locale unless they are special identifiers such as HTTP status codes or require a defined representation such as timecodes. Use localized placeholders such as `%L1` and `%Ln`, `QLocale::toString()` in C++, or `toLocaleString()` in JavaScript/QML instead of inserting locale-neutral numeric strings. Describe concepts, actions, and results from the user's business perspective; do not over-explain internal implementation details in user-facing copy.
129+
128130
Use `RuntimeInterface::settings()` for user preferences and `RuntimeInterface::globalSettings()` only for machine-wide state. Group C++ keys by `staticMetaObject.className()` (or an equally stable module name), use descriptive `lowerCamelCase` keys, supply defaults, and balance every `beginGroup()` with `endGroup()`. In QML, use `SVSCraft.Extras.Settings` with a stable module-qualified category.
129131

130132
Every interactive control must be keyboard reachable. Give icon-only controls meaningful `text`, tooltips, and `Accessible` metadata; preserve logical focus order. Use `control.mirrored`, layouts, and left/right padding correctly for RTL interfaces. Test long translations and never encode meaning by color alone.
@@ -139,6 +141,8 @@ View-model bindings maintain explicit document-to-view and view-to-document maps
139141

140142
Use a recursive checkout, CMake 3.19+, Qt 6.10-compatible development packages, Ninja, and a C++20 compiler. During vcpkg installation, expose the Qt CMake directory through `QT_DIR`/`Qt6_DIR` and retain those variables for overlay ports.
141143

144+
Do not perform any build, test, run, or automatic formatting operations unless explicitly requested by the user.
145+
142146
```sh
143147
git submodule update --init --recursive
144148
<vcpkg>/vcpkg install --x-manifest-root=scripts/vcpkg-manifest --x-install-root=<vcpkg>/installed --triplet=<triplet>

src/plugins/synth/core/SynthInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ namespace Synth {
8383
}
8484
if (d->builtinParameters.contains(configuration.id())) {
8585
if (errorMessage)
86-
*errorMessage = tr("A built-in parameter with this id is already registered");
86+
*errorMessage = tr("A built-in parameter with this ID is already registered.");
8787
return AlreadyRegistered;
8888
}
8989
d->builtinParameters.insert(configuration.id(), configuration);

src/plugins/synth/internal/SynthService.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ namespace Synth::Internal {
6565
Q_ASSERT(!s_instance);
6666
s_instance = this;
6767
m_interface->setTaskManager(m_taskManager);
68-
connect(m_coreRegistry.get(), &CoreMetadataRegistry::managedArchitecturesChanged,
69-
this, &SynthService::managedArchitecturesChanged);
68+
connect(m_coreRegistry.get(), &CoreMetadataRegistry::managedArchitecturesChanged, this, &SynthService::managedArchitecturesChanged);
7069

7170
connect(m_metadataController, &MetadataRefreshController::serviceDetailsChanged, this, [this](const QUuid &serviceId) {
7271
const auto details = m_metadataController->serviceDetails(serviceId);
@@ -180,7 +179,7 @@ namespace Synth::Internal {
180179
QStringList errors;
181180
if (!configurations.at(index).validate(&errors)) {
182181
if (errorMessage)
183-
*errorMessage = tr("Service %1: %2").arg(index + 1).arg(errors.join(QStringLiteral("; ")));
182+
*errorMessage = tr("Service %L1: %2").arg(index + 1).arg(errors.join(QStringLiteral("; ")));
184183
return false;
185184
}
186185
if (ids.contains(configurations.at(index).id())) {
@@ -295,7 +294,7 @@ namespace Synth::Internal {
295294
const auto idValue = item.toObject().value(QStringLiteral("id"));
296295
if (!idValue.isString()) {
297296
if (errorMessage)
298-
*errorMessage = tr("Every parameter entry must contain a string id.");
297+
*errorMessage = tr("Every parameter entry must contain a string 'id' field.");
299298
return false;
300299
}
301300
const auto id = idValue.toString();
@@ -325,11 +324,11 @@ namespace Synth::Internal {
325324
if (!replaceUserParameterConfigurations(merged.values(), errorMessage))
326325
return false;
327326
if (summary) {
328-
summary->append(tr("Imported %1 parameter configuration(s).").arg(imported.size()));
327+
summary->append(tr("Imported %Ln parameter configuration(s).", nullptr, imported.size()));
329328
if (ignoredBuiltin)
330-
summary->append(tr("Ignored %1 built-in parameter configuration(s).").arg(ignoredBuiltin));
329+
summary->append(tr("Ignored %Ln built-in parameter configuration(s).", nullptr, ignoredBuiltin));
331330
if (ignoredReserved)
332-
summary->append(tr("Ignored %1 reserved pitch configuration(s).").arg(ignoredReserved));
331+
summary->append(tr("Ignored %Ln reserved pitch configuration(s).", nullptr, ignoredReserved));
333332
}
334333
return true;
335334
}

src/plugins/synth/internal/addon/SynthesisProjectAddOn.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -829,13 +829,13 @@ namespace Synth::Internal {
829829
case SynthesisPiece::Ready: {
830830
if (!m_audioController->hasBinding(piece) || piece->audioFilePath().isEmpty()) {
831831
if (errorMessage) {
832-
*errorMessage = tr("Audio export was stopped because clip \"%1\" has no completed synthesized audio.").arg(clip->name());
832+
*errorMessage = tr("Audio export was stopped because clip \"%1\" contains a synthesis piece without completed audio.").arg(clip->name());
833833
}
834834
return false;
835835
}
836836
if (m_audioController->isCanceled(piece)) {
837837
if (errorMessage) {
838-
*errorMessage = tr("Audio export was stopped because synthesized audio for clip \"%1\" was canceled.").arg(clip->name());
838+
*errorMessage = tr("Audio export was stopped because audio synthesis was canceled for a synthesis piece in clip \"%1\".").arg(clip->name());
839839
}
840840
return false;
841841
}
@@ -849,7 +849,7 @@ namespace Synth::Internal {
849849
const auto detail = piece->errorMessage().isEmpty()
850850
? tr("Unknown synthesis error.")
851851
: piece->errorMessage();
852-
*errorMessage = tr("Audio export was stopped because synthesis failed for clip \"%1\": %2")
852+
*errorMessage = tr("Audio export was stopped because synthesis failed for a synthesis piece in clip \"%1\": %2")
853853
.arg(clip->name(), detail);
854854
}
855855
return false;
@@ -1047,7 +1047,7 @@ namespace Synth::Internal {
10471047
const auto architecture = architectureFor(*context);
10481048
if (architecture.id().isEmpty()) {
10491049
for (auto piece : affectedPieces)
1050-
notifyFailure(piece, tr("No healthy service provides the clip architecture."));
1050+
notifyFailure(piece, tr("No healthy service supports the architecture used by this clip."));
10511051
return;
10521052
}
10531053
QList<ClipRuntime::LanguageContinuation> preservedContinuations;
@@ -1205,7 +1205,7 @@ namespace Synth::Internal {
12051205
const auto context = buildSynthesisContext(runtime->clip);
12061206
const auto architecture = context ? architectureFor(*context) : ArchitectureMetadata{};
12071207
if (!context || architecture.id().isEmpty()) {
1208-
notifyFailure(piece, tr("No healthy service can synthesize this piece."));
1208+
notifyFailure(piece, tr("No healthy service can synthesize this synthesis piece."));
12091209
return;
12101210
}
12111211
const auto executableType = executableStage(architecture, type);
@@ -1542,7 +1542,7 @@ namespace Synth::Internal {
15421542
} else if (writeback->type == SynthesisTaskType::Phoneme && result.phonemes.size() != expected) {
15431543
writeback->responseShapeError = tr("The phoneme result does not match the requested score.");
15441544
} else if (writeback->type == SynthesisTaskType::Duration && result.phonemes.size() != expected) {
1545-
writeback->responseShapeError = tr("The duration result does not match the requested piece score.");
1545+
writeback->responseShapeError = tr("The duration result does not match the score for the requested synthesis piece.");
15461546
}
15471547
}
15481548
m_pendingTaskWritebacks.append(writeback);

src/plugins/synth/internal/api/ApiClient.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,8 @@ namespace {
448448
error.httpStatusCode = status;
449449
error.networkErrorCode = static_cast<int>(networkError);
450450
error.message = reason.isEmpty()
451-
? tr("The server returned HTTP status %1.").arg(status)
452-
: tr("The server returned HTTP status %1: %2.")
451+
? tr("The synthesis service returned HTTP status %1.").arg(status)
452+
: tr("The synthesis service returned HTTP status %1: %2.")
453453
.arg(status)
454454
.arg(reason);
455455
const auto problem = problemDetailsText(rawJson);
@@ -467,7 +467,7 @@ namespace {
467467
error.kind = ApiError::ResponseError;
468468
error.httpStatusCode = status;
469469
error.networkErrorCode = static_cast<int>(networkError);
470-
error.message = tr("The HTTP response could not be completed: %1")
470+
error.message = tr("The synthesis service returned an incomplete HTTP response: %1.")
471471
.arg(networkErrorString);
472472
error.rawResponse = body;
473473
error.rawJsonResponse = rawJson;
@@ -477,14 +477,14 @@ namespace {
477477
error.kind = ApiError::NetworkError;
478478
error.networkErrorCode = static_cast<int>(networkError);
479479
error.httpStatusCode = status;
480-
error.message = tr("The network request failed: %1").arg(networkErrorString);
480+
error.message = tr("The synthesis service request failed: %1.").arg(networkErrorString);
481481
error.rawResponse = body;
482482
error.rawJsonResponse = rawJson;
483483
response.error = std::move(error);
484484
} else if (!statusAttribute.isValid()) {
485485
ApiError error;
486486
error.kind = ApiError::ResponseError;
487-
error.message = tr("The response did not contain an HTTP status code.");
487+
error.message = tr("The synthesis service response did not contain an HTTP status code.");
488488
error.rawResponse = body;
489489
error.rawJsonResponse = rawJson;
490490
response.error = std::move(error);
@@ -495,7 +495,7 @@ namespace {
495495
ApiError error;
496496
error.kind = ApiError::ResponseError;
497497
error.httpStatusCode = status;
498-
error.message = tr("The server returned invalid JSON: %1").arg(parseError.errorString());
498+
error.message = tr("The synthesis service returned invalid JSON: %1.").arg(parseError.errorString());
499499
error.rawResponse = body;
500500
error.rawJsonResponse = rawJson;
501501
response.error = std::move(error);
@@ -709,7 +709,7 @@ class ApiClient::Private {
709709
ApiError error;
710710
error.kind = ApiError::ResponseError;
711711
error.httpStatusCode = response.httpStatusCode;
712-
error.message = QObject::tr("The response does not match the DSSP schema: %1")
712+
error.message = QObject::tr("The synthesis service returned data that does not match the DSSP schema: %1.")
713713
.arg(parseError);
714714
error.rawResponse = response.rawResponse;
715715
error.rawJsonResponse = response.json;

0 commit comments

Comments
 (0)