Fix asset upload error message handling
parent
646559becb
commit
4db0e85b09
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -811,7 +811,7 @@ Assurez-vous que le fichier a l'extension correcte.
|
|||
<notification name="ProblemWithFile">
|
||||
Problème avec le fichier [FILE] :
|
||||
|
||||
[ERROR]
|
||||
[REASON]
|
||||
</notification>
|
||||
<notification name="CannotOpenTemporarySoundFile">
|
||||
Impossible d'ouvrir le fichier son compressé temporaire : [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]
|
||||
|
|
|
|||
|
|
@ -845,7 +845,7 @@ L$ が不足しているのでこのグループに参加することができ
|
|||
<notification name="ProblemWithFile">
|
||||
「 [FILE] 」に問題があります。
|
||||
|
||||
[ERROR]
|
||||
[REASON]
|
||||
</notification>
|
||||
<notification name="CannotOpenTemporarySoundFile">
|
||||
書き込み用の一時圧縮サウンドファイルを開くことができません:[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]
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -834,7 +834,7 @@
|
|||
<notification name="ProblemWithFile">
|
||||
Проблема с файлом [FILE]:
|
||||
|
||||
[ERROR]
|
||||
[REASON]
|
||||
</notification>
|
||||
<notification name="CannotOpenTemporarySoundFile">
|
||||
Не удалось открыть для записи временно сжатый звуковой файл: [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]
|
||||
|
|
|
|||
|
|
@ -796,7 +796,7 @@
|
|||
<notification name="ProblemWithFile">
|
||||
檔案 [FILE] 有問題:
|
||||
|
||||
[ERROR]
|
||||
[REASON]
|
||||
</notification>
|
||||
<notification name="CannotOpenTemporarySoundFile">
|
||||
無法開啟並寫入暫時壓縮音頻檔:[FILE]
|
||||
|
|
|
|||
Loading…
Reference in New Issue