[Xfce-i18n] I: new subdirectory in orage
Daichi Kawahata
daichi at xfce.org
Sat Apr 29 16:05:05 CEST 2006
On Mon, 24 Apr 2006 23:01:59 +0300
juha wrote:
> Daichi,
Hi,
> I added the orage-clock panel plugin some time ago....
> Do you want to run your script to find the new strings
> from panel-plugin directory?
> Or should I do it?
Please do what you have to do, let your heart decide.
> It generates POTFILES.in?
An attached script was created for which I/a translator
can update POTFILES.in file has missing file in it.
Regards,
--
Daichi
Language Codes: http://www.w3.org/WAI/ER/IG/ert/iso639.htm
Country Codes: http://www.ics.uci.edu/pub/ietf/http/related/iso3166.txt
-------------- next part --------------
#!/bin/sh
# potfiles-in.sh - Create POTFILE.in file.
#
# Usage: potfiles-in.sh (in the "po" directory)
#
# Copyright (C) 2005 Daichi Kawahata <daichi at xfce.org>
#
# This script is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# 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 program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Changes
#
# 0.3 (2005-11-21):
#
# * Changed to the lower case letters on output strings.
# * Removed extra comment string (if desktop file doesn't exist).
#
# 0.2 (2005-11-19):
#
# * Improved matching regex by Danny Milosavljevic <dannym at xfce.org>.
#
# 0.1 (2005-11-17):
#
# * Initial version.
#
topdir=..
regex="\<[NQ]*_("
# Grabs package name and version number.
if [ -f $topdir/config.h ]; then
package=`grep PACKAGE_STRING $topdir/config.h | sed 's/#define PACKAGE_STRING \"//' | sed 's/\"//'`
else
echo
echo "This script assumes a program is using GNU Autotools (Autoheader)"
echo "and 'config.h' is already generated. Please run './configure' in"
echo "the top directory at first."
echo
fi
echo
echo "Creating latest 'POTFILES.in' file for the $package."
echo
# Inserts header comments.
#echo "# POTFILE.in file for $package." > pot_head.tmp
#echo "#" >> pot_head.tmp
echo "# List of source files containing translatable strings." > pot_head.tmp
#echo "# Please keep this file sorted alphabetically." >> pot_head.tmp
echo >> pot.tmp
echo -n "Checking for C source files... "
find $topdir -name "*.[chily]" -exec grep -l "$regex" {} \; >> pot.tmp
#perl -i -p -e "s/.*getopt\.c//g" pot.tmp
perl -i -p -e "s/.*intl\.h//g" pot.tmp
echo "done."
echo -n "Checking for C++ source files... "
find $topdir -name "*.cc" -exec grep -l "$regex" {} \; >> pot.tmp
find $topdir -name "*.cpp" -exec grep -l "$regex" {} \; >> pot.tmp
echo "done."
echo -n "Checking for Glade files... "
find $topdir -name "*.glade" -exec grep -l "translatable\=\"yes\"" {} \; >> pot.tmp
find $topdir -name "*.glade" -exec grep -l "translatable\=\"yes\"" {} \; >> pot.tmp
echo "done."
echo -n "Checking for Theme files... "
find $topdir -name "*.theme.in" >> pot.tmp
echo "done."
echo -n "Checking for XML files... "
find $topdir -name "*.xml.in" -exec grep -l "name=\"" {} \; >> pot.tmp
echo "done."
echo -n "Checking for Python files... "
find $topdir -name "*.py" -exec grep -l "$regex" {} \; >> pot.tmp
echo "done."
echo -n "Checking for Schema/GConf files... "
find $topdir -name "*.schemas.in" >> pot.tmp
echo "done."
echo -n "Checking for Server files... "
find $topdir -name "*.server.in" >> pot.tmp
find $topdir -name "*.server.in.in" >> pot.tmp
echo "done."
echo -n "Checking for Key files... "
find $topdir -name "*.keys_template.in" >> pot.tmp
find $topdir -name "*.keys.in" >> pot.tmp
echo "done."
echo -n "Checking for miscellaneous files... "
# For xfce4-mixer
find $topdir -name "*.gob" -exec grep -l "$regex" {} \; >> pot.tmp
find $topdir -name "*.scm" -exec grep -l "_ \"" {} \; >> pot.tmp
echo "done."
echo
echo -n "Merging and sorting listed files... "
cat pot_head.tmp > POTFILES.in
cat pot.tmp | sort | uniq | sed -e "s/\.\.\///g" >> POTFILES.in
echo "done."
echo
echo -n "Checking for Desktop files... "
echo >> desktop.tmp
echo "# files added by intltool-prepare." >> desktop.tmp
find $topdir -name "*.desktop.in" >> desktop.tmp
find $topdir -name "*.desktop.in.in" >> desktop.tmp
echo "done."
if grep "\.desktop" desktop.tmp > /dev/null; then
echo
echo -n "Merging and sorting listed files... "
cat desktop.tmp | sort | uniq | sed -e "s/\.\.\///g" >> POTFILES.in
echo "done."
fi
# Clean temporary files.
rm pot_head.tmp pot.tmp desktop.tmp
echo
echo "Now run 'make update-po' in this directory."
echo
exit 0
More information about the Xfce-i18n
mailing list