Blame translation-canary/translation_canary/translatable/__main__.py

Packit Service af52df
# Entry point for testing translatable strings
Packit Service af52df
#
Packit Service af52df
# Copyright (C) 2015  Red Hat, Inc.
Packit Service af52df
#
Packit Service af52df
# This copyrighted material is made available to anyone wishing to use,
Packit Service af52df
# modify, copy, or redistribute it subject to the terms and conditions of
Packit Service af52df
# the GNU Lesser General Public License v.2, or (at your option) any later
Packit Service af52df
# version. This program is distributed in the hope that it will be useful,
Packit Service af52df
# but WITHOUT ANY WARRANTY expressed or implied, including the implied
Packit Service af52df
# warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
Packit Service af52df
# the GNU Lesser General Public License for more details.  You should have
Packit Service af52df
# received a copy of the GNU Lesser General Public License along with this
Packit Service af52df
# program; if not, write to the Free Software Foundation, Inc., 51 Franklin
Packit Service af52df
# Street, Fifth Floor, Boston, MA 02110-1301, USA.  Any Red Hat trademarks
Packit Service af52df
# that are incorporated in the source code or documentation are not subject
Packit Service af52df
# to the GNU Lesser General Public License and may only be used or
Packit Service af52df
# replicated with the express permission of Red Hat, Inc.
Packit Service af52df
#
Packit Service af52df
# Red Hat Author(s): David Shea <dshea@redhat.com>
Packit Service af52df
Packit Service af52df
import sys
Packit Service af52df
from . import testPOT
Packit Service af52df
Packit Service af52df
if len(sys.argv) < 2:
Packit Service af52df
    print("Usage: translatable <POTfile>")
Packit Service af52df
    sys.exit(1)
Packit Service af52df
Packit Service af52df
status = 0
Packit Service af52df
for potfile in sys.argv[1:]:
Packit Service af52df
    if not testPOT(potfile):
Packit Service af52df
        status = 1
Packit Service af52df
Packit Service af52df
sys.exit(status)