mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
添加功能:pretest discuss user dashboard statistics
This commit is contained in:
1 parent
61cba6f180
commit
15d43636c0
41 files changed
+920
-523
No files matched your search
+2
-9
@@ -1,7 +1,4 @@
|
||||
const fs = require('fs');
|
||||
const yaml = require('js-yaml');
|
||||
|
||||
const locales = {};
|
||||
const locales = require('../../.build/locales.json');
|
||||
|
||||
String.prototype.format = function formatStr(...args) {
|
||||
let result = this;
|
||||
@@ -33,8 +30,4 @@ String.prototype.translate = function translate(language = 'zh_CN') {
|
||||
return this;
|
||||
};
|
||||
|
||||
module.exports = function load(file, language) {
|
||||
if (!locales[language]) locales[language] = {};
|
||||
const content = fs.readFileSync(file).toString();
|
||||
Object.assign(locales[language], yaml.safeLoad(content));
|
||||
};
|
||||
module.exports = locales;
|
||||
Reference in new issue
Block a user