+t-prot (2.1.1-2) unstable; urgency=low
+
+  * Improved handling of preserving configuration during only remove of the
+    package and reinstall.
+  * Added debconf translations: Czech by Miroslav Kure, Vietnamese by Clytie
+    Siddall.
+
+ -- Gerfried Fuchs <alfie@debian.org>  Fri, 04 Aug 2006 11:02:12 -0500
+
 t-prot (2.1.1-1) unstable; urgency=low
 
   * New upstream release: Doku fixes.
 
 db_input medium t-prot/muttrc.d || true
 db_go
 
-# XXX - reconfigure check?
-
 exit 0
 
--- /dev/null
+# Czech translation of t-prot debconf messages.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the t-prot package.
+# Miroslav Kure <kurem@debian.cz>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: t-prot\n"
+"Report-Msgid-Bugs-To: t-prot@packages.debian.org\n"
+"POT-Creation-Date: 2006-08-02 15:54-0500\n"
+"PO-Revision-Date: 2006-07-30 17:41+0200\n"
+"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
+"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Do you want to enable t-prot system wide for mutt?"
+msgstr "Chcete celosystémově povolit v muttu podporu t-protu?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The t-prot package provides a config file /etc/Muttrc.t-prot -- to use the "
+"script from mutt you have to enable it.  You can do this either by creating "
+"a symlink in /etc/Muttrc.d/ for systemwide usage (rather, this can be done "
+"automatically for you), or let the users decide to add a \"source\" line for "
+"it in their ~/.muttrc or ~/.mutt/muttrc.  If you acknowledge this question "
+"the systemwide usage will be enabled."
+msgstr ""
+"Balík t-prot poskytuje konfigurační soubor /etc/Muttrc.t-prot. Abyste mohli "
+"t-prot využívat přímo z muttu, musíte jej povolit. To můžete provést buď pro "
+"celý systém tak, že v adresáři /etc/Muttrc.d/ vytvoříte symbolický odkaz na "
+"tento soubor, nebo můžete nechat uživatele, aby se sami rozhodli, zda si do "
+"svého ~/.muttrc nebo ~/.mutt/muttrc přidají příslušný řádek \"source\". "
+"Odpovíte-li na tuto otázku kladně, povolí se spojení muttu s t-protem "
+"automaticky pro všechny uživatele systému."
 
 msgstr ""
 "Project-Id-Version: t-prot 2.0.2\n"
 "Report-Msgid-Bugs-To: t-prot@packages.debian.org\n"
-"POT-Creation-Date: 2006-03-27 12:44+0200\n"
+"POT-Creation-Date: 2006-08-02 15:54-0500\n"
 "PO-Revision-Date: 2006-03-27 12:45+0200\n"
 "Last-Translator: Gerfried Fuchs <alfie@debian.org>\n"
 "Language-Team: German <debian-l10n-german@lists.debian.org>\n"
 
 #. Type: boolean
 #. Description
-#: ../templates:4
+#: ../templates:1001
 msgid "Do you want to enable t-prot system wide for mutt?"
 msgstr "Wollen Sie t-prot Systemweit in mutt aktivieren?"
 
 #. Type: boolean
 #. Description
-#: ../templates:4
+#: ../templates:1001
 msgid ""
 "The t-prot package provides a config file /etc/Muttrc.t-prot -- to use the "
 "script from mutt you have to enable it.  You can do this either by creating "
 
 msgstr ""
 "Project-Id-Version: t-prot\n"
 "Report-Msgid-Bugs-To: t-prot@packages.debian.org\n"
-"POT-Creation-Date: 2006-03-27 12:44+0200\n"
+"POT-Creation-Date: 2006-08-02 15:54-0500\n"
 "PO-Revision-Date: 2006-06-28 01:10+0200\n"
 "Last-Translator: Christian Perrier <bubulle@debian.org>\n"
 "Language-Team: French <debian-l10n-french@lists.debian.org>\n"
 
 #. Type: boolean
 #. Description
-#: ../templates:4
+#: ../templates:1001
 msgid "Do you want to enable t-prot system wide for mutt?"
 msgstr "Faut-il activer t-prot pour l'ensemble des utilisateurs de mutt ?"
 
 #. Type: boolean
 #. Description
-#: ../templates:4
+#: ../templates:1001
 msgid ""
 "The t-prot package provides a config file /etc/Muttrc.t-prot -- to use the "
 "script from mutt you have to enable it.  You can do this either by creating "
 "peut se faire en choisissant cette option. Elle créera un lien symbolique "
 "dans /etc/Muttrc.d afin d'offrir cette possibilité à tous les utilisateurs "
 "du système. Alternativement, si vous ne choisissez pas cette option, chaque "
-"utilisateur pourra ajouter une instruction « source » vers ce fichier "
-"dans son fichier ~/.muttrc ou ~/.mutt/muttrc."
+"utilisateur pourra ajouter une instruction « source » vers ce fichier dans "
+"son fichier ~/.muttrc ou ~/.mutt/muttrc."
 
 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
+# This file is distributed under the same license as the t-prot package.
 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: t-prot VERSION\n"
 "Report-Msgid-Bugs-To: t-prot@packages.debian.org\n"
-"POT-Creation-Date: 2006-03-27 12:44+0200\n"
+"POT-Creation-Date: 2006-08-02 15:54-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 
 #. Type: boolean
 #. Description
