po module name in file name

This commit is contained in:
yuri
2018-10-17 14:24:15 +03:00
parent 7808586751
commit 8e879e2d73
2 changed files with 17 additions and 3 deletions
+12 -2
View File
@@ -40,14 +40,23 @@ var isWin = /^win/.test(os.platform());
var espoPath = path.dirname(fs.realpathSync(__filename)) + '';
var resLang = process.argv[2] || 'lang_LANG';
var poPath = espoPath + '/build/' + 'espocrm-' + resLang +'.po';
var onlyModuleName = null;
if (process.argv.length > 2) {
for (var i in process.argv) {
if (~process.argv[i].indexOf('--module=')) {
onlyModuleName = process.argv[i].substr(('--module=').length);
}
}
}
var poPath = espoPath + '/build/' + 'espocrm-' + resLang;
if (onlyModuleName) {
poPath += '-' + onlyModuleName;
}
poPath += '.po';
if (process.argv.length > 2) {
for (var i in process.argv) {
if (~process.argv[i].indexOf('--path=')) {
poPath = process.argv[i].substr(('--path=').length);
}
@@ -95,6 +104,7 @@ function Lang (poPath, espoPath) {
var dirs = [coreDir];
dirNames[coreDir] = 'application/Espo/Resources/i18n/' + resLang + '/';
var installDir = this.espoPath + 'install/core/i18n/' + this.baseLanguage + '/';
dirs.push(installDir);
dirNames[installDir] = 'install/core/i18n/' + resLang + '/';