1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-20 09:31:15 +02:00

Define TranslatableString::Strip()

This commit is contained in:
Paul Licameli
2019-12-15 11:56:01 -05:00
parent 911e278e60
commit f16709945b
3 changed files with 44 additions and 1 deletions

View File

@@ -455,6 +455,18 @@ public:
return PluralTemp< N >{ *this, pluralStr };
}
// Translated strings may still contain menu hot-key codes (indicated by &)
// that wxWidgets interprets, and also trailing ellipses, that should be
// removed for other uses.
enum StripOptions : unsigned {
// Values to be combined with bitwise OR
MenuCodes = 0x1,
Ellipses = 0x2,
};
TranslatableString &Strip( unsigned options = MenuCodes ) &;
TranslatableString &&Strip( unsigned options = MenuCodes ) &&
{ return std::move( Strip( options ) ); }
private:
enum class Request {
Context, // return a disambiguating context string