mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Simplify error message via better translation key/message.
This commit is contained in:
parent
a341d39720
commit
7884df8013
2 changed files with 5 additions and 6 deletions
|
@ -584,9 +584,12 @@ public:
|
|||
static bool Load(const std::string& _rFilename, int _Revision, T& _class, std::string* _failureReason)
|
||||
{
|
||||
INFO_LOG(COMMON, "ChunkReader: Loading %s" , _rFilename.c_str());
|
||||
_failureReason->clear();
|
||||
_failureReason->append("LoadStateWrongVersion");
|
||||
|
||||
if (!File::Exists(_rFilename)) {
|
||||
_failureReason->append("StateDoesntExist");
|
||||
_failureReason->clear();
|
||||
_failureReason->append("LoadStateDoesntExist");
|
||||
ERROR_LOG(COMMON, "ChunkReader: File doesn't exist");
|
||||
return false;
|
||||
}
|
||||
|
@ -618,7 +621,6 @@ public:
|
|||
// Check revision
|
||||
if (header.Revision != _Revision)
|
||||
{
|
||||
_failureReason->append("StateWrongVersion");
|
||||
ERROR_LOG(COMMON,"ChunkReader: Wrong file revision, got %d expected %d",
|
||||
header.Revision, _Revision);
|
||||
return false;
|
||||
|
|
|
@ -220,7 +220,6 @@ namespace SaveState
|
|||
Operation &op = operations[i];
|
||||
bool result;
|
||||
std::string reason;
|
||||
std::string fullMessage;
|
||||
|
||||
I18NCategory *s = GetI18NCategory("Screen");
|
||||
|
||||
|
@ -234,9 +233,7 @@ namespace SaveState
|
|||
if(result)
|
||||
osm.Show(s->T("LoadedState"), 2.0);
|
||||
else {
|
||||
fullMessage.append(s->T("LoadStateFailed"));
|
||||
fullMessage.append(s->T(reason.c_str()));
|
||||
osm.Show(fullMessage, 2.0);
|
||||
osm.Show(s->T(reason.c_str()), 2.0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue