Parsing multiple languages (German + English)

This commit is contained in:
Kill4Free
2017-04-12 23:33:05 +02:00
parent 446949738b
commit 0eb08b0c4c
2 changed files with 12 additions and 9 deletions

View File

@@ -333,31 +333,31 @@ define(['jquery'], function($) {
// signature groups
signatureGroups: {
1: {
name: 'combat site', //*
name: '(combat site|kampfgebiet)', //*
label: 'Combat'
},
2: {
name: 'relic site', //*
name: '(relic site|reliktgebiet)', //*
label: 'Relic'
},
3: {
name: 'data site',
name: '(data site|datengebiet)',
label: 'Data'
},
4: {
name: 'gas site',
name: '(gas site)',
label: 'Gas'
},
5: {
name: 'wormhole',
name: '(wormhole|wurmloch)',
label: 'Wormhole'
},
6: {
name: 'ore site',
name: '(ore site|mineraliengebiet)',
label: 'Ore'
},
7: {
name: 'ghost',
name: '(ghost)',
label: 'Ghost'
}
},

View File

@@ -98,6 +98,8 @@ define([
let validSignatureNames = [ // allowed signature type/names
'Cosmic Anomaly',
'Cosmic Signature',
'Kosmische Anomalie',
'Kosmische Signatur',
'Космическая аномалия', // == "Cosmic Anomaly"
'Источники сигналов' // == "Cosmic Signature"
];
@@ -658,7 +660,8 @@ define([
// get groupId by groupName
for (let prop in signatureGroupOptions) {
if(signatureGroupOptions.hasOwnProperty(prop)){
if(signatureGroupOptions[prop] === sigGroup){
let reg = new RegExp(signatureGroupOptions[prop], 'i');
if (reg.test(sigGroup)) {
sigGroupId = parseInt( prop );
break;
}
@@ -2453,4 +2456,4 @@ define([
getAllSignatureNamesBySystem: getAllSignatureNamesBySystem
};
});
});