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

TranslatableString can store a context and format arguments...

... Format arguments are substituted into the translation of the msgid, which
may not be known at the time the format arguments are captured (because locale
may change).  This allows TranslatableString with arguments to be constructed
at static initialization time.

There is also a special "verbatim" or null context which makes no translations
of msgids.

There is not yet any use of other contexts besides default or null.
This commit is contained in:
Paul Licameli
2019-12-03 11:34:50 -05:00
parent 4fdd1b005c
commit 15260c2c95
9 changed files with 103 additions and 35 deletions

View File

@@ -29,7 +29,7 @@ extern AUDACITY_DLL_API const wxString& GetCustomSubstitution(const wxString& st
#define _TS( s ) GetCustomSubstitution( s )
// Marks strings for extraction only... use .Translate() to translate.
#define XO(s) (TranslatableString{ wxT(s) })
#define XO(s) (TranslatableString{ wxT(s), {} })
#ifdef _
#undef _