[Xfce-i18n] Thunar nl.po file
Daichi Kawahata
daichi at xfce.org
Thu Jan 12 12:39:58 CET 2006
On Wed, 11 Jan 2006 21:28:59 +0900
Daichi Kawahata wrote:
> $ ./autogen.sh
> $ cd po
> $ gmake update-po
> $ msginit --locale=nl
> $ iconv -f ISO-8859-1 -t UTF-8 nl.po > nl.po.utf8
> $ mv nl.po.utf8 nl.po
Sorry, to be accurate, it should be:
$ gmake Thunar.pot
instead of "update-po" and you'll have to edit a charset
in the header as well.
From:
"Content-Type: text/plain; charset=ISO-8859-1\n"
To:
"Content-Type: text/plain; charset=UTF-8\n"
or use attached script.
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
#
#-----------------------------------------------------------------------
# poconv.sh - Enforcing UTF-8 whatever they have.
#
# Copyright (C) 2003-2006 Free Software Foundation, Inc.
#
# 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.
#
# Authors:
# Botond Botyanszki <b0ti at users.sourceforge.net>, 2003.
# Takuro Ashie <makeinu at users.sourceforge.net>, 2003.
# Daichi Kawahata <daichi at xfce.org>, 2005-2006.
#
#-----------------------------------------------------------------------
#
# Languages to check, if '*' is given, all languages are checked.
lang="*"
# Check whether po directory.
if [ -f POTFILES.in ]; then
:
else
echo
echo "Please run this script in the \"po\" directory."
echo
exit 0
fi
echo
echo "Trying to convert local charsets to UTF-8..."
echo
for po_file in ${lang}.po; do
po_charset=`grep "Content-Type: text/plain; charset" $po_file | sed -e 's/\"Content-Type: text\/plain; charset=\\(.*\\)\\\n\"/\\1/'`
if test -z ${po_charset}; then
echo "Missing charset in \"${po_file}\"!"
elif test ${po_charset} = "UTF-8"; then
echo "Charset in \"${po_file}\" is already UTF-8, skipping..."
elif test ${po_charset} = "utf-8"; then
echo "Charset in \"${po_file}\" is already UTF-8, skipping..."
else
echo -n "Converting ${po_charset} to UTF-8 in \"${po_file}\"... "
iconv -f ${po_charset} -t UTF-8 ${po_file} > ${po_file}.utf8
echo "done."
echo -n "Replacing charset description to UTF-8... "
sed -e 's/Content-Type: text\/plain; charset=.*\\n/Content-Type: text\/plain; charset=UTF-8\\n/' < ${po_file}.utf8 > ${po_file}
echo "done."
rm ${po_file}.utf8
fi
echo
done
exit 0
More information about the Xfce-i18n
mailing list