From b2e2cb9d9cb880f66a9378b918f387aa6ed39895 Mon Sep 17 00:00:00 2001 From: Blake-Madden <66873089+Blake-Madden@users.noreply.github.com> Date: Sat, 28 Dec 2024 12:52:05 -0500 Subject: [PATCH] i18n improvements --- demo/demo.cpp | 3 ++- src/graphs/ganttchart.cpp | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/demo/demo.cpp b/demo/demo.cpp index 2e0d5708..11f9c7b2 100644 --- a/demo/demo.cpp +++ b/demo/demo.cpp @@ -1873,7 +1873,8 @@ void MyFrame::OnNewWindow(wxCommandEvent& event) L"Name of variable from dataset"), _(L"Advanced Features") }); likertChart->AddQuestionsBracket(LikertChart::QuestionsBracket{ - LR"(Standard, "out-of-the-box" graph support is important to me)", + _DT(LR"(Standard, "out-of-the-box" graph support is important to me)", + DTExplanation::Syntax, L"Name of variable from dataset"), _DT(L"Data importing features are important to me", DTExplanation::Syntax, L"Name of variable from dataset"), _(L"Standard Features") }); diff --git a/src/graphs/ganttchart.cpp b/src/graphs/ganttchart.cpp index ef1f8989..c98277df 100644 --- a/src/graphs/ganttchart.cpp +++ b/src/graphs/ganttchart.cpp @@ -252,6 +252,7 @@ namespace Wisteria::Graphs { br.GetLabel().SetText( taskInfo.m_percentFinished == 100 ? + // TRANSLATORS: \x2713 is a checkmark character _(L"\x2713 Complete") : wxString::Format(_(L"%d%% complete"), taskInfo.m_percentFinished)); } @@ -266,20 +267,24 @@ namespace Wisteria::Graphs decalStr = taskInfo.m_resource; break; case TaskLabelDisplay::ResourceAndDays: - decalStr = wxString::Format(_(L"%s\n%d days"), taskInfo.m_resource, daysInTask); + decalStr = wxString::Format( + // TRANSLATORS: %s -> task resource, %d -> number of days for a task + _(L"%s\n%d days"), taskInfo.m_resource, daysInTask); break; case TaskLabelDisplay::Description: decalStr = taskInfo.m_description; break; case TaskLabelDisplay::DescriptionAndDays: - decalStr = - wxString::Format(_(L"%s\n%d days"), taskInfo.m_description, daysInTask); + decalStr = wxString::Format( + // TRANSLATORS: %s -> task description, %d -> number of days for a task + _(L"%s\n%d days"), taskInfo.m_description, daysInTask); break; case TaskLabelDisplay::ResourceAndDescription: decalStr = taskInfo.m_resource + L"\n" + taskInfo.m_description; break; case TaskLabelDisplay::ResourceDescriptionAndDays: decalStr = wxString::Format( + // TRANSLATORS: %s -> task description, %d -> number of days for a task _(L"%s\n%d days"), wxString(taskInfo.m_resource + L"\n" + taskInfo.m_description).Trim(), daysInTask);