Browse Source

Docs and fixes

Artur Paikin 9 years ago
parent
commit
abc73f98ed
4 changed files with 22 additions and 17 deletions
  1. 2 2
      src/core/Core.js
  2. 4 1
      src/core/Translator.js
  3. 3 3
      website/_config.yml
  4. 13 11
      website/themes/uppy/source/uppy/uppy.js

+ 2 - 2
src/core/Core.js

@@ -26,8 +26,8 @@ export default class Core {
     // Container for different types of plugins
     this.plugins = {};
 
-    this.translator = new Translator({locale: this.opts.locale});
-    console.log(this.translator.t('files_chosen', {smart_count: 3}));
+    // this.translator = new Translator({locale: this.opts.locale});
+    // console.log(this.translator.t('files_chosen', {smart_count: 3}));
   }
 
   /**

+ 4 - 1
src/core/Translator.js

@@ -9,7 +9,7 @@
 *
 * Usage example: `translator.t('files_chosen', {smart_count: 3})`
 *
-* @param {opts}
+* @param {object} opts
 */
 export default class Translator {
   constructor(opts) {
@@ -22,6 +22,9 @@ export default class Translator {
   * Takes a string with placeholder variables like `%{smart_count} file selected`
   * and replaces it with values from options `{smart_count: 5}`
   *
+  * @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
+  * taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
+  *
   * @param {string} phrase that needs interpolation, with placeholders
   * @param {object} options with values that will be used to replace placeholders
   * @return {string} interpolated

+ 3 - 3
website/_config.yml

@@ -5,9 +5,9 @@
 # Uppy versions, auto updated by update.js
 uppy_version: 0.0.1
 
-uppy_dev_size: "87.40"
-uppy_min_size: "87.40"
-uppy_gz_size: "87.40"
+uppy_dev_size: "87.57"
+uppy_min_size: "87.57"
+uppy_gz_size: "87.57"
 
 # Theme
 google_analytics: UA-63083-12

+ 13 - 11
website/themes/uppy/source/uppy/uppy.js

@@ -1933,8 +1933,8 @@ var Core = (function () {
     // Container for different types of plugins
     this.plugins = {};
 
-    this.translator = new _coreTranslator2['default']({ locale: this.opts.locale });
-    console.log(this.translator.t('files_chosen', { smart_count: 3 }));
+    // this.translator = new Translator({locale: this.opts.locale});
+    // console.log(this.translator.t('files_chosen', {smart_count: 3}));
   }
 
   /**
@@ -2036,7 +2036,7 @@ module.exports = exports['default'];
 *
 * Usage example: `translator.t('files_chosen', {smart_count: 3})`
 *
-* @param {opts}
+* @param {object} opts
 */
 'use strict';
 
@@ -2060,6 +2060,9 @@ var Translator = (function () {
   * Takes a string with placeholder variables like `%{smart_count} file selected`
   * and replaces it with values from options `{smart_count: 5}`
   *
+  * @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
+  * taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
+  *
   * @param {string} phrase that needs interpolation, with placeholders
   * @param {object} options with values that will be used to replace placeholders
   * @return {string} interpolated
@@ -2116,14 +2119,13 @@ exports['default'] = Translator;
 module.exports = exports['default'];
 
 },{}],7:[function(require,module,exports){
-/**
-* Runs a waterfall of promises: calls each task, passing the result
-* from the previous one as an argument. The first task is run with an empty array.
-*
-* @param {Array} tasks an array of Promises to run waterfall on
-* @return {Promise} of the last task
-*/
-
+// /**
+// * Runs a waterfall of promises: calls each task, passing the result
+// * from the previous one as an argument. The first task is run with an empty array.
+// *
+// * @param {Array} tasks an array of Promises to run waterfall on
+// * @return {Promise} of the last task
+// */
 'use strict';
 
 Object.defineProperty(exports, '__esModule', {