Fix asset upload error message handling

meow-7.2.2
Ansariel 2016-11-22 23:22:13 +01:00
parent 646559becb
commit 4db0e85b09
12 changed files with 26 additions and 19 deletions

View File

@ -370,9 +370,11 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
std::string shortName = gDirUtilp->getBaseFileName(filename);
// No extension
errorMessage = llformat(
"No file extension for the file: '%s'\nPlease make sure the file has a correct file extension",
shortName.c_str());
// <FS:Ansariel> Duplicate error message output
//errorMessage = llformat(
// "No file extension for the file: '%s'\nPlease make sure the file has a correct file extension",
// shortName.c_str());
// </FS:Ansariel>
errorLabel = "NoFileExtension";
error = true;
}
@ -382,8 +384,11 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
assetType = LLAssetType::AT_TEXTURE;
if (!LLViewerTextureList::createUploadFile(getFileName(), filename, codec))
{
errorMessage = llformat("Problem with file %s:\n\n%s\n",
getFileName().c_str(), LLImage::getLastError().c_str());
// <FS:Ansariel> Duplicate error message output
//errorMessage = llformat("Problem with file %s:\n\n%s\n",
// getFileName().c_str(), LLImage::getLastError().c_str());
errorMessage = LLImage::getLastError();
// </FS:Ansariel>
errorLabel = "ProblemWithFile";
error = true;
}
@ -405,12 +410,12 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
switch (encodeResult)
{
case LLVORBISENC_DEST_OPEN_ERR:
errorMessage = llformat("Couldn't open temporary compressed sound file for writing: %s\n", filename.c_str());
//errorMessage = llformat("Couldn't open temporary compressed sound file for writing: %s\n", filename.c_str()); // <FS:Ansariel> Duplicate error message output
errorLabel = "CannotOpenTemporarySoundFile";
break;
default:
errorMessage = llformat("Unknown vorbis encode failure on: %s\n", getFileName().c_str());
//errorMessage = llformat("Unknown vorbis encode failure on: %s\n", getFileName().c_str()); // <FS:Ansariel> Duplicate error message output
errorLabel = "UnknownVorbisEncodeFailure";
break;
}
@ -419,7 +424,7 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
}
else if (exten == "bvh")
{
errorMessage = llformat("We do not currently support bulk upload of animation files\n");
//errorMessage = llformat("We do not currently support bulk upload of animation files\n"); // <FS:Ansariel> Duplicate error message output
errorLabel = "DoNotSupportBulkAnimationUpload";
error = true;
}
@ -451,6 +456,8 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
LLSD errorResult(LLSD::emptyMap());
errorResult["error"] = LLSD::Binary(true);
// <FS:Ansariel> Duplicate error message output
if (!errorMessage.empty())
errorResult["message"] = errorMessage;
errorResult["label"] = errorLabel;
return errorResult;

View File

@ -821,7 +821,7 @@ Erwartet wurde [VALIDS]
<notification name="ProblemWithFile">
Problem mit Datei [FILE]:
[ERROR]
[REASON]
</notification>
<notification name="CannotOpenTemporarySoundFile">
Temporäre komprimierte Sounddatei konnte nicht geöffnet werden: [FILE]

View File

@ -2108,7 +2108,7 @@ Audio file is too long ([MAX_LENGTH] second maximum):
type="alertmodal">
Problem with file [FILE]:
[ERROR]
[REASON]
<tag>fail</tag>
</notification>

View File

@ -833,7 +833,7 @@ Se admiten [VALIDS]
<notification name="ProblemWithFile">
Problemas con el archivo [FILE]:
[ERROR]
[REASON]
</notification>
<notification name="CannotOpenTemporarySoundFile">
No se ha podido abrir para su escritura el archivo comprimido de sonido: [FILE]

View File

@ -811,7 +811,7 @@ Assurez-vous que le fichier a l&apos;extension correcte.
<notification name="ProblemWithFile">
Problème avec le fichier [FILE] :
[ERROR]
[REASON]
</notification>
<notification name="CannotOpenTemporarySoundFile">
Impossible d&apos;ouvrir le fichier son compressé temporaire : [FILE]

View File

@ -794,7 +794,7 @@ Attese [VALIDS]
<notification name="ProblemWithFile">
Problemi con il file [FILE]:
[ERROR]
[REASON]
</notification>
<notification name="CannotOpenTemporarySoundFile">
Impossibile aprire in scrittura il file temporaneamente compresso: [FILE]

View File

@ -845,7 +845,7 @@ L$ が不足しているのでこのグループに参加することができ
<notification name="ProblemWithFile">
「 [FILE] 」に問題があります。
[ERROR]
[REASON]
</notification>
<notification name="CannotOpenTemporarySoundFile">
書き込み用の一時圧縮サウンドファイルを開くことができません:[FILE]

View File

@ -750,7 +750,7 @@ Oczekiwane: [VALIDS]
<notification name="ProblemWithFile">
Problem z plikiem [FILE]:
[ERROR]
[REASON]
</notification>
<notification name="CannotOpenTemporarySoundFile">
Nie można otworzyć tymczasowego skompresowanego pliku dźwiękowego w celu zapisu: [FILE]

View File

@ -790,7 +790,7 @@ Esperada [VALIDS]
<notification name="ProblemWithFile">
Problemas com o arquivo [FILE]:
[ERROR]
[REASON]
</notification>
<notification name="CannotOpenTemporarySoundFile">
Não pode abrir o arquivo temporário de som comprimido, para leitura: [FILE]

View File

@ -834,7 +834,7 @@
<notification name="ProblemWithFile">
Проблема с файлом [FILE]:
[ERROR]
[REASON]
</notification>
<notification name="CannotOpenTemporarySoundFile">
Не удалось открыть для записи временно сжатый звуковой файл: [FILE]

View File

@ -812,7 +812,7 @@ Beklenen [VALIDS]
<notification name="ProblemWithFile">
[FILE] dosyasında sorun oluştu:
[ERROR]
[REASON]
</notification>
<notification name="CannotOpenTemporarySoundFile">
Geçici sıkıştırılmış ses dosyası yazma için açılamadı: [FILE]

View File

@ -796,7 +796,7 @@
<notification name="ProblemWithFile">
檔案 [FILE] 有問題:
[ERROR]
[REASON]
</notification>
<notification name="CannotOpenTemporarySoundFile">
無法開啟並寫入暫時壓縮音頻檔:[FILE]