1#!/usr/local/bin/bash 2# 3# Copyright 2004, 2007 Zuza Software Foundation 4# 5# This file is part of The Translate Toolkit. 6# 7# The Translate Toolkit is free software; you can redistribute it and/or modify 8# it under the terms of the GNU General Public License as published by 9# the Free Software Foundation; either version 2 of the License, or 10# (at your option) any later version. 11# 12# translate is distributed in the hope that it will be useful, 13# but WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15# GNU General Public License for more details. 16# 17# You should have received a copy of the GNU General Public License 18# along with this program; if not, see <http://www.gnu.org/licenses/>. 19 20 21# posplit - takes any po file, usually a compendium PO file, 22# and converts it into 3 distinct files named: 23# $original-translated.po 24# $original-fuzzy.po 25# $original-untranslated.po 26# A simple msgcat can recombine the PO 27 28 29if [ $# -ne 1 ]; then 30 echo "Usage: `basename $0` original.po" 31 exit 1 32fi 33 34original=$1 35 36if [ ! -f $original ]; then 37 echo "Problem with '$original'" 38 exit 1 39fi 40 41dir=`dirname $original` 42prefix=$dir/`basename $original .po` 43translated=${prefix}-translated.po 44fuzzy=${prefix}-fuzzy.po 45untranslated=${prefix}-untranslated.po 46 47rm -f $translated $fuzzy $untranslated 48 49msgattrib --output-file=$translated --translated --no-fuzzy $original 50msgattrib --output-file=$fuzzy --only-fuzzy $original 51msgattrib --output-file=$untranslated --untranslated $original 52