#!/bin/sh1#2# Copyright (c) 2021 Fernando Apesteguia <[email protected]>3#4# Redistribution and use in source and binary forms, with or without5# modification, are permitted provided that the following conditions are met:6#7# 1. Redistributions of source code must retain the above copyright notice, this8# list of conditions and the following disclaimer.9#10# 2. Redistributions in binary form must reproduce the above copyright notice,11# this list of conditions and the following disclaimer in the documentation12# and/or other materials provided with the distribution.13#14# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND15# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED16# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE17# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR20# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER21# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,22# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE23# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.2425# Check for aspell. Everything else is in base.26COMMAND=msgexec27if ! command -v ${COMMAND} >/dev/null; then28echo "${COMMAND} not found, please run 'pkg install docproj'"29exit 130fi3132usage()33{34echo "${0} <path_to_po_file> <language>"35echo "Example: ${0} documentation/content/es/articles/bsdl-gpl/_index.po es"36}3738if [ ${#} -ne 2 ]; then39usage40exit 141fi4243PO_FILE="${1}"44LANG="${2}"4546# msgexec acts as a driver, invoking a command for every47# translated text4849CURDIR=$(dirname "${0}")50msgexec -i "${PO_FILE}" "${CURDIR}"/po_check_entry.sh "${LANG}"515253