@nexrender/core 1.52.2 → 1.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexrender/core",
3
- "version": "1.52.2",
3
+ "version": "1.53.0",
4
4
  "main": "src/index.js",
5
5
  "author": "Inlife",
6
6
  "homepage": "https://www.nexrender.com",
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "3469ea7297504fc0953661f13a13fd2f877ef994"
43
+ "gitHead": "7c2436fb31a71f1d5c210a96ececdc7070282944"
44
44
  }
@@ -3,11 +3,19 @@ const path = require('path')
3
3
  const {spawn} = require('child_process')
4
4
  const {expandEnvironmentVariables, checkForWSL} = require('../helpers/path')
5
5
 
6
- const progressRegex = /([\d]{1,2}:[\d]{2}:[\d]{2}:[\d]{2})\s+(\(\d+[UL]?\))/gi;
7
- const durationRegex = /Duration:\s+([\d]{1,2}:[\d]{2}:[\d]{2}:[\d]{2})/gi;
8
- const startRegex = /Start:\s+([\d]{1,2}:[\d]{2}:[\d]{2}:[\d]{2})/gi;
9
- const nexrenderErrorRegex = /Error:\s+(nexrender:.*)$/gim;
10
- const errorRegex = /aerender Error:\s*(.*)$/gis;
6
+ const translations = {
7
+ "en": {
8
+ "duration": "Duration",
9
+ "error" : "Error",
10
+ "start" : "Start"
11
+ },
12
+ "de": {
13
+ "duration": "Dauer",
14
+ "error" : "Fehler",
15
+ "start" : "Anfang"
16
+ }
17
+ };
18
+
11
19
 
12
20
  const option = (params, name, ...values) => {
13
21
  if (values !== undefined) {
@@ -25,6 +33,17 @@ const seconds = (string) => string.split(':')
25
33
  module.exports = (job, settings) => {
26
34
  settings.logger.log(`[${job.uid}] rendering job...`);
27
35
 
36
+ if(!settings.language) {
37
+ settings.lang = "en"
38
+ }
39
+
40
+ const progressRegex = /([\d]{1,2}:[\d]{2}:[\d]{2}:[\d]{2})\s+(\(\d+[UL]?\))/gi;
41
+ const durationRegex = new RegExp(translations[settings.language].duration + ":\\s+([\\d]{1,2}:[\\d]{2}:[\\d]{2}:[\\d]{2})", "gi");
42
+ const startRegex = new RegExp(translations[settings.language].start + ":\\s+([\\d]{1,2}:[\\d]{2}:[\\d]{2}:[\\d]{2})", "gi");
43
+ const nexrenderErrorRegex = new RegExp(translations[settings.language].error + ":\\s+(nexrender:.*)$", "gim");
44
+ const errorRegex = new RegExp("aerender " + translations[settings.language].error + ":\\s*(.*)$", "gis");
45
+
46
+
28
47
  // create container for our parameters
29
48
  let params = [];
30
49
  let outputFile = expandEnvironmentVariables(job.output)