1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 23:33:49 +01:00

Rewrites of TranslatableString and reimplementation of wxPLURAL...

... including move-construction of the base string, debug string formatting,
and contexts (not fully implemented)
This commit is contained in:
Paul Licameli
2019-12-07 11:05:45 -05:00
parent 9d05fc0c7d
commit 2e3ba2204f
6 changed files with 254 additions and 95 deletions

View File

@@ -1041,10 +1041,9 @@ wxString ProjectManager::GetHoursMinsString(int iMinutes)
int iHours = iMinutes / 60;
int iMins = iMinutes % 60;
auto sHours =
wxString::Format( wxPLURAL("%d hour", "%d hours", iHours), iHours );
auto sMins =
wxString::Format( wxPLURAL("%d minute", "%d minutes", iMins), iMins );
auto sHours = wxPLURAL( "%d hour", "%d hours", 0 )( iHours ).Translation();
auto sMins = wxPLURAL( "%d minute", "%d minutes", 0 )( iMins ).Translation();
/* i18n-hint: A time in hours and minutes. Only translate the "and". */
sFormatted.Printf( _("%s and %s."), sHours, sMins);