mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 08:09:32 +02:00
Fix misbehavior of TranslatableString::Format in Windows build...
... Make sure it doesn't try to capture this (quite unnecessarily!) but calls the static overload of DoFormat. Make other qualified calls too for added measure.
This commit is contained in:
parent
fea8af541e
commit
a3d8518f5d
@ -387,13 +387,13 @@ public:
|
|||||||
(const wxString &str, Request request) -> wxString {
|
(const wxString &str, Request request) -> wxString {
|
||||||
switch ( request ) {
|
switch ( request ) {
|
||||||
case Request::Context:
|
case Request::Context:
|
||||||
return DoGetContext( prevFormatter );
|
return TranslatableString::DoGetContext( prevFormatter );
|
||||||
case Request::Format:
|
case Request::Format:
|
||||||
case Request::DebugFormat:
|
case Request::DebugFormat:
|
||||||
default: {
|
default: {
|
||||||
bool debug = request == Request::DebugFormat;
|
bool debug = request == Request::DebugFormat;
|
||||||
return wxString::Format(
|
return wxString::Format(
|
||||||
DoFormat( prevFormatter, str, debug ),
|
TranslatableString::DoFormat( prevFormatter, str, debug ),
|
||||||
TranslatableString::TranslateArgument( args, debug )...
|
TranslatableString::TranslateArgument( args, debug )...
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -499,14 +499,15 @@ private:
|
|||||||
(const wxString &str, Request request) -> wxString {
|
(const wxString &str, Request request) -> wxString {
|
||||||
switch ( request ) {
|
switch ( request ) {
|
||||||
case Request::Context:
|
case Request::Context:
|
||||||
return DoGetContext( prevFormatter );
|
return TranslatableString::DoGetContext( prevFormatter );
|
||||||
case Request::Format:
|
case Request::Format:
|
||||||
case Request::DebugFormat:
|
case Request::DebugFormat:
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
bool debug = request == Request::DebugFormat;
|
bool debug = request == Request::DebugFormat;
|
||||||
return wxString::Format(
|
return wxString::Format(
|
||||||
DoChooseFormat( prevFormatter, str, plural, nn, debug ),
|
TranslatableString::DoChooseFormat(
|
||||||
|
prevFormatter, str, plural, nn, debug ),
|
||||||
TranslatableString::TranslateArgument( args, debug )...
|
TranslatableString::TranslateArgument( args, debug )...
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -356,13 +356,13 @@ TranslatableString &TranslatableString::Join(
|
|||||||
-> wxString {
|
-> wxString {
|
||||||
switch ( request ) {
|
switch ( request ) {
|
||||||
case Request::Context:
|
case Request::Context:
|
||||||
return DoGetContext( prevFormatter );
|
return TranslatableString::DoGetContext( prevFormatter );
|
||||||
case Request::Format:
|
case Request::Format:
|
||||||
case Request::DebugFormat:
|
case Request::DebugFormat:
|
||||||
default: {
|
default: {
|
||||||
bool debug = request == Request::DebugFormat;
|
bool debug = request == Request::DebugFormat;
|
||||||
return
|
return
|
||||||
DoFormat( prevFormatter, str, debug )
|
TranslatableString::DoFormat( prevFormatter, str, debug )
|
||||||
+ separator
|
+ separator
|
||||||
+ arg.DoFormat( debug );
|
+ arg.DoFormat( debug );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user