Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

Brush sets: translate the set counts, dialog titles and sentences (es, zh-TW, zh-CN)

islandmed8fc554ead2bd
diff --git a/src/app/I18nSimplifiedChinese.cpp b/src/app/I18nSimplifiedChinese.cpp
index 28e3c278..6b5172f1 100644
--- a/src/app/I18nSimplifiedChinese.cpp
+++ b/src/app/I18nSimplifiedChinese.cpp
@@ -3322,6 +3322,14 @@ constexpr Entry kSimplifiedChinese[] = {
{"Save Shelf as Brush Set", "将工具栏保存为笔刷组"},
{"none yet", "尚无"},
{"this shelf (not saved)", "当前的工具栏(未保存)"},
+ {"%d brush", "%d 个笔刷"},
+ {"%d brushes", "%d 个笔刷"},
+ {"Save Brush Set", "保存笔刷组"},
+ {"Delete Brush Set?", "删除笔刷组?"},
+ {"The bottom shelf's %d brushes, in order, and their keys. Switching to the set later puts both back.", "底部工具栏的%d个笔刷(按顺序)及其快捷键。切换到此组时两者都会恢复。"},
+ {"Replaces the set %s.", "将替换笔刷组 %s。"},
+ {"Delete the brush set %s?", "删除笔刷组 %s?"},
+ {"Switch the bottom shelf to this set's brushes and give them the set's keys.", "将底部工具栏换成这个组的笔刷,并应用这个组的快捷键。"},
};
} // namespace
diff --git a/src/app/I18nSpanish.cpp b/src/app/I18nSpanish.cpp
index 8d4b221f..ecdaea02 100644
--- a/src/app/I18nSpanish.cpp
+++ b/src/app/I18nSpanish.cpp
@@ -3790,6 +3790,14 @@ constexpr Entry kSpanish[] = {
{"Save Shelf as Brush Set", "Guardar estante como conjunto de pinceles"},
{"none yet", "ninguno todavía"},
{"this shelf (not saved)", "este estante (sin guardar)"},
+ {"%d brush", "%d pincel"},
+ {"%d brushes", "%d pinceles"},
+ {"Save Brush Set", "Guardar conjunto de pinceles"},
+ {"Delete Brush Set?", "¿Eliminar conjunto de pinceles?"},
+ {"The bottom shelf's %d brushes, in order, and their keys. Switching to the set later puts both back.", "Los %d pinceles del estante inferior, en orden, y sus teclas. Al cambiar a este conjunto más tarde vuelven ambos."},
+ {"Replaces the set %s.", "Reemplaza el conjunto %s."},
+ {"Delete the brush set %s?", "¿Eliminar el conjunto de pinceles %s?"},
+ {"Switch the bottom shelf to this set's brushes and give them the set's keys.", "Cambia el estante inferior a los pinceles de este conjunto y les da sus teclas."},
};
} // namespace
diff --git a/src/app/I18nTraditionalChinese.cpp b/src/app/I18nTraditionalChinese.cpp
index 2af1536b..1474c1c2 100644
--- a/src/app/I18nTraditionalChinese.cpp
+++ b/src/app/I18nTraditionalChinese.cpp
@@ -3320,6 +3320,14 @@ constexpr Entry kTraditionalChinese[] = {
{"Save Shelf as Brush Set", "將工具列儲存為筆刷組"},
{"none yet", "尚無"},
{"this shelf (not saved)", "目前的工具列(未儲存)"},
+ {"%d brush", "%d 個筆刷"},
+ {"%d brushes", "%d 個筆刷"},
+ {"Save Brush Set", "儲存筆刷組"},
+ {"Delete Brush Set?", "刪除筆刷組?"},
+ {"The bottom shelf's %d brushes, in order, and their keys. Switching to the set later puts both back.", "底部工具列的%d個筆刷(依順序)及其快速鍵。切換到此組時兩者都會恢復。"},
+ {"Replaces the set %s.", "將取代筆刷組 %s。"},
+ {"Delete the brush set %s?", "刪除筆刷組 %s?"},
+ {"Switch the bottom shelf to this set's brushes and give them the set's keys.", "將底部工具列換成這個組的筆刷,並套用這個組的快速鍵。"},
};
} // namespace
diff --git a/src/app/PanelBrushSets.cpp b/src/app/PanelBrushSets.cpp
index b2bc0b42..0ec7f489 100644
--- a/src/app/PanelBrushSets.cpp
+++ b/src/app/PanelBrushSets.cpp
@@ -288,12 +288,12 @@ void App::drawBrushSetMenu() {
for (size_t i = 0; i < brushSets_.list.size(); ++i) {
const BrushSet& set = brushSets_.list[i];
const int n = countBrushes(set.shelf);
- const std::string count = std::to_string(n) + (n == 1 ? " brush" : " brushes");
+ char count[64];
+ std::snprintf(count, sizeof count, n == 1 ? tr("%d brush") : tr("%d brushes"), n);
const std::string label = set.name + "##brushset" + std::to_string(i);
- if (ImGui::MenuItem(label.c_str(), count.c_str(), int(i) == current)) runCommand("brush_set", {{"name", set.name}});
+ if (ImGui::MenuItem(label.c_str(), count, int(i) == current)) runCommand("brush_set", {{"name", set.name}});
ui::HelpText(set.name.c_str(), actions_.shortcutText("brushset.use." + slug(set.name)).c_str(),
- ("Switch the bottom shelf to this set's " + count + " and give them the set's keys.").c_str(),
- "Brush > Brush set");
+ "Switch the bottom shelf to this set's brushes and give them the set's keys.", "Brush > Brush set");
}
ImGui::Separator();
if (ImGui::MenuItem(tr("Save Shelf as Brush Set...##brushsetmenu"))) openBrushSetSave();
@@ -334,13 +334,16 @@ void App::drawBrushSetRow() {
}
void App::drawBrushSetSave() {
+ // (Translated titles: the popup's id follows the language, opened and drawn under the same one.)
+ const char* savePopup = tr(kSavePopup);
+ const char* deletePopup = tr(kDeletePopup);
if (brushSets_.saveOpen) {
- ImGui::OpenPopup(kSavePopup);
+ ImGui::OpenPopup(savePopup);
brushSets_.saveOpen = false;
brushSets_.saveFocus = true;
}
if (brushSets_.deleteOpen) {
- ImGui::OpenPopup(kDeletePopup);
+ ImGui::OpenPopup(deletePopup);
brushSets_.deleteOpen = false;
}
const float s = uiScale_;
@@ -348,7 +351,7 @@ void App::drawBrushSetSave() {
const ImVec2 button(110 * s, 0);
ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
- if (ImGui::BeginPopupModal(kSavePopup, nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings)) {
+ if (ImGui::BeginPopupModal(savePopup, nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings)) {
std::string& error = brushSets_.error;
if (brushSets_.saveFocus) {
error.clear();
@@ -360,13 +363,13 @@ void App::drawBrushSetSave() {
sizeof brushSets_.name, ImGuiInputTextFlags_EnterReturnsTrue);
const int brushes = countBrushes(layout_.bottomShelf);
ImGui::PushTextWrapPos(320 * s);
- ImGui::TextDisabled("%s", ("The bottom shelf's " + std::to_string(brushes) +
- " brushes, in order, and their keys. Switching to the set later puts both back.")
- .c_str());
+ ImGui::TextDisabled(tr("The bottom shelf's %d brushes, in order, and their keys. Switching to the set later puts "
+ "both back."),
+ brushes);
const std::string name = trimmed(brushSets_.name);
const int existing = name.empty() ? -1 : findSet(brushSets_.list, name);
if (existing >= 0 && brushSets_.list[size_t(existing)].name == name)
- ImGui::TextColored(ImVec4(0.94f, 0.53f, 0.18f, 1.0f), "%s", ("Replaces the set " + name + ".").c_str());
+ ImGui::TextColored(ImVec4(0.94f, 0.53f, 0.18f, 1.0f), tr("Replaces the set %s."), name.c_str());
ImGui::PopTextWrapPos();
if (!error.empty()) ImGui::TextColored(ImVec4(1.0f, 0.45f, 0.45f, 1.0f), "%s", error.c_str());
ImGui::BeginDisabled(name.empty());
@@ -384,8 +387,8 @@ void App::drawBrushSetSave() {
}
ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
- if (ImGui::BeginPopupModal(kDeletePopup, nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings)) {
- ImGui::Text("%s", ("Delete the brush set " + brushSets_.deleting + "?").c_str());
+ if (ImGui::BeginPopupModal(deletePopup, nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings)) {
+ ImGui::Text(tr("Delete the brush set %s?"), brushSets_.deleting.c_str());
ImGui::TextDisabled("%s", tr("Only the set goes: the brushes and the shelf stay as they are."));
bool close = false;
if (ImGui::Button(tr("Delete##brushsetdelete_ok"), button)) {