From 1a90972dced1b1e4a2ecd6b98cf4eb345419bda1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Wed, 14 Sep 2011 18:37:41 +0300 Subject: [PATCH] Add a script to remove obsolete messages. --- obsolete | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 obsolete diff --git a/obsolete b/obsolete new file mode 100755 index 0000000..6211787 --- /dev/null +++ b/obsolete @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Copyright 2007, Donatas Glodenis +# Copyright 2009, Andrius Štikonas +# +# # +# # 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 +# obsolete - remove obsolete gettext entries + + +source "`dirname $0`/ths-variables" + +if [ $# -eq 1 ]; then + folder="$1" +else + folder="trunk" +fi + +for po in `find -L "$folder" -name "*.po"`; do + msgattrib --no-obsolete "$po" > "$po".temp + mv "$po".temp "$po" +done