Просмотр исходного кода

Merge branch 'master' into inprv/better-input-on-mobile

Yuki Takei 7 лет назад
Родитель
Сommit
3ad3f79981
4 измененных файлов с 12 добавлено и 7 удалено
  1. 1 0
      CHANGES.md
  2. 7 3
      lib/crowi/dev.js
  3. 1 1
      package.json
  4. 3 3
      yarn.lock

+ 1 - 0
CHANGES.md

@@ -12,6 +12,7 @@ CHANGES
 * Fix: Comment body doesn't break long terms
 * Fix: lsx plugin lists up pages that hit by forward match wrongly
     * Introduced by 3.0.4
+* Support: Multilingualize React components with i18next
 * Support: Upgrade libs
     * elasticsearch
     * googleapis

+ 7 - 3
lib/crowi/dev.js

@@ -41,9 +41,13 @@ class CrowiDev {
    */
   requireForAutoReloadServer() {
     // load all json files for live reloading
-    fs.readdirSync(this.crowi.localeDir).map((dirname) => {
-      require(path.join(this.crowi.localeDir, dirname, 'translation.json'));
-    });
+    fs.readdirSync(this.crowi.localeDir)
+      .filter(filename => {
+        return fs.statSync(path.join(this.crowi.localeDir, filename)).isDirectory();
+      })
+      .map((dirname) => {
+        require(path.join(this.crowi.localeDir, dirname, 'translation.json'));
+      });
   }
 
   /**

+ 1 - 1
package.json

@@ -104,7 +104,7 @@
     "string-width": "^2.1.1",
     "swig-templates": "^2.0.2",
     "uglifycss": "^0.0.29",
-    "xss": "^0.3.5"
+    "xss": "^0.3.7"
   },
   "devDependencies": {
     "@alienfast/i18next-loader": "^1.0.16",

+ 3 - 3
yarn.lock

@@ -7659,9 +7659,9 @@ xmlhttprequest-ssl@~1.5.4:
   version "1.5.4"
   resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.4.tgz#04f560915724b389088715cc0ed7813e9677bf57"
 
-xss@^0.3.5:
-  version "0.3.7"
-  resolved "https://registry.yarnpkg.com/xss/-/xss-0.3.7.tgz#1df6dc85c0240b455b5e5f0428bdeccd739ab4ee"
+xss@^0.3.7:
+  version "0.3.8"
+  resolved "https://registry.yarnpkg.com/xss/-/xss-0.3.8.tgz#d0cbe23bde490bc98c139f08de3899165a68af0e"
   dependencies:
     commander "^2.9.0"
     cssfilter "0.0.10"