mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-02 06:40:12 +01:00
Define and use non-mutating TranslatableString::Stripped
This commit is contained in:
@@ -89,7 +89,7 @@ public:
|
||||
const TranslatableString &Msgid() const { return mMsgid; }
|
||||
const wxString Translation() const { return mMsgid.Translation(); }
|
||||
const wxString StrippedTranslation() const
|
||||
{ return TranslatableString{mMsgid}.Strip().Translation(); }
|
||||
{ return mMsgid.Stripped().Translation(); }
|
||||
|
||||
bool empty() const { return mInternal.empty(); }
|
||||
|
||||
|
||||
@@ -467,6 +467,10 @@ public:
|
||||
TranslatableString &&Strip( unsigned options = MenuCodes ) &&
|
||||
{ return std::move( Strip( options ) ); }
|
||||
|
||||
// non-mutating, constructs another TranslatableString object
|
||||
TranslatableString Stripped( unsigned options = MenuCodes ) const
|
||||
{ return TranslatableString{ *this }.Strip( options ); }
|
||||
|
||||
private:
|
||||
enum class Request {
|
||||
Context, // return a disambiguating context string
|
||||
|
||||
Reference in New Issue
Block a user