File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ import adminforth from '@/adminforth';
2626import AsyncQueue from ' ./async-queue' ;
2727import Quill from " quill" ;
2828import " quill/dist/quill.snow.css" ;
29+ import { useI18n } from ' vue-i18n' ;
2930
31+ const { t } = useI18n ();
3032function dbg(title : string ,... args : any []) {
3133 // return; // comment for debug
3234 console .log (title , ... args .map (a => JSON .stringify (a , null , 1 )));
@@ -130,7 +132,7 @@ async function saveToServer(file: File) {
130132
131133 if (error ) {
132134 adminforth .alert ({
133- message: ` File was not uploaded because of error: ${error } ` ,
135+ message: ` ${ t ( ' File was not uploaded because of error:' )} ${error }` ,
134136 variant: ' danger'
135137 });
136138 return ;
@@ -155,7 +157,7 @@ async function saveToServer(file: File) {
155157 });
156158 if (! success ) {
157159 adminforth .alert ({
158- messageHtml: ` <div>Sorry but the file was not uploaded because of S3 Request Error: </div>
160+ messageHtml: ` <div>${ t ( ' Sorry but the file was not uploaded because of S3 Request Error:' )} </div>
159161 <pre style="white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; max-width: 100%;">${
160162 xhr .responseText .replace (/ </ g , ' <' ).replace (/ >/ g , ' >' )
161163 }</pre> ` ,
You can’t perform that action at this time.
0 commit comments