-#: ../templates:4
+#: ../templates:1001
 msgid "Do you want to enable t-prot system wide for mutt?"
 msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../templates:4
+#: ../templates:1001
 msgid ""
 "The t-prot package provides a config file /etc/Muttrc.t-prot -- to use the "
 "script from mutt you have to enable it.  You can do this either by creating "
 
--- /dev/null
+# Vietnamese translation for t-prot.
+# Copyright © 2006 Free Software Foundation, Inc.
+# Clytie Siddall <clytie@riverland.net.au>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: t-prot_2.1.1-1\n"
+"Report-Msgid-Bugs-To: t-prot@packages.debian.org\n"
+"POT-Creation-Date: 2006-08-02 15:54-0500\n"
+"PO-Revision-Date: 2006-07-31 18:04+0930\n"
+"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+"X-Generator: LocFactoryEditor 1.6fc1\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Do you want to enable t-prot system wide for mutt?"
+msgstr "Bạn có muốn bật chạy t-prot cho mutt trên toàn bộ hệ thống không?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The t-prot package provides a config file /etc/Muttrc.t-prot -- to use the "
+"script from mutt you have to enable it.  You can do this either by creating "
+"a symlink in /etc/Muttrc.d/ for systemwide usage (rather, this can be done "
+"automatically for you), or let the users decide to add a \"source\" line for "
+"it in their ~/.muttrc or ~/.mutt/muttrc.  If you acknowledge this question "
+"the systemwide usage will be enabled."
+msgstr ""
+"Gói t-prot cung cấp tập tin cấu hình </etc/Muttrc.t-prot> cần bật chạy nếu "
+"bạn muốn sử dụng tập lệnh từ mutt. Có thể bật chạy nó hoặc bằng cách tạo "
+"liên kết tượng trưng trong thư mục </etc/Muttrc.d/> để sử dụng trên toàn bộ "
+"hệ thống (hoặc cho gói tạo nó một cách tự động), hoặc cho phép mỗi người "
+"dùng quyết định thêm một dòng « nguồn » (source) dành cho nó vào tập tin tài "
+"nguyên <~/.muttrc> hay <~/.mutt/muttrc> của họ. Nếu bạn đồng ý, gói này sẽ "
+"bật chạy khả năng sử dụng trên toàn bộ hệ thống."
 
        . /usr/share/debconf/confmodule
 fi
 
-if [ "$1" != 'configure' ] && [ "$1" != 'reconfigure' ]; then
+action=$1
+version=$2
+if [ "${DEBCONF_RECONFIGURE}" = "1" ]; then
+       # workaround until reconfigure is really available
+       action=reconfigure
+fi
+
+if [ "$action" != 'configure' ] && [ "$action" != 'reconfigure' ]; then
        exit 0
 fi
 
 # change existing symlink from ../Muttrc.t-prot to ../t-prot/Mutrc
-if [ "$2" = "2.1-1" ] && [ -L /etc/Muttrc.d/t-prot.rc ]; then
+if [ "$version" = "2.1-1" ] && [ -L /etc/Muttrc.d/t-prot.rc ]; then
        cd /etc/Muttrc.d && ln -sf ../t-prot/Muttrc t-prot.rc || true
 fi
 
+# if we got reinstalled after a remove, enable the config snippet again
+if [ "$action" = 'configure' ] && [ -e /etc/Muttrc.d/t-prot.rc.removed ] && [ ! -e /etc/Muttrc.d/t-prot.rc ]; then
+       mv /etc/Muttrc.d/t-prot.rc.removed /etc/Muttrc.d/t-prot.rc || true
+fi
+
 # only on new install or reconfigure
-if [ "x$2" = "x" ] || [ "$1" = "reconfigure" ] || [ "${DEBCONF_RECONFIGURE}" = "1" ]; then
+if [ "x$version" = "x" ] || [ "$action" = "reconfigure" ]; then
        symlink=true
        if [ -e /usr/share/debconf/confmodule ]; then
                db_get t-prot/muttrc.d
 
 #!/bin/sh -e
 # postrm for t-prot
 
-# remove /etc/Muttrc.d/t-prot.rc symlink on both remove and purge
-if [ "$1" = purge ] || [ "$1" = remove ]; then
-       if [ -L /etc/Muttrc.d/t-prot.rc ]; then
-               rm /etc/Muttrc.d/t-prot.rc
+action=$1
+
+case "$action" in
+    remove)
+       if [ ! -e /etc/Muttrc.d/t-prot.rc.removed ]; then
+               # only disable the configuration
+               mv /etc/Muttrc.d/t-prot.rc /etc/Muttrc.d/t-prot.rc.removed || true
        fi
+       ;;
+    purge)
+       rm /etc/Muttrc.d/t-prot.rc.removed || true
+       rm /etc/Muttrc.d/t-prot.rc || true
        rmdir /etc/Muttrc.d 2> /dev/null || true
-fi
-
-# on purge purge debconf data, too
-if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
-       . /usr/share/debconf/confmodule
-       db_purge
-fi
+       # remove debconf data on purge
+       if [ -e /usr/share/debconf/confmodule ]; then
+               . /usr/share/debconf/confmodule
+               db_purge
+       fi
+       ;;
+esac