mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Removed my previous PanicAlert translation hack. Fixed with a better method suggested by BhaaL. The translation is done by a callback in the MsgHandler routine that is set at program start. Added macros PanicAlertT, SuccessAlertT, PanicYesNoT, and AskYesNoT that are identical to the non T versions except those strings will be added by gettext to the po files to be translated. These can and should be used anywhere in the code for strings that should be translated.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6838 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -37,7 +37,7 @@ CBannerLoaderGC::CBannerLoaderGC(DiscIO::IFileSystem& _rFileSystem)
|
||||
_rFileSystem.ReadFile("opening.bnr", m_pBannerFile, FileSize);
|
||||
m_BNRType = getBannerType();
|
||||
if (m_BNRType == BANNER_UNKNOWN)
|
||||
PanicAlert("Invalid opening.bnr found in gcm:\n%s\n You may need to redump this game.",
|
||||
PanicAlertT("Invalid opening.bnr found in gcm:\n%s\n You may need to redump this game.",
|
||||
_rFileSystem.GetVolume()->GetName().c_str());
|
||||
else m_IsValid = true;
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ bool CompressFileToBlob(const char* infile, const char* outfile, u32 sub_type,
|
||||
|
||||
if (IsCompressedBlob(infile))
|
||||
{
|
||||
PanicAlert("%s is already compressed! Cannot compress it further.", infile);
|
||||
PanicAlertT("%s is already compressed! Cannot compress it further.", infile);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ bool CompressFileToBlob(const char* infile, const char* outfile, u32 sub_type,
|
||||
{
|
||||
if (!DiscScrubber::SetupScrub(infile, block_size))
|
||||
{
|
||||
PanicAlert("%s failed to be scrubbed. Probably the image is corrupt.", infile);
|
||||
PanicAlertT("%s failed to be scrubbed. Probably the image is corrupt.", infile);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ bool DecompressBlobToFile(const char* infile, const char* outfile, CompressCB ca
|
||||
{
|
||||
if (!IsCompressedBlob(infile))
|
||||
{
|
||||
PanicAlert("File not compressed");
|
||||
PanicAlertT("File not compressed");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ void DriveReader::GetBlock(u64 block_num, u8 *out_ptr)
|
||||
LONG off_high = (LONG)(offset >> 32);
|
||||
SetFilePointer(hDisc, off_low, &off_high, FILE_BEGIN);
|
||||
if (!ReadFile(hDisc, lpSector, m_blocksize, (LPDWORD)&NotUsed, NULL))
|
||||
PanicAlert("Disc Read Error");
|
||||
PanicAlertT("Disc Read Error");
|
||||
#else
|
||||
fseeko(file_, m_blocksize*block_num, SEEK_SET);
|
||||
fread(lpSector, 1, m_blocksize, file_);
|
||||
@ -127,7 +127,7 @@ bool DriveReader::ReadMultipleAlignedBlocks(u64 block_num, u64 num_blocks, u8 *o
|
||||
SetFilePointer(hDisc, off_low, &off_high, FILE_BEGIN);
|
||||
if (!ReadFile(hDisc, out_ptr, (DWORD)(m_blocksize * num_blocks), (LPDWORD)&NotUsed, NULL))
|
||||
{
|
||||
PanicAlert("Disc Read Error");
|
||||
PanicAlertT("Disc Read Error");
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
|
@ -308,13 +308,13 @@ bool CVolumeDirectory::SetApploader(const std::string& _rApploader)
|
||||
std::string data;
|
||||
if (!File::ReadFileToString(false, _rApploader.c_str(), data))
|
||||
{
|
||||
PanicAlert("Apploader unable to load from file");
|
||||
PanicAlertT("Apploader unable to load from file");
|
||||
return false;
|
||||
}
|
||||
m_apploaderSize = 0x20 + Common::swap32(*(u32*)&data.data()[0x14]) + Common::swap32(*(u32*)&data.data()[0x18]);
|
||||
if (m_apploaderSize != data.size())
|
||||
{
|
||||
PanicAlert("Apploader is the wrong size...is it really an apploader?");
|
||||
PanicAlertT("Apploader is the wrong size...is it really an apploader?");
|
||||
return false;
|
||||
}
|
||||
m_apploader = new u8[m_apploaderSize];
|
||||
|
@ -57,7 +57,7 @@ std::string CVolumeGC::GetUniqueID() const
|
||||
char id[6];
|
||||
if (!Read(0, sizeof(id), reinterpret_cast<u8*>(id)))
|
||||
{
|
||||
PanicAlert("Failed to read unique ID from disc image");
|
||||
PanicAlertT("Failed to read unique ID from disc image");
|
||||
return NO_UID;
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ u8* WiiWAD::CreateWADEntry(DiscIO::IBlobReader& _rReader, u32 _Size, u64 _Offset
|
||||
if (!_rReader.Read(_Offset, _Size, pTmpBuffer))
|
||||
{
|
||||
ERROR_LOG(DISCIO, "WiiWAD: Could not read from file");
|
||||
PanicAlert("WiiWAD: Could not read from file");
|
||||
PanicAlertT("WiiWAD: Could not read from file");
|
||||
}
|
||||
return pTmpBuffer;
|
||||
}
|
||||
|
Reference in New Issue
Block a user