1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 15:23:48 +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

@@ -78,7 +78,12 @@ extern AUDACITY_DLL_API const wxString& GetCustomSubstitution(const wxString& st
//
// Your i18n-comment should therefore say something like,
// "In the string after this one, ..."
#define wxPLURAL(sing, plur, n) wxGetTranslation( wxT(sing), wxT(plur), n)
//
// The macro call is then followed by a sequence of format arguments in
// parentheses. The third argument of the macro call is the zero-based index
// of the format argument that selects singular or plural
#define wxPLURAL(sing, plur, n) \
TranslatableString{ wxT(sing), {} }.Plural<(n)>( wxT(plur) )
#endif