虽然fineuploader发送给最终用户的大多数字符串(不是开发人员修复嵌入精细上传器中的错误)来自模板,因此可以在服务器端轻松翻译创建该模板,我发现有些地方没有似乎有这个起源?
使用过程中来到我的地方:
confirmMessage: "Are you sure you want to delete {filename}?",
通过fineuploader-4.2.1.js进行grepping时可以找到其他几个字符串:
qq.status = {
SUBMITTING: "submitting",
SUBMITTED: "submitted",
REJECTED: "rejected",
QUEUED: "queued",
CANCELED: "canceled",
PAUSED: "paused",
UPLOADING: "uploading",
UPLOAD_RETRYING: "retrying upload",
UPLOAD_SUCCESSFUL: "upload successful",
UPLOAD_FAILED: "upload failed",
DELETE_FAILED: "delete failed",
DELETING: "deleting",
DELETED: "deleted"
return new qq.Promise().failure(imgOrCanvas, "File or URL not found.");
"due to CORS on a user agent that does not support pre-flighting.", "warn");
this._options.callbacks.onError(id, name, "Delete request failed", xhrOrXdr);
this._options.callbacks.onError(id, name, "Delete request failed with response code " + xhrOrXdr.status, xhrOrXdr);
this._options.callbacks.onError(id, name, "XHR returned response code " + xhr.status, xhr);
typeError: "{file} has an invalid extension. Valid extension(s): {extensions}.",
sizeError: "{file} is too large, maximum file size is {sizeLimit}.",
minSizeError: "{file} is too small, minimum file size is {minSizeLimit}.",
emptyError: "{file} is empty, please select files again without it.",
noFilesError: "No files to upload.",
tooManyItemsError: "Too many items ({netItems}) would be uploaded. Item limit is {itemLimit}.",
maxHeightImageError: "Image is too tall.",
maxWidthImageError: "Image is too wide.",
minHeightImageError: "Image is not tall enough.",
minWidthImageError: "Image is not wide enough.",
retryFailTooManyItems: "Retry failed - you have reached your file limit.",
onLeave: "The files are being uploaded, if you leave now the upload will be canceled."
responseProperty: "error",
tooManyFilesError: "You may only drop one file",
unsupportedBrowser: "Unrecoverable error - this browser does not permit file uploading of any kind."
autoRetryNote: "Retrying {retryNum}/{maxAuto}..."
confirmMessage: "Are you sure you want to delete {filename}?",
deletingStatusText: "Deleting...",
deletingFailedText: "Delete failed"
namePromptMessage: "Please name this image"
throw new Error("file with passed id was not added, or already uploaded or canceled");
promise.failure(img, "Problem drawing thumbnail!");
drawPreview.failure(container, "Browser cannot render image!");
drawPreview.failure(container, "Not previewable");
thePromise.failure("No EXIF header to be found!");
我在这里的文档中遗漏了什么吗? THIA - 干杯, 威利
答案 0 :(得分:1)
您可以在Fine Uploader UI模式deleteFile
options中更改上面提到的确认消息。
您问题中列出的许多其他项目都可以通过文档中定义的选项轻松自定义。例如,请参阅core messages
option和其他messages
option for UI mode。此外,上面列出的许多项目根本不是消息,和/或不直接传递给用户,例如responseProperty
,所有qq.status
项目等。如果有您必须覆盖的特定文本项目,但由于库中的疏忽而无法覆盖,请打开功能请求。