浏览代码

Fixed some small issues.

KrisVos130 7 年之前
父节点
当前提交
5155cb414d
共有 3 个文件被更改,包括 5 次插入12 次删除
  1. 0 2
      backend/index.js
  2. 4 4
      frontend/app/js/i18n.js
  3. 1 6
      frontend/config/template.js

+ 0 - 2
backend/index.js

@@ -210,8 +210,6 @@ async.waterfall([
 
 			app.get("/locales/*", (req, res) => {
 				let path = req.path;
-				path = path.replace(/\//g, "\\");
-				path = path.replace("\\locales", "locales");
 				console.log(rootDirLocales, path, rootDirLocales + path);
 				fs.access(rootDirLocales + path, function(err) {
 					console.log("Error: ", !!err);

+ 4 - 4
frontend/app/js/i18n.js

@@ -1,5 +1,5 @@
 import i18next from "i18next";
-import XHR from 'i18next-xhr-backend';
+import XHR from "i18next-xhr-backend";
 import config from "config";
 
 const i18n = i18next
@@ -10,12 +10,12 @@ const i18n = i18next
 		fallbackLng: "en",
 		referenceLng: "en",
 		backend: {
-			loadPath: '/locales/{{lng}}/{{ns}}.json',
-			addPath: 'locales/add/{{lng}}/{{ns}}',
+			loadPath: "/locales/{{lng}}/{{ns}}.json",
+			addPath: "locales/add/{{lng}}/{{ns}}",
 			allowMultiLoading: false,
 			crossDomain: false,
 			withCredentials: false,
-			queryStringParams: { v: config.version }
+			queryStringParams: { v: config.version },
 		},
 		ns: ["general"],
 		defaultNS: "general",

+ 1 - 6
frontend/config/template.js

@@ -8,10 +8,5 @@ export default {
 		"secure": false,
 		"sidName": "SID",
 	},
-	"locize": {
-		"projectId": "fb8c7f34-4a49-4e07-876e-ee941f2b5a2c",
-		"apiKey": "32c144d5-55cb-4da9-a3f9-9cb13e639c4a",
-		"version": "latest",
-	},
-	"version": "2.3.0-REACT"
+	"version": "2.3.0-REACT",
 };