Sfoglia il codice sorgente

Fix some comments and indentation.

Renée Kooi 7 anni fa
parent
commit
1233e0b018
2 ha cambiato i file con 19 aggiunte e 24 eliminazioni
  1. 1 1
      src/core/Core.js
  2. 18 23
      src/core/Translator.js

+ 1 - 1
src/core/Core.js

@@ -14,7 +14,7 @@ const DefaultStore = require('../store/DefaultStore')
  */
 class Uppy {
   /**
-  * Instansicate Uppy
+  * Instantiate Uppy
   * @param {object} opts — Uppy options
   */
   constructor (opts) {

+ 18 - 23
src/core/Translator.js

@@ -27,24 +27,19 @@ module.exports = class Translator {
 
     this.opts = Object.assign({}, defaultOptions, opts)
     this.locale = Object.assign({}, defaultOptions.locale, opts.locale)
-
-    // console.log(this.opts.locale)
-
-    // this.locale.pluralize = this.locale ? this.locale.pluralize : defaultPluralize
-    // this.locale.strings = Object.assign({}, en_US.strings, this.opts.locale.strings)
   }
 
-/**
- * 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
- */
+  /**
+   * 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
+   */
   interpolate (phrase, options) {
     const replace = String.prototype.replace
     const dollarRegex = /\$/g
@@ -68,13 +63,13 @@ module.exports = class Translator {
     return phrase
   }
 
-/**
- * Public translate method
- *
- * @param {string} key
- * @param {object} options with values that will be used later to replace placeholders in string
- * @return {string} translated (and interpolated)
- */
+  /**
+   * Public translate method
+   *
+   * @param {string} key
+   * @param {object} options with values that will be used later to replace placeholders in string
+   * @return {string} translated (and interpolated)
+   */
   translate (key, options) {
     if (options && options.smart_count) {
       var plural = this.locale.pluralize(options.smart_count)