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

ComponentInterfaceSymbol contains TranslatableString

This commit is contained in:
Paul Licameli
2019-11-30 17:56:51 -05:00
parent e4a7c9ba5b
commit b351eabf47
22 changed files with 80 additions and 56 deletions

View File

@@ -73,14 +73,15 @@ public:
// Two-argument version distinguishes internal from translatable string
// such as when the first squeezes spaces out
ComponentInterfaceSymbol( const wxString &internal, const wxString &msgid )
ComponentInterfaceSymbol( const wxString &internal,
const TranslatableString &msgid )
: mInternal{ internal }
// Do not permit non-empty msgid with empty internal
, mMsgid{ internal.empty() ? wxString{} : msgid }
, mMsgid{ internal.empty() ? TranslatableString{} : msgid }
{}
const wxString &Internal() const { return mInternal; }
const wxString &Msgid() const { return mMsgid; }
const TranslatableString &Msgid() const { return mMsgid; }
const wxString &Translation() const
{ return GetCustomTranslation( mMsgid ); }
@@ -96,7 +97,7 @@ public:
private:
wxString mInternal;
wxString mMsgid;
TranslatableString mMsgid;
};