commit 7648eea61a61552432bdd0caf2cb702641e3fe8e
parent 16947a74c97226ba73f947056d73bd90d71e93a6
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date: Thu, 6 Sep 2012 10:30:00 -0700
Correct decoding error message
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/spek-audio-desc.cc b/src/spek-audio-desc.cc
@@ -91,8 +91,12 @@ wxString spek_audio_desc(const struct spek_audio_properties *properties)
break;
}
- // TRANSLATORS: first %s is the error message, second %s is stream description.
- desc = wxString::Format(_("%s: %s"), error.c_str(), desc.c_str());
+ if (desc.IsEmpty()) {
+ desc = error;
+ } else {
+ // TRANSLATORS: first %s is the error message, second %s is stream description.
+ desc = wxString::Format(_("%s: %s"), error.c_str(), desc.c_str());
+ }
}
return desc;