#!/bin/bash # # Copyright 2007, Donatas Glodenis # # # # # This script is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License 2 as published by # # the Free Software Foundation. # # # This script is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this script; if not, write to the Free Software # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # ths-stripfuzzy.sh - makes all fuzzy strings non-fuzzy in a translation project. if [ $# -ne 2 ]; then echo "Usage `basename $0` " exit 1 fi pofiles=$1 templates=$2 echo "Completely removing the fuzzy strings from the pofiles..." for po in `cd $pofiles ; find . -name "*.po"` do echo -n $pofiles/$po msgattrib -o $pofiles/$po --no-fuzzy $pofiles/$po done echo "Restoring the previously fuzzy as untranslated strings..." for po in `cd $pofiles ; find . -name "*.po"` do echo -n $pofiles/$po msgmerge --no-fuzzy-matching --backup=off --update $pofiles/$po $templates/${po}t done