Skip to content

Commit

Permalink
i18n fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Jan 6, 2025
1 parent 8d5c58a commit 11b1597
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/base/image.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ namespace Wisteria::GraphItems
static wxString GetImageFileFilter()
{
return _(
LR"(Image Files (*.bmp;*.jpg;*.jpeg;*.jpe;*.png;*.gif;*.tga;*.tif;*.tiff;*.pcx)|*.bmp;*.jpg;*.jpeg;*.jpe;*.png;*.gif;*.tga;*.tif;*.tiff;*.pcx|Bitmap (*.bmp)|*.bmp|JPEG (*.jpg;*.jpeg;*.jpe)|*.jpg;*.jpg;*.jpe|PNG (*.png)|*.png|GIF (*.gif)|*.gif|Targa (*.tga)|*.tga|TIFF (*.tif;*.tiff)|*.tif;*.tiff|PCX (*.pcx)|*.pcx)");
LR"(Image Files (*.bmp;*.jpg;*.jpeg;*.jpe;*.png;*.gif;*.tga;*.tif;*.tiff;*.pcx)|"
"*.bmp;*.jpg;*.jpeg;*.jpe;*.png;*.gif;*.tga;*.tif;*.tiff;*.pcx|Bitmap (*.bmp)|*.bmp|"
"JPEG (*.jpg;*.jpeg;*.jpe)|*.jpg;*.jpg;*.jpe|PNG (*.png)|*.png|GIF (*.gif)|*.gif|"
"Targa (*.tga)|*.tga|TIFF (*.tif;*.tiff)|*.tif;*.tiff|PCX (*.pcx)|*.pcx)");
}

/** @brief Loads image and adjusts its JPEG orientation (if necessary).
Expand Down
4 changes: 3 additions & 1 deletion src/data/dataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -1728,7 +1728,9 @@ namespace Wisteria::Data
static wxString GetDataFileFilter()
{
return _(
LR"(All Data Files (*.txt;*.csv;*.xlsx)|*.txt;*.csv;*.xlsx|Tab Delimited Files (*.txt)|*.txt|CSV Files (*.csv)|*.csv|Excel Files (*.xlsx)|*.xlsx)");
LR"(All Data Files (*.txt;*.csv;*.xlsx)|*.txt;*.csv;*.xlsx|"
"Tab Delimited Files (*.txt)|*.txt|CSV Files (*.csv)|*.csv|"
"Excel Files (*.xlsx)|*.xlsx)");
}

/// @}
Expand Down
4 changes: 3 additions & 1 deletion src/graphs/barchart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ namespace Wisteria::Graphs
Settings::GetDefaultNumberFormat())) :
(GetBinLabelDisplay() == BinLabelDisplay::BinNameAndPercentage) ?
bar.GetAxisLabel().GetText() +
wxString::Format(L" (%s%%)",
wxString::Format(
// TRANSLATORS: Percent value (%s) and percentage symbol (%%)
_(L" (%s%%)"),
wxNumberFormatter::ToString(percentage, (percentage < 1) ? 2 : 0,
wxNumberFormatter::Style::Style_NoTrailingZeroes)) :
(GetBinLabelDisplay() == BinLabelDisplay::BinValue) ?
Expand Down
8 changes: 6 additions & 2 deletions src/graphs/piechart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ namespace Wisteria::GraphItems
Settings::GetDefaultNumberFormat())));
break;
case BinLabelDisplay::BinNameAndPercentage:
pieLabel->SetText(wxString::Format(L"%s\n(%s%%)",
pieLabel->SetText(wxString::Format(
// TRANSLATORS: Pie chart label and then a percentage value in parentheses
_(L"%s\n(%s%%)"),
pieLabel->GetText(),
percStr));
break;
Expand Down Expand Up @@ -201,7 +203,9 @@ namespace Wisteria::GraphItems
wxNumberFormatter::ToString(m_value, 0, Settings::GetDefaultNumberFormat())));
break;
case BinLabelDisplay::BinNameAndPercentage:
pieLabel->SetText(wxString::Format(L"%s (%s%%)", pieLabel->GetText(), percStr));
pieLabel->SetText(wxString::Format(
// TRANSLATORS: Pie chart label and then a percentage value in parentheses
_(L"%s (%s%%)"), pieLabel->GetText(), percStr));
break;
case BinLabelDisplay::BinName:
[[fallthrough]];
Expand Down
4 changes: 3 additions & 1 deletion src/graphs/sankeydiagram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ namespace Wisteria::Graphs
wxNumberFormatter::ToString(group.m_frequency, 0,
wxNumberFormatter::Style::Style_WithThousandsSep)) :
(GetGroupLabelDisplay() == BinLabelDisplay::BinPercentage) ?
wxString::Format(L"%s%%",
wxString::Format(
// TRANSLATORS: Percent value placeholder and percentage symbol (%%)
_(L"%s%%"),
wxNumberFormatter::ToString(group.m_percentOfColumn * 100, 0)) :
(GetGroupLabelDisplay() == BinLabelDisplay::BinValue) ?
wxString::Format(L"%s",
Expand Down

0 comments on commit 11b1597

Please sign in to comment.