Adding i18n support to xpinstall: using StringBundleServcie.

git-svn-id: svn://10.0.0.236/trunk@48559 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sgehani%netscape.com
1999-09-21 08:46:10 +00:00
parent a4396ce8f6
commit c6e2c33e9c
7 changed files with 130 additions and 22 deletions

View File

@@ -137,21 +137,36 @@ void nsInstallDelete::Abort()
char* nsInstallDelete::toString()
{
char* buffer = new char[1024];
char* rsrcVal = nsnull;
if (buffer == nsnull)
if (buffer == nsnull || !mInstall)
return nsnull;
if (mDeleteStatus == DELETE_COMPONENT)
{
char* temp = mRegistryName.ToNewCString();
sprintf( buffer, nsInstallResources::GetDeleteComponentString(), temp);
rsrcVal = mInstall->GetResourcedString("DeleteComponent");
if (rsrcVal)
{
sprintf( buffer, rsrcVal, temp);
nsCRT::free(rsrcVal);
}
if (temp)
delete [] temp;
}
else
{
if (mFinalFile)
sprintf( buffer, nsInstallResources::GetDeleteFileString(), mFinalFile->GetCString());
{
rsrcVal = mInstall->GetResourcedString("DeleteComponent");
if (rsrcVal)
{
sprintf( buffer, rsrcVal, mFinalFile->GetCString());
nsCRT::free(rsrcVal);
}
}
}
return buffer;