luci-app-natmap: add forward_port option and update stun_server description
authorRichard Yu <yurichard3839@gmail.com>
Wed, 21 Dec 2022 10:07:06 +0000 (18:07 +0800)
committerHannu Nyman <hannu.nyman@iki.fi>
Wed, 21 Dec 2022 20:21:26 +0000 (22:21 +0200)
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js
applications/luci-app-natmap/po/templates/natmap.pot

index 2f666278644267b02f301a0e17729df4b75cde58..14dea3aa1941198a8b684b1f3ce131d0c7e4f771 100644 (file)
@@ -79,7 +79,7 @@ return view.extend({
                o.datatype = 'uinteger';
                o.modalonly = true;
 
-               o = s.option(form.Value, 'stun_server', _('STUN server'), _('For UDP mode'));
+               o = s.option(form.Value, 'stun_server', _('STUN server'));
                o.datatype = 'host';
                o.modalonly = true;
                o.optional = false;
@@ -88,12 +88,10 @@ return view.extend({
                o = s.option(form.Value, 'http_server', _('HTTP server'), _('For TCP mode'));
                o.datatype = 'host';
                o.modalonly = true;
-               o.optional = false;
                o.rmempty = false;
 
-               o = s.option(form.Value, 'port', _('Port'));
+               o = s.option(form.Value, 'port', _('Bind port'));
                o.datatype = 'port';
-               o.optional = false;
                o.rmempty = false;
 
                o = s.option(form.Flag, '_forward_mode', _('Forward mode'));
@@ -109,6 +107,11 @@ return view.extend({
                o.modalonly = true;
                o.depends('_forward_mode', '1');
 
+               o = s.option(form.Value, 'forward_port', _('Forward target port'));
+               o.datatype = 'port';
+               o.modalonly = true;
+               o.depends('_forward_mode', '1');
+
                o = s.option(form.Value, 'notify_script', _('Notify script'));
                o.datatype = 'file';
                o.modalonly = true;
index 5c221e0eb8659bd75d75308ee8ebcc54fba872a7..5ea9ed1b85543b115d0bd1cb5a0415c61867f8cc 100644 (file)
@@ -1,83 +1,83 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=UTF-8"
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:56
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:55
 msgid "Enable"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:117
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:121
 msgid "External IP"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:124
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:128
 msgid "External Port"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:89
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:88
 msgid "For TCP mode"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:83
-msgid "For UDP mode"
-msgstr ""
-
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:100
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:99
 msgid "Forward mode"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:108
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:107
 msgid "Forward target"
 msgstr ""
 
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:112
+msgid "Forward target port"
+msgstr ""
+
 #: applications/luci-app-natmap/root/usr/share/rpcd/acl.d/luci-app-natmap.json:3
 msgid "Grant access to LuCI app natmap"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:89
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:88
 msgid "HTTP server"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:72
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:71
 msgid "IPv4 and IPv6"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:73
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:72
 msgid "IPv4 only"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:74
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:73
 msgid "IPv6 only"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:76
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:75
 msgid "Interface"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:79
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:78
 msgid "Keep-alive interval"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:51
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:50
 #: applications/luci-app-natmap/root/usr/share/luci/menu.d/luci-app-natmap.json:3
 msgid "NATMap"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:113
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:117
 msgid "Notify script"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:95
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:94
 msgid "Port"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:60
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:59
 msgid "Protocol"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:70
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:69
 msgid "Restrict to address family"
 msgstr ""
 
-#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:83
+#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:82
 msgid "STUN server"
 msgstr ""