luci-mod-network: remove customi18n() from dhcp.js
authorDavid Härdeman <[email protected]>
Tue, 21 Oct 2025 20:03:29 +0000 (22:03 +0200)
committerPaul Donald <[email protected]>
Fri, 24 Oct 2025 13:57:43 +0000 (15:57 +0200)
The single user isn't really enough to warrant this function, so remove
it to prepare for the following patches.

Signed-off-by: David Härdeman <[email protected]>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js

index e887b483c5478a33a5916e2ef13e0349d106a8ec..1175e3ecfcf3ecf6d951ab8e1f2841dc73982edc 100644 (file)
@@ -235,16 +235,6 @@ return view.extend({
                var has_dhcpv6 = L.hasSystemFeature('dnsmasq', 'dhcpv6') || L.hasSystemFeature('odhcpd'),
                    m, s, o, ss, so;
 
-               let noi18nstrings = {
-                       etc_ethers: '<code>/etc/ethers</code>',
-               };
-
-               function customi18n(template, values) {
-                       if (!values)
-                               values = noi18nstrings;
-                       return template.replace(/\{(\w+)\}/g, (match, key) => values[key] || match);
-               };
-
                m = new form.Map('dhcp', _('DHCP'));
 
                s = m.section(form.TypedSection, 'dnsmasq');
@@ -375,9 +365,8 @@ return view.extend({
 
                // Begin files
                s.taboption('files', form.Flag, 'readethers',
-                       customi18n(_('Use {etc_ethers}') ),
-                       customi18n(_('Read {etc_ethers} to configure the DHCP server.') )
-                       );
+                       _('Use %s').format('<code>/etc/ethers</code>'),
+                       _('Read %s to configure the DHCP server.').format('<code>/etc/ethers</code>'));
 
                s.taboption('files', form.Value, 'leasefile',
                        _('Lease file'),