diff --git a/containers/libreportal/frontend/components/admin/config/js/config-utils.js b/containers/libreportal/frontend/components/admin/config/js/config-utils.js index cf1bd64..436960d 100755 --- a/containers/libreportal/frontend/components/admin/config/js/config-utils.js +++ b/containers/libreportal/frontend/components/admin/config/js/config-utils.js @@ -5,7 +5,16 @@ class ConfigUtils { } formatSubcategoryName(subcategoryName) { - return subcategoryName.replace(/_/g, ' ').replace(/\b\w/g, function(l) { return l.toUpperCase(); }); + var name = subcategoryName.replace(/_/g, ' ').replace(/\b\w/g, function(l) { return l.toUpperCase(); }); + // Naive title-casing mangles acronyms/brand names ("Ssh", "Dns", + // "Libreportal"). Fix known ones per whole word so sections read + // professionally ("SSH", "DNS", "LibrePortal"). + var ACRONYMS = { + Ssh: 'SSH', Dns: 'DNS', Vpn: 'VPN', Api: 'API', Ip: 'IP', Ui: 'UI', + Url: 'URL', Http: 'HTTP', Https: 'HTTPS', Tls: 'TLS', Ssl: 'SSL', + Webui: 'WebUI', Libreportal: 'LibrePortal' + }; + return name.split(' ').map(function(w) { return ACRONYMS[w] || w; }).join(' '); } cleanDescription(description) {