From 9505efb797971058280066f2a33f1c421fb7a46d Mon Sep 17 00:00:00 2001 From: printempw Date: Fri, 23 Feb 2018 18:39:37 +0800 Subject: [PATCH] Update vendor i18n files --- resources/assets/src/js/skinlib/upload.js | 4 + resources/lang/en/locale.js | 2 +- resources/lang/zh_CN/locale.js | 189 ++++++++++++---------- 3 files changed, 112 insertions(+), 83 deletions(-) diff --git a/resources/assets/src/js/skinlib/upload.js b/resources/assets/src/js/skinlib/upload.js index 7e28f4a6..5cab37bc 100644 --- a/resources/assets/src/js/skinlib/upload.js +++ b/resources/assets/src/js/skinlib/upload.js @@ -5,6 +5,10 @@ 'use strict'; function initUploadListeners() { + if (trans('vendor.fileinput') !== 'vendor.fileinput') { + $.fn.fileinputLocales[blessing.locale] = trans('vendor.fileinput'); + } + $('body') .on('change', ['#file', '#skin-type'], () => handleFiles()) .on('ifToggled', '#type-cape', () => handleFiles()) diff --git a/resources/lang/en/locale.js b/resources/lang/en/locale.js index 195d021a..2007c5de 100644 --- a/resources/lang/en/locale.js +++ b/resources/lang/en/locale.js @@ -8,7 +8,7 @@ */ (function ($) { - "use strict"; + 'use strict'; $.locales['en'] = { auth: { diff --git a/resources/lang/zh_CN/locale.js b/resources/lang/zh_CN/locale.js index f9f18ebd..7e63adbd 100644 --- a/resources/lang/zh_CN/locale.js +++ b/resources/lang/zh_CN/locale.js @@ -8,7 +8,7 @@ */ (function ($) { - "use strict"; + 'use strict'; $.locales['zh_CN'] = { auth: { @@ -201,90 +201,115 @@ noResult: '无结果' }, vendor: { - datatables: { - "sProcessing": "处理中...", - "sLengthMenu": "每页 _MENU_ 项", - "sZeroRecords": "没有匹配结果", - "sInfo": "当前显示第 _START_ 至 _END_ 项,共 _TOTAL_ 项。", - "sInfoEmpty": "当前显示第 0 至 0 项,共 0 项", - "sInfoFiltered": "(由 _MAX_ 项结果过滤)", - "sInfoPostFix": "", - "sSearch": "搜索:", - "sUrl": "", - "sEmptyTable": "表中数据为空", - "sLoadingRecords": "载入中...", - "sInfoThousands": ",", - "oPaginate": { - "sFirst": "首页", - "sPrevious": "上页", - "sNext": "下页", - "sLast": "末页", - "sJump": "跳转" + fileinput: { + fileSingle: '文件', + filePlural: '个文件', + browseLabel: '选择 …', + removeLabel: '移除', + removeTitle: '清除选中文件', + cancelLabel: '取消', + cancelTitle: '取消进行中的上传', + uploadLabel: '上传', + uploadTitle: '上传选中文件', + msgNo: '没有', + msgNoFilesSelected: '', + msgCancelled: '取消', + msgPlaceholder: '选择 {files}...', + msgZoomModalHeading: '详细预览', + msgFileRequired: '必须选择一个文件上传.', + msgSizeTooSmall: '文件 "{name}" ({size} KB) 必须大于限定大小 {minSize} KB.', + msgSizeTooLarge: '文件 "{name}" ({size} KB) 超过了允许大小 {maxSize} KB.', + msgFilesTooLess: '你必须选择最少 {n} {files} 来上传. ', + msgFilesTooMany: '选择的上传文件个数 ({n}) 超出最大文件的限制个数 {m}.', + msgFileNotFound: '文件 "{name}" 未找到!', + msgFileSecured: '安全限制,为了防止读取文件 "{name}".', + msgFileNotReadable: '文件 "{name}" 不可读.', + msgFilePreviewAborted: '取消 "{name}" 的预览.', + msgFilePreviewError: '读取 "{name}" 时出现了一个错误.', + msgInvalidFileName: '文件名 "{name}" 包含非法字符.', + msgInvalidFileType: '不正确的类型 "{name}". 只支持 "{types}" 类型的文件.', + msgInvalidFileExtension: '不正确的文件扩展名 "{name}". 只支持 "{extensions}" 的文件扩展名.', + msgFileTypes: { + 'image': 'image', + 'html': 'HTML', + 'text': 'text', + 'video': 'video', + 'audio': 'audio', + 'flash': 'flash', + 'pdf': 'PDF', + 'object': 'object' }, - "oAria": { - "sSortAscending": ": 以升序排列此列", - "sSortDescending": ": 以降序排列此列" + msgUploadAborted: '该文件上传被中止', + msgUploadThreshold: '处理中...', + msgUploadBegin: '正在初始化...', + msgUploadEnd: '完成', + msgUploadEmpty: '无效的文件上传.', + msgUploadError: 'Error', + msgValidationError: '验证错误', + msgLoading: '加载第 {index} 文件 共 {files} …', + msgProgress: '加载第 {index} 文件 共 {files} - {name} - {percent}% 完成.', + msgSelected: '{n} {files} 选中', + msgFoldersNotAllowed: '只支持拖拽文件! 跳过 {n} 拖拽的文件夹.', + msgImageWidthSmall: '图像文件的"{name}"的宽度必须是至少{size}像素.', + msgImageHeightSmall: '图像文件的"{name}"的高度必须至少为{size}像素.', + msgImageWidthLarge: '图像文件"{name}"的宽度不能超过{size}像素.', + msgImageHeightLarge: '图像文件"{name}"的高度不能超过{size}像素.', + msgImageResizeError: '无法获取的图像尺寸调整。', + msgImageResizeException: '调整图像大小时发生错误。
{errors}
', + msgAjaxError: '{operation} 发生错误. 请重试!', + msgAjaxProgressError: '{operation} 失败', + ajaxOperations: { + deleteThumb: '删除文件', + uploadThumb: '上传文件', + uploadBatch: '批量上传', + uploadExtra: '表单数据上传' + }, + dropZoneTitle: '拖拽文件到这里 …
支持多文件同时上传', + dropZoneClickTitle: '
(或点击{files}按钮选择文件)', + fileActionSettings: { + removeTitle: '删除文件', + uploadTitle: '上传文件', + uploadRetryTitle: 'Retry upload', + zoomTitle: '查看详情', + dragTitle: '移动 / 重置', + indicatorNewTitle: '没有上传', + indicatorSuccessTitle: '上传', + indicatorErrorTitle: '上传错误', + indicatorLoadingTitle: '上传 ...' + }, + previewZoomButtonTitles: { + prev: '预览上一个文件', + next: '预览下一个文件', + toggleheader: '缩放', + fullscreen: '全屏', + borderless: '无边界模式', + close: '关闭当前预览' + } + }, + datatables: { + sProcessing: '处理中...', + sLengthMenu: '显示 _MENU_ 项结果', + sZeroRecords: '没有匹配结果', + sInfo: '显示第 _START_ 至 _END_ 项结果,共 _TOTAL_ 项', + sInfoEmpty: '显示第 0 至 0 项结果,共 0 项', + sInfoFiltered: '(由 _MAX_ 项结果过滤)', + sInfoPostFix: '', + sSearch: '搜索:', + sUrl: '', + sEmptyTable: '表中数据为空', + sLoadingRecords: '载入中...', + sInfoThousands: ',', + oPaginate: { + sFirst: '首页', + sPrevious: '上页', + sNext: '下页', + sLast: '末页' + }, + oAria: { + sSortAscending: ': 以升序排列此列', + sSortDescending: ': 以降序排列此列' } } } }; - - $.fn.fileinputLocales['zh_CN'] = { - fileSingle: '文件', - filePlural: '多个文件', - browseLabel: '选择 …', - removeLabel: '移除', - removeTitle: '清除选中文件', - cancelLabel: '取消', - cancelTitle: '取消进行中的上传', - uploadLabel: '上传', - uploadTitle: '上传选中文件', - msgNo: '没有', - msgNoFilesSelected: '', - msgCancelled: '取消', - msgZoomModalHeading: '详细预览', - msgSizeTooLarge: '文件 "{name}" ({size} KB) 超过了允许大小 {maxSize} KB.', - msgFilesTooLess: '你必须选择最少 {n} {files} 来上传. ', - msgFilesTooMany: '选择的上传文件个数 ({n}) 超出最大文件的限制个数 {m}.', - msgFileNotFound: '文件 "{name}" 未找到!', - msgFileSecured: '安全限制,为了防止读取文件 "{name}".', - msgFileNotReadable: '文件 "{name}" 不可读.', - msgFilePreviewAborted: '取消 "{name}" 的预览.', - msgFilePreviewError: '读取 "{name}" 时出现了一个错误.', - msgInvalidFileType: '不正确的类型 "{name}". 只支持 "{types}" 类型的文件.', - msgInvalidFileExtension: '不正确的文件扩展名 "{name}". 只支持 "{extensions}" 的文件扩展名.', - msgUploadAborted: '该文件上传被中止', - msgUploadThreshold: 'Processing...', - msgValidationError: '验证错误', - msgLoading: '加载第 {index} 文件 共 {files} …', - msgProgress: '加载第 {index} 文件 共 {files} - {name} - {percent}% 完成.', - msgSelected: '{n} {files} 选中', - msgFoldersNotAllowed: '只支持拖拽文件! 跳过 {n} 拖拽的文件夹.', - msgImageWidthSmall: '宽度的图像文件的"{name}"的必须是至少{size}像素.', - msgImageHeightSmall: '图像文件的"{name}"的高度必须至少为{size}像素.', - msgImageWidthLarge: '宽度的图像文件"{name}"不能超过{size}像素.', - msgImageHeightLarge: '图像文件"{name}"的高度不能超过{size}像素.', - msgImageResizeError: '无法获取的图像尺寸调整。', - msgImageResizeException: '错误而调整图像大小。
{errors}
', - dropZoneTitle: '拖拽文件到这里 …', - dropZoneClickTitle: '
(or click to select {files})', - fileActionSettings: { - removeTitle: '删除文件', - uploadTitle: '上传文件', - zoomTitle: '查看详情', - dragTitle: 'Move / Rearrange', - indicatorNewTitle: '没有上传', - indicatorSuccessTitle: '上传', - indicatorErrorTitle: '上传错误', - indicatorLoadingTitle: '上传 ...' - }, - previewZoomButtonTitles: { - prev: 'View previous file', - next: 'View next file', - toggleheader: 'Toggle header', - fullscreen: 'Toggle full screen', - borderless: 'Toggle borderless mode', - close: 'Close detailed preview' - } - }; })(window.jQuery);