mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-03 02:47:03 +00:00
cs
This commit is contained in:
19
po.js
19
po.js
@@ -41,26 +41,27 @@ const PO = require('./js/po');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
var language = process.argv[2] || null;
|
||||
let language = process.argv[2] || null;
|
||||
|
||||
let onlyModuleName = null;
|
||||
|
||||
var onlyModuleName = null;
|
||||
if (process.argv.length > 2) {
|
||||
for (var i in process.argv) {
|
||||
for (let i in process.argv) {
|
||||
if (~process.argv[i].indexOf('--module=')) {
|
||||
onlyModuleName = process.argv[i].substr(('--module=').length);
|
||||
}
|
||||
|
||||
if (~process.argv[i].indexOf('--all')) {
|
||||
language = '--all';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var espoPath = path.dirname(fs.realpathSync(__filename)) + '';
|
||||
let espoPath = path.dirname(fs.realpathSync(__filename)) + '';
|
||||
|
||||
var po = new PO(espoPath, language, onlyModuleName);
|
||||
let po = new PO(espoPath, language, onlyModuleName);
|
||||
|
||||
if (language === '--all') {
|
||||
po.runAll();
|
||||
} else {
|
||||
language === '--all' ?
|
||||
po.runAll() :
|
||||
po.run();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user