fix: replace multi-byte UTF-8 in runtime UI strings with ASCII to fix Windows-1252 mojibake
This commit is contained in:
+1
-1
@@ -767,7 +767,7 @@ void doBankRemoveSelected() {
|
|||||||
(orphanCount == 1 ? " selected sample is" : " selected samples are") +
|
(orphanCount == 1 ? " selected sample is" : " selected samples are") +
|
||||||
" in no other bank.\n\nRemoving " +
|
" in no other bank.\n\nRemoving " +
|
||||||
(orphanCount == 1 ? "it" : "them") +
|
(orphanCount == 1 ? "it" : "them") +
|
||||||
" drops the index entry only — the file stays on disk until you prune "
|
" drops the index entry only -- the file stays on disk until you prune "
|
||||||
"(it is never deleted by remove).\n\nRemove anyway?";
|
"(it is never deleted by remove).\n\nRemove anyway?";
|
||||||
const int r = ShowMessageBox(msg.c_str(),
|
const int r = ShowMessageBox(msg.c_str(),
|
||||||
"ReaSampler: remove last-reference sample(s)", 4);
|
"ReaSampler: remove last-reference sample(s)", 4);
|
||||||
|
|||||||
+12
-12
@@ -736,7 +736,7 @@ void drawRegionHeader(LICE_IBitmap* bmp, const RECT& region, const char* title,
|
|||||||
const bool thisFull =
|
const bool thisFull =
|
||||||
poolBtnIsPool ? (g_panel.fullHeight == BankPanelFullHeight::PoolOnly)
|
poolBtnIsPool ? (g_panel.fullHeight == BankPanelFullHeight::PoolOnly)
|
||||||
: (g_panel.fullHeight == BankPanelFullHeight::BanksOnly);
|
: (g_panel.fullHeight == BankPanelFullHeight::BanksOnly);
|
||||||
drawCenteredText(bmp, btn, thisFull ? "\xE2\x87\x85" : "\xE2\x87\x83", // ⇅ / ⇃
|
drawCenteredText(bmp, btn, thisFull ? "[v]" : "[^]", // collapse / expand
|
||||||
kRgbBtnText, DT_CENTER);
|
kRgbBtnText, DT_CENTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -754,7 +754,7 @@ void drawTabStrip(LICE_IBitmap* bmp, const RECT& region) {
|
|||||||
const int n = static_cast<int>(tabs.size());
|
const int n = static_cast<int>(tabs.size());
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
RECT r{strip.x + 8, strip.y, strip.x + strip.width, strip.y + strip.height};
|
RECT r{strip.x + 8, strip.y, strip.x + strip.width, strip.y + strip.height};
|
||||||
drawCenteredText(bmp, r, "No named banks — click + to create one.",
|
drawCenteredText(bmp, r, "No named banks -- click + to create one.",
|
||||||
RGB(140, 140, 146), DT_LEFT);
|
RGB(140, 140, 146), DT_LEFT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -772,8 +772,8 @@ void drawTabStrip(LICE_IBitmap* bmp, const RECT& region) {
|
|||||||
strip.y + strip.height};
|
strip.y + strip.height};
|
||||||
RECT rc{strip.x + strip.width - kTabSpec.chevronWidth, strip.y,
|
RECT rc{strip.x + strip.width - kTabSpec.chevronWidth, strip.y,
|
||||||
strip.x + strip.width, strip.y + strip.height};
|
strip.x + strip.width, strip.y + strip.height};
|
||||||
drawCenteredText(bmp, lc, "\xE2\x80\xB9", kRgbTabText, DT_CENTER); // ‹
|
drawCenteredText(bmp, lc, "<", kRgbTabText, DT_CENTER);
|
||||||
drawCenteredText(bmp, rc, "\xE2\x80\xBA", kRgbTabText, DT_CENTER); // ›
|
drawCenteredText(bmp, rc, ">", kRgbTabText, DT_CENTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string activeId = book() ? book()->activeBankId() : std::string();
|
const std::string activeId = book() ? book()->activeBankId() : std::string();
|
||||||
@@ -1256,9 +1256,9 @@ void doDeleteBank(const std::string& bankId) {
|
|||||||
const std::string msg =
|
const std::string msg =
|
||||||
"\"" + name + "\" holds " + std::to_string(members) +
|
"\"" + name + "\" holds " + std::to_string(members) +
|
||||||
(members == 1 ? " sample" : " samples") +
|
(members == 1 ? " sample" : " samples") +
|
||||||
".\n\nYes — delete the bank AND drop its samples (files are kept on disk "
|
".\n\nYes -- delete the bank AND drop its samples (files are kept on disk "
|
||||||
"but no bank references them until prune).\nNo — Evacuate them to the "
|
"but no bank references them until prune).\nNo -- Evacuate them to the "
|
||||||
"pool first, then delete the empty bank (keeps the samples).\nCancel — "
|
"pool first, then delete the empty bank (keeps the samples).\nCancel -- "
|
||||||
"do nothing.";
|
"do nothing.";
|
||||||
// 3 == MB_YESNOCANCEL. 6=Yes, 7=No, 2=Cancel (SDK).
|
// 3 == MB_YESNOCANCEL. 6=Yes, 7=No, 2=Cancel (SDK).
|
||||||
const int r = ShowMessageBox(msg.c_str(),
|
const int r = ShowMessageBox(msg.c_str(),
|
||||||
@@ -1361,7 +1361,7 @@ void removeSamples(const std::vector<std::string>& sampleIds,
|
|||||||
(orphanCount == 1 ? " selected sample is" : " selected samples are") +
|
(orphanCount == 1 ? " selected sample is" : " selected samples are") +
|
||||||
" in no other bank.\n\nRemoving " +
|
" in no other bank.\n\nRemoving " +
|
||||||
(orphanCount == 1 ? "it" : "them") +
|
(orphanCount == 1 ? "it" : "them") +
|
||||||
" drops the index entry only — the file stays on disk until you prune "
|
" drops the index entry only -- the file stays on disk until you prune "
|
||||||
"(it is never deleted by remove).\n\nRemove anyway?";
|
"(it is never deleted by remove).\n\nRemove anyway?";
|
||||||
// 4 == MB_YESNO. 6=Yes (SDK); anything else cancels.
|
// 4 == MB_YESNO. 6=Yes (SDK); anything else cancels.
|
||||||
const int r = ShowMessageBox(msg.c_str(),
|
const int r = ShowMessageBox(msg.c_str(),
|
||||||
@@ -1443,11 +1443,11 @@ void showTabMenu(int screenX, int screenY, const std::string& bankId) {
|
|||||||
isActive ? "Active (capture target)" : "Activate (make capture target)",
|
isActive ? "Active (capture target)" : "Activate (make capture target)",
|
||||||
/*grayed=*/isActive);
|
/*grayed=*/isActive);
|
||||||
menuSeparator(menu);
|
menuSeparator(menu);
|
||||||
menuAppend(menu, kMenuRename, "Rename\xE2\x80\xA6");
|
menuAppend(menu, kMenuRename, "Rename...");
|
||||||
menuAppend(menu, kMenuEvacuate, "Evacuate to pool", /*grayed=*/!nonEmpty);
|
menuAppend(menu, kMenuEvacuate, "Evacuate to pool", /*grayed=*/!nonEmpty);
|
||||||
menuAppend(menu, kMenuDelete, "Delete\xE2\x80\xA6");
|
menuAppend(menu, kMenuDelete, "Delete...");
|
||||||
menuSeparator(menu);
|
menuSeparator(menu);
|
||||||
menuAppend(menu, kMenuCreate, "New bank\xE2\x80\xA6");
|
menuAppend(menu, kMenuCreate, "New bank...");
|
||||||
|
|
||||||
const int cmd = TrackPopupMenu(menu, TPM_RETURNCMD, screenX, screenY, 0,
|
const int cmd = TrackPopupMenu(menu, TPM_RETURNCMD, screenX, screenY, 0,
|
||||||
g_panel.hwnd, nullptr);
|
g_panel.hwnd, nullptr);
|
||||||
@@ -1498,7 +1498,7 @@ void showSelectionMenu(int screenX, int screenY) {
|
|||||||
(" " + dests[i].name).c_str());
|
(" " + dests[i].name).c_str());
|
||||||
menuSeparator(menu);
|
menuSeparator(menu);
|
||||||
}
|
}
|
||||||
menuAppend(menu, kMenuRemove, ("Remove " + label + "\xE2\x80\xA6").c_str());
|
menuAppend(menu, kMenuRemove, ("Remove " + label + "...").c_str());
|
||||||
|
|
||||||
const int cmd = TrackPopupMenu(menu, TPM_RETURNCMD, screenX, screenY, 0,
|
const int cmd = TrackPopupMenu(menu, TPM_RETURNCMD, screenX, screenY, 0,
|
||||||
g_panel.hwnd, nullptr);
|
g_panel.hwnd, nullptr);
|
||||||
|
|||||||
+4
-4
@@ -177,11 +177,11 @@ static void DriveRealtimeCapture()
|
|||||||
// abort from the closed-project DROP (the captured project was closed mid-record,
|
// abort from the closed-project DROP (the captured project was closed mid-record,
|
||||||
// review §1: nothing restored because the pointers were already freed).
|
// review §1: nothing restored because the pointers were already freed).
|
||||||
if (r.status == reasampler::RealtimeTickStatus::Done)
|
if (r.status == reasampler::RealtimeTickStatus::Done)
|
||||||
ShowConsoleMsg("ReaSampler realtime capture: project switched mid-record — "
|
ShowConsoleMsg("ReaSampler realtime capture: project switched mid-record -- "
|
||||||
"captured audio restored into the original project; not "
|
"captured audio restored into the original project; not "
|
||||||
"persisted to avoid crossing projects.\n");
|
"persisted to avoid crossing projects.\n");
|
||||||
else
|
else
|
||||||
ShowConsoleMsg(("ReaSampler realtime capture: project changed mid-record — " +
|
ShowConsoleMsg(("ReaSampler realtime capture: project changed mid-record -- " +
|
||||||
r.result.message + "\n").c_str());
|
r.result.message + "\n").c_str());
|
||||||
g_rtCapture.reset();
|
g_rtCapture.reset();
|
||||||
g_rtCaptureProject = nullptr;
|
g_rtCaptureProject = nullptr;
|
||||||
@@ -646,7 +646,7 @@ static void RunCaptureRealtimeTrack()
|
|||||||
if (g_rtCapture)
|
if (g_rtCapture)
|
||||||
{
|
{
|
||||||
ShowConsoleMsg("ReaSampler realtime capture: a capture is already in "
|
ShowConsoleMsg("ReaSampler realtime capture: a capture is already in "
|
||||||
"progress — let it finish (or stop the transport) first.\n");
|
"progress -- let it finish (or stop the transport) first.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -712,7 +712,7 @@ static void RunCancelRealtime()
|
|||||||
if (r.status == reasampler::RealtimeTickStatus::Done)
|
if (r.status == reasampler::RealtimeTickStatus::Done)
|
||||||
CommitRealtimeResult(r.result); // Ok: keep what was captured up to the cancel
|
CommitRealtimeResult(r.result); // Ok: keep what was captured up to the cancel
|
||||||
else
|
else
|
||||||
ShowConsoleMsg(("ReaSampler realtime capture cancelled — " +
|
ShowConsoleMsg(("ReaSampler realtime capture cancelled -- " +
|
||||||
r.result.message + "\n").c_str());
|
r.result.message + "\n").c_str());
|
||||||
g_rtCapture.reset();
|
g_rtCapture.reset();
|
||||||
g_rtCaptureProject = nullptr;
|
g_rtCaptureProject = nullptr;
|
||||||
|
|||||||
+5
-5
@@ -142,7 +142,7 @@ std::string getProjExtStateString(ReaProject* proj, const char* ns,
|
|||||||
// the console so this reads as "too large to load", not silent data loss
|
// the console so this reads as "too large to load", not silent data loss
|
||||||
// (mirrors the malformed-JSON warning in loadFromProject).
|
// (mirrors the malformed-JSON warning in loadFromProject).
|
||||||
ShowConsoleMsg(("ReaSampler: stored value for key '" + std::string(key) +
|
ShowConsoleMsg(("ReaSampler: stored value for key '" + std::string(key) +
|
||||||
"' exceeds the 16 MB read ceiling — ignoring (bank not "
|
"' exceeds the 16 MB read ceiling -- ignoring (bank not "
|
||||||
"loaded).\n").c_str());
|
"loaded).\n").c_str());
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@@ -245,7 +245,7 @@ ViewModeModel loadViewModel(ReaProject* proj) {
|
|||||||
if (viewJson.empty()) return ViewModeModel{}; // no stored view state -> default
|
if (viewJson.empty()) return ViewModeModel{}; // no stored view state -> default
|
||||||
std::optional<ViewModeModel> loaded = ViewModeModel::deserialize(viewJson);
|
std::optional<ViewModeModel> loaded = ViewModeModel::deserialize(viewJson);
|
||||||
if (!loaded) {
|
if (!loaded) {
|
||||||
ShowConsoleMsg("ReaSampler: stored view state is malformed — ignoring.\n");
|
ShowConsoleMsg("ReaSampler: stored view state is malformed -- ignoring.\n");
|
||||||
return ViewModeModel{};
|
return ViewModeModel{};
|
||||||
}
|
}
|
||||||
return std::move(*loaded);
|
return std::move(*loaded);
|
||||||
@@ -262,7 +262,7 @@ TailSetting loadTailSetting(ReaProject* proj) {
|
|||||||
if (tailJson.empty()) return TailSetting{}; // no stored setting -> default
|
if (tailJson.empty()) return TailSetting{}; // no stored setting -> default
|
||||||
std::optional<TailSetting> loaded = deserializeTailSetting(tailJson);
|
std::optional<TailSetting> loaded = deserializeTailSetting(tailJson);
|
||||||
if (!loaded) {
|
if (!loaded) {
|
||||||
ShowConsoleMsg("ReaSampler: stored tail setting is malformed — ignoring.\n");
|
ShowConsoleMsg("ReaSampler: stored tail setting is malformed -- ignoring.\n");
|
||||||
return TailSetting{};
|
return TailSetting{};
|
||||||
}
|
}
|
||||||
return *loaded;
|
return *loaded;
|
||||||
@@ -281,7 +281,7 @@ OwnedFileManifest loadOwnedManifest(ReaProject* proj) {
|
|||||||
if (ownedJson.empty()) return OwnedFileManifest{}; // no stored manifest -> empty
|
if (ownedJson.empty()) return OwnedFileManifest{}; // no stored manifest -> empty
|
||||||
std::optional<OwnedFileManifest> loaded = OwnedFileManifest::deserialize(ownedJson);
|
std::optional<OwnedFileManifest> loaded = OwnedFileManifest::deserialize(ownedJson);
|
||||||
if (!loaded) {
|
if (!loaded) {
|
||||||
ShowConsoleMsg("ReaSampler: stored owned-file manifest is malformed — ignoring.\n");
|
ShowConsoleMsg("ReaSampler: stored owned-file manifest is malformed -- ignoring.\n");
|
||||||
return OwnedFileManifest{};
|
return OwnedFileManifest{};
|
||||||
}
|
}
|
||||||
return std::move(*loaded);
|
return std::move(*loaded);
|
||||||
@@ -334,7 +334,7 @@ void ReaSamplerSession::loadFromProject(void* proj, const std::string& projectDi
|
|||||||
if (!banksJson.empty()) {
|
if (!banksJson.empty()) {
|
||||||
std::optional<BankBook> loaded = BankBook::deserialize(banksJson);
|
std::optional<BankBook> loaded = BankBook::deserialize(banksJson);
|
||||||
if (!loaded) {
|
if (!loaded) {
|
||||||
ShowConsoleMsg("ReaSampler: stored banks are malformed — ignoring.\n");
|
ShowConsoleMsg("ReaSampler: stored banks are malformed -- ignoring.\n");
|
||||||
book_ = BankBook{};
|
book_ = BankBook{};
|
||||||
} else {
|
} else {
|
||||||
book_ = std::move(*loaded);
|
book_ = std::move(*loaded);
|
||||||
|
|||||||
Reference in New Issue
Block a user