summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-02-03 15:31:52 -0200
committerRenato Botelho <renato@netgate.com>2017-02-03 15:31:52 -0200
commit70ada8192a8aa850c0ab7accd57d9d22fd2e49f9 (patch)
treef0b79531c2ed5d0104f89cabce3fd6b849ef705c /tools
parentf21d286d0c09b2cf47d4e79266d29b09abf1972d (diff)
downloadpfsense-70ada8192a8aa850c0ab7accd57d9d22fd2e49f9.zip
pfsense-70ada8192a8aa850c0ab7accd57d9d22fd2e49f9.tar.gz
Remove infra scripts
Diffstat (limited to 'tools')
-rwxr-xr-xtools/scripts/update_pot.sh85
-rwxr-xr-xtools/scripts/update_translations.sh66
2 files changed, 0 insertions, 151 deletions
diff --git a/tools/scripts/update_pot.sh b/tools/scripts/update_pot.sh
deleted file mode 100755
index 463d0a6..0000000
--- a/tools/scripts/update_pot.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/sh
-#
-# update_pot.sh
-#
-# part of pfSense (https://www.pfsense.org)
-# Copyright (c) 2004-2016 Rubicon Communications, LLC (Netgate)
-# All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Verify if user defined a custom path for xgettext
-if [ -n "$XGETTEXT" ]; then
- if [ ! -x "$XGETTEXT" ]; then
- echo "XGETTEXT env var points to invalid executable"
- exit 1
- fi
-elif ! which -s xgettext; then
- echo "xgettext not found, try to set env var XGETTEXT with full path"
- exit 1
-else
- XGETTEXT=$(which xgettext)
-fi
-
-ROOT=$(realpath "$(dirname $0)/../..")
-
-FILES=$(mktemp -t src-files-)
-
-if [ -z "$FILES" -o ! -f "$FILES" ]; then
- echo "Error creating temporary file"
- exit 1
-fi
-
-trap "rm -f $FILES" 1 2 15 EXIT
-
-( \
- cd $ROOT && \
- find src -type f -name '*.inc' -or -name '*.class' -or -name '*.php' \
-) > $FILES
-
-POT=$ROOT/src/usr/local/share/locale/pot/pfSense.pot
-
-( \
- cd $ROOT && \
- $XGETTEXT \
- -f $FILES \
- -o $POT \
- -L php \
- --from-code UTF-8 \
- -ksetHelp \
- -kForm_Section \
- -kForm_Group \
- -kForm_Input:2 \
- -kForm_Checkbox:2 \
- -kForm_StaticText \
- -kModal \
- -kForm_Button:2 \
- -kForm_Textarea:2 \
- -kForm_MultiCheckboxGroup \
- -kForm_MultiCheckbox:2 \
- -kForm_IpAddress:2 \
- -kForm_Select:2 \
-) || exit 1
-
-( \
- cd $ROOT && \
- $XGETTEXT \
- -f $FILES \
- -o $POT \
- -L php \
- -j \
- --from-code UTF-8 \
- -kForm_Checkbox:3 \
- -kForm_StaticText:2 \
- -kForm_MultiCheckbox:3 \
-) || exit 1
diff --git a/tools/scripts/update_translations.sh b/tools/scripts/update_translations.sh
deleted file mode 100755
index 577bf20..0000000
--- a/tools/scripts/update_translations.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-#
-# update_translations.sh
-#
-# part of pfSense (https://www.pfsense.org)
-# Copyright (c) 2017 Rubicon Communications, LLC (Netgate)
-# All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-ldir=src/usr/local/share/locale
-: ${MSGFMT=$(which msgfmt)}
-
-if [ -z "${MSGFMT}" -o ! -e "${MSGFMT}" ]; then
- echo "ERROR: msgfmt not found"
- exit 1
-fi
-
-if [ ! -d $ldir ]; then
- echo "ERROR: Locale dir (${ldir}) not found"
- exit 1
-fi
-
-if ! ./tools/scripts/update_pot.sh; then
- echo "ERROR: Unable to update pot"
- exit 1
-fi
-
-if git status -s | grep -q "${ldir}/pot/pfSense.pot"; then
- git add ${ldir}/pot/pfSense.pot
- git commit -m "Regenerate pot"
- if ! zanata-cli -B push; then
- echo "ERROR: Unable to push pot to Zanata"
- exit 1
- fi
-fi
-
-#zanata-cli -B pull --min-doc-percent 75
-if ! zanata-cli -B pull; then
- echo "ERROR: Unable to pull po files from Zanata"
- exit 1
-fi
-
-unset commit
-for po in $(git status -s ${ldir}/*/*/pfSense.po | awk '{print $2}'); do
- if ! $MSGFMT -o ${po%%.po}.mo ${po}; then
- echo "ERROR: Error compiling ${po}"
- exit 1
- fi
- git add $(dirname ${po})
- commit=1
-done
-
-if [ -n "${commit}" ]; then
- git commit -m "Update translation files"
-fi
OpenPOWER on IntegriCloud