mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-14 09:03:54 +01:00
Macros for translatable strings that need disambiguating context
This commit is contained in:
@@ -32,7 +32,13 @@ extern AUDACITY_DLL_API const wxString& GetCustomSubstitution(const wxString& st
|
||||
// '&', preceding menu accelerators, should NOT occur in the argument.
|
||||
#define XO(s) (TranslatableString{ wxT(s), {} })
|
||||
|
||||
// Marks strings for extraction only, where '&', preceding men accelerators, MAY
|
||||
// Alternative taking a second context argument. A context is a string literal,
|
||||
// which is not translated, but serves to disambiguate uses of the first string
|
||||
// that might need differing translations, such as "Light" meaning not-heavy in
|
||||
// one place but not-dark elsewhere.
|
||||
#define XC(s, c) (TranslatableString{ wxT(s), {} }.Context(c))
|
||||
|
||||
// Marks strings for extraction only, where '&', preceding menu accelerators, MAY
|
||||
// occur.
|
||||
// For now, expands exactly as macro XO does, but in future there will be a
|
||||
// type distinction - for example XXO should be used for menu item names that
|
||||
@@ -86,6 +92,10 @@ extern AUDACITY_DLL_API const wxString& GetCustomSubstitution(const wxString& st
|
||||
#define XP(sing, plur, n) \
|
||||
TranslatableString{ wxT(sing), {} }.Plural<(n)>( wxT(plur) )
|
||||
|
||||
// Like XP but with an additional context argument, as for XC
|
||||
#define XPC(sing, plur, n, c) \
|
||||
TranslatableString{ wxT(sing), {} }.Context(c).Plural<(n)>( wxT(plur) )
|
||||
|
||||
#endif
|
||||
|
||||
class Internat
|
||||
|
||||
Reference in New Issue
Block a user