diff --git a/Makefile b/Makefile
index aa1f63907..641631f7e 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,8 @@ install: force
xargs -n1 printf "/usr/local/%s\n"
lint: force
- find ${.CURDIR}/src ! -name "*.xml" ! -name "*.eot" \
+ find ${.CURDIR}/src ${.CURDIR}/lang/dynamic/helpers \
+ ! -name "*.xml" ! -name "*.eot" \
! -name "*.svg" ! -name "*.woff" ! -name "*.woff2" \
! -name "*.otf" ! -name "*.png" ! -name "*.js" \
! -name "*.scss" ! -name "*.py" ! -name "*.ttf" \
diff --git a/lang/Makefile b/lang/Makefile
index d9aac2543..73a95ef43 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -18,12 +18,13 @@ ${LANG}:
${TEMPLATE}:
@: > ${TEMPLATE}.pot
- # XXX bring this back
- #${.CURDIR}/../scripts/translate/collect.py
- cd ${.CURDIR}/.. && find src | \
+ cd ${.CURDIR}/.. && find src lang/dynamic/helpers | \
xargs ${XGETTEXT} -j -o ${.CURDIR}/${TEMPLATE}.pot
install: ${LANGUAGES}
template: ${TEMPLATE}
-.PHONY: ${LANGUAGES} ${TEMPLATE}
+dynamic:
+ @${.CURDIR}/dynamic/collect.py ${.CURDIR}/..
+
+.PHONY: ${LANGUAGES} ${TEMPLATE} dynamic
diff --git a/scripts/translate/collect.py b/lang/dynamic/collect.py
similarity index 92%
rename from scripts/translate/collect.py
rename to lang/dynamic/collect.py
index 957fdba97..fb0de8afc 100755
--- a/scripts/translate/collect.py
+++ b/lang/dynamic/collect.py
@@ -35,11 +35,16 @@ import glob
import importlib
import sys
+if len(sys.argv) < 2:
+ print 'Usage: collect.py rootdir'
+ sys.exit(1)
+
# get source location (root of core package)
-OPNsenseRoot='%s/../../src/'%'/'.join(os.path.realpath(__file__).split('/')[:-1])
+OPNsenseRoot=sys.argv[1] + '/src'
# create target location
-targetPath='%s/../../src/opnsense/lang_helpers/'%'/'.join(os.path.realpath(__file__).split('/')[:-1])
+targetPath=sys.argv[1] + '/lang/dynamic/helpers'
+
if len(glob.glob(targetPath)) == 0:
os.mkdir(targetPath)
diff --git a/lang/dynamic/helpers/acl.php b/lang/dynamic/helpers/acl.php
new file mode 100644
index 000000000..ea0fb2686
--- /dev/null
+++ b/lang/dynamic/helpers/acl.php
@@ -0,0 +1,276 @@
+TIP: You can also paste a comma seperated list into this field.');
+echo gettext('This option reverses the order of preference to make Squid contact dual-stack websites over IPv4 first.
+ Squid will still perform both IPv6 and IPv4 DNS lookups before connecting.
+
Warning: This option will restrict the situations under which IPv6
+ connectivity is used (and tested). Hiding network problems
+ which would otherwise be detected and warned about.
');
+echo gettext('If set (default), Squid will include a Via header in requests and
+ replies as required by RFC2616.');
+echo gettext('Select what to do with X-Forwarded for header.');
+echo gettext('Suppress Squid version string info in HTTP headers and HTML error pages.');
+echo gettext('Select what to do with URI that contain whitespaces.
+ NOTE: the current Squid implementation of encode and chop violates
+ RFC2616 by not using a 301 redirect after altering the URL.
');
+echo gettext('Enable or disable the local cache.
+ Curently only ufs directory cache type is supported.
+ Do not enable on embedded systems with SD or CF cards as this may break your drive.');
+echo gettext('Enter the storage size for the local cache (default is 100).');
+echo gettext('
+ Enter the number of first-level subdirectories for the local cache (default is 16).');
+echo gettext('
+ Enter the number of first-level subdirectories for the local cache (default is 256).');
+echo gettext('Enable or disable traffic management.');
+echo gettext('Enter the maxium size for downloads in kilobytes (leave empty to disable).');
+echo gettext('Enter the maxium size for uploads in kilobytes (leave empty to disable).');
+echo gettext('
+ Enter the allowed overall bandtwith in kilobits per second (leave empty to disable).');
+echo gettext('
+ Enter the allowed per host bandwidth in kilobits per second (leave empty to disable).');
+echo gettext('Select interface(s) the proxy will bind to.');
+echo gettext('The port the proxy service will listen to.');
+echo gettext('
+ When enabled the subnets of the selected interfaces will be added to the allow access list.');
+echo gettext('Select interface(s) the ftp proxy will bind to.');
+echo gettext('The port the proxy service will listen to.');
+echo gettext('
+ Type subnets you want to allow acces to the proxy server, use a comma or press Enter for new item. TIP: You can also paste a comma separated list into this field.
');
+echo gettext('
+ Type IP adresses you want to allow acces to the proxy server, use a comma or press Enter for new item. TIP: You can also paste a comma separated list into this field.
');
+echo gettext('
+ Type IP adresses you want to deny acces to the proxy server, use a comma or press Enter for new item. TIP: You can also paste a comma separated list into this field.
');
+echo gettext('Whitelist destination domains.
+ You may use a regular expression, use a comma or press Enter for new item.
+
+ Examples:
+ .mydomain.com -> matches on *.mydomain.com
+ ^http(s|)://([a-zA-Z]+)\.mydomain\.* -> matches on http(s)://*.mydomain.*
+ \\.+\.gif$ -> matches on \*.gif but not on \*.gif\test
+ \\.+[0-9]+\.gif$ -> matches on \123.gif but not on \test.gif
+
+ TIP: You can also paste a comma separated list into this field.
');
+echo gettext('Blacklist destination domains.
+ You may use a regular expression, use a comma or press Enter for new item.
+
+ Examples:
+ .mydomain.com -> matches on *.mydomain.com
+ ^http(s|)://([a-zA-Z]+)\.mydomain\.* -> matches on http(s)://*.mydomain.*
+ \\.+\.gif$ -> matches on \*.gif but not on \*.gif\test
+ \\.+[0-9]+\.gif$ -> matches on \123.gif but not on \test.gif
+
+ TIP: You can also paste a comma separated list into this field.
');
+echo gettext('Block user-agents.
+ You may use a regular expression, use a comma or press Enter for new item.
+
+ Examples:
+ ^(.)+Macintosh(.)+Firefox/37\.0 -> matches on Macintosh version of Firefox revision 37.0
+ ^Mozilla -> matches on all Mozilla based browsers
+
+ TIP: You can also paste a comma separated list into this field.
');
+echo gettext('Block specific MIME type reply.
+ You may use a regular expression, use a comma or press Enter for new item.
+
+ Examples:
+ video/flv -> matches on Flash Video
+ application/x-javascript -> matches on javascripts
+
+ TIP: You can also paste a comma separated list into this field.
');
+echo gettext('Allowed destination TCP ports, you may use ranges (ex. 222-226) and add comments with collon (ex. 22:ssh).
+ TIP: You can also paste a comma separated list into this field.
');
+echo gettext('Allowed destination SSL ports, you may use ranges (ex. 222-226) and add comments with collon (ex. 22:ssh).
+ TIP: You can also paste a comma separated list into this field.
');
+echo gettext('Select Authentication method');
+echo gettext('The prompt will be displayed in the autherntication request window.');
+echo gettext('This specifies for how long (in hours) the proxy server assumes an externally validated username and password combination is valid (Time To Live).
+ When the TTL expires, the user will be prompted for credentials again.');
+echo gettext('The total number of authenticator processes to spawn.');
+echo gettext('Total bandwidth for this pipe');
+echo gettext('number of dynamic queues, leave empty for default');
+echo gettext('Dynamic queue creation by source or destination address.
+ choose destination here to share the total bandwidth of this pipe among all connected clients.
+ choose source to provide all connected clients up to a maximum of this pipe configured bandwidth
+ ');
+echo gettext('Description to identify this pipe.');
diff --git a/lang/dynamic/helpers/models.php b/lang/dynamic/helpers/models.php
new file mode 100644
index 000000000..6e290695f
--- /dev/null
+++ b/lang/dynamic/helpers/models.php
@@ -0,0 +1,236 @@
+