diff --git a/CHANGE.md b/CHANGE.md index d69d21b3..9c587337 100755 --- a/CHANGE.md +++ b/CHANGE.md @@ -5,8 +5,9 @@ Change Log: `bootstrap-fileinput` **Major Release: BC Breaking** -**Date**: 19-Jun-2022 +**Date**: 27-Jun-2022 +- (enh #1799): Correct translations containing `{maxSize}, {minSize}, {size}`. - (enh #1796): Add two new Font Awesome 6.x themes. - `fa6` - `explorer-fa6` diff --git a/js/locales/ar.js b/js/locales/ar.js index 871edd25..7d58ecf5 100755 --- a/js/locales/ar.js +++ b/js/locales/ar.js @@ -42,8 +42,8 @@ msgPlaceholder: 'إختر {files} ...', msgZoomModalHeading: 'معاينة تفصيلية', msgFileRequired: 'يجب عليك تحديد ملف للتحميل.', - msgSizeTooSmall: 'الملف "{name}" ({size} ك ب) صغير جداً ويجب أن يكون أكبر من {minSize} ك ب.', - msgSizeTooLarge: 'الملف "{name}" ({size} ك.ب) تعدى الحد الأقصى المسموح للرفع {maxSize} ك.ب.', + msgSizeTooSmall: 'الملف "{name}" ({size}) صغير جداً ويجب أن يكون أكبر من {minSize}.', + msgSizeTooLarge: 'الملف "{name}" ({size}) تعدى الحد الأقصى المسموح للرفع {maxSize}.', msgFilesTooLess: 'يجب عليك اختيار {n} {files} على الأقل للرفع.', msgFilesTooMany: 'عدد الملفات المختارة للرفع ({n}) تعدت الحد الأقصى المسموح به لعدد {m}.', msgTotalFilesTooMany: 'يمكنك تحميل كحد أقصى {m} ملفات ({n} ملفات تم الكشف عنها).', diff --git a/js/locales/fa.js b/js/locales/fa.js index c1f38267..c4aef41a 100755 --- a/js/locales/fa.js +++ b/js/locales/fa.js @@ -42,8 +42,8 @@ msgPlaceholder: 'انتخاب {files} ...', msgZoomModalHeading: 'نمایش با جزییات', msgFileRequired: 'شما باید یک فایل برای بارگذاری انتخاب نمایید.', - msgSizeTooSmall: 'فایل "{name}" ({size} کیلوبایت) خیلی کوچک است و باید از {minSize} کیلوبایت بزرگتر باشد.', - msgSizeTooLarge: 'فایل "{name}" ({size} کیلوبایت) از حداکثر مجاز {maxSize} کیلوبایت بزرگتر است.', + msgSizeTooSmall: 'فایل "{name}" ({size}) خیلی کوچک است و باید از {minSize}.', + msgSizeTooLarge: 'فایل "{name}" ({size}) از حداکثر مجاز {maxSize} بزرگتر است.', msgFilesTooLess: 'شما باید حداقل {n} {files} فایل برای بارگذاری انتخاب کنید.', msgFilesTooMany: 'تعداد فایل‌های انتخاب شده برای بارگذاری ({n}) از حداکثر مجاز عبور کرده است {m}.', msgTotalFilesTooMany: 'You can upload a maximum of {m} files ({n} files detected).', diff --git a/js/locales/fi.js b/js/locales/fi.js index 845173f0..cacc2395 100755 --- a/js/locales/fi.js +++ b/js/locales/fi.js @@ -8,21 +8,21 @@ * * NOTE: this file must be saved in UTF-8 encoding. */ -(function (factory) { - 'use strict'; - if (typeof define === 'function' && define.amd) { - define(['jquery'], factory); - } else if (typeof module === 'object' && typeof module.exports === 'object') { - factory(require('jquery')); - } else { - factory(window.jQuery); - } +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else if (typeof module === 'object' && typeof module.exports === 'object') { + factory(require('jquery')); + } else { + factory(window.jQuery); + } }(function ($) { "use strict"; $.fn.fileinputLocales.fi = { - sizeUnits: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], - bitRateUnits: ['B/s', 'KB/s', 'MB/s', 'GB/s', 'TB/s', 'PB/s', 'EB/s', 'ZB/s', 'YB/s'], + sizeUnits: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], + bitRateUnits: ['B/s', 'KB/s', 'MB/s', 'GB/s', 'TB/s', 'PB/s', 'EB/s', 'ZB/s', 'YB/s'], fileSingle: 'tiedosto', filePlural: 'tiedostot', browseLabel: 'Selaa …', @@ -35,9 +35,9 @@ uploadLabel: 'Lataa', uploadTitle: 'Lataa valitut tiedostot', msgNoFilesSelected: '', - msgFileRequired: 'You must select a file to upload.', - msgSizeTooSmall: 'File "{name}" ({size}) is too small and must be larger than {minSize}.', - msgSizeTooLarge: 'Tiedosto "{name}" ({size} Kt) ylittää suurimman sallitun tiedoston koon, joka on {maxSize} Kt. Yritä uudelleen!', + msgFileRequired: 'You must select a file to upload.', + msgSizeTooSmall: 'File "{name}" ({size}) is too small and must be larger than {minSize}.', + msgSizeTooLarge: 'Tiedosto "{name}" ({size}) ylittää suurimman sallitun tiedoston koon, joka on {maxSize}. Yritä uudelleen!', msgFilesTooLess: 'Vähintään {n} {files} tiedostoa on valittava ladattavaksi. Ole hyvä ja yritä uudelleen!', msgFilesTooMany: 'Valittujen tiedostojen lukumäärä ({n}) ylittää suurimman sallitun määrän {m}. Ole hyvä ja yritä uudelleen!', msgTotalFilesTooMany: 'You can upload a maximum of {m} files ({n} files detected).', @@ -46,7 +46,7 @@ msgFileNotReadable: 'Tiedosto "{name}" ei ole luettavissa.', msgFilePreviewAborted: 'Tiedoston "{name}" esikatselu keskeytetty.', msgFilePreviewError: 'Virhe on tapahtunut luettaessa tiedostoa "{name}".', - msgInvalidFileName: 'Invalid or unsupported characters in file name "{name}".', + msgInvalidFileName: 'Invalid or unsupported characters in file name "{name}".', msgInvalidFileType: 'Tiedosto "{name}" on väärän tyyppinen. Ainoastaan tiedostot tyyppiä "{types}" ovat tuettuja.', msgInvalidFileExtension: 'Tiedoston "{name}" tarkenne on epäkelpo. Ainoastaan tarkenteet "{extensions}" ovat tuettuja.', msgFileTypes: { @@ -60,44 +60,44 @@ 'object': 'Olio' }, msgUploadThreshold: 'Käsitellään …', - msgUploadBegin: 'Initializing …', - msgUploadEnd: 'Done', + msgUploadBegin: 'Initializing …', + msgUploadEnd: 'Done', msgUploadResume: 'Resuming upload …', msgUploadEmpty: 'Ei ladattavaa dataa.', - msgUploadError: 'Upload Error', - msgDeleteError: 'Delete Error', - msgProgressError: 'Error', + msgUploadError: 'Upload Error', + msgDeleteError: 'Delete Error', + msgProgressError: 'Error', msgValidationError: 'Tiedoston latausvirhe', msgLoading: 'Ladataan tiedostoa {index} / {files} …', msgProgress: 'Ladataan tiedostoa {index} / {files} - {name} - {percent}% valmistunut.', msgSelected: '{n} tiedostoa valittu', msgFoldersNotAllowed: 'Raahaa ja pudota ainoastaan tiedostoja! Ohitettu {n} raahattua kansiota.', - msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!', - msgAjaxProgressError: '{operation} failed', + msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!', + msgAjaxProgressError: '{operation} failed', msgDuplicateFile: 'File "{name}" of same size "{size}" has already been selected earlier. Skipping duplicate selection.', msgResumableUploadRetriesExceeded: 'Upload aborted beyond {max} retries for file {file}! Error Details:
{error}
', msgPendingTime: '{time} remaining', msgCalculatingTime: 'calculating time remaining', - ajaxOperations: { - deleteThumb: 'file delete', - uploadThumb: 'file upload', - uploadBatch: 'batch file upload', - uploadExtra: 'form data upload' - }, + ajaxOperations: { + deleteThumb: 'file delete', + uploadThumb: 'file upload', + uploadBatch: 'batch file upload', + uploadExtra: 'form data upload' + }, dropZoneTitle: 'Raahaa ja pudota tiedostot tähän …', dropZoneClickTitle: '
(tai valitse hiirellä {files})', fileActionSettings: { removeTitle: 'Poista tiedosto', uploadTitle: 'Upload file', - uploadRetryTitle: 'Retry upload', - downloadTitle: 'Download file', + uploadRetryTitle: 'Retry upload', + downloadTitle: 'Download file', rotateTitle: 'Rotate 90 deg. clockwise', zoomTitle: 'Yksityiskohdat', dragTitle: 'Siirrä / Järjestele', indicatorNewTitle: 'Ei ladattu', indicatorSuccessTitle: 'Ladattu', indicatorErrorTitle: 'Lataus epäonnistui', - indicatorPausedTitle: 'Upload Paused', + indicatorPausedTitle: 'Upload Paused', indicatorLoadingTitle: 'Ladataan …' }, previewZoomButtonTitles: { diff --git a/js/locales/fr.js b/js/locales/fr.js index b5ead0c8..e8e86bba 100755 --- a/js/locales/fr.js +++ b/js/locales/fr.js @@ -42,7 +42,7 @@ msgZoomModalHeading: 'Aperçu détaillé', msgFileRequired: 'Vous devez sélectionner un fichier à envoyer.', msgSizeTooSmall: 'Le fichier "{name}" ({size}) est inférieur à la taille minimale de {minSize}.', - msgSizeTooLarge: 'Le fichier "{name}" ({size} Ko) dépasse la taille maximale autorisée qui est de {maxSize} Ko.', + msgSizeTooLarge: 'Le fichier "{name}" ({size}) dépasse la taille maximale autorisée qui est de {maxSize}.', msgFilesTooLess: 'Vous devez sélectionner au moins {n} {files} à transmettre.', msgFilesTooMany: 'Le nombre de fichiers sélectionnés ({n}) dépasse la quantité maximale autorisée qui est de {m}.', msgTotalFilesTooMany: 'Il n\'est pas permis d\'envoyer plus de {m} fichiers (actuellement {n} fichiers).', diff --git a/js/plugins/buffer.js b/js/plugins/buffer.js index 331c6282..d4fa0aa1 100644 --- a/js/plugins/buffer.js +++ b/js/plugins/buffer.js @@ -7,7 +7,8 @@ */ 'use strict'; -const base64 = { +var KrajeeBase64, KrajeeIeee754, customInspectSymbol, INSPECT_MAX_BYTES = 50, K_MAX_LENGTH = 0x7fffffff; +KrajeeBase64 = { fromByteArray: function (uint8) { var tmp, len = uint8.length, extraBytes = len % 3, // if we have 1 byte left, pad 2 bytes parts = [], maxChunkLength = 16383; // must be multiple of 3 @@ -63,7 +64,7 @@ const base64 = { return arr; } }; -const ieee754 = { +KrajeeIeee754 = { read: function (buffer, offset, isLE, mLen, nBytes) { var e, m, eLen = (nBytes * 8) - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, nBits = -7, i = isLE ? (nBytes - 1) : 0, d = isLE ? -1 : 1, s = buffer[offset + i]; @@ -140,13 +141,10 @@ const ieee754 = { buffer[offset + i - d] |= s * 128; } }; - -const customInspectSymbol = +customInspectSymbol = (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation : null; -const INSPECT_MAX_BYTES = 50; -const K_MAX_LENGTH = 0x7fffffff; /** * If `Buffer.TYPED_ARRAY_SUPPORT`: @@ -1076,9 +1074,9 @@ Buffer.prototype.toJSON = function toJSON() { function base64Slice(buf, start, end) { if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf); + return KrajeeBase64.fromByteArray(buf); } else { - return base64.fromByteArray(buf.slice(start, end)); + return KrajeeBase64.fromByteArray(buf.slice(start, end)); } } @@ -1502,25 +1500,25 @@ Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(off Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); - return ieee754.read(this, offset, true, 23, 4); + return KrajeeIeee754.read(this, offset, true, 23, 4); }; Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); - return ieee754.read(this, offset, false, 23, 4); + return KrajeeIeee754.read(this, offset, false, 23, 4); }; Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 8, this.length); - return ieee754.read(this, offset, true, 52, 8); + return KrajeeIeee754.read(this, offset, true, 52, 8); }; Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 8, this.length); - return ieee754.read(this, offset, false, 52, 8); + return KrajeeIeee754.read(this, offset, false, 52, 8); }; function checkInt(buf, value, offset, ext, max, min) { @@ -1789,7 +1787,7 @@ function writeFloat(buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38); } - ieee754.write(buf, value, offset, littleEndian, 23, 4); + KrajeeIeee754.write(buf, value, offset, littleEndian, 23, 4); return offset + 4; } @@ -1807,7 +1805,7 @@ function writeDouble(buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308); } - ieee754.write(buf, value, offset, littleEndian, 52, 8); + KrajeeIeee754.write(buf, value, offset, littleEndian, 52, 8); return offset + 8; } @@ -2191,7 +2189,7 @@ function utf16leToBytes(str, units) { } function base64ToBytes(str) { - return base64.toByteArray(base64clean(str)); + return KrajeeBase64.toByteArray(base64clean(str)); } function blitBuffer(src, dst, offset, length) {