Skip to content

Commit

Permalink
i18n improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Dec 28, 2024
1 parent 8d1cf4a commit b2e2cb9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion demo/demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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") });
Expand Down
11 changes: 8 additions & 3 deletions src/graphs/ganttchart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand All @@ -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);
Expand Down

0 comments on commit b2e2cb9

Please sign in to comment.