| | |
| | | function buildBuiltinRegexEntries() { |
| | | return [ |
| | | { |
| | | regex: /^圈(\d+)\s*\|\s*站点:\s*(\d+)\s*\|\s*(?:任务|Task):\s*(\d+)\s*\|\s*(?:手动|Manual):\s*(\d+)\s*\|\s*承载:\s*([\d.]+%)$/, |
| | | key: "legacy.regex.loopStatusWithManual", |
| | | fallback: "Zone {0} | Stations: {1} | Tasks: {2} | Manual: {3} | Load: {4}" |
| | | }, |
| | | { |
| | | regex: /^圈(\d+)\s*\|\s*站点:\s*(\d+)\s*\|\s*(?:任务|Task):\s*(\d+)\s*\|\s*承载:\s*([\d.]+%)$/, |
| | | key: "legacy.regex.loopStatus", |
| | | fallback: "Zone {0} | Stations: {1} | Tasks: {2} | Load: {3}" |
| | |
| | | window.layer.__wcsI18nWrapped = true; |
| | | } |
| | | |
| | | function hasElementLocaleMessages() { |
| | | var key; |
| | | if (!state.ready || !state.messages) { |
| | | return false; |
| | | } |
| | | for (key in state.messages) { |
| | | if (Object.prototype.hasOwnProperty.call(state.messages, key) && key.indexOf("el.") === 0) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | function wrapElement() { |
| | | if (!window.ELEMENT || window.ELEMENT.__wcsI18nWrapped) { |
| | | if (!window.ELEMENT || window.ELEMENT.__wcsI18nWrapped || !hasElementLocaleMessages()) { |
| | | return; |
| | | } |
| | | var element = window.ELEMENT; |