Commit 2f1d85e2 authored by Franco Fichtner's avatar Franco Fichtner

lang: bootstrap by importing lang/ from core.git

Commit: c9330e3b6aaed
parents
XGETTEXT= xgettext -L PHP --from-code=UTF-8 -F --strict --debug
XGETTEXT_PL= xgettext.pl -P Locale::Maketext::Extract::Plugin::Volt \
-u -w -W
MSGMERGE= msgmerge -U -N --backup=off
MSGFMT= msgfmt --strict
PERL_DIR= /usr/local/lib/perl5/site_perl
PERL_NAME= Locale/Maketext/Extract/Plugin
LOCALEDIR= /usr/local/share/locale/%%LANG%%/LC_MESSAGES
# stable
LANGUAGES= de_DE fr_FR ja_JP zh_CN
# devel
LANGUAGES+= es_CO mn_MN nl_NL ru_RU
TEMPLATE= en_US
INSTALL=
MERGE=
PLIST=
PAGER?= less
all:
@cat ${.CURDIR}/README.md | ${PAGER}
.for LANG in ${LANGUAGES}
${LANG}DIR= ${LOCALEDIR:S/%%LANG%%/${LANG}/g}
install-${LANG}:
@mkdir -p ${DESTDIR}${${LANG}DIR}
${MSGFMT} -o ${DESTDIR}${${LANG}DIR}/OPNsense.mo ${LANG}.po
clean-${LANG}:
@rm -f ${DESTDIR}${${LANG}DIR}/OPNsense.mo
plist-${LANG}:
@echo ${${LANG}DIR}/OPNsense.mo
merge-${LANG}:
${MSGMERGE} ${LANG}.po ${TEMPLATE}.pot
# strip stale translations
sed -i '' -e '/^#~.*/d' ${LANG}.po
INSTALL+= install-${LANG}
CLEAN+= clean-${LANG}
PLIST+= plist-${LANG}
MERGE+= merge-${LANG}
.endfor
${TEMPLATE}:
@cp ${.CURDIR}/Volt.pm ${PERL_DIR}/${PERL_NAME}/
@: > ${TEMPLATE}.pot
cd ${.CURDIR}/.. && \
${XGETTEXT_PL} -D src -p ${.CURDIR} -o ${TEMPLATE}.pot
cd ${.CURDIR}/.. && find src lang/dynamic/helpers | \
xargs ${XGETTEXT} -j -o ${.CURDIR}/${TEMPLATE}.pot
template: ${TEMPLATE}
install: ${INSTALL}
clean: ${CLEAN}
plist: ${PLIST}
merge: ${MERGE}
dynamic:
@${.CURDIR}/dynamic/collect.py ${.CURDIR}/..
.PHONY: ${INSTALL} ${PLIST} ${MERGE} ${TEMPLATE} dynamic
OPNsense language translation kit
=================================
The kit requires additional tools in order to properly extract strings
from the source code. You'll need to run this once locally:
# pkg install gettext-tools p5-Locale-Maketext-Lexicon python27
Regenerate dynamic strings that can't be found in the template
generation step (XML contents, etc.):
# make dynamic
Regenerate the translation template using:
# make template
Merge the latest template changes into the actual translations:
# make merge
Remove the compiled translation files from the system/chroot:
# make clean
The build system will automatically pick up all registered languages.
package Locale::Maketext::Extract::Plugin::Volt;
$Locale::Maketext::Extract::Plugin::Volt::VERSION = '1.00';
use strict;
use base qw(Locale::Maketext::Extract::Plugin::Base);
# ABSTRACT: Volt template parser
sub file_types {
return qw( volt );
}
sub extract {
my $self = shift;
local $_ = shift;
my $line = 1;
# Volt Template:
$line = 1;
pos($_) = 0;
while (m/\G(.*?(?<!\{)\{\{(?!\{)\s*lang\._\('(.*?)'\)\s*\}\})/sg) {
my ( $vars, $str ) = ( '', $2 );
$line += ( () = ( $1 =~ /\n/g ) ); # cryptocontext!
$self->add_entry( $str, $line, $vars );
}
}
1;
__END__
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/usr/bin/env python2.7
"""
Copyright (c) 2015 Deciso B.V.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
"""
__author__ = 'Ad Schellevis'
import os.path
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=sys.argv[1] + '/src'
# create target location
targetPath=sys.argv[1] + '/lang/dynamic/helpers'
if len(glob.glob(targetPath)) == 0:
os.mkdir(targetPath)
# load default output template
templateText = open('%s/template.txt'%'/'.join(os.path.realpath(__file__).split('/')[:-1]),'r').read()
for filename in glob.glob('%s/plugins/*.py'%'/'.join(os.path.realpath(__file__).split('/')[:-1])):
modulename = os.path.basename(filename)[:-3]
lang = importlib.import_module('plugins.%s'%modulename)
if hasattr(lang,'getTranslations'):
# open filehandle for collected plugin
fOut=open('%s/%s.php'%(targetPath,modulename),'w')
fOut.write(templateText)
# collect and sort tags
translations = list()
for textValue in lang.getTranslations(OPNsenseRoot):
translations.append(textValue)
translations.sort()
# fill with gettext tags
for textValue in translations:
line="echo gettext('%s');\n"%(unicode(textValue).replace("'","\\'"))
fOut.write(line)
fOut.close()
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
/**
*
* Language support, autogenerated file
*
*/
echo gettext('Allow access to the \'Status: IPsec: SAD\' page.');
echo gettext('Allow access to the \'VPN: PPTP: Users\' page.');
echo gettext('Allow access to the \'System: Authentication Servers\' page.');
echo gettext('Allow access to the \'Diagnostics: States Summary\' page.');
echo gettext('Allow access to the \'VPN: PPTP: User: Edit\' page.');
echo gettext('Show all items on help menu');
echo gettext('Allow access to the \'System: Firmware: Settings\' page.');
echo gettext('Allow access to the \'System: User Manager: Add Privileges\' page.');
echo gettext('Allow access to the \'Services: NTP\' page.');
echo gettext('Allow access to the \'VPN: OpenVPN: Client Specific Override\' page.');
echo gettext('Allow access to the \'VPN: OpenVPN: Client\' page.');
echo gettext('Allow access to the \'Interfaces: Assign network ports\' page.');
echo gettext('Allow access to the \'Firewall: NAT: Port Forward\' page.');
echo gettext('Allow access to the \'VPN: IPsec: Pre-Shared Keys List\' page.');
echo gettext('Create interface groups');
echo gettext('Allow access to the \'Interfaces: VLAN: Edit\' page.');
echo gettext('Allow access to the \'Diagnostics: Reboot System\' page.');
echo gettext('Allow access to the \'Load Balancer: Pool: Edit\' page.');
echo gettext('Allow access to the \'System: User Manager\' page.');
echo gettext('Allow access to the \'Services: DHCPv6 Server : Edit static mapping\' page.');
echo gettext('Allow access to the \'Load Balancer: Pool\' page.');
echo gettext('Allow access to the \'VPN: L2TP: Users : Edit\' page.');
echo gettext('Allow access to the \'Firewall: Schedules\' page.');
echo gettext('Allow access to the \'Diagnostics: Logs: Settings\' page.');
echo gettext('Allow access to the \'Service: Universal Plug and Play\' page.');
echo gettext('Allow access to the \'Firewall: Virtual IP Addresses\' page.');
echo gettext('Allow access to the \'System: Firmware: Manual Update\' page.');
echo gettext('Allow access to the \'Status: Services\' page.');
echo gettext('Allow access to the \'Status: IPsec: Leases\' page.');
echo gettext('Allow access to the \'Services: DNS Forwarder: Edit Domain Override\' page.');
echo gettext('Allow access to the \'Interfaces: PPPs\' page.');
echo gettext('Allow access to the \'Firewall: NAT: 1:1\' page.');
echo gettext('Indicates whether the user is allowed to use the proxy');
echo gettext('Allow access to the \'Status: System logs: IPsec VPN\' page.');
echo gettext('Allow access to the \'Services: DHCP Server : Edit static mapping\' page.');
echo gettext('Allow access to the \'Services: DHCPv6 server\' page.');
echo gettext('Allow access to the \'Status: System logs: Load Balancer\' page.');
echo gettext('Allow access to the \'Lobby: Login / Logout/ Dashboard\' page.');
echo gettext('Allow access to the \'Services: DNS Resolver: Edit host\' page.');
echo gettext('Allow access to the \'Services: SNMP\' page.');
echo gettext('Allow access to the \'Settings: Load Balancer: Settings\' page.');
echo gettext('Allow access to the \'Diagnostics: Show States\' page.');
echo gettext('Allow access to the \'VPN: OpenVPN: Client Export Utility\' page.');
echo gettext('Indicates whether the user is able to login for example via SSH.');
echo gettext('Allow access to the \'Status: Traffic Graph\' page.');
echo gettext('Allow access to the \'Firewall: Aliases\' page.');
echo gettext('Allow access to the \'Services: Load Balancer: Monitor: Edit\' page.');
echo gettext('Allow access to the \'System: CRL Manager\' page.');
echo gettext('Allow access to the \'Diagnostics: Interface Traffic\' page.');
echo gettext('Allow access to the \'System: Firmware: Auto Update\' page.');
echo gettext('Allow access to the \'Diagnostics: Sockets\' page.');
echo gettext('Allow access to the \'Status: Universal Plug and Play\' page.');
echo gettext('Allow access to the \'Services: PPPoE Server\' page.');
echo gettext('Allow access to the \'Status: System logs: OpenVPN\' page.');
echo gettext('Allow access to the \'Status: OpenVPN\' page.');
echo gettext('Allow access to the \'Services: RFC 2136 clients\' page.');
echo gettext('Uploads crash reports to the developers.');
echo gettext('Allow access to the \'Firewall: Alias: Edit\' page.');
echo gettext('Allow access to the \'Interfaces: PPPs: Edit\' page.');
echo gettext('Allow access to the \'Firewall: NAT: NPT\' page.');
echo gettext('Allow access to the \'Interfaces: GIF: Edit\' page.');
echo gettext('Allow access to the \'VPN: IPsec\' page.');
echo gettext('Allow access to the \'Load Balancer: Virtual Server: Edit\' page.');
echo gettext('Allow access to the \'Status: System logs: NTP\' page.');
echo gettext('Allow access to the \'Interfaces: GRE\' page.');
echo gettext('Allow access to the \'Services: Router Advertisements\' page.');
echo gettext('Allow access to the \'VPN: IPsec: Edit Phase 2\' page.');
echo gettext('Allow access to the \'System: Advanced: Networking\' page.');
echo gettext('Allow access to the \'VPN: IPsec: Edit Phase 1\' page.');
echo gettext('Allow access to the \'Interfaces: VLAN\' page.');
echo gettext('Allow access to the \'Firewall: NAT: Port Forward: Edit\' page.');
echo gettext('Allow access to the \'Services: DNS Resolver: Edit Domain Override\' page.');
echo gettext('Allow access to the \'Firewall: Alias: Import\' page.');
echo gettext('Allow access to the \'Diagnostics: Reset state\' page.');
echo gettext('Allow access to the \'Services: Wake on LAN: Edit\' page.');
echo gettext('Allow access to the \'Firewall: Virtual IP Address: Edit\' page.');
echo gettext('Allow access to the \'Diagnostics: Routing tables\' page.');
echo gettext('Allow access to the \'System: Advanced: Admin Access\' page.');
echo gettext('Allow access to the \'Status: System logs: System: Routing\' page.');
echo gettext('Allow access to the \'Status: Interfaces\' page.');
echo gettext('Allow access to the \'Services: DNS Forwarder\' page.');
echo gettext('Allow access to the \'Status: Gateways\' page.');
echo gettext('Allow access to the \'Status: DHCP leases\' page.');
echo gettext('Allow access to the \'Hidden: Detailed Status\' page.');
echo gettext('Allow access to the \'System: Advanced: Miscellaneous\' page.');
echo gettext('Allow access to the \'AJAX: Service Providers\' page.');
echo gettext('Allow access to the \'Diagnostics: Logs: Firewall: Normal View\' page.');
echo gettext('Allow access to the \'Diagnostics: Halt system\' page.');
echo gettext('Allow access to the \'Diagnostics: Logs: L2TP\' page.');
echo gettext('Allow access to the \'Services: Igmpproxy: Edit\' page.');
echo gettext('Allow access to the \'System: User Manager: Settings: Test LDAP\' page.');
echo gettext('Allow access to the \'VPN: L2TP\' page.');
echo gettext('Allow access to the \'XMLRPC Library\' page.');
echo gettext('Allow access to the \'Diagnostics: Logs: Firewall: Summary View\' page.');
echo gettext('Allow access to the \'Status: IPsec: SPD\' page.');
echo gettext('Allow access to the \'Status: Filter Reload Status\' page.');
echo gettext('Allow access to all pages');
echo gettext('Allow access to the \'Firewall: NAT: NPT: Edit\' page.');
echo gettext('Indicates whether the user is allowed to dial in via PPPOE');
echo gettext('Allow access to the \'System: Advanced: Notifications\' page.');
echo gettext('Allow access to the \'Diagnostics: Logs: DHCP\' page.');
echo gettext('Allow access to the \'System: Gateway Groups\' page.');
echo gettext('Allow access to the \'Wizard subsystem\' page.');
echo gettext('Allow access to the \'Diagnostics: Restore Full Backup\' page.');
echo gettext('Allow access to the \'Status: CARP\' page.');
echo gettext('Allow access to the \'Diagnostics: Authentication\' page.');
echo gettext('Allow access to the \'VPN: PPTP\' page.');
echo gettext('Allow access to the \'Firewall: Rules\' page.');
echo gettext('Allow access to the \'AJAX: Get Stats\' page.');
echo gettext('Allow access to the \'Diagnostics: Logs: System: Gateways\' page.');
echo gettext('Allow access to the \'Services: DHCPv6 Relay\' page.');
echo gettext('Allow access to the \'Services: DNS Resolver: Advanced\' page.');
echo gettext('Allow access to the \'Services: Load Balancer: Virtual Servers\' page.');
echo gettext('Allow access to the \'Status: NTP\' page.');
echo gettext('Allows access to the \'Diagnostics: Limiter Info\' page');
echo gettext('Allow access to the \'Diagnostics: Logs: Firewall: Plain View\' page.');
echo gettext('Allow access to the \'Diagnostics: Logs: System: Resolver\' page.');
echo gettext('Allow access to the \'Status: Wireless\' page.');
echo gettext('Allow access to the \'Status: NTP PPS\' page.');
echo gettext('Allow access to the \'Diagnostics: Logs: PPTP\' page.');
echo gettext('Allow access to the \'Diagnostics: NanoBSD\' page.');
echo gettext('Allow access to the \'System: CA Manager\' page.');
echo gettext('Allow access to all pages required for the dashboard.');
echo gettext('Allow access to the \'Diagnostics: Patterns\' page.');
echo gettext('Allow access to the \'System: User Password Manager\' page.');
echo gettext('Allow access to \'Interfaces: QinQ: Edit\' page');
echo gettext('Allow access to the \'Firewall: Rules: Edit\' page.');
echo gettext('Allow access to the \'Diagnostics: Packet Capture\' page.');
echo gettext('Allow access to the \'Services: DNS Resolver: Access Lists\' page.');
echo gettext('Allow access to the \'Firewall: NAT: Outbound: Edit\' page.');
echo gettext('Allow access to the \'Status: IPsec\' page.');
echo gettext('Allow access to the \'Interfaces: Wireless : Edit\' page.');
echo gettext('Allow access to the \'Diagnostics: Test Port\' page.');
echo gettext('Allow access to the \'Diagnostics: Logs: System\' page.');
echo gettext('Allow access to the \'VPN: L2TP : Users\' page.');
echo gettext('If present, ignores requests from this user to write config.xml.');
echo gettext('Allow access to the \'Interfaces: Groups: Edit\' page.');
echo gettext('Allow access to the \'Diagnostics: Logs: Firewall: Dynamic View\' page.');
echo gettext('Allows access to the \'Diagnostics: pfInfo\' page');
echo gettext('Indicates whether the user is allowed to dial in via IPsec xauth (Note: Does not allow shell access, but may allow the user to create ssh tunnels)');
echo gettext('Allow access to the \'Status: System logs: IPsec VPN\' page.');
echo gettext('Allow access to the \'Interfaces: LAGG: Edit\' page.');
echo gettext('Allow access to the \'VPN: OpenVPN: Server\' page.');
echo gettext('Allow access to the \'VPN: IPsec: Mobile\' page.');
echo gettext('Allow access to the \'System: Gateways: Edit Gateway\' page.');
echo gettext('Allow access to the \'Diagnostics: Backup/restore\' page.');
echo gettext('Allow direct access to all Dashboard widget pages, required for some widgets using AJAX.');
echo gettext('Allow access to the \'Status: Load Balancer: Virtual Server\' page.');
echo gettext('Allow access to the \'Diagnostics: Configuration History\' page.');
echo gettext('Allow access to the \'Interfaces: GRE: Edit\' page.');
echo gettext('Allow access to the \'Status: Gateway Groups\' page.');
echo gettext('Allow access to the \'Services: DHCP server\' page.');
echo gettext('Allow access to the \'Interfaces\' page.');
echo gettext('Allow access to the \'Services: DNS Forwarder: Edit host\' page.');
echo gettext('Allow access to the \'Status: System logs: Captive portal\' page.');
echo gettext('Allow access to the \'System: General Setup\' page.');
echo gettext('Allow access to the \'Services: DNS Resolver: Access Lists: Edit\' page.');
echo gettext('Allow access to the \'Firewall: NAT: 1:1: Edit\' page.');
echo gettext('Allow access to the \'Diagnostics: Tables\' page.');
echo gettext('Allow access to the \'System: Group manager\' page.');
echo gettext('Allow access to the \'System: User Manager: settings\' page.');
echo gettext('Allow access to the \'Status: DHCPv6 leases\' page.');
echo gettext('Edit Interface LAGG');
echo gettext('Allow access to the \'Status: NTP Serial GPS\' page.');
echo gettext('Indicates whether the user is allowed to dial in via L2TP');
echo gettext('Allow access to the \'Status: Load Balancer: Pool\' page.');
echo gettext('Allow access to the \'Interfaces: QinQ\' page.');
echo gettext('Allow access to the \'Interfaces: Bridge : Edit\' page.');
echo gettext('Allow access to the \'Interfaces: Wireless\' page.');
echo gettext('Allow access to the \'Services: Dynamic DNS clients\' page.');
echo gettext('Allow access to the \'Status: System logs: System: Wireless\' page.');
echo gettext('Allow access to the \'Firewall: Schedules: Edit\' page.');
echo gettext('Allow access to the \'Diagnostics: Ping\' page.');
echo gettext('Allow access to the \'System: Certificate Manager\' page.');
echo gettext('Allow access to the \'System: Gateways: Edit Gateway Groups\' page.');
echo gettext('Allow access to the \'System: Static Routes: Edit route\' page.');
echo gettext('Allow access to the \'Services: Wake on LAN\' page.');
echo gettext('Allow access to the \'System: License\' page.');
echo gettext('Allow access to the \'Services: DNS Filter\' page.');
echo gettext('Allow access to the \'Services: DNS Resolver\' page.');
echo gettext('Allows access to the \'Diagnostics: pfTop\' page');
echo gettext('Allow access to the \'Interfaces: GIF\' page.');
echo gettext('Allow access to the \'VPN: IPsec: Edit Pre-Shared Keys\' page.');
echo gettext('Allow access to the \'Services: Dynamic DNS client\' page.');
echo gettext('Allow access to the \'Services: PPPoE Server: Edit\' page.');
echo gettext('Allow access to the \'Diagnostics: Logs: PPPoE\' page.');
echo gettext('Allow access to the \'System: Advanced: Tunables\' page.');
echo gettext('Allow access to the \'System: Group Manager: Add Privileges\' page.');
echo gettext('Allow access to the \'Services: Load Balancer: Monitors\' page.');
echo gettext('Indicates whether the user is allowed to dial in via PPTP');
echo gettext('Allow access to the \'Diagnostics: Traceroute\' page.');
echo gettext('Allow access to the \'Firewall: NAT: Outbound\' page.');
echo gettext('Allow access to the \'System: Advanced: Firewall and NAT\' page.');
echo gettext('Allow access to the \'System: Gateways\' page.');
echo gettext('Allow access to the \'Firewall: Easy Rule\' add/status page.');
echo gettext('Allow access to the \'System: Static Routes\' page.');
echo gettext('Allow access to the \'XMLRPC Interface Stats\' page.');
echo gettext('Allow access to the \'Interfaces: Bridge\' page.');
echo gettext('Allow access to the \'System: High Availability\' page.');
echo gettext('Allow access to the \'Diagnostics: Factory defaults\' page.');
echo gettext('Allow access to the \'Services: DHCP Relay\' page.');
echo gettext('Allow access to the \'System: Firmware: Manual Update: Progress bar\' page.');
echo gettext('Allow access to the \'Services: Igmpproxy\' page.');
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
/**
*
* Language support, autogenerated file
*
*/
echo gettext('Enable this zone');
echo gettext('Internal number used for this zone');
echo gettext('Select interface(s) to enable for captive portal.');
echo gettext('Select authentication methods to use, leave empty for no authentication needed.');
echo gettext('Clients will be disconnected after this amount of inactivity. They may log in again immediately, though. Enter 0 to disable idle timeout.');
echo gettext('Clients will be disconnected after this amount of time, regardless of activity. They may log in again immediately, though. Enter 0 to disable hard timeout (not recommended unless an idle timeout is set).');
echo gettext('If this option is set, users can login on multiple machines at once. If disabled subsequent logins will cause machines previously logged in with the same username to be disconnected.');
echo gettext('If provided, all traffic will be transmitted over an HTTPS connection to protect against eavesdroppers.');
echo gettext('Hostname (of this machine) to redirect login page to, leave blank to use this interface IP address, otherwise make sure the client can access DNS to resolve this location. When using a SSL certificate, make sure both this name and the cert name are equal.');
echo gettext('Avoid authentication for addresses and subnets in this list');
echo gettext('Avoid authentication for physical addresses in this list');
echo gettext('Use custom template package for user login');
echo gettext('Description to identify this zone.');
echo gettext('Select if job is enabled or not');
echo gettext('Enter the minutes for the job to act, can also be a comma separated list, * (each) or a range (ex. 10,20,30 or 10-30)');
echo gettext('Enter the hours for the job to act, can also be a comma separated list, * (each) or a range (ex. 10,11,12 or 10-12)');
echo gettext('Enter the days of the month for the job to act, can also be a comma separated list, * (each) or a range (ex. 1,20,28 or 1-28)');
echo gettext('Enter the months for the job to act, can also be a comma separated list, * (each) or a range (ex. 1,2,3 or 1-3)');
echo gettext('Enter the days of the week for the job to act, can also be a comma separated list, * (each) or a range (ex. 1,2,3 or 1-3)');
echo gettext('Select the command that needs to be executed at given time frame.');
echo gettext('Enter parameters for this job if required.');
echo gettext('Enter a description to explain what this job is intended for.');
echo gettext('set action to perform here, only used when in IPS mode');
echo gettext('enable IDS');
echo gettext('Select interface(s) to use.');
echo gettext('Select if job is enabled or not');
echo gettext('Enter a filename for storing the blacklist.');
echo gettext('Enter an url to fetch the blacklist from.');
echo gettext('Enter a description to explain what this blacklist is intended for.');
echo gettext('Enable or disable the proxy service.');
echo gettext('The port number where Squid sends and receives ICP queries to and from neighbor caches. Leave blank to disable (default). The standard UDP port for ICP is 3130.');
echo gettext('Enable access logging.');
echo gettext('Enable store logging.');
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('Enter the cache memory size to use.');
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('Select Authentication method');
echo gettext('The prompt will be displayed in the authentication request window.');
echo gettext('The total number of authenticator processes to spawn.');
echo gettext('enable this pipe and it\'s related queues and rules');
echo gettext('Total bandwidth for this pipe');
echo gettext('number of dynamic queues, leave empty for default');
echo gettext('Description to identify this pipe.');
echo gettext('enable this queue and it\'s related rules');
echo gettext('connected pipe for this queue');
echo gettext('Weight of this queue (1..100), used to prioritize within a pipe. (1 is low, 100 is high)');
echo gettext('Description to identify this pipe.');
echo gettext('order in which the rule will be evaluated (lowest first)');
echo gettext('secondary interface, matches packets going traveling from interface (1) to interface (2).
');
echo gettext('source ip or network, examples 10.0.0.0/24, 10.0.0.1');
echo gettext('source port number or well known name (imap,imaps, http,https,...)');
echo gettext('destination ip or network, examples 10.0.0.0/24, 10.0.0.1');
echo gettext('destination port number or well known name (imap,imaps, http,https,...)');
echo gettext('matches incoming or outgoing packets or both (default)');
echo gettext('target pipe or queue');
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
/**
*
* Language support, autogenerated file
*
*/
echo gettext('Root');
echo gettext('Dashboard');
echo gettext('License');
echo gettext('Password');
echo gettext('Logout');
echo gettext('Lobby');
echo gettext('workAround');
echo gettext('Certificates');
echo gettext('workAround');
echo gettext('Authorities');
echo gettext('workAround');
echo gettext('Revocation');
echo gettext('Trust');
echo gettext('none');
echo gettext('History');
echo gettext('Backups');
echo gettext('Configuration');
echo gettext('Crash Reporter');
echo gettext('Firmware');
echo gettext('Synchronization');
echo gettext('CARP Status');
echo gettext('High Availability');
echo gettext('Edit');
echo gettext('All');
echo gettext('Status');
echo gettext('Log File');
echo gettext('Routes');
echo gettext('All');
echo gettext('Edit');
echo gettext('All');
echo gettext('Status');
echo gettext('Edit');
echo gettext('Group');
echo gettext('Group Status');
echo gettext('Log File');
echo gettext('Gateways');
echo gettext('General');
echo gettext('Admin Access');
echo gettext('Networking');
echo gettext('Firewall/NAT');
echo gettext('Notifications');
echo gettext('Logs/Reports');
echo gettext('Miscellaneous');
echo gettext('Edit');
echo gettext('Tunables');
echo gettext('Settings');
echo gettext('Log File');
echo gettext('Step');
echo gettext('Wizard');
echo gettext('All');
echo gettext('Privileges');
echo gettext('Users');
echo gettext('All');
echo gettext('Privileges');
echo gettext('Groups');
echo gettext('Settings');
echo gettext('Edit');
echo gettext('Servers');
echo gettext('Tester');
echo gettext('Access');
echo gettext('Factory Defaults');
echo gettext('Halt System');
echo gettext('Reboot System');
echo gettext('SMART Status');
echo gettext('All');
echo gettext('Services');
echo gettext('Diagnostics');
echo gettext('System');
echo gettext('Overview');
echo gettext('Assignments');
echo gettext('Edit');
echo gettext('Bridge');
echo gettext('Edit');
echo gettext('GIF');
echo gettext('Edit');
echo gettext('GRE');
echo gettext('Edit');
echo gettext('Group');
echo gettext('Edit');
echo gettext('LAGG');
echo gettext('Edit');
echo gettext('QinQ');
echo gettext('Edit');
echo gettext('VLAN');
echo gettext('Other Types');
echo gettext('Edit');
echo gettext('Devices');
echo gettext('Log File');
echo gettext('Point-to-Point');
echo gettext('Edit');
echo gettext('Devices');
echo gettext('Log File');
echo gettext('Status');
echo gettext('Status');
echo gettext('Wireless');
echo gettext('DNS Lookup');
echo gettext('Packet Capture');
echo gettext('Ping');
echo gettext('Test Port');
echo gettext('Traceroute');
echo gettext('Details');
echo gettext('Traffic Graph');
echo gettext('Diagnostics');
echo gettext('Interfaces');
echo gettext('Edit');
echo gettext('NoneEdit');
echo gettext('None');
echo gettext('All');
echo gettext('Edit');
echo gettext('IPs');
echo gettext('Edit');
echo gettext('Ports');
echo gettext('Edit');
echo gettext('URLs');
echo gettext('Import');
echo gettext('Aliases');
echo gettext('RulesEdit');
echo gettext('Floating');
echo gettext('Interface');
echo gettext('Rules');
echo gettext('NatEdit');
echo gettext('Port Forward');
echo gettext('OneOnOneEdit');
echo gettext('1:1');
echo gettext('OutboundEdit');
echo gettext('Outbound');
echo gettext('NPTEdit');
echo gettext('NPT (IPv6)');
echo gettext('NAT');
echo gettext('Status');
echo gettext('TrafficShaper');
echo gettext('VirtualIPEdit');
echo gettext('Virtual IPs');
echo gettext('SchedulesEdit');
echo gettext('Schedules');
echo gettext('Filter Reload');
echo gettext('pfInfo');
echo gettext('pfTop');
echo gettext('Details');
echo gettext('pfTables');
echo gettext('SocketsDetails');
echo gettext('Sockets');
echo gettext('States Dump');
echo gettext('States Reset');
echo gettext('States Summary');
echo gettext('Filter');
echo gettext('Source Tracking');
echo gettext('Diagnostics');
echo gettext('Normal View');
echo gettext('Dynamic View');
echo gettext('Summary View');
echo gettext('Plain View');
echo gettext('Log Files');
echo gettext('Firewall');
echo gettext('Tab');
echo gettext('Edit');
echo gettext('Server');
echo gettext('Relay');
echo gettext('Details');
echo gettext('Leases');
echo gettext('Log File');
echo gettext('DHCP');
echo gettext('Edit');
echo gettext('RA');
echo gettext('Server');
echo gettext('Relay');
echo gettext('Details');
echo gettext('Leases');
echo gettext('DHCPv6');
echo gettext('Hosts');
echo gettext('Domains');
echo gettext('DNS Forwarder');
echo gettext('General');
echo gettext('Hosts');
echo gettext('Domains');
echo gettext('Overrides');
echo gettext('Advanced');
echo gettext('All');
echo gettext('Access Lists');
echo gettext('DNS Resolver');
echo gettext('Edit');
echo gettext('DynDNS');
echo gettext('Filter');
echo gettext('Log File');
echo gettext('Edit');
echo gettext('RFC 2136');
echo gettext('DNS Tools');
echo gettext('IGMPProxyEdit');
echo gettext('IGMP Proxy');
echo gettext('Edit');
echo gettext('Monitors');
echo gettext('Edit');
echo gettext('Pool Setup');
echo gettext('Pool Status');
echo gettext('Settings');
echo gettext('Log File');
echo gettext('Edit');
echo gettext('Virtual Server Setup');
echo gettext('Virtual Server Status');
echo gettext('Load Balancer');
echo gettext('General');
echo gettext('GPS');
echo gettext('PPS');
echo gettext('Status');
echo gettext('Log File');
echo gettext('Network Time');
echo gettext('Edit');
echo gettext('Settings');
echo gettext('Type');
echo gettext('Log File');
echo gettext('PPPoE Server');
echo gettext('More');
echo gettext('Log File');
echo gettext('Proxy');
echo gettext('SNMP');
echo gettext('Edit');
echo gettext('Settings');
echo gettext('Status');
echo gettext('Universal Plug and Play');
echo gettext('WoLEdit');
echo gettext('Wake on LAN');
echo gettext('Services');
echo gettext('Phase1');
echo gettext('Phase2');
echo gettext('Tunnel Settings');
echo gettext('Mobile Clients');
echo gettext('Edit');
echo gettext('Pre-Shared Keys');
echo gettext('Advanced Settings');
echo gettext('Act');
echo gettext('Status Overview');
echo gettext('Lease Status');
echo gettext('Security Association Database');
echo gettext('Security Policy Database');
echo gettext('Log File');
echo gettext('IPsec');
echo gettext('Settings');
echo gettext('Edit');
echo gettext('Users');
echo gettext('Type');
echo gettext('Log File');
echo gettext('L2TP');
echo gettext('Edit');
echo gettext('Server Settings');
echo gettext('Edit');
echo gettext('Client Settings');
echo gettext('Edit');
echo gettext('Client Specific Overrides');
echo gettext('Edit');
echo gettext('Client Export');
echo gettext('Shared Key Export');
echo gettext('Connection Status');
echo gettext('Log File');
echo gettext('OpenVPN');
echo gettext('Settings');
echo gettext('Edit');
echo gettext('Users');
echo gettext('Type');
echo gettext('Log File');
echo gettext('PPTP');
echo gettext('VPN');
echo gettext('About this Page');
echo gettext('Developers Wiki');
echo gettext('Documentation');
echo gettext('FreeBSD Handbook');
echo gettext('Paid Support');
echo gettext('User Forum');
echo gettext('Help');
echo gettext('menu');
echo gettext('Administration');
echo gettext('Sessions');
echo gettext('Vouchers');
echo gettext('Log File');
echo gettext('Captive Portal');
echo gettext('Services');
echo gettext('menu');
echo gettext('Maximum number of zones reached');
echo gettext('Idle timeout must be between 0(no timeout) and 10080 (a week)');
echo gettext('Hard timeout must be between 0(no timeout) and 10080 (a week)');
echo gettext('Please select a valid certificate from the list');
echo gettext('Please enter a valid servername, ip address or leave this option blank');
echo gettext('Please enter valid addresses');
echo gettext('Please enter valid mac addresses');
echo gettext('Related template not found');
echo gettext('Description should be a string between 1 and 255 characters');
echo gettext('Fileid should be an internally generated unique number');
echo gettext('Template name should be a string between 1 and 255 characters');
echo gettext('File content should be in (base64 encoded) zip format');
echo gettext('Origin should be regular text of max 30 characters');
echo gettext('Value needs to be between 0 and 59, multiple values, ranges and * are supported (ex. 1,10,20,30 or 1-30 )');
echo gettext('Value needs to be between 0 and 23, multiple values, ranges and * are supported (ex. 1,2,8 or 0-8 )');
echo gettext('Value needs to be between 1 and 31, multiple values, ranges, L (last day of month) and * are supported (ex. 1,2,8 or 1-28 )');
echo gettext('Value needs to be between 1 and 12 or JAN to DEC, multiple values, ranges and * are supported (ex. JAN,2,10 or 3-8 )');
echo gettext('Value needs to be between 0 and 6 ( Sunday to Saturday), multiple values, ranges and * are supported (ex. 1,2,4 or 0-4 ) ');
echo gettext('Select a command from the list.');
echo gettext('Enter valid parameter(s) for the chosen command (Found illegal characters).');
echo gettext('Enter a description.');
echo gettext('Intrusion Detection');
echo gettext('Services');
echo gettext('menu');
echo gettext('sid should be a number');
echo gettext('Related cron not found');
echo gettext('Administration');
echo gettext('Proxy Server');
echo gettext('Services');
echo gettext('menu');
echo gettext('ICP port needs to be an integer value between 1 and 65535');
echo gettext('Specify a positive memory cache size. (number of MB\'s)');
echo gettext('Specify a positive cache size. (number of MB\'s)');
echo gettext('Specify a positive number of first-level subdirectories.');
echo gettext('Specify a positive number of second-level subdirectories.');
echo gettext('Specify the maximum download size. (number of KBs)');
echo gettext('Specify the maximum upload size. (number of KBs)');
echo gettext('Specify the overall bandwidth for downloads in kilobits per second.');
echo gettext('Specify the per host bandwidth for downloads in kilobits per second.');
echo gettext('Proxy port needs to be an integer value between 1 and 65535');
echo gettext('FTP Proxy port needs to be an integer value between 1 and 65535');
echo gettext('The filename may only contain letters,digits and one dot (not required).');
echo gettext('This does not look like a valid url.');
echo gettext('Related cron not found');
echo gettext('Credentials TTL needs to be an integer value above 0');
echo gettext('Number of children needs to be an integer value above 0');
echo gettext('Health');
echo gettext('Activity Monitor');
echo gettext('Diagnostics');
echo gettext('System');
echo gettext('ARP Table');
echo gettext('NDP Table');
echo gettext('Diagnostics');
echo gettext('Interfaces');
echo gettext('menu');
echo gettext('Settings');
echo gettext('Traffic Shaper');
echo gettext('Firewall');
echo gettext('menu');
echo gettext('Pipe number must be between 1...65535');
echo gettext('Bandwidth out of range');
echo gettext('Bandwidth metric should be one of bit,Kbit,Mbit');
echo gettext('The burst value is an integer and represent a number of bytes.');
echo gettext('queue size should be between 2...100');
echo gettext('origin should be regular text of max 30 characters');
echo gettext('Description should be a string between 1 and 255 characters');
echo gettext('Queue number must be between 1...65535');
echo gettext('Related pipe not found');
echo gettext('Weight must be between 1...100');
echo gettext('Description should be a string between 1 and 255 characters');
echo gettext('origin should be regular text of max 30 characters');
echo gettext('provide a valid sequence for sorting');
echo gettext('Related pipe or queue not found');
echo gettext('origin should be regular text of max 30 characters');
"""
Copyright (c) 2015 Deciso B.V.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : translate
function: collect acl translatable text
"""
__author__ = 'Ad Schellevis'
def getTranslations(root):
import json
filename='%s/opnsense/mvc/app/models/OPNsense/Core/ACL_Legacy_Page_Map.json'%root
aclMap = json.loads(open(filename).read())
for aclKey in aclMap.keys():
if aclMap[aclKey].has_key('descr'):
yield aclMap[aclKey]['descr']
"""
Copyright (c) 2015 Deciso B.V.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : translate
function: collect controller translatable text
"""
__author__ = 'Ad Schellevis'
def recursiveParseForm(xmlNode):
for childNode in xmlNode:
for tag in recursiveParseForm(childNode):
yield tag
if xmlNode.tag == 'help':
yield xmlNode.text
def getTranslations(root):
import os
import xml.etree.ElementTree as ET
rootpath='%s/opnsense/mvc/app/controllers/'%root
for rootdir, dirs, files in os.walk(rootpath, topdown=False):
for name in files:
if name.lower()[-4:] == '.xml':
filename = '%s/%s'%(rootdir,name)
tree = ET.parse(filename)
rootObj = tree.getroot()
if rootObj.tag == 'form':
for tag in recursiveParseForm(rootObj):
yield tag
"""
Copyright (c) 2015 Deciso B.V.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------------
package : translate
function: collect model translatable text
"""
__author__ = 'Ad Schellevis'
def recursiveParseModel(xmlNode):
for childNode in xmlNode:
for tag in recursiveParseModel(childNode):
yield tag
if xmlNode.tag == 'ValidationMessage':
yield xmlNode.text
def recursiveParseMenu(xmlNode):
for childNode in xmlNode:
for tag in recursiveParseMenu(childNode):
yield tag
if xmlNode.attrib.has_key('VisibleName'):
yield xmlNode.attrib['VisibleName']
else:
yield xmlNode.tag
def getTranslations(root):
import os
import xml.etree.ElementTree as ET
rootpath='%s/opnsense/mvc/app/models/'%root
for rootdir, dirs, files in os.walk(rootpath, topdown=False):
for name in files:
if name.lower()[-4:] == '.xml':
filename = '%s/%s'%(rootdir,name)
tree = ET.parse(filename)
rootObj = tree.getroot()
if rootObj.tag == 'model':
for tag in recursiveParseModel(rootObj):
yield tag
elif rootObj.tag == 'menu':
for tag in recursiveParseMenu(rootObj):
yield tag
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
/**
*
* Language support, autogenerated file
*
*/
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment