Selaa lähdekoodia

Upgrade to release v4.1.8

Kartik Visweswaran 10 vuotta sitten
vanhempi
commit
98bd3a52dd
2 muutettua tiedostoa jossa 44 lisäystä ja 1 poistoa
  1. 1 1
      README.md
  2. 43 0
      js/fileinput_locale_en.js

+ 1 - 1
README.md

@@ -140,7 +140,7 @@ Alternatively, you can directly call the plugin options by setting data attribut
 
 ## Translations
 
-As shown in the installation section, translations are now enabled with release 4.1.8. You can load a locale file `/fileinput_locale_<lang>.js` after the core `fileinput.min.js` file, where `<lang>` is the language code (e.g. `de`, `fr` etc.). If  locale file does not exist, you can submit a translation for the new language via a [new pull request to add to this folder](https://github.com/kartik-v/bootstrap-fileinput/tree/master/js). Check the [sample german translation locale file]((https://github.com/kartik-v/bootstrap-fileinput/tree/master/js/fileinput_locale_de.js) to copy and create your own.
+As shown in the installation section, translations are now enabled with release 4.1.8. You can load a locale file `/fileinput_locale_<lang>.js` after the core `fileinput.min.js` file, where `<lang>` is the language code (e.g. `de`, `fr` etc.). If  locale file does not exist, you can submit a translation for the new language via a [new pull request to add to this folder](https://github.com/kartik-v/bootstrap-fileinput/tree/master/js). Check the [sample english file]((https://github.com/kartik-v/bootstrap-fileinput/tree/master/js/fileinput_locale_en.js) to copy and create one for your own language.
 
 ## Plugin Options
 The plugin supports these following options:

+ 43 - 0
js/fileinput_locale_en.js

@@ -0,0 +1,43 @@
+/*!
+ * FileInput English Translations - Sample file for copying and creating other translations
+ *
+ * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or
+ * any HTML markup tags in the messages must not be converted or translated.
+ *
+ * @see http://github.com/kartik-v/bootstrap-fileinput
+ *
+ * NOTE: this file must be saved in UTF-8 encoding.
+ */
+(function ($) {
+    "use strict";
+
+    $.fn.fileinput.locales.en = {
+        fileSingle: 'file',
+        filePlural: 'files',
+        browseLabel: 'Browse &hellip;',
+        removeLabel: 'Remove',
+        removeTitle: 'Clear selected files',
+        cancelLabel: 'Cancel',
+        cancelTitle: 'Abort ongoing upload',
+        uploadLabel: 'Upload',
+        uploadTitle: 'Upload selected files',
+        msgSizeTooLarge: 'File "{name}" (<b>{size} KB</b>) exceeds maximum allowed upload size of <b>{maxSize} KB</b>. Please retry your upload!',
+        msgFilesTooLess: 'You must select at least <b>{n}</b> {files} to upload. Please retry your upload!',
+        msgFilesTooMany: 'Number of files selected for upload <b>({n})</b> exceeds maximum allowed limit of <b>{m}</b>. Please retry your upload!',
+        msgFileNotFound: 'File "{name}" not found!',
+        msgFileSecured: 'Security restrictions prevent reading the file "{name}".',
+        msgFileNotReadable: 'File "{name}" is not readable.',
+        msgFilePreviewAborted: 'File preview aborted for "{name}".',
+        msgFilePreviewError: 'An error occurred while reading the file "{name}".',
+        msgInvalidFileType: 'Invalid type for file "{name}". Only "{types}" files are supported.',
+        msgInvalidFileExtension: 'Invalid extension for file "{name}". Only "{extensions}" files are supported.',
+        msgValidationError: 'File Upload Error',
+        msgLoading: 'Loading file {index} of {files} &hellip;',
+        msgProgress: 'Loading file {index} of {files} - {name} - {percent}% completed.',
+        msgSelected: '{n} files selected',
+        msgFoldersNotAllowed: 'Drag & drop files only! {n} folder(s) dropped were skipped.',
+        dropZoneTitle: 'Drag & drop files here &hellip;'
+    };
+
+    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.en);
+})(window.jQuery);