Debian Codegraph @

translation-canary/translation_canary/translatable/__main__.py

raw
1 # Entry point for testing translatable strings
2 #
3 # Copyright (C) 2015 Red Hat, Inc.
4 #
5 # This copyrighted material is made available to anyone wishing to use,
6 # modify, copy, or redistribute it subject to the terms and conditions of
7 # the GNU Lesser General Public License v.2, or (at your option) any later
8 # version. This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY expressed or implied, including the implied
10 # warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 # the GNU Lesser General Public License for more details. You should have
12 # received a copy of the GNU Lesser General Public License along with this
13 # program; if not, write to the Free Software Foundation, Inc., 51 Franklin
14 # Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks
15 # that are incorporated in the source code or documentation are not subject
16 # to the GNU Lesser General Public License and may only be used or
17 # replicated with the express permission of Red Hat, Inc.
18 #
19 # Red Hat Author(s): David Shea <[email protected]>
20
21 import sys
22 from . import testPOT
23
24 if len(sys.argv) < 2:
25 print("Usage: translatable <POTfile>")
26 sys.exit(1)
27
28 status = 0
29 for potfile in sys.argv[1:]:
30 if not testPOT(potfile):
31 status = 1
32
33 sys.exit(status)