[pkg-otr-team] [irssi-plugin-otr] 01/02: Imported Upstream version 4.0.0

Holger Levsen holger at moszumanska.debian.org
Mon Mar 3 21:55:18 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to annotated tag debian/4.0.0-1
in repository irssi-plugin-otr.

commit 75d144e7f6c77cd423b41a9d2f11b5f5f5268988
Author: intrigeri <intrigeri at boum.org>
Date:   Tue Feb 18 11:08:20 2014 +0000

    Imported Upstream version 4.0.0
---
 AUTHORS                          |    2 +-
 COPYING                          |    4 +-
 ChangeLog                        |  185 ++-
 INSTALL                          |    4 +-
 INSTALL.mingw                    |  120 ++
 Makefile.am                      |    2 +-
 Makefile.in                      |    2 +-
 Makefile.mingw                   |   58 +-
 NEWS                             |   38 +
 README                           |   15 +-
 aclocal.m4                       |  270 ++---
 configure                        |  690 ++++++++++-
 configure.ac                     |  141 ++-
 dialogs.c                        |   18 +-
 dialogs.h                        |   22 +-
 gtk-dialog.c                     | 2392 ++++++++++++++++++++++++--------------
 gtk-dialog.h                     |    7 +-
 gtk-ui.c                         |  299 +++--
 gtk-ui.h                         |    7 +-
 otr-icons.h                      |   23 +-
 otr-plugin.c                     |  864 ++++++++++----
 otr-plugin.h                     |   26 +-
 packaging/fedora/pidgin-otr.spec |   21 +-
 packaging/windows/pidgin-otr.nsi |   38 +-
 po/README                        |    5 +
 po/de.po                         |  647 +++++++----
 po/el.po                         |  854 ++++++++++++++
 po/es.po                         |  936 ++++++++++-----
 po/fa.po                         |  843 ++++++++++++++
 po/fr.po                         |  716 ++++++++----
 po/my_MM.po                      |  797 +++++++++++++
 po/nl.po                         |  910 ++++++++++-----
 po/nn.po                         |  883 ++++++++++++++
 po/ru.po                         |   64 +-
 po/zh_CN.po                      |  881 ++++++++++++++
 tooltipmenu.c                    |  201 ++--
 tooltipmenu.h                    |   15 +-
 ui.c                             |   46 +-
 ui.h                             |    7 +-
 39 files changed, 10434 insertions(+), 2619 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 091315a..05f434a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,7 +2,7 @@ Off-the-Record Messaging plugin for pidgin
 
 Authors:
 
-    Ian Goldberg, Rob Smits, Chris Alexander, Nikita Borisov
+    Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew, Lisa Du, Nikita Borisov
     <otr at cypherpunks.ca>
 
 See the README file for mailing list information
diff --git a/COPYING b/COPYING
index 5b6e7c6..73680a2 100644
--- a/COPYING
+++ b/COPYING
@@ -2,7 +2,7 @@
 		       Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+                      51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
 
     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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
 
 Also add information on how to contact you by electronic and paper mail.
diff --git a/ChangeLog b/ChangeLog
index 3a16b12..d32958e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,17 +1,148 @@
-2012-05-14
+2012-09-04
 
-	* INSTALL: Fixing typo and updating reference to CVS.
-	* Makefile.mingw, packaging/windows/pidgin-otr.nsi:
-	Updating to support building the win32 installer on
-	GNU/Linux.
+	* README: Release 4.0.0
 
-2012-05-12
+2012-09-02
 
-	* otr-plugin.c: Fixing a format string vulnerability.
-	Identified by intrigeri <intrigeri at boum.org>.
-	
-	* Makefile.mingw, README, configure.ac, pidgin-otr.nsi:
-	Bumped version number to 3.2.1.
+	* gtk-dialog.c (otrg_gtk_dialog_new_purple_conv): When switching
+	to a conversation tab for which the user has explicitly disabled
+	OTR, remove the OTR menus from the top menu bar.  Thanks to Greg
+	Troxel <gdt at ir.bbn.com> for reporting the issue.
+
+2012-08-27
+
+	* otr-plugin.c: Add a timer_control callback for the last-minute
+	libotr 4 API change.
+
+	* gtk-dialog.c (otrg_gtk_dialog_finished): If one of our buddies
+	ends his/her side of the OTR session, don't automatically change
+	the label on the OTR button on our side to "Finished", since
+	there may be other sessions for the same buddy still in ENCRYPTED.
+
+	* configure.ac: Make the version number of libotr we're looking
+	for more clear.  It used to say "4.0.0 or newer"; now it says
+	"4.x >= 4.0.0", since 5.0 is *not* acceptable.  Thanks to
+	Jacob Appelbaum <jacob at appelbaum.net> for pointing it out.
+
+2012-08-24
+
+	* otr-plugin.c: Turn off the beta dialog
+	* README:
+	* INSTALL.mingw:
+	* Makefile.mingw:
+	* packaging/windows/pidgin-otr.nsi:
+	* configure.ac: Change version number to 4.0.0
+
+2012-08-22
+
+	* configure.ac:
+	* Makefile.mingw: Use gcc and ld hardening flags, where possible.
+	* patches/win32/rndw32.c:
+	* patches/win32/libgcrypt-config.h.patch: Include required win32
+	build patches right here in the source tree
+	* INSTALL.mingw: Be much more thorough in describing how to
+	cross-compile pidgin-otr.dll on Linux
+	* configure.ac:
+	* gtk-dialog.c: Build cleanly with -Wall -Wextra
+	-Wno-unused-parameter -Wno-missing-field-initializers
+	-Wformat-security
+
+2012-08-16
+
+	* packaging/windows/pidgin-otr.nsi: Modifications to the nsi
+	file to make it work properly in a UI-less setting.  Thanks to
+	Ariel Poliak <ariel.p at hostdime.com> for the patch!
+
+2012-07-19
+
+	* gtk-dialog.c, gtk-ui.c, otr-plugin.c: Clean up compiler warnings,
+	memory leaks, and a potential buffer overflow from overlong
+	translations.  Thanks to Paul Wouters <pwouters at redhat.com> for
+	the report.
+
+2012-07-03
+
+	* po/de.po: Updates to German translation from Andreas Schlick
+	<schlick at lavabit.com>
+
+2012-07-01
+
+	* po/my_MM.po: Burmese translation from Russell Kyaw
+	<russellkyaw at gmail.com>
+
+2012-06-29
+
+	* po/nl.po: Updated Dutch translation from Paul Wouters
+	<paul at cypherpunks.ca>
+	* po/fr.po: Updated French translation from Paul Hendry
+	<pshendry at uwaterloo.ca>
+
+2012-06-28
+
+	* po/fa.po: Farsi translation from Hooman Mohajeri Moghaddam
+	ﻩﻮﻤﻧ ﻢﻫﺎﺟﺭی ﻢﻗﺪﻣ <hmohajer at cs.uwaterloo.ca>
+	* po/nn.po: Norwegian translation from Yngve Spjeld Landro
+	<l10n at landro.net>
+
+2012-06-25
+
+	* po/es.po: Updated Spanish translation from Juan Rodriguez
+	<sevenfactors at gmail dot com>
+
+2012-06-21
+
+	* INSTALL.mingw:
+	* Makefile.mingw: Cleaned up instructions for mingw win32
+	cross-compile
+
+	* po/el.po: Updated Greek translation by Alex
+	<irregulator at riseup.net>
+
+2012-06-21
+
+	* otr-plugin.c: Fixed a crash that happened when enabling the
+	OTR plugin while a conversation is open.
+
+	* Release 4.0.0-beta2
+
+2012-06-20
+
+	* po/el.po: Greek translation by Alex <irregulator at riseup.net>
+
+	* po/zh_CN.po: Simplified Chinese translation by Bisheng Liu
+	<bisheng.liu at uwaterloo.ca>
+
+2012-06-16
+
+	* po/de.po: German translation updated by Marc Ester
+	<marc.aurel.ester at googlemail.com>
+
+2012-06-07
+
+	* Release 4.0.0-beta1
+
+2012-05-11
+
+	* otr-plugin.c: Added annoying warnings to prepare for
+	win32 build.
+
+2012-05-10
+
+	* gtk-dialog.c:
+	* otr-plugin.c: Avoiding storing values in g_hash_tables.
+	Doing this improperly created issues in 64-bit
+	environments.
+
+2012-04-30
+
+	* gtk-dialog.c:
+	* gtk-ui.c: 
+	* otr-plugin.c:
+	* otr-plugin.h:
+	* ui.c: More changes for instance tags. Some logging-
+	related changes too (output whether pidgin is logging,
+	change default not to log otr conversations). -- Rob
+	Smits
 
 2010-03-02
 
@@ -24,6 +155,13 @@
 	the fingerprints in the manual authentication dialog
 	selectable (but not selected by default).
 
+2009-06-11
+
+	* gtk-dialog.c:
+	* otr-plugin.c:
+	* otr-plugin.h: Initial instance tags implementation
+	from Lisa Du
+
 2009-08-24
 
 	* po/fr.po: Fixed \n errors
@@ -53,6 +191,18 @@
 	* po/it.po: Italian translation from Vincenzo Reale
 	<smart2128 at baslug.org>.
 
+2008-08-15
+
+	* otr-plugin.c: Willy Lew's updates to reflect libotr 4.0.0 API
+
+2008-08-07
+
+	* otr-plugin.c:
+	* dialogs.h:
+	* dialogs.c:
+	* gtk-dialog.c: Add a force_create parameter to
+	display_otr_message.
+
 2008-07-10
 
 	* otr-plugin.c: Use /dev/urandom to generate keys instead of
@@ -64,6 +214,14 @@
 	* gtk-conv.c: Don't delete the OTR menus if a non-foreground
 	conversation window is closed.
 
+2008-07-02
+
+	* dialogs.c:
+	* dialogs.h:
+	* gtk-dialog.c:
+	* otr-plugin.c: Use the new SMP event callback instead of
+	handling the SMP state machine ourselves.
+
 2008-06-19
 
 	* Makefile.static: Forgot to add tooltipmenu.o to
@@ -79,6 +237,11 @@
 	* po/de.po: Updated German translation from Michael Meier
 	<mail at code.mmsources.de>.
 
+2008-06-16
+
+	* gtk-dialog.c: Make the menu item say "Reauthenticate buddy"
+	when the buddy is already authenticated.
+
 2008-06-15
 
 	* gtk-dialog.c: Don't try to destroy the submenu when we've
diff --git a/INSTALL b/INSTALL
index f44c3b7..eb507a7 100644
--- a/INSTALL
+++ b/INSTALL
@@ -16,7 +16,7 @@ If you install these with a package manager, you'll probably need the
 
 COMPILING (non-Win32)
 
-If you've got a git copy, you will need to regenerate the configure
+If you're got a CVS copy, you will need to regenerate the configure
 script using:
 
     intltoolize --force --copy
@@ -51,6 +51,8 @@ Use the provided Makefile.mingw:
 
     make -f Makefile.mingw
 
+See INSTALL.mingw for a few hints.
+
 INSTALLATION
 
 You should be able to simply do "make install".  If you want to install
diff --git a/INSTALL.mingw b/INSTALL.mingw
new file mode 100644
index 0000000..25e74b0
--- /dev/null
+++ b/INSTALL.mingw
@@ -0,0 +1,120 @@
+Here are some rough notes that might help you create a pidgin-otr Win32 build on
+a Linux system with mingw32. These have been tested on Ubuntu 11.04.
+
+tl;dr download and install for files before disconnecting from the internet:
+
+ wget -c  ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.0.tar.gz \
+          ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.2.1.tar.gz \
+          http://www.cypherpunks.ca/otr/rndw32.diff \
+          http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip \
+          http://downloads.sourceforge.net/project/pidgin/Pidgin/2.10.6/pidgin-2.10.6.tar.bz2 \
+          http://downloads.sourceforge.net/project/pidgin/Pidgin/2.10.6/pidgin-2.10.6-win32-bin.zip \
+          http://www.cypherpunks.ca/otr/nsisunz.zip
+
+  apt-get install mingw32 nsis wget unzip tar
+
+The above files have the following SHA1 values:
+
+  895072c22f5bfd4ac9054d48d62d6c8b2a487098  gtk+-bundle_2.24.10-20120208_win32.zip
+  8627d483e26e73b4cfabb4807ae8423875c37cda  libgcrypt-1.2.1.tar.gz
+  1c91787f208c30a91678ebb2f173308f8fab3d36  libgpg-error-1.0.tar.gz
+  caeeb30321966279285228f9afa088c7f4cace84  nsisunz.zip
+  a0532e7ba2acd205d6a5a4e3624156a980fe3d43  pidgin-2.10.6.tar.bz2
+  e2758a47f911850a2afe7ad3764a383b43e405ba  pidgin-2.10.6-win32-bin.zip
+  7513069475a3717f851867ab5f729f3a871421c0  rndw32.diff
+
+Packages and their build instructions in the order they should be built. Good luck!
+
+mingw:
+  apt-get install mingw32
+
+libgpg-error-1.0:
+  cd /tmp;
+  wget ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.0.tar.gz
+  tar -xvzf libgpg-error-1.0.tar.gz
+  # (before configure)
+  HOST_CC=gcc
+  DLLTOOL=i586-mingw32msvc-dlltool
+  AS=i586-mingw32msvc-as
+  CFLAGS="-g -O2 -fstack-protector-all -Wstack-protector -fwrapv --param ssp-buffer-size=1 -fno-strict-overflow"
+  LDFLAGS="-pie"
+  export HOST_CC DLLTOOL AS CFLAGS LDFLAGS
+  ./configure --with-pic --build=`./config.guess` --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc 
+  make
+  sudo make install
+
+libgcrypt-1.2.1:
+  cd /tmp;
+  wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.2.1.tar.gz
+  wget http://www.cypherpunks.ca/otr/rndw32.diff
+  tar -xvzf libgcrypt-1.2.1.tar.gz
+  cd /tmp/libgcrypt-1.2.1
+  CFLAGS="-g -O2 -fstack-protector-all -Wstack-protector -fwrapv --param ssp-buffer-size=1 -fno-strict-overflow"
+  LDFLAGS="-pie"
+  export CFLAGS LDFLAGS
+  w32root=/usr/i586-mingw32msvc ./autogen.sh --build-w32
+  # Apply a basic configuration change patch
+  patch -p0 < /path/to/pidgin-otr/patches/win32/libgcrypt-config.h.patch
+  # Apply windows slow random fix patch
+  patch -p0 < /path/to/pidgin-otr/patches/win32/rndw32.diff
+  make
+  sudo make install
+  
+nsis:
+  sudo apt-get install nsis
+  # Locate the "nsisunz" plugin (a google search for "nsisunz.zip" should be sufficient)
+  # Extract the DLL to /usr/share/nsis/Plugins
+  # (yes it's a DLL extension, but it will still work for GNU/Linux nsis)
+  # set LIBOTRSRCDIR to the libotr src directory
+  cd /tmp;
+  wget -c http://www.cypherpunks.ca/otr/nsisunz.zip
+  unzip nsisunz.zip
+  sudo cp /tmp/nsisunz/Release/nsisunz.dll /usr/share/nsis/Plugins/
+
+
+libotr:
+  autoreconf -s -i
+  ./configure --with-pic --build=`./config.guess` --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc \
+              --with-libgcrypt-prefix=/usr/i586-mingw32msvc
+  make
+  sudo make install
+
+pidgin-otr:
+  # You will need: Pidgin source code distributable,
+  # Pidgin Win32 distributable, 
+  # and an "all-in-one bundle" of the GTK+ stack 2.14.7 or greater
+  # e.g., gtk+-bundle_2.24.10-20120208_win32.zip from 
+  # http://www.gtk.org/download/win32.php
+  # In Makefile.mingw, specify the location of PIDGIN_HEADERS, PURPLE_HEADERS,
+  # GTK_WIN32_BUNDLE, and PIDGIN_WIN32_LIBS
+  # Ensure either pkg-config will correctly resolve all the dependencies for
+  # glib-2.0 and gtk+-2.0. There is a README in the GTK+ bundle about this, or
+  # uncomment (and perhaps revise) the hardcoded list of includes for GTK_HDRS
+  cd /tmp;
+  wget -c http://prdownloads.sourceforge.net/pidgin/pidgin-2.10.3.tar.bz2
+  wget -c http://downloads.sourceforge.net/project/pidgin/Pidgin/2.10.6/pidgin-2.10.6-win32-bin.zip
+  wget -c http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip
+  sudo mkdir -p /usr/i586-mingw32msvc/misc/gtk_bundle;
+  cd /usr/i586-mingw32msvc/misc/gtk_bundle;
+  sudo unzip /tmp/gtk+-bundle_2.24.10-20120208_win32.zip
+  cd /tmp;
+  unzip pidgin-2.10.6-win32-bin.zip
+  sudo mkdir -p /usr/i586-mingw32msvc/misc/pidgin_dlls
+  sudo mv /tmp/pidgin-2.10.6-win32bin/*.dll /usr/i586-mingw32msvc/misc/pidgin_dlls/
+  tar -xvjf pidgin-2.10.6.tar.bz2
+  sudo mkdir -p /usr/i586-mingw32msvc/include/
+  sudo mv /tmp/pidgin-2.10.6/libpurple /usr/i586-mingw32msvc/include/
+  sudo mv /tmp/pidgin-2.10.6/pidgin /usr/i586-mingw32msvc/include/
+  cd /path/to/pidgin-otr/
+  # Finally build pidgin-otr plugin
+  make -f Makefile.mingw
+  # This should now build the nsis installer
+  make -f Makefile.mingw installer
+  # This should now build the zipfile
+  make -f Makefile.mingw zip
+
+The pidgin-otr plugin is now available in the current working directory -
+inspect it with unzip:
+
+  unzip -l pidgin-otr-4.0.0.zip
+
diff --git a/Makefile.am b/Makefile.am
index f5573f7..b11d604 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,6 @@ EXTRA_DIST=		dialogs.h gtk-dialog.h gtk-ui.h otr-plugin.h ui.h \
 			Makefile.mingw packaging/windows/pidgin-otr.nsi \
 			packaging/fedora/pidgin-otr.spec po/Makefile.mingw \
 			po/README intltool-extract.in intltool-merge.in \
-			intltool-update.in Makefile.static
+			intltool-update.in Makefile.static INSTALL.mingw
 
 DISTCLEANFILES=		intltool-extract intltool-merge intltool-update
diff --git a/Makefile.in b/Makefile.in
index 46fafee..1b4b0b8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -304,7 +304,7 @@ EXTRA_DIST = dialogs.h gtk-dialog.h gtk-ui.h otr-plugin.h ui.h \
 			Makefile.mingw packaging/windows/pidgin-otr.nsi \
 			packaging/fedora/pidgin-otr.spec po/Makefile.mingw \
 			po/README intltool-extract.in intltool-merge.in \
-			intltool-update.in Makefile.static
+			intltool-update.in Makefile.static INSTALL.mingw
 
 DISTCLEANFILES = intltool-extract intltool-merge intltool-update
 all: config.h
diff --git a/Makefile.mingw b/Makefile.mingw
index f4e4ca4..4a0bd8d 100644
--- a/Makefile.mingw
+++ b/Makefile.mingw
@@ -1,7 +1,7 @@
 WIN32=1
 
 # The version number to put in the plugin info
-PIDGIN_OTR_VERSION = 3.2.1
+PIDGIN_OTR_VERSION = 4.0.0
 
 # Name of the gettext domain
 GETTEXT_PACKAGE = pidgin-otr
@@ -19,16 +19,18 @@ GTK_WIN32_BUNDLE ?= /usr/i586-mingw32msvc/misc/gtk_bundle
 # (i.e. pidgin.dll and libpurple.dll)
 PIDGIN_WIN32_LIBS ?= /usr/i586-mingw32msvc/misc/pidgin_dlls
 
-# If you don't have pkg-config, uncomment the -I lines below
-GTK_HDRS ?= `pkg-config --cflags glib-2.0 gtk+-2.0`
-#GTK_HDRS ?= -I$(GTK_WIN32_BUNDLE)/include/gtk-2.0  \
-# -I$(GTK_WIN32_BUNDLE)/include/glib-2.0 \
-# -I$(GTK_WIN32_BUNDLE)/include/cairo \
-# -I$(GTK_WIN32_BUNDLE)/include/pango-1.0 \
-# -I$(GTK_WIN32_BUNDLE)/include/atk-1.0 \
-# -I$(GTK_WIN32_BUNDLE)/include/gdk-pixbuf-2.0 \
-# -I$(GTK_WIN32_BUNDLE)/lib/glib-2.0/include \
-# -I$(GTK_WIN32_BUNDLE)/lib/gtk-2.0/include
+# If you have a pkg-config that finds the win32 versions, you can use it
+# instead of the -I lines below
+#GTK_HDRS ?= `pkg-config --cflags glib-2.0 gtk+-2.0`
+GTK_HDRS ?= -I$(GTK_WIN32_BUNDLE)/include  \
+ -I$(GTK_WIN32_BUNDLE)/include/gtk-2.0  \
+ -I$(GTK_WIN32_BUNDLE)/include/glib-2.0 \
+ -I$(GTK_WIN32_BUNDLE)/include/cairo \
+ -I$(GTK_WIN32_BUNDLE)/include/pango-1.0 \
+ -I$(GTK_WIN32_BUNDLE)/include/atk-1.0 \
+ -I$(GTK_WIN32_BUNDLE)/include/gdk-pixbuf-2.0 \
+ -I$(GTK_WIN32_BUNDLE)/lib/glib-2.0/include \
+ -I$(GTK_WIN32_BUNDLE)/lib/gtk-2.0/include
 
 
 # The location of the libotr include files.  Note that if, for example,
@@ -57,19 +59,30 @@ TARGET = pidgin-otr.dll
 # The target zipfile
 ZIPFILE = pidgin-otr-$(PIDGIN_OTR_VERSION).zip
 
+# Compiling with -fPIE and linking with -pie causes the plugin to crash
+# on load, so we'll skip those.
+CC_HARDENING_OPTIONS ?= -fstack-protector-all -Wstack-protector -fwrapv \
+	--param ssp-buffer-size=1 -fno-strict-overflow -Wall -Wextra \
+	-Wno-unused-parameter -Wno-missing-field-initializers -Wformat-security
+# In theory, we'd also like the following:
+# LD_HARDENING_OPTIONS ?= -dynamicbase --nxcompat -pie -z relro -z now
+LD_HARDENING_OPTIONS ?= --dynamicbase --nxcompat
+
 CC = i586-mingw32msvc-gcc
-LDFLAGS = -Wl,--enable-auto-image-base
+LDFLAGS = -Wl,--enable-auto-image-base $(LD_HARDENING_OPTIONS)
 LDLIBS = $(LIBOTRLIBDIR)/libotr.a -L$(GTK_WIN32_BUNDLE)/lib \
 	 -L$(PIDGIN_WIN32_LIBS) -lgtk-win32-2.0 -lglib-2.0 \
 	 -lgdk_pixbuf-2.0 -lgobject-2.0 -lpidgin -llibpurple \
-	 -lgcrypt -lgpg-error -L$(LIBINTLLIBDIR) -lintl
+	 -lgcrypt -lgpg-error -L$(LIBINTLLIBDIR) -lintl -lssp
 
 CC ?= gcc
-override CFLAGS += -g -O2 -Wall $(PIDGIN_HEADERS) $(PURPLE_HEADERS) \
+override CFLAGS += -g -O2 -Wall $(CC_HARDENING_OPTIONS) \
+	$(PIDGIN_HEADERS) $(PURPLE_HEADERS) \
 	$(GTK_HDRS) -I$(LIBOTRINCDIR) $(FPIC) -DUSING_GTK -DPURPLE_PLUGINS \
 	-DPIDGIN_OTR_VERSION=\"$(PIDGIN_OTR_VERSION)\" \
-	-DPIDGIN_NAME=\"Pidgin\" -I$(LIBINTLINCDIR) -DENABLE_NLS \
+	-I$(LIBINTLINCDIR) -DENABLE_NLS \
 	-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
+	#-DPIDGIN_NAME=\"Pidgin\" 
  
 all: $(TARGET)
 	$(MAKE) -C po -f Makefile.mingw
@@ -93,7 +106,7 @@ prepare_win32_export: all
 		otr_readforge.exe  otr_sesskeys.exe; do \
 			cp -a $(LIBOTRBINDIR)/$$f win32_export/; done
 	cp -a $(LIBOTRSRCDIR)/README win32_export/README.Toolkit.txt
-	cp -a $(LIBOTRSRCDIR)/Protocol-v2.html win32_export/Protocol-v2.html
+	cp -a $(LIBOTRSRCDIR)/Protocol-v3.html win32_export/Protocol-v3.html
 	cp -a $(LIBOTRSRCDIR)/COPYING win32_export/COPYING.txt
 	cp -a $(LIBOTRSRCDIR)/COPYING.LIB win32_export/COPYING.LIB.txt
 	cp -a $(TARGET) win32_export/
@@ -104,11 +117,10 @@ prepare_win32_export: all
 		mkdir -p win32_export/locale/$$l/LC_MESSAGES; \
 		cp -a $$i win32_export/locale/$$l/LC_MESSAGES/pidgin-otr.mo; \
 	done
-	cp -a po/*.gmo win32_export/
 	cd win32_export; \
 	i586-mingw32msvc-strip *.exe *.dll; \
-	perl -pi -e 's/$$/\r/' README.Toolkit.txt Protocol-v2.html \
-		COPYING.txt COPYING.LIB.txt README.txt; \
+	perl -pi -e 's/$$/\r/' README.Toolkit.txt Protocol-v3.html \
+		COPYING.txt COPYING.LIB.txt README.txt;
 
 installer: prepare_win32_export
 	makensis packaging/windows/pidgin-otr.nsi
@@ -116,9 +128,9 @@ installer: prepare_win32_export
 
 ## Package up all the pieces needed to build the installer
 zip: prepare_win32_export
-	rm -f ../$(ZIPFILE); \
-	zip -r ../$(ZIPFILE) README.txt \
-		README.Toolkit.txt Protocol-v2.html COPYING.txt \
-		COPYING.LIB.txt *.exe *.dll *.nsi locale
+	rm -f $(ZIPFILE)
+	cd win32_export; \
+	zip -r $(ZIPFILE) ./*; \
+	mv $(ZIPFILE) ../;
 	rm -rf win32_export
 
diff --git a/NEWS b/NEWS
index 8d13e6f..b6eec40 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,41 @@
+24 Aug 2012:
+
+- Release 4.0.0
+
+21 Jun 2012:
+
+- Fixed an issue that happened when enabling the OTR plugin while a
+  conversation is open.
+- Release 4.0.0-beta2
+
+7 Jun 2012:
+
+- The plugin now supports multiple OTR conversations with the same
+  buddy who is logged in at multiple locations. In this case, a new
+  OTR menu will appear, which allows you to select which session an
+  outgoing message is indended for. Note that concurrent SMP
+  authentications with the same buddy who is logged in multiple times
+  is not yet supported (starting a second authentication will end the
+  first).
+- During a private conversation with a buddy, an incoming unencrypted
+  message will now trigger the regular incoming message notifications.
+  In Pidgin this includes showing the message in the top-right
+  notification area, if it is normally configured to do so.
+- New Italian, Swedish, Polish and Vietnamese translations. Updates to
+  the French translation.
+- When a private conversation begins, the plugin will indicate whether
+  Pidgin is configured to log the conversation.
+- By default, OTR conversations will not be logged by Pidgin.
+- Fingerprints in the manual authentication dialog are now selectable
+- The plugin will no longer delete the OTR menus if a non-foreground
+  conversation window is closed.
+- Except on WIN32, the plugin will now set the umask to 0077 before
+  creating the otr.* files in the purple directory so that they end up
+  mode 0600. 
+- The menu item now says "Reauthenticate buddy" when the buddy is
+  already authenticated.
+- Release 4.0.0-beta1
+
 28 May 2008:
 
 - The functionality of the OTR button has now moved to a menu.  There's
diff --git a/README b/README
index 750146d..47aa5da 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
 	       Off-the-Record Messaging plugin for pidgin
-			  v3.2.1, 14 May 2012
+			  v4.0.0, 4 Sep 2012
 
 This is a pidgin plugin which implements Off-the-Record (OTR) Messaging.
 It is known to work (at least) under the Linux and Windows versions of
@@ -179,7 +179,7 @@ End private conversation
 Authenticate Buddy
 
     For more information on authentication, see
-    http://otr-help.cypherpunks.ca/3.2.1/authenticate.php
+    http://otr-help.cypherpunks.ca/3.2.0/authenticate.php
 
     OTR provides three ways to authenticate your buddy:
 
@@ -300,8 +300,9 @@ The Off-the-Record Messaging plugin for pidgin is covered by the following
 (GPL) license:
 
     Off-the-Record Messaging plugin for pidgin
-    Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
-                             Chris Alexander, Nikita Borisov
+    Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+                             Chris Alexander, Willy Lew,
+                             Lisa Du, Nikita Borisov
                              <otr at cypherpunks.ca>
 
 
@@ -316,15 +317,15 @@ The Off-the-Record Messaging plugin for pidgin is covered by the following
 
     There is a copy of the GNU General Public License in the COPYING file
     packaged with this plugin; if you cannot find it, write to the Free
-    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-    02111-1307  USA
+    Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301 USA
 
 CONTACT
 
 To report problems, comments, suggestions, patches, etc., you can email
 the authors:
 
-Ian Goldberg, Rob Smits, Chris Alexander, and Nikita Borisov
+Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew, Lisa Du, Nikita Borisov
 <otr at cypherpunks.ca>
 
 For more information on Off-the-Record Messaging, visit
diff --git a/aclocal.m4 b/aclocal.m4
index 8f35cf1..1e55f28 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -755,6 +755,141 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
   AC_SUBST(LIBGCRYPT_LIBS)
 ])
 
+dnl
+dnl  Off-the-Record Messaging library
+dnl  Copyright (C) 2004-2007  Ian Goldberg, Chris Alexander, Nikita Borisov
+dnl                           <otr at cypherpunks.ca>
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of version 2.1 of the GNU Lesser General
+dnl  Public License as published by the Free Software Foundation.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+dnl
+
+dnl AM_PATH_LIBOTR([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for libotr, and define LIBOTR_CFLAGS and LIBOTR_LIBS as appropriate.
+dnl enables arguments --with-libotr-prefix=
+dnl                   --with-libotr-inc-prefix=
+dnl
+dnl You must already have found libgcrypt with AM_PATH_LIBGCRYPT
+dnl
+dnl Adapted from alsa.m4, originally by
+dnl      Richard Boulton <richard-alsa at tartarus.org>
+dnl      Christopher Lansdown <lansdoct at cs.alfred.edu>
+dnl      Jaroslav Kysela <perex at suse.cz>
+
+AC_DEFUN([AM_PATH_LIBOTR],
+[dnl Save the original CFLAGS, LDFLAGS, and LIBS
+libotr_save_CFLAGS="$CFLAGS"
+libotr_save_LDFLAGS="$LDFLAGS"
+libotr_save_LIBS="$LIBS"
+libotr_found=yes
+
+dnl
+dnl Get the cflags and libraries for libotr
+dnl
+AC_ARG_WITH(libotr-prefix,
+[  --with-libotr-prefix=PFX  Prefix where libotr is installed(optional)],
+[libotr_prefix="$withval"], [libotr_prefix=""])
+
+AC_ARG_WITH(libotr-inc-prefix,
+[  --with-libotr-inc-prefix=PFX  Prefix where libotr includes are (optional)],
+[libotr_inc_prefix="$withval"], [libotr_inc_prefix=""])
+
+dnl Add any special include directories
+AC_MSG_CHECKING(for libotr CFLAGS)
+if test "$libotr_inc_prefix" != "" ; then
+	LIBOTR_CFLAGS="$LIBOTR_CFLAGS -I$libotr_inc_prefix"
+	CFLAGS="$CFLAGS $LIBOTR_CFLAGS"
+fi
+AC_MSG_RESULT($LIBOTR_CFLAGS)
+
+dnl add any special lib dirs
+AC_MSG_CHECKING(for libotr LIBS)
+if test "$libotr_prefix" != "" ; then
+	LIBOTR_LIBS="$LIBOTR_LIBS -L$libotr_prefix"
+	LDFLAGS="$LDFLAGS $LIBOTR_LIBS"
+fi
+
+dnl add the libotr library
+LIBOTR_LIBS="$LIBOTR_LIBS -lotr"
+LIBS="$LIBOTR_LIBS $LIBS"
+AC_MSG_RESULT($LIBOTR_LIBS)
+
+dnl Check for a working version of libotr that is of the right version.
+min_libotr_version=ifelse([$1], ,3.0.0,$1)
+no_libotr=""
+    libotr_min_major_version=`echo $min_libotr_version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+    libotr_min_minor_version=`echo $min_libotr_version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+    libotr_min_sub_version=`echo $min_libotr_version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+AC_MSG_CHECKING(for libotr headers version $libotr_min_major_version.x >= $min_libotr_version)
+
+AC_LANG_SAVE
+AC_LANG_C
+AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <libotr/version.h>
+], [
+#  if(OTRL_VERSION_MAJOR != $libotr_min_major_version)
+#    error not present
+#  else
+
+#    if(OTRL_VERSION_MINOR > $libotr_min_minor_version)
+       exit(0);
+#    else
+#      if(OTRL_VERSION_MINOR < $libotr_min_minor_version)
+#        error not present
+#      endif
+
+#      if(OTRL_VERSION_SUB < $libotr_min_sub_version)
+#        error not present
+#      endif
+#    endif
+#  endif
+exit(0);
+],
+  [AC_MSG_RESULT(found.)],
+  [AC_MSG_RESULT(not present.)
+   ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libotr not found.)])
+   libotr_found=no]
+)
+AC_LANG_RESTORE
+
+dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
+AC_CHECK_LIB([otr], [otrl_message_receiving],,
+	[ifelse([$3], , [AC_MSG_ERROR(No linkable libotr was found.)])
+	 libotr_found=no],
+	 $LIBGCRYPT_LIBS
+)
+
+LDFLAGS="$libotr_save_LDFLAGS"
+LIBS="$libotr_save_LIBS"
+
+if test "x$libotr_found" = "xyes" ; then
+   ifelse([$2], , :, [$2])
+else
+   LIBOTR_CFLAGS=""
+   LIBOTR_LIBS=""
+   ifelse([$3], , :, [$3])
+fi
+
+dnl That should be it.  Now just export our symbols:
+AC_SUBST(LIBOTR_CFLAGS)
+AC_SUBST(LIBOTR_LIBS)
+])
+
+
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -9853,138 +9988,3 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
-dnl
-dnl  Off-the-Record Messaging library
-dnl  Copyright (C) 2004-2007  Ian Goldberg, Chris Alexander, Nikita Borisov
-dnl                           <otr at cypherpunks.ca>
-dnl
-dnl  This library is free software; you can redistribute it and/or
-dnl  modify it under the terms of version 2.1 of the GNU Lesser General
-dnl  Public License as published by the Free Software Foundation.
-dnl
-dnl  This library is distributed in the hope that it will be useful,
-dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-dnl  Lesser General Public License for more details.
-dnl
-dnl  You should have received a copy of the GNU Lesser General Public
-dnl  License along with this library; if not, write to the Free Software
-dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-dnl
-
-dnl AM_PATH_LIBOTR([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for libotr, and define LIBOTR_CFLAGS and LIBOTR_LIBS as appropriate.
-dnl enables arguments --with-libotr-prefix=
-dnl                   --with-libotr-inc-prefix=
-dnl
-dnl You must already have found libgcrypt with AM_PATH_LIBGCRYPT
-dnl
-dnl Adapted from alsa.m4, originally by
-dnl      Richard Boulton <richard-alsa at tartarus.org>
-dnl      Christopher Lansdown <lansdoct at cs.alfred.edu>
-dnl      Jaroslav Kysela <perex at suse.cz>
-
-AC_DEFUN([AM_PATH_LIBOTR],
-[dnl Save the original CFLAGS, LDFLAGS, and LIBS
-libotr_save_CFLAGS="$CFLAGS"
-libotr_save_LDFLAGS="$LDFLAGS"
-libotr_save_LIBS="$LIBS"
-libotr_found=yes
-
-dnl
-dnl Get the cflags and libraries for libotr
-dnl
-AC_ARG_WITH(libotr-prefix,
-[  --with-libotr-prefix=PFX  Prefix where libotr is installed(optional)],
-[libotr_prefix="$withval"], [libotr_prefix=""])
-
-AC_ARG_WITH(libotr-inc-prefix,
-[  --with-libotr-inc-prefix=PFX  Prefix where libotr includes are (optional)],
-[libotr_inc_prefix="$withval"], [libotr_inc_prefix=""])
-
-dnl Add any special include directories
-AC_MSG_CHECKING(for libotr CFLAGS)
-if test "$libotr_inc_prefix" != "" ; then
-	LIBOTR_CFLAGS="$LIBOTR_CFLAGS -I$libotr_inc_prefix"
-	CFLAGS="$CFLAGS $LIBOTR_CFLAGS"
-fi
-AC_MSG_RESULT($LIBOTR_CFLAGS)
-
-dnl add any special lib dirs
-AC_MSG_CHECKING(for libotr LIBS)
-if test "$libotr_prefix" != "" ; then
-	LIBOTR_LIBS="$LIBOTR_LIBS -L$libotr_prefix"
-	LDFLAGS="$LDFLAGS $LIBOTR_LIBS"
-fi
-
-dnl add the libotr library
-LIBOTR_LIBS="$LIBOTR_LIBS -lotr"
-LIBS="$LIBOTR_LIBS $LIBS"
-AC_MSG_RESULT($LIBOTR_LIBS)
-
-dnl Check for a working version of libotr that is of the right version.
-min_libotr_version=ifelse([$1], ,3.0.0,$1)
-no_libotr=""
-    libotr_min_major_version=`echo $min_libotr_version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-    libotr_min_minor_version=`echo $min_libotr_version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-    libotr_min_sub_version=`echo $min_libotr_version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-AC_MSG_CHECKING(for libotr headers version $libotr_min_major_version.x >= $min_libotr_version)
-
-AC_LANG_SAVE
-AC_LANG_C
-AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <libotr/version.h>
-], [
-#  if(OTRL_VERSION_MAJOR != $libotr_min_major_version)
-#    error not present
-#  else
-
-#    if(OTRL_VERSION_MINOR > $libotr_min_minor_version)
-       exit(0);
-#    else
-#      if(OTRL_VERSION_MINOR < $libotr_min_minor_version)
-#        error not present
-#      endif
-
-#      if(OTRL_VERSION_SUB < $libotr_min_sub_version)
-#        error not present
-#      endif
-#    endif
-#  endif
-exit(0);
-],
-  [AC_MSG_RESULT(found.)],
-  [AC_MSG_RESULT(not present.)
-   ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libotr not found.)])
-   libotr_found=no]
-)
-AC_LANG_RESTORE
-
-dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
-AC_CHECK_LIB([otr], [otrl_message_receiving],,
-	[ifelse([$3], , [AC_MSG_ERROR(No linkable libotr was found.)])
-	 libotr_found=no],
-	 $LIBGCRYPT_LIBS
-)
-
-LDFLAGS="$libotr_save_LDFLAGS"
-LIBS="$libotr_save_LIBS"
-
-if test "x$libotr_found" = "xyes" ; then
-   ifelse([$2], , :, [$2])
-else
-   LIBOTR_CFLAGS=""
-   LIBOTR_LIBS=""
-   ifelse([$3], , :, [$3])
-fi
-
-dnl That should be it.  Now just export our symbols:
-AC_SUBST(LIBOTR_CFLAGS)
-AC_SUBST(LIBOTR_LIBS)
-])
-
-
diff --git a/configure b/configure
index 605afee..ad2f754 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for pidgin-otr 3.2.1.
+# Generated by GNU Autoconf 2.65 for pidgin-otr 4.0.0.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -698,8 +698,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='pidgin-otr'
 PACKAGE_TARNAME='pidgin-otr'
-PACKAGE_VERSION='3.2.1'
-PACKAGE_STRING='pidgin-otr 3.2.1'
+PACKAGE_VERSION='4.0.0'
+PACKAGE_STRING='pidgin-otr 4.0.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -743,6 +743,8 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+BUILD_NT_SERVICES_FALSE
+BUILD_NT_SERVICES_TRUE
 MKINSTALLDIRS
 POSUB
 POFILES
@@ -912,6 +914,8 @@ with_libgcrypt_prefix
 with_libotr_prefix
 with_libotr_inc_prefix
 enable_nls
+enable_gcc_hardening
+enable_linker_hardening
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1466,7 +1470,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures pidgin-otr 3.2.1 to adapt to many kinds of systems.
+\`configure' configures pidgin-otr 4.0.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1536,7 +1540,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of pidgin-otr 3.2.1:";;
+     short | recursive ) echo "Configuration of pidgin-otr 4.0.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1552,6 +1556,9 @@ Optional Features:
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --disable-nls           do not use Native Language Support
+  --disable-gcc-hardening disable compiler security checks
+  --disable-linker-hardening
+                          disable linker security fixups
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1644,7 +1651,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-pidgin-otr configure 3.2.1
+pidgin-otr configure 4.0.0
 generated by GNU Autoconf 2.65
 
 Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2009,7 +2016,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by pidgin-otr $as_me 3.2.1, which was
+It was created by pidgin-otr $as_me 4.0.0, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   $ $0 $@
@@ -2821,7 +2828,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='pidgin-otr'
- VERSION='3.2.1'
+ VERSION='4.0.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4554,13 +4561,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:4557: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:4564: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4560: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:4567: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4563: output\"" >&5)
+  (eval echo "\"\$as_me:4570: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -5766,7 +5773,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5769 "configure"' > conftest.$ac_ext
+  echo '#line 5776 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7262,11 +7269,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7265: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7272: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7269: \$? = $ac_status" >&5
+   echo "$as_me:7276: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7601,11 +7608,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7604: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7611: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7608: \$? = $ac_status" >&5
+   echo "$as_me:7615: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7706,11 +7713,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7709: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7716: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7713: \$? = $ac_status" >&5
+   echo "$as_me:7720: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -7761,11 +7768,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7764: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7771: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7768: \$? = $ac_status" >&5
+   echo "$as_me:7775: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -10145,7 +10152,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10148 "configure"
+#line 10155 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10241,7 +10248,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10244 "configure"
+#line 10251 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10649,7 +10656,7 @@ LIBS="$LIBOTR_LIBS $LIBS"
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTR_LIBS" >&5
 $as_echo "$LIBOTR_LIBS" >&6; }
 
-min_libotr_version=3.2.0
+min_libotr_version=4.0.0
 no_libotr=""
     libotr_min_major_version=`echo $min_libotr_version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
@@ -10775,7 +10782,7 @@ if test "x$libotr_found" = "xyes" ; then
 else
    LIBOTR_CFLAGS=""
    LIBOTR_LIBS=""
-   as_fn_error "libotr 3.2.0 or newer is required." "$LINENO" 5
+   as_fn_error "libotr 4.x >= 4.0.0 is required." "$LINENO" 5
 fi
 
 
@@ -11556,7 +11563,7 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-ALL_LINGUAS="ar de es fr hu it pl nl ru sk sv vi"
+ALL_LINGUAS="ar de el es fa fr hu it my_MM nl nn pl ru sk sv vi zh_CN"
 
    for ac_header in locale.h
 do :
@@ -12262,6 +12269,631 @@ $as_echo "$LINGUAS" >&6; }
 	< $srcdir/po/POTFILES.in > po/POTFILES
 
 
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for win32" >&5
+$as_echo_n "checking for win32... " >&6; }
+if test "$cross_compiling" = yes; then :
+  bwin32=cross; { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5
+$as_echo "cross" >&6; }
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int main(int c, char **v) {
+#ifdef _WIN32
+#if _WIN32
+  return 0;
+#else
+  return 1;
+#endif
+#else
+  return 2;
+#endif
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  bwin32=true; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  bwin32=false; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+if test "$bwin32" = cross; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for win32 (cross)" >&5
+$as_echo_n "checking for win32 (cross)... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef _WIN32
+int main(int c, char **v) {return 0;}
+#else
+#error
+int main(int c, char **v) {return x(y);}
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  bwin32=true; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  bwin32=false; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test x$bwin32 = xtrue; then
+  BUILD_NT_SERVICES_TRUE=
+  BUILD_NT_SERVICES_FALSE='#'
+else
+  BUILD_NT_SERVICES_TRUE='#'
+  BUILD_NT_SERVICES_FALSE=
+fi
+
+
+# Check whether --enable-gcc-hardening was given.
+if test "${enable_gcc_hardening+set}" = set; then :
+  enableval=$enable_gcc_hardening;
+fi
+
+
+# Check whether --enable-linker-hardening was given.
+if test "${enable_linker_hardening+set}" = set; then :
+  enableval=$enable_linker_hardening;
+fi
+
+
+
+all_ldflags_for_check="$LDFLAGS"
+all_libs_for_check="$LIBGCRYPT_LIBS"
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+#if !defined(__clang__)
+#error
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  have_clang=yes
+else
+  have_clang=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test x$enable_gcc_hardening != xno; then
+    CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
+    if test x$have_clang = xyes; then
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Qunused-arguments" >&5
+$as_echo_n "checking whether the compiler accepts -Qunused-arguments... " >&6; }
+if test "${otr_cv_cflags__Qunused_arguments+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    otr_saved_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -pedantic -Werror -Qunused-arguments"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  otr_cv_cflags__Qunused_arguments=yes
+else
+  otr_cv_cflags__Qunused_arguments=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$otr_saved_CFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_cflags__Qunused_arguments" >&5
+$as_echo "$otr_cv_cflags__Qunused_arguments" >&6; }
+  if test x$otr_cv_cflags__Qunused_arguments = xyes; then
+    CFLAGS="$CFLAGS -Qunused-arguments"
+  fi
+
+
+    fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -fstack-protector-all" >&5
+$as_echo_n "checking whether the compiler accepts -fstack-protector-all... " >&6; }
+if test "${otr_cv_cflags__fstack_protector_all+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    otr_saved_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -pedantic -Werror -fstack-protector-all"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  otr_cv_cflags__fstack_protector_all=yes
+else
+  otr_cv_cflags__fstack_protector_all=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$otr_saved_CFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_cflags__fstack_protector_all" >&5
+$as_echo "$otr_cv_cflags__fstack_protector_all" >&6; }
+  if test x$otr_cv_cflags__fstack_protector_all = xyes; then
+    CFLAGS="$CFLAGS -fstack-protector-all"
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Wstack-protector" >&5
+$as_echo_n "checking whether the compiler accepts -Wstack-protector... " >&6; }
+if test "${otr_cv_cflags__Wstack_protector+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    otr_saved_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -pedantic -Werror -Wstack-protector"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  otr_cv_cflags__Wstack_protector=yes
+else
+  otr_cv_cflags__Wstack_protector=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$otr_saved_CFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_cflags__Wstack_protector" >&5
+$as_echo "$otr_cv_cflags__Wstack_protector" >&6; }
+  if test x$otr_cv_cflags__Wstack_protector = xyes; then
+    CFLAGS="$CFLAGS -Wstack-protector"
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -fwrapv" >&5
+$as_echo_n "checking whether the compiler accepts -fwrapv... " >&6; }
+if test "${otr_cv_cflags__fwrapv+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    otr_saved_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -pedantic -Werror -fwrapv"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  otr_cv_cflags__fwrapv=yes
+else
+  otr_cv_cflags__fwrapv=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$otr_saved_CFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_cflags__fwrapv" >&5
+$as_echo "$otr_cv_cflags__fwrapv" >&6; }
+  if test x$otr_cv_cflags__fwrapv = xyes; then
+    CFLAGS="$CFLAGS -fwrapv"
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts --param ssp-buffer-size=1" >&5
+$as_echo_n "checking whether the compiler accepts --param ssp-buffer-size=1... " >&6; }
+if test "${otr_cv_cflags___param_ssp_buffer_size_1+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    otr_saved_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -pedantic -Werror --param ssp-buffer-size=1"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  otr_cv_cflags___param_ssp_buffer_size_1=yes
+else
+  otr_cv_cflags___param_ssp_buffer_size_1=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$otr_saved_CFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_cflags___param_ssp_buffer_size_1" >&5
+$as_echo "$otr_cv_cflags___param_ssp_buffer_size_1" >&6; }
+  if test x$otr_cv_cflags___param_ssp_buffer_size_1 = xyes; then
+    CFLAGS="$CFLAGS --param ssp-buffer-size=1"
+  fi
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -fno-strict-overflow" >&5
+$as_echo_n "checking whether the compiler accepts -fno-strict-overflow... " >&6; }
+if test "${otr_cv_cflags__fno_strict_overflow+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    otr_saved_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -pedantic -Werror -fno-strict-overflow"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  otr_cv_cflags__fno_strict_overflow=yes
+else
+  otr_cv_cflags__fno_strict_overflow=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$otr_saved_CFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_cflags__fno_strict_overflow" >&5
+$as_echo "$otr_cv_cflags__fno_strict_overflow" >&6; }
+  if test x$otr_cv_cflags__fno_strict_overflow = xyes; then
+    CFLAGS="$CFLAGS -fno-strict-overflow"
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Wall" >&5
+$as_echo_n "checking whether the compiler accepts -Wall... " >&6; }
+if test "${otr_cv_cflags__Wall+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    otr_saved_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -pedantic -Werror -Wall"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  otr_cv_cflags__Wall=yes
+else
+  otr_cv_cflags__Wall=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$otr_saved_CFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_cflags__Wall" >&5
+$as_echo "$otr_cv_cflags__Wall" >&6; }
+  if test x$otr_cv_cflags__Wall = xyes; then
+    CFLAGS="$CFLAGS -Wall"
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Wextra -Wno-unused-parameter -Wno-missing-field-initializers" >&5
+$as_echo_n "checking whether the compiler accepts -Wextra -Wno-unused-parameter -Wno-missing-field-initializers... " >&6; }
+if test "${otr_cv_cflags__Wextra__Wno_unused_parameter__Wno_missing_field_initializers+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    otr_saved_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -pedantic -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  otr_cv_cflags__Wextra__Wno_unused_parameter__Wno_missing_field_initializers=yes
+else
+  otr_cv_cflags__Wextra__Wno_unused_parameter__Wno_missing_field_initializers=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$otr_saved_CFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_cflags__Wextra__Wno_unused_parameter__Wno_missing_field_initializers" >&5
+$as_echo "$otr_cv_cflags__Wextra__Wno_unused_parameter__Wno_missing_field_initializers" >&6; }
+  if test x$otr_cv_cflags__Wextra__Wno_unused_parameter__Wno_missing_field_initializers = xyes; then
+    CFLAGS="$CFLAGS -Wextra -Wno-unused-parameter -Wno-missing-field-initializers"
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Wformat-security" >&5
+$as_echo_n "checking whether the compiler accepts -Wformat-security... " >&6; }
+if test "${otr_cv_cflags__Wformat_security+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    otr_saved_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -pedantic -Werror -Wformat-security"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  otr_cv_cflags__Wformat_security=yes
+else
+  otr_cv_cflags__Wformat_security=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$otr_saved_CFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_cflags__Wformat_security" >&5
+$as_echo "$otr_cv_cflags__Wformat_security" >&6; }
+  if test x$otr_cv_cflags__Wformat_security = xyes; then
+    CFLAGS="$CFLAGS -Wformat-security"
+  fi
+
+
+
+    if test "$bwin32" = "false"; then
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -fPIE" >&5
+$as_echo_n "checking whether the compiler accepts -fPIE... " >&6; }
+if test "${otr_cv_cflags__fPIE+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    otr_saved_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -pedantic -Werror -fPIE"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  otr_cv_cflags__fPIE=yes
+else
+  otr_cv_cflags__fPIE=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$otr_saved_CFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_cflags__fPIE" >&5
+$as_echo "$otr_cv_cflags__fPIE" >&6; }
+  if test x$otr_cv_cflags__fPIE = xyes; then
+    CFLAGS="$CFLAGS -fPIE"
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -pie" >&5
+$as_echo_n "checking whether the linker accepts -pie... " >&6; }
+if test "${otr_cv_ldflags__pie+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    otr_saved_CFLAGS="$CFLAGS"
+    otr_saved_LDFLAGS="$LDFLAGS"
+    otr_saved_LIBS="$LIBS"
+    CFLAGS="$CFLAGS -pedantic -Werror"
+    LDFLAGS="$LDFLAGS "$all_ldflags_for_check" -pie"
+    LIBS="$LIBS "$all_libs_for_check""
+    if test "$cross_compiling" = yes; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  otr_cv_ldflags__pie=yes
+else
+  otr_cv_ldflags__pie=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+fputs("", stdout)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  otr_cv_ldflags__pie=yes
+else
+  otr_cv_ldflags__pie=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    CFLAGS="$otr_saved_CFLAGS"
+    LDFLAGS="$otr_saved_LDFLAGS"
+    LIBS="$otr_saved_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_ldflags__pie" >&5
+$as_echo "$otr_cv_ldflags__pie" >&6; }
+  if test x$otr_cv_ldflags__pie = xyes; then
+    LDFLAGS="$LDFLAGS -pie"
+  fi
+
+
+    fi
+fi
+
+if test x$enable_linker_hardening != xno; then
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -z relro -z now" >&5
+$as_echo_n "checking whether the linker accepts -z relro -z now... " >&6; }
+if test "${otr_cv_ldflags__z_relro__z_now+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    otr_saved_CFLAGS="$CFLAGS"
+    otr_saved_LDFLAGS="$LDFLAGS"
+    otr_saved_LIBS="$LIBS"
+    CFLAGS="$CFLAGS -pedantic -Werror"
+    LDFLAGS="$LDFLAGS "$all_ldflags_for_check" -z relro -z now"
+    LIBS="$LIBS "$all_libs_for_check""
+    if test "$cross_compiling" = yes; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  otr_cv_ldflags__z_relro__z_now=yes
+else
+  otr_cv_ldflags__z_relro__z_now=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+fputs("", stdout)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  otr_cv_ldflags__z_relro__z_now=yes
+else
+  otr_cv_ldflags__z_relro__z_now=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    CFLAGS="$otr_saved_CFLAGS"
+    LDFLAGS="$otr_saved_LDFLAGS"
+    LIBS="$otr_saved_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $otr_cv_ldflags__z_relro__z_now" >&5
+$as_echo "$otr_cv_ldflags__z_relro__z_now" >&6; }
+  if test x$otr_cv_ldflags__z_relro__z_now = xyes; then
+    LDFLAGS="$LDFLAGS -z relro -z now"
+  fi
+
+
+fi
+
 ac_config_files="$ac_config_files Makefile po/Makefile.in"
 
 cat >confcache <<\_ACEOF
@@ -12381,6 +13013,10 @@ fi
   ac_config_commands="$ac_config_commands po/stamp-it"
 
 
+if test -z "${BUILD_NT_SERVICES_TRUE}" && test -z "${BUILD_NT_SERVICES_FALSE}"; then
+  as_fn_error "conditional \"BUILD_NT_SERVICES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_write_fail=0
@@ -12789,7 +13425,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by pidgin-otr $as_me 3.2.1, which was
+This file was extended by pidgin-otr $as_me 4.0.0, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -12855,7 +13491,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-pidgin-otr config.status 3.2.1
+pidgin-otr config.status 4.0.0
 configured by $0, generated by GNU Autoconf 2.65,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 8eaa976..f998eb9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce configure.
 
-AC_INIT(pidgin-otr, 3.2.1)
+AC_INIT(pidgin-otr, 4.0.0)
 
 AM_CONFIG_HEADER(config.h)
 
@@ -14,7 +14,7 @@ AM_PROG_LIBTOOL
 
 AM_PATH_LIBGCRYPT(1:1.2.0,,AC_MSG_ERROR(libgcrypt 1.2.0 or newer is required.))
 
-AM_PATH_LIBOTR(3.2.0,,AC_MSG_ERROR(libotr 3.2.0 or newer is required.))
+AM_PATH_LIBOTR(4.0.0,,AC_MSG_ERROR(libotr 4.x >= 4.0.0 is required.))
 
 PKG_CHECK_MODULES([EXTRA], [glib-2.0 >= 2.6 gtk+-2.0 >= 2.6 pidgin >= 2.0 purple >= 2.0])
 
@@ -24,7 +24,142 @@ GETTEXT_PACKAGE=pidgin-otr
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
 
-ALL_LINGUAS="ar de es fr hu it pl nl ru sk sv vi"
+ALL_LINGUAS="ar de el es fa fr hu it my_MM nl nn pl ru sk sv vi zh_CN"
 AM_GLIB_GNU_GETTEXT
 
+dnl 1:flags
+dnl Taken from Tor's autoconf magic repository
+AC_DEFUN([OTR_CHECK_CFLAGS], [
+  AS_VAR_PUSHDEF([VAR],[otr_cv_cflags_$1])
+  AC_CACHE_CHECK([whether the compiler accepts $1], VAR, [
+    otr_saved_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -pedantic -Werror $1"
+    AC_TRY_COMPILE([], [return 0;],
+                   [AS_VAR_SET(VAR,yes)],
+                   [AS_VAR_SET(VAR,no)])
+    CFLAGS="$otr_saved_CFLAGS"
+  ])
+  if test x$VAR = xyes; then
+    CFLAGS="$CFLAGS $1"
+  fi
+  AS_VAR_POPDEF([VAR])
+])
+
+dnl 1:flags
+dnl 2:extra ldflags
+dnl 3:extra libraries
+AC_DEFUN([OTR_CHECK_LDFLAGS], [
+  AS_VAR_PUSHDEF([VAR],[otr_cv_ldflags_$1])
+  AC_CACHE_CHECK([whether the linker accepts $1], VAR, [
+    otr_saved_CFLAGS="$CFLAGS"
+    otr_saved_LDFLAGS="$LDFLAGS"
+    otr_saved_LIBS="$LIBS"
+    CFLAGS="$CFLAGS -pedantic -Werror"
+    LDFLAGS="$LDFLAGS $2 $1"
+    LIBS="$LIBS $3"
+    AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [fputs("", stdout)])],
+                  [AS_VAR_SET(VAR,yes)],
+                  [AS_VAR_SET(VAR,no)],
+           [AC_TRY_LINK([], [return 0;],
+                                   [AS_VAR_SET(VAR,yes)],
+                                   [AS_VAR_SET(VAR,no)])])
+    CFLAGS="$otr_saved_CFLAGS"
+    LDFLAGS="$otr_saved_LDFLAGS"
+    LIBS="$otr_saved_LIBS"
+  ])
+  if test x$VAR = xyes; then
+    LDFLAGS="$LDFLAGS $1"
+  fi
+  AS_VAR_POPDEF([VAR])
+])
+
+
+dnl If _WIN32 is defined and non-zero, we are building for win32
+AC_MSG_CHECKING([for win32])
+AC_RUN_IFELSE([AC_LANG_SOURCE([
+int main(int c, char **v) {
+#ifdef _WIN32
+#if _WIN32
+  return 0;
+#else
+  return 1;
+#endif
+#else
+  return 2;
+#endif
+}])],
+bwin32=true; AC_MSG_RESULT([yes]),
+bwin32=false; AC_MSG_RESULT([no]),
+bwin32=cross; AC_MSG_RESULT([cross])
+)
+
+if test "$bwin32" = cross; then
+AC_MSG_CHECKING([for win32 (cross)])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#ifdef _WIN32
+int main(int c, char **v) {return 0;}
+#else
+#error
+int main(int c, char **v) {return x(y);}
+#endif
+])],
+bwin32=true; AC_MSG_RESULT([yes]),
+bwin32=false; AC_MSG_RESULT([no]))
+fi
+
+AM_CONDITIONAL(BUILD_NT_SERVICES, test x$bwin32 = xtrue)
+
+dnl Adam Shostack suggests the following for Windows:
+dnl -D_FORTIFY_SOURCE=2 -fstack-protector-all
+dnl Others suggest '/gs /safeseh /nxcompat /dynamicbase' for non-gcc on Windows
+dnl This requires that we use gcc and that we add -O2 to the CFLAGS.
+AC_ARG_ENABLE(gcc-hardening,
+    AS_HELP_STRING(--disable-gcc-hardening, disable compiler security checks))
+
+dnl Linker hardening options
+dnl Currently these options are ELF specific - you can't use this with MacOSX
+AC_ARG_ENABLE(linker-hardening,
+    AS_HELP_STRING(--disable-linker-hardening, disable linker security fixups))
+
+dnl ---------------------------------------------------------------------
+dnl Now that we know about our major libraries, we can check for compiler
+dnl and linker hardening options.  We need to do this with the libraries known,
+dnl since sometimes the linker will like an option but not be willing to
+dnl use it with a build of a library.
+
+all_ldflags_for_check="$LDFLAGS"
+all_libs_for_check="$LIBGCRYPT_LIBS"
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
+#if !defined(__clang__)
+#error
+#endif
+])], have_clang=yes, have_clang=no)
+
+if test x$enable_gcc_hardening != xno; then
+    CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
+    if test x$have_clang = xyes; then
+       OTR_CHECK_CFLAGS(-Qunused-arguments)
+    fi
+    OTR_CHECK_CFLAGS(-fstack-protector-all)
+    OTR_CHECK_CFLAGS(-Wstack-protector)
+    OTR_CHECK_CFLAGS(-fwrapv)
+    OTR_CHECK_CFLAGS(--param ssp-buffer-size=1)
+
+    dnl Ian added the next four:
+    OTR_CHECK_CFLAGS(-fno-strict-overflow)
+    OTR_CHECK_CFLAGS(-Wall)
+    OTR_CHECK_CFLAGS(-Wextra -Wno-unused-parameter -Wno-missing-field-initializers)
+    OTR_CHECK_CFLAGS(-Wformat-security)
+
+    if test "$bwin32" = "false"; then
+       OTR_CHECK_CFLAGS(-fPIE)
+       OTR_CHECK_LDFLAGS(-pie, "$all_ldflags_for_check", "$all_libs_for_check")
+    fi
+fi
+
+if test x$enable_linker_hardening != xno; then
+    OTR_CHECK_LDFLAGS(-z relro -z now, "$all_ldflags_for_check", "$all_libs_for_check")
+fi
+
 AC_OUTPUT([Makefile po/Makefile.in])
diff --git a/dialogs.c b/dialogs.c
index d36ee02..ff5175f 100644
--- a/dialogs.c
+++ b/dialogs.c
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
- *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+ *                           Chris Alexander, Willy Lew,
+ *                           Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifdef HAVE_CONFIG_H
@@ -104,9 +105,11 @@ void otrg_dialog_notify_info(const char *accountname, const char *protocol,
  * username conversation.  Return 0 on success, non-0 on error (in which
  * case the message will be displayed inline as a received message). */
 int otrg_dialog_display_otr_message( const char *accountname,
-	const char *protocol, const char *username, const char *msg)
+	const char *protocol, const char *username, const char *msg,
+	int force_create)
 {
-    return ui_ops->display_otr_message(accountname, protocol, username, msg);
+    return ui_ops->display_otr_message(accountname, protocol, username, msg,
+	    force_create);
 }
 
 /* Put up a Please Wait dialog.  This dialog can not be cancelled.
@@ -153,9 +156,10 @@ void otrg_dialog_socialist_millionaires_q(ConnContext *context,
 }
 
 /* Update the status of an ongoing socialist millionaires protocol. */
-void otrg_dialog_update_smp(ConnContext *context, double progress_level)
+void otrg_dialog_update_smp(ConnContext *context, OtrlSMPEvent smp_event,
+	double progress_level)
 {
-    ui_ops->update_smp(context, progress_level);
+    ui_ops->update_smp(context, smp_event, progress_level);
 }
 
 /* Call this when a context transitions to ENCRYPTED. */
diff --git a/dialogs.h b/dialogs.h
index 1fad217..4a9e93f 100644
--- a/dialogs.h
+++ b/dialogs.h
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
- *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+ *                           Chris Alexander, Willy Lew,
+ *                           Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef __OTRG_DIALOGS_H__
@@ -34,6 +35,8 @@
 #define SESSIONID_HELPURL     BASE_HELPURL "sessionid.php"
 #define UNVERIFIED_HELPURL    BASE_HELPURL "unverified.php"
 #define LEVELS_HELPURL        BASE_HELPURL "levels.php"
+#define SESSIONS_HELPURL      BASE_HELPURL "sessions.php"
+
 
 typedef struct s_OtrgDialogWait *OtrgDialogWaitHandle;
 
@@ -47,7 +50,7 @@ typedef struct {
 	const char *title, const char *primary, const char *secondary);
 
     int (*display_otr_message)(const char *accountname, const char *protocol,
-	    const char *username, const char *msg);
+	    const char *username, const char *msg, int force_create);
 
     OtrgDialogWaitHandle (*private_key_wait_start)(const char *account,
 	const char *protocol);
@@ -62,7 +65,8 @@ typedef struct {
     void (*socialist_millionaires)(ConnContext *context, char *question,
 	    gboolean responder);
 
-    void (*update_smp)(ConnContext *context, double progress_level);
+    void (*update_smp)(ConnContext *context, OtrlSMPEvent smp_event,
+	    double progress_level);
 
     void (*connected)(ConnContext *context);
 
@@ -117,8 +121,9 @@ void otrg_dialog_notify_info(const char *accountname, const char *protocol,
 /* Display an OTR control message for the given accountname / protocol /
  * username conversation.  Return 0 on success, non-0 on error (in which
  * case the message will be displayed inline as a received message). */
-int otrg_dialog_display_otr_message( const char *accountname,
-	const char *protocol, const char *username, const char *msg);
+int otrg_dialog_display_otr_message(const char *accountname,
+	const char *protocol, const char *username, const char *msg,
+	int force_create);
 
 /* Put up a Please Wait dialog. This dialog can not be cancelled.
  * Return a handle that must eventually be passed to
@@ -146,7 +151,8 @@ void otrg_dialog_socialist_millionaires_q(ConnContext *context,
 	char *question);
 
 /* Update the status of an ongoing socialist millionaires protocol. */
-void otrg_dialog_update_smp(ConnContext *context, double progress_level);
+void otrg_dialog_update_smp(ConnContext *context, OtrlSMPEvent smp_event,
+	double progress_level);
 
 /* Call this when a context transitions to ENCRYPTED. */
 void otrg_dialog_connected(ConnContext *context);
diff --git a/gtk-dialog.c b/gtk-dialog.c
index 3bf0617..725c78c 100644
--- a/gtk-dialog.c
+++ b/gtk-dialog.c
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
- *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+ *                           Chris Alexander, Willy Lew,
+ *                           Lisa Du, Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 /* config.h */
@@ -55,6 +56,7 @@
 #include <libotr/proto.h>
 #include <libotr/message.h>
 #include <libotr/userstate.h>
+#include <libotr/instag.h>
 
 /* purple-otr headers */
 #include "otr-plugin.h"
@@ -74,11 +76,13 @@ static int img_id_finished = 0;
 
 typedef struct {
     ConnContext *context;       /* The context used to fire library code */
-    GtkEntry* question_entry;       /* The text entry field containing the user question */
+    GtkEntry* question_entry;   /* The text entry field containing the user
+				 * question */
     GtkEntry *entry;	        /* The text entry field containing the secret */
-    int smp_type;               /* Whether the SMP type is based on question challenge (0) or shared secret (1) */
+    int smp_type;               /* Whether the SMP type is based on question
+				 * challenge (0) or shared secret (1) */
     gboolean responder;	        /* Whether or not this is the first side to give
-			                       their secret */
+				 * their secret */
 } SmpResponsePair;
 
 /* Information used by the plugin that is specific to both the
@@ -89,6 +93,7 @@ typedef struct dialog_context_data {
     GtkWidget       *smp_progress_dialog;
     GtkWidget       *smp_progress_bar;
     GtkWidget       *smp_progress_label;
+    otrl_instag_t   their_instance;
 } SMPData;
 
 typedef struct {
@@ -98,6 +103,39 @@ typedef struct {
     GtkWidget       *notebook;
 } AuthSignalData;
 
+typedef struct {
+    enum {
+	convctx_none,
+	convctx_conv,
+	convctx_ctx
+    } convctx_type;
+    PurpleConversation *conv;
+    ConnContext *context;
+} ConvOrContext;
+
+static gint get_new_instance_index(PurpleConversation *conv)
+{
+    gint * max_index = (gint *)
+	    purple_conversation_get_data(conv, "otr-max_idx");
+    *max_index = (*max_index) + 1;
+    return *max_index;
+}
+
+static gint get_context_instance_to_index(PurpleConversation *conv,
+	ConnContext *context) {
+    GHashTable * conv_to_idx_map =
+	    purple_conversation_get_data(conv, "otr-conv_to_idx");
+    gpointer index = NULL;
+
+    if (!g_hash_table_lookup_extended(conv_to_idx_map, context, NULL, &index)) {
+	index = g_malloc(sizeof(gint));
+	*(gint *)index = get_new_instance_index(conv);
+	g_hash_table_replace(conv_to_idx_map, context, index);
+    }
+
+    return *(gint *)index;
+}
+
 static void close_progress_window(SMPData *smp_data)
 {
     if (smp_data->smp_progress_dialog) {
@@ -136,6 +174,9 @@ static void otrg_gtk_dialog_add_smp_data(PurpleConversation *conv)
     smp_data->smp_progress_dialog = NULL;
     smp_data->smp_progress_bar = NULL;
     smp_data->smp_progress_label = NULL;
+    /* Chosen as initialized value since libotr should never allow
+     * this as a "their_instance" value */
+    smp_data->their_instance = OTRL_INSTAG_BEST;
 
     purple_conversation_set_data(conv, "otr-smpdata", smp_data);
 }
@@ -179,7 +220,8 @@ static void message_response_cb(GtkDialog *dialog, gint id, GtkWidget *widget)
     gtk_widget_destroy(GTK_WIDGET(widget));
 }
 
-/* Forward declarations for the benefit of smp_message_response_cb/redraw authvbox */
+/* Forward declarations for the benefit of smp_message_response_cb/redraw
+ * authvbox */
 static void verify_fingerprint(GtkWindow *parent, Fingerprint *fprint);
 static void add_vrfy_fingerprint(GtkWidget *vbox, void *data);
 static struct vrfy_fingerprint_data* vrfy_fingerprint_data_new(
@@ -197,7 +239,7 @@ static void smp_progress_response_cb(GtkDialog *dialog, gint response,
 {
     PurpleConversation *conv = otrg_plugin_context_to_conv(context, 0);
     SMPData *smp_data = NULL;
-    
+
     if (conv) {
 	gdouble frac;
 
@@ -234,58 +276,58 @@ static void smp_secret_response_cb(GtkDialog *dialog, gint response,
     SmpResponsePair *smppair;
 
     if (!auth_opt_data) return;
-    
+
     smppair = auth_opt_data->smppair;
-    
+
     if (!smppair) return;
 
     context = smppair->context;
 
     if (response == GTK_RESPONSE_ACCEPT && smppair->entry) {
-        GtkEntry* entry = smppair->entry;
-        char *secret;
-        size_t secret_len;
-
-        GtkEntry* question_entry = smppair->question_entry;
-    
-        const char *user_question = NULL;
-
-
-        if (context == NULL || context->msgstate != OTRL_MSGSTATE_ENCRYPTED) {
-            return;
-        }
-    
-        secret = g_strdup(gtk_entry_get_text(entry));
-        secret_len = strlen(secret);
-
-        if (smppair->responder) {
-            otrg_plugin_continue_smp(context, (const unsigned char *)secret,
-                secret_len);
-            
-        } else {
-            
-            if (smppair->smp_type == 0) {
-                if (!question_entry) {
-                    return;
-                }
-              
-                user_question = gtk_entry_get_text(question_entry);
-        
-                if (user_question == NULL || strlen(user_question) == 0) {
-                    return;
-                }
-            }
-
-            /* pass user question here */
-            otrg_plugin_start_smp(context, user_question,
-	           (const unsigned char *)secret, secret_len);
-
-        }
-    
-        g_free(secret);
-
-        /* launch progress bar window */
-        create_smp_progress_dialog(GTK_WINDOW(dialog), context);
+	GtkEntry* entry = smppair->entry;
+	char *secret;
+	size_t secret_len;
+
+	GtkEntry* question_entry = smppair->question_entry;
+
+	const char *user_question = NULL;
+
+
+	if (context == NULL || context->msgstate != OTRL_MSGSTATE_ENCRYPTED) {
+	    return;
+	}
+
+	secret = g_strdup(gtk_entry_get_text(entry));
+	secret_len = strlen(secret);
+
+	if (smppair->responder) {
+	    otrg_plugin_continue_smp(context, (const unsigned char *)secret,
+		    secret_len);
+
+	} else {
+
+	    if (smppair->smp_type == 0) {
+		if (!question_entry) {
+		    return;
+		}
+
+		user_question = gtk_entry_get_text(question_entry);
+
+		if (user_question == NULL || strlen(user_question) == 0) {
+		    return;
+		}
+	    }
+
+	    /* pass user question here */
+	    otrg_plugin_start_smp(context, user_question,
+		    (const unsigned char *)secret, secret_len);
+
+	}
+
+	g_free(secret);
+
+	/* launch progress bar window */
+	create_smp_progress_dialog(GTK_WINDOW(dialog), context);
     } else if (response == GTK_RESPONSE_HELP) {
 	char *helpurl = g_strdup_printf("%s%s&context=%s",
 		AUTHENTICATE_HELPURL, _("?lang=en"),
@@ -306,19 +348,19 @@ static void smp_secret_response_cb(GtkDialog *dialog, gint response,
 	/* Don't destroy the window */
 	return;
     } else {
-        otrg_plugin_abort_smp(context);
+	otrg_plugin_abort_smp(context);
     }
-    
+
     /* In all cases except HELP, destroy the current window */
     gtk_widget_destroy(GTK_WIDGET(dialog));
-    
+
     /* Clean up references to this window */
     conv = otrg_plugin_context_to_conv(smppair->context, 0);
     smp_data = purple_conversation_get_data(conv, "otr-smpdata");
-    
+
     if (smp_data) {
-        smp_data->smp_secret_dialog = NULL;
-        smp_data->smp_secret_smppair = NULL;
+	smp_data->smp_secret_dialog = NULL;
+	smp_data->smp_secret_smppair = NULL;
     }
 
     /* Free memory */
@@ -381,7 +423,7 @@ static GtkWidget *create_dialog(GtkWindow *parent,
     gtk_window_set_role(GTK_WINDOW(dialog), "notify_dialog");
 
     g_signal_connect(G_OBJECT(dialog), "response",
-			 G_CALLBACK(message_response_cb), dialog);
+	    G_CALLBACK(message_response_cb), dialog);
     gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT,
 	    sensitive);
 
@@ -400,10 +442,10 @@ static GtkWidget *create_dialog(GtkWindow *parent,
     }
 
     label_text = g_strdup_printf(
-		       "<span weight=\"bold\" size=\"larger\">%s</span>%s%s",
-		       (primary ? primary : ""),
-		       (primary ? "\n\n" : ""),
-		       (secondary ? secondary : ""));
+	    "<span weight=\"bold\" size=\"larger\">%s</span>%s%s",
+	    (primary ? primary : ""),
+	    (primary ? "\n\n" : ""),
+	    (secondary ? secondary : ""));
 
     label = gtk_label_new(NULL);
 
@@ -430,19 +472,19 @@ static void add_to_vbox_init_one_way_auth(GtkWidget *vbox,
     GtkWidget *entry;
     GtkWidget *label;
     GtkWidget *label2;
-    char *label_text;   
-    
+    char *label_text;
+
     SmpResponsePair* smppair = auth_opt_data->smppair;
-    
+
     if (smppair->responder) {
-        label_text = g_strdup_printf("<small><i>\n%s\n</i></small>",
+	label_text = g_strdup_printf("<small><i>\n%s\n</i></small>",
 	    _("Your buddy is attempting to determine if he or she is really "
 		"talking to you, or if it's someone pretending to be you.  "
 		"Your buddy has asked a question, indicated below.  "
 		"To authenticate to your buddy, enter the answer and "
 		"click OK."));
     } else {
-        label_text = g_strdup_printf("<small><i>\n%s\n</i></small>",
+	label_text = g_strdup_printf("<small><i>\n%s\n</i></small>",
 	    _("To authenticate using a question, pick a question whose "
 	    "answer is known only to you and your buddy.  Enter this "
 	    "question and this answer, then wait for your buddy to "
@@ -458,57 +500,56 @@ static void add_to_vbox_init_one_way_auth(GtkWidget *vbox,
     gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
     gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
     gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-       
-       
+
+
     if (smppair->responder) {
-        label_text = g_strdup_printf(_("This is the question asked by "
-		    "your buddy:"));
+	label_text = g_strdup_printf(_("This is the question asked by "
+		"your buddy:"));
     } else {
-        label_text = g_strdup_printf(_("Enter question here:"));
+	label_text = g_strdup_printf(_("Enter question here:"));
     }
-    
+
     label = gtk_label_new(label_text);
     gtk_label_set_selectable(GTK_LABEL(label), FALSE);
     g_free(label_text);
     gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
     gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
     gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-    
 
-    
+
+
     if (smppair->responder && question) {
-        label_text = g_markup_printf_escaped("<span background=\"white\" foreground=\"black\" weight=\"bold\">%s</span>", question);
-        label = gtk_label_new(NULL);
-        gtk_label_set_markup (GTK_LABEL(label), label_text);
-        gtk_label_set_selectable(GTK_LABEL(label), FALSE);
-        g_free(label_text);
-        gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-        gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
-        gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-        smppair->question_entry = NULL;
+	label_text = g_markup_printf_escaped("<span background=\"white\" "
+		"foreground=\"black\" weight=\"bold\">%s</span>", question);
+	label = gtk_label_new(NULL);
+	gtk_label_set_markup (GTK_LABEL(label), label_text);
+	gtk_label_set_selectable(GTK_LABEL(label), FALSE);
+	g_free(label_text);
+	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
+	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+	smppair->question_entry = NULL;
     } else {
-        /* Create the text view where the user enters their question */
-        question_entry = gtk_entry_new ();
-        smppair->question_entry = GTK_ENTRY(question_entry);
-        gtk_box_pack_start(GTK_BOX(vbox), question_entry, FALSE, FALSE, 0);
+	/* Create the text view where the user enters their question */
+	question_entry = gtk_entry_new ();
+	smppair->question_entry = GTK_ENTRY(question_entry);
+	gtk_box_pack_start(GTK_BOX(vbox), question_entry, FALSE, FALSE, 0);
     }
-    
+
     if (context->active_fingerprint->trust &&
-        context->active_fingerprint->trust[0] && !(smppair->responder)) {
-        label2 = gtk_label_new(_("This buddy is already authenticated."));
+	context->active_fingerprint->trust[0] && !(smppair->responder)) {
+	label2 = gtk_label_new(_("This buddy is already authenticated."));
     } else {
-        label2 = NULL;
+	label2 = NULL;
     }
 
-    
-    gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-    
+
     /* Leave a blank line */
     gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new(NULL), FALSE,
-        FALSE, 0);
+	    FALSE, 0);
 
     label_text = g_strdup_printf(_("Enter secret answer here "
-		"(case sensitive):"));
+	    "(case sensitive):"));
 
     label = gtk_label_new(NULL);
 
@@ -527,16 +568,15 @@ static void add_to_vbox_init_one_way_auth(GtkWidget *vbox,
     gtk_entry_set_activates_default(GTK_ENTRY(entry), smppair->responder);
 
     gtk_box_pack_start(GTK_BOX(vbox), entry, FALSE, FALSE, 0);
-    gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-    
+
     /* Leave a blank line */
     gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new(NULL), FALSE,
-        FALSE, 0);
-        
+	    FALSE, 0);
+
     if (label2) {
-        gtk_box_pack_start(GTK_BOX(vbox), label2, FALSE, FALSE, 0);
-        gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new(NULL), FALSE,
-            FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(vbox), label2, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new(NULL), FALSE,
+		FALSE, 0);
     }
 }
 
@@ -545,13 +585,13 @@ static void add_to_vbox_init_two_way_auth(GtkWidget *vbox,
     GtkWidget *entry;
     GtkWidget *label;
     GtkWidget *label2;
-    char *label_text;   
-    
+    char *label_text;
+
     label_text = g_strdup_printf("<small><i>\n%s\n</i></small>",
-        _("To authenticate, pick a secret known "
-            "only to you and your buddy.  Enter this secret, then "
-            "wait for your buddy to enter it too.  If the secrets "
-            "don't match, then you may be talking to an imposter."));
+	_("To authenticate, pick a secret known "
+	    "only to you and your buddy.  Enter this secret, then "
+	    "wait for your buddy to enter it too.  If the secrets "
+	    "don't match, then you may be talking to an imposter."));
 
     label = gtk_label_new(NULL);
 
@@ -561,7 +601,7 @@ static void add_to_vbox_init_two_way_auth(GtkWidget *vbox,
     gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
     gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
     gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-       
+
     label_text = g_strdup_printf(_("Enter secret here:"));
     label = gtk_label_new(label_text);
     gtk_label_set_selectable(GTK_LABEL(label), FALSE);
@@ -569,8 +609,8 @@ static void add_to_vbox_init_two_way_auth(GtkWidget *vbox,
     gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
     gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
     gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-        
-       
+
+
     /* Create the text view where the user enters their secret */
     entry = gtk_entry_new();
     gtk_entry_set_text(GTK_ENTRY(entry), "");
@@ -578,28 +618,29 @@ static void add_to_vbox_init_two_way_auth(GtkWidget *vbox,
     auth_opt_data->two_way_entry = GTK_ENTRY(entry);
 
     if (context->active_fingerprint->trust &&
-        context->active_fingerprint->trust[0]) {
-        label2 = gtk_label_new(_("This buddy is already authenticated."));
+	context->active_fingerprint->trust[0]) {
+	label2 = gtk_label_new(_("This buddy is already authenticated."));
     } else {
-        label2 = NULL;
+	label2 = NULL;
     }
 
     gtk_box_pack_start(GTK_BOX(vbox), entry, FALSE, FALSE, 0);
-    gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-    
+
     /* Leave a blank line */
     gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new(NULL), FALSE,
-        FALSE, 0);
-        
+	FALSE, 0);
+
     if (label2) {
-        gtk_box_pack_start(GTK_BOX(vbox), label2, FALSE, FALSE, 0);
-        gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new(NULL), FALSE,
-            FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(vbox), label2, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new(NULL), FALSE,
+		FALSE, 0);
     }
 }
 
-static void add_to_vbox_verify_fingerprint(GtkWidget *vbox, ConnContext *context, SmpResponsePair* smppair) {
-    char our_hash[45], their_hash[45];
+static void add_to_vbox_verify_fingerprint(GtkWidget *vbox,
+	ConnContext *context, SmpResponsePair* smppair) {
+    char our_hash[OTRL_PRIVKEY_FPRINT_HUMAN_LEN],
+	    their_hash[OTRL_PRIVKEY_FPRINT_HUMAN_LEN];
     GtkWidget *label;
     char *label_text;
     struct vrfy_fingerprint_data *vfd;
@@ -609,16 +650,14 @@ static void add_to_vbox_verify_fingerprint(GtkWidget *vbox, ConnContext *context
 
     if (fprint == NULL) return;
     if (fprint->fingerprint == NULL) return;
-    context = fprint->context;
-    if (context == NULL) return;
 
     label_text = g_strdup_printf("<small><i>\n%s %s\n</i></small>",
 	    _("To verify the fingerprint, contact your buddy via some "
 	    "<i>other</i> authenticated channel, such as the telephone "
 	    "or GPG-signed email.  Each of you should tell your fingerprint "
 	    "to the other."),
-	    _("If everything matches up, you should indicate in the above "
-	    "dialog that you <b>have</b> verified the fingerprint."));
+	    _("If everything matches up, you should chose <b>I have</b> "
+	    "in the menu below."));
     label = gtk_label_new(NULL);
     gtk_label_set_markup(GTK_LABEL(label), label_text);
     gtk_label_set_selectable(GTK_LABEL(label), FALSE);
@@ -628,20 +667,21 @@ static void add_to_vbox_verify_fingerprint(GtkWidget *vbox, ConnContext *context
 
     vfd = vrfy_fingerprint_data_new(fprint);
 
-    strcpy(our_hash, _("[none]"));
+    strncpy(our_hash, _("[none]"), 44);
+    our_hash[44] = '\0';
     otrl_privkey_fingerprint(otrg_plugin_userstate, our_hash,
-        context->accountname, context->protocol);
+	    context->accountname, context->protocol);
 
     otrl_privkey_hash_to_human(their_hash, fprint->fingerprint);
 
     p = purple_find_prpl(context->protocol);
     proto_name = (p && p->info->name) ? p->info->name : _("Unknown");
     label_text = g_strdup_printf(_("Fingerprint for you, %s (%s):\n%s\n\n"
-        "Purported fingerprint for %s:\n%s\n"), context->accountname,
-        proto_name, our_hash, context->username, their_hash);
-        
+	    "Purported fingerprint for %s:\n%s\n"), context->accountname,
+	    proto_name, our_hash, context->username, their_hash);
+
     label = gtk_label_new(NULL);
-    
+
     gtk_label_set_markup(GTK_LABEL(label), label_text);
     /* Make the label containing the fingerprints selectable, but
      * not auto-selected. */
@@ -652,37 +692,38 @@ static void add_to_vbox_verify_fingerprint(GtkWidget *vbox, ConnContext *context
     gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
     gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
     gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-        
+
     add_vrfy_fingerprint(vbox, vfd);
     g_signal_connect(G_OBJECT(vbox), "destroy",
 	    G_CALLBACK(vrfy_fingerprint_destroyed), vfd);
 }
 
-static void redraw_auth_vbox(GtkComboBox *combo, void *data) {
+static void redraw_auth_vbox(GtkComboBox *combo, void *data)
+{
     AuthSignalData *auth_data = (AuthSignalData*) data;
 
     GtkWidget *notebook = auth_data ? auth_data->notebook : NULL;
 
     int selected;
-    
+
     if (auth_data == NULL) return;
 
     selected = gtk_combo_box_get_active(combo);
-    
+
     if (selected == 0) {
-        gtk_notebook_set_current_page (GTK_NOTEBOOK(notebook), 0);
-        auth_data->smppair->entry = auth_data->one_way_entry;
-        auth_data->smppair->smp_type = 0;
+	gtk_notebook_set_current_page (GTK_NOTEBOOK(notebook), 0);
+	auth_data->smppair->entry = auth_data->one_way_entry;
+	auth_data->smppair->smp_type = 0;
     } else if (selected == 1) {
-        gtk_notebook_set_current_page (GTK_NOTEBOOK(notebook), 1);
-        auth_data->smppair->entry = auth_data->two_way_entry;
-        auth_data->smppair->smp_type = 1;
+	gtk_notebook_set_current_page (GTK_NOTEBOOK(notebook), 1);
+	auth_data->smppair->entry = auth_data->two_way_entry;
+	auth_data->smppair->smp_type = 1;
     } else if (selected == 2) {
-        auth_data->smppair->entry = NULL;
-        gtk_notebook_set_current_page (GTK_NOTEBOOK(notebook), 2);
-        auth_data->smppair->smp_type = -1;
+	auth_data->smppair->entry = NULL;
+	gtk_notebook_set_current_page (GTK_NOTEBOOK(notebook), 2);
+	auth_data->smppair->smp_type = -1;
     }
-    
+
 }
 
 static void add_other_authentication_options(GtkWidget *vbox,
@@ -692,7 +733,7 @@ static void add_other_authentication_options(GtkWidget *vbox,
     char *labeltext;
 
     labeltext = g_strdup_printf("\n%s",
-	_("How would you like to authenticate your buddy?"));
+	    _("How would you like to authenticate your buddy?"));
     label = gtk_label_new(labeltext);
     g_free(labeltext);
     gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
@@ -713,9 +754,9 @@ static void add_other_authentication_options(GtkWidget *vbox,
     gtk_box_pack_start(GTK_BOX(vbox), combo, FALSE, FALSE, 0);
 
     data->notebook = notebook;
-   
+
     g_signal_connect (combo, "changed",
-                  G_CALLBACK (redraw_auth_vbox), data);
+	    G_CALLBACK (redraw_auth_vbox), data);
 }
 
 
@@ -728,124 +769,134 @@ static GtkWidget *create_smp_dialog(const char *title, const char *primary,
     SMPData *smp_data = purple_conversation_get_data(conv, "otr-smpdata");
 
     close_progress_window(smp_data);
-    
+
+    /* If you start SMP authentication on a different context, it
+     * will kill any existing SMP */
+    if (smp_data->their_instance != context->their_instance) {
+	otrg_gtk_dialog_free_smp_data(conv);
+	otrg_gtk_dialog_add_smp_data(conv);
+    }
+
     if (!(smp_data->smp_secret_dialog)) {
-        GtkWidget *hbox;
-        GtkWidget *vbox;
-        GtkWidget *auth_vbox;
-        GtkWidget *label;
-        GtkWidget *img = NULL;
-        char *label_text;
-        const char *icon_name = NULL;
-        SmpResponsePair* smppair;
-        GtkWidget *notebook;
-        AuthSignalData *auth_opt_data;     
-    
-        icon_name = PIDGIN_STOCK_DIALOG_INFO;
-        img = gtk_image_new_from_stock(icon_name,
+	GtkWidget *hbox;
+	GtkWidget *vbox;
+	GtkWidget *auth_vbox;
+	GtkWidget *label;
+	GtkWidget *img = NULL;
+	char *label_text;
+	const char *icon_name = NULL;
+	SmpResponsePair* smppair;
+	GtkWidget *notebook;
+	AuthSignalData *auth_opt_data;
+
+	smp_data->their_instance = context->their_instance;
+	icon_name = PIDGIN_STOCK_DIALOG_INFO;
+	img = gtk_image_new_from_stock(icon_name,
 		gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE));
-        gtk_misc_set_alignment(GTK_MISC(img), 0, 0);
-    
-        dialog = gtk_dialog_new_with_buttons(title ? title :
+	gtk_misc_set_alignment(GTK_MISC(img), 0, 0);
+
+	dialog = gtk_dialog_new_with_buttons(title ? title :
 		PIDGIN_ALERT_TITLE, NULL, 0,
-                         GTK_STOCK_HELP, GTK_RESPONSE_HELP,
-                         GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
-                         _("_Authenticate"), GTK_RESPONSE_ACCEPT, NULL);
-        gtk_dialog_set_default_response(GTK_DIALOG(dialog),
+		 GTK_STOCK_HELP, GTK_RESPONSE_HELP,
+		 GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+		 _("_Authenticate"), GTK_RESPONSE_ACCEPT, NULL);
+	gtk_dialog_set_default_response(GTK_DIALOG(dialog),
 		GTK_RESPONSE_ACCEPT);
-    
-        auth_vbox = gtk_vbox_new(FALSE, 0);
-        hbox = gtk_hbox_new(FALSE, 15);
-        vbox = gtk_vbox_new(FALSE, 0);
-        
-        smppair = malloc(sizeof(SmpResponsePair));
-        smppair->responder = responder;
-        smppair->context = context;
-        
-        
-        notebook = gtk_notebook_new();
-        auth_opt_data = malloc(sizeof(AuthSignalData)); 
-        auth_opt_data->smppair = smppair;
-        
-        gtk_window_set_focus_on_map(GTK_WINDOW(dialog), !responder);
-        gtk_window_set_role(GTK_WINDOW(dialog), "notify_dialog");
-    
-        gtk_container_set_border_width(GTK_CONTAINER(dialog), 6);
-        gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
-        gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
-        gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), 12);
-        gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), 6);
-    
-        gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox);
-    
-        gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
-    
-        label_text = g_strdup_printf(
-               "<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s",
-               (primary ? primary : ""),
+
+	auth_vbox = gtk_vbox_new(FALSE, 0);
+	hbox = gtk_hbox_new(FALSE, 15);
+	vbox = gtk_vbox_new(FALSE, 0);
+
+	smppair = malloc(sizeof(SmpResponsePair));
+	smppair->responder = responder;
+	smppair->context = context;
+
+
+	notebook = gtk_notebook_new();
+	auth_opt_data = malloc(sizeof(AuthSignalData));
+	auth_opt_data->smppair = smppair;
+
+	gtk_window_set_focus_on_map(GTK_WINDOW(dialog), !responder);
+	gtk_window_set_role(GTK_WINDOW(dialog), "notify_dialog");
+
+	gtk_container_set_border_width(GTK_CONTAINER(dialog), 6);
+	gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
+	gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
+	gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), 12);
+	gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),
+		6);
+
+	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox);
+
+	gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
+
+	label_text = g_strdup_printf(
+		"<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s",
+		(primary ? primary : ""),
 		_("Authenticating a buddy helps ensure that the person "
-		    "you are talking to is who he or she claims to be."));
-    
-        label = gtk_label_new(NULL);
-    
-        gtk_label_set_markup(GTK_LABEL(label), label_text);
-        gtk_label_set_selectable(GTK_LABEL(label), FALSE);
-        g_free(label_text);
-        gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-        gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
-        gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-    
-        if (!responder) {
-            add_other_authentication_options(vbox, notebook, context, auth_opt_data);
-        }
-        
-        g_signal_connect(G_OBJECT(dialog), "response",
-                 G_CALLBACK(smp_secret_response_cb),
-                 auth_opt_data);
-    
-        if (!responder || (responder && question != NULL)) {
-            GtkWidget *one_way_vbox = gtk_vbox_new(FALSE, 0);
-            add_to_vbox_init_one_way_auth(one_way_vbox, context,
+		"you are talking to is who he or she claims to be."));
+
+	label = gtk_label_new(NULL);
+
+	gtk_label_set_markup(GTK_LABEL(label), label_text);
+	gtk_label_set_selectable(GTK_LABEL(label), FALSE);
+	g_free(label_text);
+	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
+	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+
+	if (!responder) {
+	    add_other_authentication_options(vbox, notebook, context,
+		    auth_opt_data);
+	}
+
+	g_signal_connect(G_OBJECT(dialog), "response",
+		G_CALLBACK(smp_secret_response_cb),
+		auth_opt_data);
+
+	if (!responder || (responder && question != NULL)) {
+	    GtkWidget *one_way_vbox = gtk_vbox_new(FALSE, 0);
+	    add_to_vbox_init_one_way_auth(one_way_vbox, context,
 		    auth_opt_data, question);
-            gtk_notebook_append_page(GTK_NOTEBOOK(notebook), one_way_vbox,
-                gtk_label_new("0"));
-            smppair->entry = auth_opt_data->one_way_entry;
-            smppair->smp_type = 0;
-        }
-        
-        if (!responder || (responder && question == NULL)) {
-            GtkWidget *two_way_vbox = gtk_vbox_new(FALSE, 0);
-            add_to_vbox_init_two_way_auth(two_way_vbox, context, auth_opt_data);
-            gtk_notebook_append_page(GTK_NOTEBOOK(notebook), two_way_vbox,
-                gtk_label_new("1"));
-                    
-            if (responder && question == NULL) {
-                smppair->entry = auth_opt_data->two_way_entry;
-                smppair->smp_type = 1;
-            }
-        }
-        
-        if (!responder) {
-            GtkWidget *fingerprint_vbox = gtk_vbox_new(FALSE, 0);
-            add_to_vbox_verify_fingerprint(fingerprint_vbox, context, smppair);
-            gtk_notebook_append_page(GTK_NOTEBOOK(notebook), fingerprint_vbox,
-                gtk_label_new("2"));
-        }
-        
-        gtk_notebook_set_show_tabs (GTK_NOTEBOOK(notebook), FALSE);
-        
-        gtk_notebook_set_show_border (GTK_NOTEBOOK(notebook), FALSE);
-        gtk_box_pack_start(GTK_BOX(auth_vbox), notebook, FALSE, FALSE, 0);
-        gtk_widget_show(notebook);
-    
-    
-        gtk_box_pack_start(GTK_BOX(vbox), auth_vbox, FALSE, FALSE, 0);
-        
-        gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
-    
-        gtk_widget_show_all(dialog);
-        
-        gtk_notebook_set_current_page (GTK_NOTEBOOK(notebook), 0);
+	    gtk_notebook_append_page(GTK_NOTEBOOK(notebook), one_way_vbox,
+		    gtk_label_new("0"));
+	    smppair->entry = auth_opt_data->one_way_entry;
+	    smppair->smp_type = 0;
+	}
+
+	if (!responder || (responder && question == NULL)) {
+	    GtkWidget *two_way_vbox = gtk_vbox_new(FALSE, 0);
+	    add_to_vbox_init_two_way_auth(two_way_vbox, context, auth_opt_data);
+	    gtk_notebook_append_page(GTK_NOTEBOOK(notebook), two_way_vbox,
+		    gtk_label_new("1"));
+
+	    if (responder && question == NULL) {
+		smppair->entry = auth_opt_data->two_way_entry;
+		smppair->smp_type = 1;
+	    }
+	}
+
+	if (!responder) {
+	    GtkWidget *fingerprint_vbox = gtk_vbox_new(FALSE, 0);
+	    add_to_vbox_verify_fingerprint(fingerprint_vbox, context, smppair);
+	    gtk_notebook_append_page(GTK_NOTEBOOK(notebook), fingerprint_vbox,
+		    gtk_label_new("2"));
+	}
+
+	gtk_notebook_set_show_tabs (GTK_NOTEBOOK(notebook), FALSE);
+
+	gtk_notebook_set_show_border (GTK_NOTEBOOK(notebook), FALSE);
+	gtk_box_pack_start(GTK_BOX(auth_vbox), notebook, FALSE, FALSE, 0);
+	gtk_widget_show(notebook);
+
+
+	gtk_box_pack_start(GTK_BOX(vbox), auth_vbox, FALSE, FALSE, 0);
+
+	gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
+
+	gtk_widget_show_all(dialog);
+
+	gtk_notebook_set_current_page (GTK_NOTEBOOK(notebook), 0);
 
 	if (!responder) {
 	    gtk_window_set_focus(GTK_WINDOW(dialog),
@@ -854,16 +905,16 @@ static GtkWidget *create_smp_dialog(const char *title, const char *primary,
 	    gtk_window_set_focus(GTK_WINDOW(dialog),
 		    GTK_WIDGET(smppair->entry));
 	}
-        
-        smp_data->smp_secret_dialog = dialog;
-        smp_data->smp_secret_smppair = smppair;
-    
+
+	smp_data->smp_secret_dialog = dialog;
+	smp_data->smp_secret_smppair = smppair;
+
     } else {
-        /* Set the responder field to TRUE if we were passed that value,
-         * even if the window was already up. */
-        if (responder) {
-            smp_data->smp_secret_smppair->responder = responder;
-        }
+	/* Set the responder field to TRUE if we were passed that value,
+	 * even if the window was already up. */
+	if (responder) {
+	    smp_data->smp_secret_smppair->responder = responder;
+	}
     }
 
     return smp_data->smp_secret_dialog;
@@ -891,9 +942,9 @@ static GtkWidget *create_smp_progress_dialog(GtkWindow *parent,
 
     dialog = gtk_dialog_new_with_buttons(
 	    context->smstate->received_question ?
-            /* Translators: you are asked to authenticate yourself */
+	    /* Translators: you are asked to authenticate yourself */
 	    _("Authenticating to Buddy") :
-            /* Translators: you asked your buddy to authenticate him/herself */
+	    /* Translators: you asked your buddy to authenticate him/herself */
 	    _("Authenticating Buddy"),
 	    parent, 0, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
 	    GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
@@ -921,8 +972,8 @@ static GtkWidget *create_smp_progress_dialog(GtkWindow *parent,
 
     label_pat = g_strdup_printf("<span weight=\"bold\" size=\"larger\">"
 	    "%s</span>\n", context->smstate->received_question ?
-		   _("Authenticating to %s") :
-		   _("Authenticating %s"));
+	    _("Authenticating to %s") :
+	    _("Authenticating %s"));
     label_text = g_strdup_printf(label_pat, context->username);
     g_free(label_pat);
 
@@ -940,12 +991,12 @@ static GtkWidget *create_smp_progress_dialog(GtkWindow *parent,
     gtk_label_set_line_wrap(GTK_LABEL(proglabel), TRUE);
     gtk_misc_set_alignment(GTK_MISC(proglabel), 0, 0);
     gtk_box_pack_start(GTK_BOX(vbox), proglabel, FALSE, FALSE, 0);
-   
+
     /* Create the progress bar */
     bar = gtk_progress_bar_new();
     gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(bar), 0.1);
     gtk_box_pack_start(GTK_BOX(vbox), bar, FALSE, FALSE, 0);
-    
+
     gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
 
     conv = otrg_plugin_context_to_conv(context, 0);
@@ -958,8 +1009,8 @@ static GtkWidget *create_smp_progress_dialog(GtkWindow *parent,
     gtk_label_set_text(GTK_LABEL(proglabel), _("Waiting for buddy..."));
 
     g_signal_connect(G_OBJECT(dialog), "response",
-		     G_CALLBACK(smp_progress_response_cb),
-		     context);
+	     G_CALLBACK(smp_progress_response_cb),
+	     context);
 
     gtk_widget_show_all(dialog);
 
@@ -998,11 +1049,11 @@ static OtrgDialogWaitHandle otrg_gtk_dialog_private_key_wait_start(
 
     p = purple_find_prpl(protocol);
     protocol_print = (p ? p->info->name : _("Unknown"));
-	
+
     /* Create the Please Wait... dialog */
     secondary = g_strdup_printf(_("Generating private key for %s (%s)..."),
 	    account, protocol_print);
-	
+
     dialog = create_dialog(NULL, PURPLE_NOTIFY_MSG_INFO, title, primary,
 	    secondary, 0, &label, NULL, NULL);
     handle = malloc(sizeof(struct s_OtrgDialogWait));
@@ -1014,26 +1065,26 @@ static OtrgDialogWaitHandle otrg_gtk_dialog_private_key_wait_start(
     while (gtk_events_pending ()) {
 	gtk_main_iteration ();
     }
-	
+
     g_free(secondary);
 
     return handle;
 }
 
 static int otrg_gtk_dialog_display_otr_message(const char *accountname,
-	const char *protocol, const char *username, const char *msg)
+	const char *protocol, const char *username, const char *msg,
+	int force_create)
 {
     /* See if there's a conversation window we can put this in. */
-    PurpleAccount *account;
-    PurpleConversation *conv;
+    PurpleConversation *conv = otrg_plugin_userinfo_to_conv(accountname,
+	    protocol, username, force_create);
 
-    account = purple_accounts_find(accountname, protocol);
-    if (!account) return -1;
 
-    conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, username, account);
     if (!conv) return -1;
 
-    purple_conversation_write(conv, NULL, msg, PURPLE_MESSAGE_SYSTEM, time(NULL));
+
+    purple_conversation_write(conv, NULL, msg, PURPLE_MESSAGE_SYSTEM,
+	    time(NULL));
 
     return 0;
 }
@@ -1068,8 +1119,9 @@ static void otrg_gtk_dialog_unknown_fingerprint(OtrlUserState us,
 
     /* Figure out if this is the first fingerprint we've seen for this
      * user. */
-    context = otrl_context_find(us, who, accountname, protocol, FALSE,
-	    NULL, NULL, NULL);
+    context = otrl_context_find(us, who, accountname, protocol,
+	    OTRL_INSTAG_MASTER, 0, NULL, NULL, NULL);
+
     if (context) {
 	Fingerprint *fp = context->fingerprint_root.next;
 	while(fp) {
@@ -1095,124 +1147,94 @@ static void otrg_gtk_dialog_unknown_fingerprint(OtrlUserState us,
 
     conv = otrg_plugin_userinfo_to_conv(accountname, protocol, who, TRUE);
 
-    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM, time(NULL));
-    
+    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM,
+	    time(NULL));
+
     g_free(buf);
 }
 
 static void otrg_gtk_dialog_clicked_connect(GtkWidget *widget, gpointer data);
 
-static void build_otr_menu(PurpleConversation *conv, GtkWidget *menu,
+static void build_otr_menu(ConvOrContext *convctx, GtkWidget *menu,
 	TrustLevel level);
 static void otr_refresh_otr_buttons(PurpleConversation *conv);
 static void otr_destroy_top_menu_objects(PurpleConversation *conv);
 static void otr_add_top_otr_menu(PurpleConversation *conv);
 static void otr_add_buddy_top_menus(PurpleConversation *conv);
-static void otr_check_conv_status_change( PurpleConversation *conv);
+static void otr_check_conv_status_change(PurpleConversation *conv);
 
 static void destroy_menuitem(GtkWidget *widget, gpointer data)
 {
     gtk_widget_destroy(widget);
 }
 
+static void otr_build_status_submenu(PidginWindow *win,
+	ConvOrContext *convctx, GtkWidget *menu, TrustLevel level);
+
 static void dialog_update_label_conv(PurpleConversation *conv, TrustLevel level)
 {
     GtkWidget *label;
     GtkWidget *icon;
-#ifdef OLD_OTR_BUTTON
-    GtkWidget *icontext;
-#endif
     GtkWidget *button;
     GtkWidget *menu;
-#ifdef OLD_OTR_BUTTON
-    GtkWidget *menuquery;
-    GtkWidget *menuend;
-    GtkWidget *menuquerylabel;
-    GtkWidget *menuview;
-    GtkWidget *menuverf;
-    GtkWidget *menusmp;
-#endif
+    ConvOrContext *convctx;
+    GHashTable * conv_or_ctx_map;
+    char *markup;
     PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
     label = purple_conversation_get_data(conv, "otr-label");
     icon = purple_conversation_get_data(conv, "otr-icon");
     button = purple_conversation_get_data(conv, "otr-button");
     menu = purple_conversation_get_data(conv, "otr-menu");
-#ifdef OLD_OTR_BUTTON
-    icontext = purple_conversation_get_data(conv, "otr-icontext");
-    menuquery = purple_conversation_get_data(conv, "otr-menuquery");
-    menuquerylabel = gtk_bin_get_child(GTK_BIN(menuquery));
-    menuend = purple_conversation_get_data(conv, "otr-menuend");
-    menuview = purple_conversation_get_data(conv, "otr-menuview");
-    menuverf = purple_conversation_get_data(conv, "otr-menuverf");
-    menusmp = purple_conversation_get_data(conv, "otr-menusmp");
-#endif
 
-    /* Set the button's icon, label and tooltip. */
-#ifdef OLD_OTR_BUTTON
     otr_icon(icon, level, 1);
-    gtk_label_set_text(GTK_LABEL(label),
+    markup = g_strdup_printf(" <span color=\"%s\">%s</span>",
+	    level == TRUST_FINISHED ? "#000000" :
+	    level == TRUST_PRIVATE ? "#00a000" :
+	    level == TRUST_UNVERIFIED ? "#a06000" :
+	    "#ff0000",
 	    level == TRUST_FINISHED ? _("Finished") :
 	    level == TRUST_PRIVATE ? _("Private") :
 	    level == TRUST_UNVERIFIED ? _("Unverified") :
 	    _("Not private"));
-    gtk_tooltips_set_tip(gtkconv->tooltips, button,
-	    (level == TRUST_NOT_PRIVATE || level == TRUST_FINISHED) ?
-		    _("Start a private conversation") :
-		    _("Refresh the private conversation"), NULL);
-
-    /* Set the menu item label for the OTR Query item. */
-    gtk_label_set_markup_with_mnemonic(GTK_LABEL(menuquerylabel),
-	    (level == TRUST_NOT_PRIVATE || level == TRUST_FINISHED) ?
-		    _("Start _private conversation") :
-		    _("Refresh _private conversation"));
-
-    /* Sensitize the menu items as appropriate. */
-    gtk_widget_set_sensitive(GTK_WIDGET(menuend), level != TRUST_NOT_PRIVATE);
-    gtk_widget_set_sensitive(GTK_WIDGET(menuview), level != TRUST_NOT_PRIVATE);
-    gtk_widget_set_sensitive(GTK_WIDGET(menuverf), level != TRUST_NOT_PRIVATE);
-    gtk_widget_set_sensitive(GTK_WIDGET(menusmp), level != TRUST_NOT_PRIVATE
-	    && level != TRUST_FINISHED);
-#else
-    {
-	char *markup;
-
-	otr_icon(icon, level, 1);
-	markup = g_strdup_printf(" <span color=\"%s\">%s</span>",
-		level == TRUST_FINISHED ? "#000000" :
-		level == TRUST_PRIVATE ? "#00a000" :
-		level == TRUST_UNVERIFIED ? "#a06000" :
-		"#ff0000",
-		level == TRUST_FINISHED ? _("Finished") :
-		level == TRUST_PRIVATE ? _("Private") :
-		level == TRUST_UNVERIFIED ? _("Unverified") :
-		_("Not private"));
-	gtk_label_set_markup(GTK_LABEL(label), markup);
-	g_free(markup);
-	gtk_tooltips_set_tip(gtkconv->tooltips, button, _("OTR"), NULL);
-    }
+    gtk_label_set_markup(GTK_LABEL(label), markup);
+    g_free(markup);
+    gtk_tooltips_set_tip(gtkconv->tooltips, button, _("OTR"), NULL);
 
-#endif
 
     /* Use any non-NULL value for "private", NULL for "not private" */
     purple_conversation_set_data(conv, "otr-private",
 	    (level == TRUST_NOT_PRIVATE || level == TRUST_FINISHED) ?
 		    NULL : conv);
 
+    /* Use any non-NULL value for "unauthenticated", NULL for
+     * "authenticated" */
+    purple_conversation_set_data(conv, "otr-authenticated",
+	    (level == TRUST_PRIVATE) ? conv : NULL);
+
     /* Use any non-NULL value for "finished", NULL for "not finished" */
     purple_conversation_set_data(conv, "otr-finished",
 	    level == TRUST_FINISHED ? conv : NULL);
 
-#ifdef OLD_OTR_BUTTON
-#else
-    build_otr_menu(conv, menu, level);
-#endif
+    conv_or_ctx_map = purple_conversation_get_data(conv, "otr-convorctx");
+    convctx = g_hash_table_lookup(conv_or_ctx_map, conv);
+
+    if (!convctx) {
+	convctx = malloc(sizeof(ConvOrContext));
+	g_hash_table_insert(conv_or_ctx_map, conv, (gpointer)convctx);
+    }
+
+    convctx->convctx_type = convctx_conv;
+    convctx->conv = conv;
+    build_otr_menu(convctx, menu, level);
+    otr_build_status_submenu(pidgin_conv_get_window(gtkconv), convctx, menu,
+	    level);
 
     conv = gtkconv->active_conv;
     otr_check_conv_status_change(conv);
 
     /* Update other widgets */
     if (gtkconv != pidgin_conv_window_get_active_gtkconv(gtkconv->win)) {
-        return;
+	return;
     }
 
     otr_destroy_top_menu_objects(conv);
@@ -1227,9 +1249,11 @@ static void dialog_update_label(ConnContext *context)
     PurpleConversation *conv;
     TrustLevel level = otrg_plugin_context_to_trust(context);
 
+
     account = purple_accounts_find(context->accountname, context->protocol);
     if (!account) return;
-    conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, context->username, account);
+    conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM,
+	    context->username, account);
     if (!conv) return;
     dialog_update_label_conv(conv, level);
 }
@@ -1240,6 +1264,7 @@ struct vrfy_fingerprint_data {
 			      while.  Use the copied pieces below
 			      instead. */
     char *accountname, *username, *protocol;
+    otrl_instag_t their_instance;
     unsigned char fingerprint[20];
 };
 
@@ -1262,6 +1287,7 @@ static struct vrfy_fingerprint_data* vrfy_fingerprint_data_new(
     vfd->accountname = strdup(context->accountname);
     vfd->username = strdup(context->username);
     vfd->protocol = strdup(context->protocol);
+    vfd->their_instance = context->their_instance;
     memmove(vfd->fingerprint, fprint->fingerprint, 20);
 
     return vfd;
@@ -1277,15 +1303,14 @@ static void vrfy_fingerprint_changed(GtkComboBox *combo, void *data)
 {
     struct vrfy_fingerprint_data *vfd = data;
     ConnContext *context = otrl_context_find(otrg_plugin_userstate,
-	    vfd->username, vfd->accountname, vfd->protocol, 0, NULL,
-	    NULL, NULL);
+	    vfd->username, vfd->accountname, vfd->protocol, vfd->their_instance,
+	    0, NULL, NULL, NULL);
     Fingerprint *fprint;
     int oldtrust, trust;
 
     if (context == NULL) return;
 
-    fprint = otrl_context_find_fingerprint(context, vfd->fingerprint,
-	    0, NULL);
+    fprint = otrl_context_find_fingerprint(context, vfd->fingerprint, 0, NULL);
 
     if (fprint == NULL) return;
 
@@ -1300,7 +1325,7 @@ static void vrfy_fingerprint_changed(GtkComboBox *combo, void *data)
 	otrg_plugin_write_fingerprints();
 	otrg_ui_update_keylist();
 	otrg_dialog_resensitize_all();
-    
+
     }
 }
 
@@ -1319,10 +1344,10 @@ static void add_vrfy_fingerprint(GtkWidget *vbox, void *data)
 
     hbox = gtk_hbox_new(FALSE, 0);
     combo = gtk_combo_box_new_text();
-    /* Translators: the following four messages should give alternative sentences.
-       The user selects the first or second message in a combo box;
-      the third message, a new line, a fingerprint, a new line, and 
-      the fourth message will follow it. */
+    /* Translators: the following four messages should give alternative
+     * sentences. The user selects the first or second message in a combo box;
+     * the third message, a new line, a fingerprint, a new line, and
+     * the fourth message will follow it. */
     gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("I have not"));
     /* 2nd message */
     gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("I have"));
@@ -1344,7 +1369,7 @@ static void add_vrfy_fingerprint(GtkWidget *vbox, void *data)
     g_free(labelt);
     gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
     gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
-    
+
     /* Leave a blank line */
     gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new(NULL), FALSE, FALSE, 0);
 }
@@ -1352,7 +1377,8 @@ static void add_vrfy_fingerprint(GtkWidget *vbox, void *data)
 static void verify_fingerprint(GtkWindow *parent, Fingerprint *fprint)
 {
     GtkWidget *dialog;
-    char our_hash[45], their_hash[45];
+    char our_hash[OTRL_PRIVKEY_FPRINT_HUMAN_LEN],
+	    their_hash[OTRL_PRIVKEY_FPRINT_HUMAN_LEN];
     char *primary;
     char *secondary;
     struct vrfy_fingerprint_data *vfd;
@@ -1369,7 +1395,8 @@ static void verify_fingerprint(GtkWindow *parent, Fingerprint *fprint)
 	    context->username);
     vfd = vrfy_fingerprint_data_new(fprint);
 
-    strcpy(our_hash, _("[none]"));
+    strncpy(our_hash, _("[none]"), 44);
+    our_hash[44] = '\0';
     otrl_privkey_fingerprint(otrg_plugin_userstate, our_hash,
 	    context->accountname, context->protocol);
 
@@ -1378,8 +1405,8 @@ static void verify_fingerprint(GtkWindow *parent, Fingerprint *fprint)
     p = purple_find_prpl(context->protocol);
     proto_name = (p && p->info->name) ? p->info->name : _("Unknown");
     secondary = g_strdup_printf(_("<small><i>%s %s\n\n</i></small>"
-		"Fingerprint for you, %s (%s):\n%s\n\n"
-		"Purported fingerprint for %s:\n%s\n"),
+	    "Fingerprint for you, %s (%s):\n%s\n\n"
+	    "Purported fingerprint for %s:\n%s\n"),
 	    _("To verify the fingerprint, contact your buddy via some "
 	    "<i>other</i> authenticated channel, such as the telephone "
 	    "or GPG-signed email.  Each of you should tell your fingerprint "
@@ -1409,7 +1436,6 @@ static void otrg_gtk_dialog_verify_fingerprint(Fingerprint *fprint)
 static void otrg_gtk_dialog_socialist_millionaires(ConnContext *context,
 	char *question, gboolean responder)
 {
-    GtkWidget *dialog;
     char *primary;
     PurplePlugin *p;
     char *proto_name;
@@ -1417,20 +1443,18 @@ static void otrg_gtk_dialog_socialist_millionaires(ConnContext *context,
     if (context == NULL) return;
 
     if (responder && question) {
-        primary = g_strdup_printf(_("Authentication from %s"),
-            context->username);
+	primary = g_strdup_printf(_("Authentication from %s"),
+	    context->username);
     } else {
-        primary = g_strdup_printf(_("Authenticate %s"),
-            context->username);
+	primary = g_strdup_printf(_("Authenticate %s"),
+	    context->username);
     }
-    
-    /* fprintf(stderr, "Question = ``%s''\n", question); */
 
     p = purple_find_prpl(context->protocol);
     proto_name = (p && p->info->name) ? p->info->name : _("Unknown");
-    
 
-    dialog = create_smp_dialog(_("Authenticate Buddy"),
+
+    create_smp_dialog(_("Authenticate Buddy"),
 	    primary, context, responder, question);
 
     g_free(primary);
@@ -1440,7 +1464,7 @@ static void otrg_gtk_dialog_socialist_millionaires(ConnContext *context,
  * protocol.  Progress_level is a percentage, from 0.0 (aborted) to
  * 1.0 (complete).  Any other value represents an intermediate state. */
 static void otrg_gtk_dialog_update_smp(ConnContext *context,
-	double progress_level)
+	OtrlSMPEvent smp_event, double progress_level)
 {
     PurpleConversation *conv = otrg_plugin_context_to_conv(context, 0);
     GtkProgressBar *bar;
@@ -1453,7 +1477,7 @@ static void otrg_gtk_dialog_update_smp(ConnContext *context,
 
     /* If the counter is reset to absolute zero, the protocol has aborted */
     if (progress_level == 0.0) {
-        GtkDialog *dialog = GTK_DIALOG(smp_data->smp_progress_dialog);
+	GtkDialog *dialog = GTK_DIALOG(smp_data->smp_progress_dialog);
 
 	gtk_dialog_set_response_sensitive(dialog, GTK_RESPONSE_ACCEPT, 1);
 	gtk_dialog_set_response_sensitive(dialog, GTK_RESPONSE_REJECT, 0);
@@ -1465,14 +1489,14 @@ static void otrg_gtk_dialog_update_smp(ConnContext *context,
 	return;
     } else if (progress_level == 1.0) {
 	/* If the counter reaches 1.0, the protocol is complete */
-        GtkDialog *dialog = GTK_DIALOG(smp_data->smp_progress_dialog);
+	GtkDialog *dialog = GTK_DIALOG(smp_data->smp_progress_dialog);
 
 	gtk_dialog_set_response_sensitive(dialog, GTK_RESPONSE_ACCEPT, 1);
 	gtk_dialog_set_response_sensitive(dialog, GTK_RESPONSE_REJECT, 0);
 	gtk_dialog_set_default_response(GTK_DIALOG(dialog),
 		GTK_RESPONSE_ACCEPT);
 
-        if (context->smstate->sm_prog_state == OTRL_SMP_PROG_SUCCEEDED) {
+	if (smp_event == OTRL_SMPEVENT_SUCCESS) {
 	    if (context->active_fingerprint->trust &&
 		    context->active_fingerprint->trust[0]) {
 		gtk_label_set_text(GTK_LABEL(smp_data->smp_progress_label),
@@ -1480,10 +1504,10 @@ static void otrg_gtk_dialog_update_smp(ConnContext *context,
 	    } else {
 		gtk_label_set_text(GTK_LABEL(smp_data->smp_progress_label),
 			_("Your buddy has successfully authenticated you.  "
-			    "You may want to authenticate your buddy as "
-			    "well by asking your own question."));
+			"You may want to authenticate your buddy as "
+			"well by asking your own question."));
 	    }
-        } else {
+	} else {
 	    gtk_label_set_text(GTK_LABEL(smp_data->smp_progress_label),
 		    _("Authentication failed."));
 	}
@@ -1501,6 +1525,7 @@ static void otrg_gtk_dialog_connected(ConnContext *context)
     char *format_buf;
     TrustLevel level;
     OtrgUiPrefs prefs;
+    gboolean * is_multi_inst;
 
     conv = otrg_plugin_context_to_conv(context, TRUE);
     level = otrg_plugin_context_to_trust(context);
@@ -1513,33 +1538,56 @@ static void otrg_gtk_dialog_connected(ConnContext *context)
 
     switch(level) {
        case TRUST_PRIVATE:
-           format_buf = g_strdup(_("Private conversation with %s started.%s"));
-           break;
+	    format_buf = g_strdup(
+		    _("Private conversation with %s started.%s%s"));
+	    break;
 
        case TRUST_UNVERIFIED:
-           format_buf = g_strdup_printf(_("<a href=\"%s%s\">Unverified</a> "
-                       "conversation with %%s started.%%s"),
-                       UNVERIFIED_HELPURL, _("?lang=en"));
-           break;
+	    format_buf = g_strdup_printf(_("<a href=\"%s%s\">Unverified</a> "
+		    "conversation with %%s started.%%s%%s"),
+		    UNVERIFIED_HELPURL, _("?lang=en"));
+	    break;
 
        default:
-           /* This last case should never happen, since we know
-            * we're in ENCRYPTED. */
-           format_buf = g_strdup(_("Not private conversation with %s "
-                       "started.%s"));
-           break;
+	    /* This last case should never happen, since we know
+	     * we're in ENCRYPTED. */
+	    format_buf = g_strdup(_("Not private conversation with %s "
+		    "started.%s%s"));
+	    break;
     }
     buf = g_strdup_printf(format_buf,
 		purple_conversation_get_name(conv),
 		context->protocol_version == 1 ? _("  Warning: using old "
-		    "protocol version 1.") : "");
+		"protocol version 1.") : "", conv->logging ?
+		_("  Your client is logging this conversation.") :
+		_("  Your client is not logging this conversation."));
+
+    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM,
+	    time(NULL));
 
-    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM, time(NULL));
-    
     g_free(buf);
     g_free(format_buf);
 
     dialog_update_label(context);
+
+    is_multi_inst = (gboolean *) purple_conversation_get_data(conv,
+	    "otr-conv_multi_instances");
+
+    if (*is_multi_inst) {
+	gboolean * have_warned_instances = (gboolean *)
+		purple_conversation_get_data(conv, "otr-warned_instances");
+
+	if (!*have_warned_instances) {
+	    *have_warned_instances = TRUE;
+	    buf = g_strdup_printf(_("Your buddy is logged in multiple times and"
+		    " OTR has established <a href=\"%s%s\">multiple sessions"
+		    "</a>. Use the icon menu above if you wish to select the "
+		    "outgoing session."), SESSIONS_HELPURL, _("?lang=en"));
+	    otrg_gtk_dialog_display_otr_message(context->accountname,
+		    context->protocol, context->username, buf, 0);
+	    g_free(buf);
+	}
+    }
 }
 
 /* Call this when a context transitions to PLAINTEXT. */
@@ -1553,16 +1601,16 @@ static void otrg_gtk_dialog_disconnected(ConnContext *context)
 
     buf = g_strdup_printf(_("Private conversation with %s lost."),
 	    purple_conversation_get_name(conv));
-    
-    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM, time(NULL));
-    
+
+    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM,
+	    time(NULL));
+
     g_free(buf);
 
     otrg_ui_get_prefs(&prefs, purple_conversation_get_account(conv),
 	    context->username);
     if (prefs.avoid_logging_otr) {
-	if (purple_prefs_get_bool("/purple/logging/log_ims"))
-	{
+	if (purple_prefs_get_bool("/purple/logging/log_ims")) {
 	    purple_conversation_set_logging(conv, TRUE);
 	}
     }
@@ -1579,6 +1627,7 @@ static void otrg_gtk_dialog_finished(const char *accountname,
     /* See if there's a conversation window we can put this in. */
     PurpleAccount *account;
     PurpleConversation *conv;
+    ConnContext *context;
     char *buf;
 
     account = purple_accounts_find(accountname, protocol);
@@ -1589,14 +1638,16 @@ static void otrg_gtk_dialog_finished(const char *accountname,
     if (!conv) return;
 
     buf = g_strdup_printf(_("%s has ended his/her private conversation with "
-		"you; you should do the same."),
+	    "you; you should do the same."),
 	    purple_conversation_get_name(conv));
-        
-    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM, time(NULL));
-        
+
+    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM,
+	    time(NULL));
+
     g_free(buf);
 
-    dialog_update_label_conv(conv, TRUST_FINISHED);
+    context = otrg_plugin_conv_to_selected_context(conv, 0);
+    dialog_update_label_conv(conv, otrg_plugin_context_to_trust(context));
     close_smp_window(conv);
 }
 
@@ -1613,33 +1664,34 @@ static void otrg_gtk_dialog_stillconnected(ConnContext *context)
     level = otrg_plugin_context_to_trust(context);
 
     switch(level) {
-       case TRUST_PRIVATE:
-           format_buf = g_strdup(_("Successfully refreshed the private "
-                       "conversation with %s.%s"));
-           break;
+	case TRUST_PRIVATE:
+	    format_buf = g_strdup(_("Successfully refreshed the private "
+		    "conversation with %s.%s"));
+	    break;
 
-       case TRUST_UNVERIFIED:
-           format_buf = g_strdup_printf(_("Successfully refreshed the "
-                       "<a href=\"%s%s\">unverified</a> conversation with "
-                       "%%s.%%s"),
-                       UNVERIFIED_HELPURL, _("?lang=en"));
-           break;
+	case TRUST_UNVERIFIED:
+	    format_buf = g_strdup_printf(_("Successfully refreshed the "
+		    "<a href=\"%s%s\">unverified</a> conversation with "
+		    "%%s.%%s"),
+		    UNVERIFIED_HELPURL, _("?lang=en"));
+	    break;
 
-       default:
-           /* This last case should never happen, since we know
-            * we're in ENCRYPTED. */
-           format_buf = g_strdup(_("Successfully refreshed the not private "
-                       "conversation with %s.%s"));
-           break;
+	default:
+	    /* This last case should never happen, since we know
+	     * we're in ENCRYPTED. */
+	    format_buf = g_strdup(_("Successfully refreshed the not private "
+		    "conversation with %s.%s"));
+	    break;
     }
 
     buf = g_strdup_printf(format_buf,
 		purple_conversation_get_name(conv),
 		context->protocol_version == 1 ? _("  Warning: using old "
-		    "protocol version 1.") : "");
+		"protocol version 1.") : "");
+
+    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM,
+	    time(NULL));
 
-    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM, time(NULL));
-    
     g_free(buf);
     g_free(format_buf);
 
@@ -1656,7 +1708,7 @@ static void otrg_gtk_dialog_clicked_connect(GtkWidget *widget, gpointer data)
     PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
 
     if (gtkconv->active_conv != conv) {
-        pidgin_conv_switch_active_conversation(conv);
+	pidgin_conv_switch_active_conversation(conv);
     }
 
     if (purple_conversation_get_data(conv, "otr-private")) {
@@ -1665,19 +1717,28 @@ static void otrg_gtk_dialog_clicked_connect(GtkWidget *widget, gpointer data)
 	format = _("Attempting to start a private conversation with %s...");
     }
     buf = g_strdup_printf(format, purple_conversation_get_name(conv));
-    
-    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM, time(NULL));
-    
+
+    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM,
+	    time(NULL));
+
     g_free(buf);
-	
+
     otrg_plugin_send_default_query_conv(conv);
 }
 
 /* Called when SMP verification option selected from menu */
 static void socialist_millionaires(GtkWidget *widget, gpointer data)
 {
-    PurpleConversation *conv = data;
-    ConnContext *context = otrg_plugin_conv_to_context(conv);
+    ConvOrContext *convctx = data;
+    PurpleConversation *conv;
+    ConnContext *context = NULL;
+
+    if (convctx->convctx_type == convctx_conv) {
+	conv = convctx->conv;
+	context = otrg_plugin_conv_to_selected_context(conv, 0);
+    } else if (convctx->convctx_type == convctx_ctx) {
+	context = convctx->context;
+    }
 
     if (context == NULL || context->msgstate != OTRL_MSGSTATE_ENCRYPTED)
 	return;
@@ -1694,8 +1755,17 @@ static void menu_whatsthis(GtkWidget *widget, gpointer data)
 
 static void menu_end_private_conversation(GtkWidget *widget, gpointer data)
 {
-    PurpleConversation *conv = data;
-    ConnContext *context = otrg_plugin_conv_to_context(conv);
+    PurpleConversation *conv;
+    ConnContext *context = NULL;
+    ConvOrContext *convctx = data;
+
+    if (convctx->convctx_type == convctx_conv) {
+	conv = convctx->conv;
+	context = otrg_plugin_conv_to_selected_context(conv, 0);
+    } else if (convctx->convctx_type == convctx_ctx) {
+	context = convctx->context;
+    }
+
 
     otrg_ui_disconnect_connection(context);
 }
@@ -1708,16 +1778,6 @@ static gboolean button_pressed(GtkWidget *w, GdkEventButton *event,
 {
     PurpleConversation *conv = data;
 
-#ifdef OLD_OTR_BUTTON
-    if ((event->button == 3) && (event->type == GDK_BUTTON_PRESS)) {
-	GtkWidget *menu = purple_conversation_get_data(conv, "otr-menu");
-	if (menu) {
-	    gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
-		    3, event->time);
-	    return TRUE;
-	}
-    }
-#else
     /* Any button will do */
     if (event->type == GDK_BUTTON_PRESS) {
 	GtkWidget *menu = purple_conversation_get_data(conv, "otr-menu");
@@ -1727,14 +1787,15 @@ static gboolean button_pressed(GtkWidget *w, GdkEventButton *event,
 	    return TRUE;
 	}
     }
-#endif
+
     return FALSE;
 }
 
 static void otrg_gtk_dialog_new_purple_conv(PurpleConversation *conv);
 
 
-static void otr_refresh_otr_buttons(PurpleConversation *conv) {
+static void otr_refresh_otr_buttons(PurpleConversation *conv)
+{
     PidginConversation *gtkconv = PIDGIN_CONVERSATION ( conv );
     GList * list_iter = gtkconv->convs;
     PurpleConversation * current_conv;
@@ -1742,8 +1803,8 @@ static void otr_refresh_otr_buttons(PurpleConversation *conv) {
 
     for (;list_iter;list_iter = list_iter->next) {
 
-        current_conv = list_iter->data;
-        button = purple_conversation_get_data(current_conv, "otr-button");
+	current_conv = list_iter->data;
+	button = purple_conversation_get_data(current_conv, "otr-button");
 
 	if (button) {
 	    if (current_conv == gtkconv->active_conv) {
@@ -1755,38 +1816,59 @@ static void otr_refresh_otr_buttons(PurpleConversation *conv) {
     }
 }
 
-static void otr_destroy_top_menu_objects(PurpleConversation *conv) {
-    PidginConversation *gtkconv = PIDGIN_CONVERSATION ( conv );
-    PidginWindow *win = pidgin_conv_get_window ( gtkconv );
+/* Menu has been destroyed -- let's remove it from the menu_list
+ * so that it won't be destroyed again. */
+static void otr_menu_destroy(GtkWidget *widget, gpointer pdata)
+{
+    PidginWindow *win = (PidginWindow *) pdata ;
+    GtkWidget *top_menu = widget;
+
     GList * menu_list = g_hash_table_lookup ( otr_win_menus, win );
-    GList * iter;
-    GList * next;
-
-    if ( menu_list != NULL ) {
-        iter = menu_list;
-        while ( iter ) {
-            if ( iter->data ) gtk_object_destroy ( GTK_OBJECT ( iter->data ) );
-            next = iter->next;
-            menu_list = g_list_remove ( menu_list, iter->data );
-            iter = next;
-        }
-    }
+    menu_list = g_list_remove ( menu_list, top_menu );
     g_hash_table_replace ( otr_win_menus, win, menu_list );
+}
+
+static void otr_clear_win_menu_list(PidginWindow *win)
+{
+    GList * head = g_hash_table_lookup ( otr_win_menus, win ); /* menu_list */
+    GList * old_head = 0;
+
+    while(head) {
+	old_head = head;
+	gtk_object_destroy ( GTK_OBJECT ( head->data ) );
+	head = g_hash_table_lookup ( otr_win_menus, win );
+
+	if (head && head == old_head) {
+	    /* The head was not removed by the "destroyed" callback
+	       Something is wrong */
+	    break;
+	}
+    }
 
+    g_hash_table_replace ( otr_win_menus, win, head );
 }
 
-static int otr_get_menu_insert_pos(PurpleConversation *conv) {
+static void otr_destroy_top_menu_objects(PurpleConversation *conv)
+{
+    PidginConversation *gtkconv = PIDGIN_CONVERSATION ( conv );
+    PidginWindow *win = pidgin_conv_get_window ( gtkconv );
+
+    otr_clear_win_menu_list(win);
+}
+
+static int otr_get_menu_insert_pos(PurpleConversation *conv)
+{
     PidginConversation *gtkconv = PIDGIN_CONVERSATION ( conv );
     PidginWindow *win = pidgin_conv_get_window ( gtkconv );
     GtkWidget *menu_bar = win->menu.menubar;
 
-    GList * list_iter = gtk_container_get_children ( GTK_CONTAINER ( menu_bar ) );
+    GList * list_iter = gtk_container_get_children(GTK_CONTAINER(menu_bar));
     GList * head = list_iter;
 
     int pos = 0;
     while ( list_iter ) {
-        pos++;
-        list_iter = list_iter->next;
+	pos++;
+	list_iter = list_iter->next;
     }
 
     if (pos != 0) pos--;
@@ -1796,15 +1878,40 @@ static int otr_get_menu_insert_pos(PurpleConversation *conv) {
     return pos;
 }
 
-static void otr_set_menu_labels(PurpleConversation *conv, GtkWidget *query, GtkWidget *end, GtkWidget *smp) {
-    int insecure = purple_conversation_get_data(conv, "otr-private") ? 0 : 1;
-    int finished = purple_conversation_get_data(conv, "otr-finished") ? 1 : 0;
+static void otr_set_menu_labels(ConvOrContext *convctx, GtkWidget *query,
+	GtkWidget *end, GtkWidget *smp) {
+    PurpleConversation *conv;
+    int insecure = 0;
+    int authen = 0;
+    int finished = 0;
+    TrustLevel level = TRUST_NOT_PRIVATE;
+
+
+    if (convctx->convctx_type == convctx_conv) {
+	conv = convctx->conv;
+	insecure = purple_conversation_get_data(conv, "otr-private") ? 0 : 1;
+	authen = purple_conversation_get_data(conv, "otr-authenticated") ? 1 :0;
+	finished = purple_conversation_get_data(conv, "otr-finished") ? 1 : 0;
+    } else if (convctx->convctx_type == convctx_ctx) {
+	level = otrg_plugin_context_to_trust(convctx->context);
+	insecure = level == TRUST_UNVERIFIED || level == TRUST_PRIVATE ? 0 : 1;
+	authen = level == TRUST_PRIVATE ? 1 : 0;
+	finished = level == TRUST_FINISHED ? 1 : 0;
+    } else {
+	return;
+    }
 
     GtkWidget * label = gtk_bin_get_child(GTK_BIN(query));
 
     gtk_label_set_markup_with_mnemonic(GTK_LABEL(label),
-        insecure ? _("Start _private conversation") :
-        _("Refresh _private conversation"));
+	    insecure ? _("Start _private conversation") :
+	    _("Refresh _private conversation"));
+
+    label = gtk_bin_get_child(GTK_BIN(smp));
+
+    gtk_label_set_markup_with_mnemonic(GTK_LABEL(label),
+	    (!insecure && authen) ? _("Re_authenticate buddy") :
+	    _("_Authenticate buddy"));
 
     gtk_widget_set_sensitive(GTK_WIDGET(end), !insecure || finished);
     gtk_widget_set_sensitive(GTK_WIDGET(smp), !insecure);
@@ -1816,7 +1923,7 @@ static void force_deselect(GtkItem *item, gpointer data)
 }
 
 static void otr_build_status_submenu(PidginWindow *win,
-	PurpleConversation *conv, GtkWidget *menu, TrustLevel level) {
+	ConvOrContext *convctx, GtkWidget *menu, TrustLevel level) {
     char *status = "";
     GtkWidget *image;
     GtkWidget *levelimage;
@@ -1826,8 +1933,21 @@ static void otr_build_status_submenu(PidginWindow *win,
     GdkPixbuf *pixbuf;
     GtkWidget *whatsthis;
 
-    gchar *text = g_strdup_printf("%s (%s)", conv->name,
+    gchar *text = NULL;
+
+    PurpleConversation *conv;
+
+    if (convctx->convctx_type == convctx_conv) {
+	conv = convctx->conv;
+    } else if (convctx->convctx_type == convctx_ctx) {
+	conv = otrg_plugin_context_to_conv(convctx->context, 0);
+    } else {
+	return;
+    }
+
+    text = g_strdup_printf("%s (%s)", conv->name,
 	    purple_account_get_username(conv->account));
+
     buddy_name = gtk_image_menu_item_new_with_label(text);
     g_free(text);
 
@@ -1844,24 +1964,24 @@ static void otr_build_status_submenu(PidginWindow *win,
     gtk_image_menu_item_set_image ( GTK_IMAGE_MENU_ITEM ( buddy_name ), image);
 
     switch(level) {
-        case TRUST_NOT_PRIVATE:
-            status = _("Not Private");
-            break;
-        case TRUST_UNVERIFIED:
-            status = _("Unverified");
-            break;
-        case TRUST_PRIVATE:
-            status = _("Private");
-            break;
-        case TRUST_FINISHED:
-            status = _("Finished");
-            break;
-        }
+	case TRUST_NOT_PRIVATE:
+	    status = _("Not Private");
+	    break;
+	case TRUST_UNVERIFIED:
+	    status = _("Unverified");
+	    break;
+	case TRUST_PRIVATE:
+	    status = _("Private");
+	    break;
+	case TRUST_FINISHED:
+	    status = _("Finished");
+	    break;
+	}
 
     buddy_status = gtk_image_menu_item_new_with_label(status);
 
     levelimage = otr_icon(NULL, level, 1);
-    
+
     gtk_image_menu_item_set_image ( GTK_IMAGE_MENU_ITEM ( buddy_status ),
 	    levelimage);
 
@@ -1870,8 +1990,8 @@ static void otr_build_status_submenu(PidginWindow *win,
     whatsthis = gtk_image_menu_item_new_with_mnemonic(_("_What's this?"));
     gtk_image_menu_item_set_image ( GTK_IMAGE_MENU_ITEM ( whatsthis ),
 	    gtk_image_new_from_stock(GTK_STOCK_HELP,
-		gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL)));
-    
+	    gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL)));
+
     gtk_menu_shell_append(GTK_MENU_SHELL(menu), menusep);
     gtk_menu_shell_append(GTK_MENU_SHELL(menu), buddy_name);
     gtk_menu_shell_append(GTK_MENU_SHELL(menu), buddy_status);
@@ -1885,24 +2005,34 @@ static void otr_build_status_submenu(PidginWindow *win,
     gtk_widget_show_all(whatsthis);
 
     gtk_signal_connect(GTK_OBJECT(buddy_name), "select",
-        GTK_SIGNAL_FUNC(force_deselect), NULL);
+	GTK_SIGNAL_FUNC(force_deselect), NULL);
     gtk_signal_connect(GTK_OBJECT(buddy_status), "select",
-        GTK_SIGNAL_FUNC(force_deselect), NULL);
+	GTK_SIGNAL_FUNC(force_deselect), NULL);
     gtk_signal_connect(GTK_OBJECT(whatsthis), "activate",
-        GTK_SIGNAL_FUNC(menu_whatsthis), conv);
+	GTK_SIGNAL_FUNC(menu_whatsthis), conv);
 }
 
-static void build_otr_menu(PurpleConversation *conv, GtkWidget *menu,
+static void build_otr_menu(ConvOrContext *convctx, GtkWidget *menu,
 	TrustLevel level)
 {
-    PidginConversation *gtkconv = PIDGIN_CONVERSATION ( conv );
-    PidginWindow *win = pidgin_conv_get_window ( gtkconv );
+    PurpleConversation *conv;
+
+    if (convctx->convctx_type == convctx_conv) {
+	conv = convctx->conv;
+    } else if (convctx->convctx_type == convctx_ctx) {
+	conv = otrg_plugin_context_to_conv(convctx->context, 0);
+    } else {
+	return;
+    }
 
-    GtkWidget *buddymenuquery = gtk_menu_item_new_with_mnemonic(_("Start _private conversation"));
-    GtkWidget *buddymenuend = gtk_menu_item_new_with_mnemonic(_("_End private conversation"));
-    GtkWidget *buddymenusmp = gtk_menu_item_new_with_mnemonic(_("_Authenticate buddy"));
+    GtkWidget *buddymenuquery = gtk_menu_item_new_with_mnemonic(
+	    _("Start _private conversation"));
+    GtkWidget *buddymenuend = gtk_menu_item_new_with_mnemonic(
+	    _("_End private conversation"));
+    GtkWidget *buddymenusmp = gtk_menu_item_new_with_mnemonic(
+	    _("_Authenticate buddy"));
 
-    otr_set_menu_labels(conv, buddymenuquery, buddymenuend, buddymenusmp);
+    otr_set_menu_labels(convctx, buddymenuquery, buddymenuend, buddymenusmp);
 
     /* Empty out the menu */
     gtk_container_foreach(GTK_CONTAINER(menu), destroy_menuitem, NULL);
@@ -1916,16 +2046,16 @@ static void build_otr_menu(PurpleConversation *conv, GtkWidget *menu,
     gtk_widget_show(buddymenusmp);
 
     gtk_signal_connect(GTK_OBJECT(buddymenuquery), "activate",
-        GTK_SIGNAL_FUNC(otrg_gtk_dialog_clicked_connect), conv);
+	GTK_SIGNAL_FUNC(otrg_gtk_dialog_clicked_connect), conv);
     gtk_signal_connect(GTK_OBJECT(buddymenuend), "activate",
-        GTK_SIGNAL_FUNC(menu_end_private_conversation), conv);
+	GTK_SIGNAL_FUNC(menu_end_private_conversation), convctx);
     gtk_signal_connect(GTK_OBJECT(buddymenusmp), "activate",
-        GTK_SIGNAL_FUNC(socialist_millionaires), conv);
+	GTK_SIGNAL_FUNC(socialist_millionaires), convctx);
 
-    otr_build_status_submenu(win, conv, menu, level);
 }
 
-static void otr_add_top_otr_menu(PurpleConversation *conv) {
+static void otr_add_top_otr_menu(PurpleConversation *conv)
+{
     PidginConversation *gtkconv = PIDGIN_CONVERSATION ( conv );
     PidginWindow *win = pidgin_conv_get_window ( gtkconv );
     GtkWidget *menu_bar = win->menu.menubar;
@@ -1936,7 +2066,12 @@ static void otr_add_top_otr_menu(PurpleConversation *conv) {
     GtkWidget *topmenuitem;
 
     TrustLevel level = TRUST_NOT_PRIVATE;
-    ConnContext *context = otrg_plugin_conv_to_context(conv);
+    ConnContext *context = otrg_plugin_conv_to_selected_context(conv, 1);
+
+    ConvOrContext *convctx;
+
+    GHashTable * conv_or_ctx_map = purple_conversation_get_data(conv,
+	    "otr-convorctx");
 
     int pos = otr_get_menu_insert_pos(conv);
 
@@ -1944,204 +2079,705 @@ static void otr_add_top_otr_menu(PurpleConversation *conv) {
 
     topmenuitem = gtk_menu_item_new_with_label ( "OTR" );
     topmenu = gtk_menu_new();
-        
+
     if (context != NULL) {
-        level = otrg_plugin_context_to_trust(context);
+	level = otrg_plugin_context_to_trust(context);
     }
-    
-    build_otr_menu(conv, topmenu, level);
 
-    gtk_menu_item_set_submenu ( GTK_MENU_ITEM ( topmenuitem ), topmenu );
+    convctx = g_hash_table_lookup(conv_or_ctx_map, conv);
+
+    if (!convctx) {
+	convctx = malloc(sizeof(ConvOrContext));
+	g_hash_table_insert(conv_or_ctx_map, conv, (gpointer)convctx);
+    }
+
+    convctx->convctx_type = convctx_conv;
+    convctx->conv = conv;
+    build_otr_menu(convctx, topmenu, level);
+    otr_build_status_submenu(win, convctx, topmenu, level);
+
+    gtk_menu_item_set_submenu ( GTK_MENU_ITEM ( topmenuitem ), topmenu );
 
     gtk_widget_show(topmenuitem);
     gtk_widget_show(topmenu);
 
     gtk_menu_shell_insert ( GTK_MENU_SHELL ( menu_bar ), topmenuitem, pos++ );
 
+    g_signal_connect(G_OBJECT(topmenuitem), "destroy",
+	    G_CALLBACK(otr_menu_destroy), win);
 
     menu_list = g_list_append(menu_list, topmenuitem);
 
     g_hash_table_replace ( otr_win_menus, win, menu_list );
 }
 
-static GList* otr_get_full_buddy_list(PurpleConversation *conv) {
+static GList* otr_get_full_buddy_list(PurpleConversation *conv)
+{
     PidginConversation *gtkconv = PIDGIN_CONVERSATION ( conv );
 
     GList *pres_list = NULL;
     GList *conv_list = NULL;
-    
+
     GSList *l, *buds;
 
     /* This code is derived from pidgin's 'generating sendto menu' stuff */
     if ( gtkconv->active_conv->type == PURPLE_CONV_TYPE_IM ) {
-        buds = purple_find_buddies ( gtkconv->active_conv->account, gtkconv->active_conv->name );
-        
-        if ( buds == NULL) {  /* buddy not on list */
-            conv_list = g_list_prepend ( conv_list, conv);
-        } else  {
-            for ( l = buds; l != NULL; l = l->next ) {
-                PurpleBlistNode *node = ( PurpleBlistNode * ) purple_buddy_get_contact ( ( PurpleBuddy * ) l->data );
-
-                for ( node = node->child; node != NULL; node = node->next ) {
-                    PurpleBuddy *buddy = ( PurpleBuddy * ) node;
-                    PurpleAccount *account;
-
-                    if ( !PURPLE_BLIST_NODE_IS_BUDDY ( node ) )
-                        continue;
-
-                    account = purple_buddy_get_account ( buddy );
-                    if ( purple_account_is_connected ( account ) ) {
-                        /* Use the PurplePresence to get unique buddies. */
-                        PurplePresence *presence = purple_buddy_get_presence ( buddy );
-                        if ( !g_list_find ( pres_list, presence ) ) {
-                            
-                            PurpleConversation * currentConv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, \
-                                purple_buddy_get_name ( buddy ), purple_buddy_get_account ( buddy ));
-                            
-                            pres_list = g_list_prepend ( pres_list, presence );
-                            
-                            if (currentConv != NULL) {
-                                conv_list = g_list_prepend ( conv_list, currentConv);    
-                            }
-                            
-                        }
-                    }
-                }
-            }
-            
-            g_slist_free ( buds );
-            g_list_free( pres_list );
-        }
-    }
-    
+	buds = purple_find_buddies ( gtkconv->active_conv->account,
+		gtkconv->active_conv->name );
+
+	if ( buds == NULL
+		&& !g_list_find(conv_list, conv)) {  /* buddy not on list */
+	    conv_list = g_list_prepend ( conv_list, conv);
+	} else  {
+	    for ( l = buds; l != NULL; l = l->next ) {
+		PurpleBlistNode *node = ( PurpleBlistNode * )
+			purple_buddy_get_contact ( ( PurpleBuddy * ) l->data );
+
+		for ( node = node->child; node != NULL; node = node->next ) {
+		    PurpleBuddy *buddy = ( PurpleBuddy * ) node;
+		    PurpleAccount *account;
+
+		    if ( !PURPLE_BLIST_NODE_IS_BUDDY ( node ) )
+			continue;
+
+		    account = purple_buddy_get_account ( buddy );
+		    if ( purple_account_is_connected ( account ) ) {
+			/* Use the PurplePresence to get unique buddies. */
+			PurplePresence *presence =
+				purple_buddy_get_presence( buddy );
+			if ( !g_list_find ( pres_list, presence ) ) {
+
+			    PurpleConversation * currentConv =
+				    purple_find_conversation_with_account(
+				    PURPLE_CONV_TYPE_IM, \
+				    purple_buddy_get_name ( buddy ),
+				    purple_buddy_get_account ( buddy ));
+
+			    pres_list = g_list_prepend ( pres_list, presence );
+
+			    if (currentConv != NULL &&
+				    !g_list_find(conv_list, currentConv)) {
+				conv_list = g_list_prepend ( conv_list,
+					currentConv );
+			    }
+
+			}
+		    }
+		}
+	    }
+
+	    g_slist_free ( buds );
+	    g_list_free( pres_list );
+	}
+    }
+
     return conv_list;
 }
 
-static void otr_add_buddy_top_menus(PurpleConversation *conv) {
-    PidginConversation *gtkconv = PIDGIN_CONVERSATION ( conv );
-    PidginWindow *win = pidgin_conv_get_window ( gtkconv );
-    
-    PurpleConversation * currentConv;
+static void unselect_meta_ctx(PurpleConversation *conv)
+{
+    GtkWidget *select_best = (GtkWidget *) purple_conversation_get_data(conv,
+	    "otr-select_best");
+    GtkWidget *select_recent = (GtkWidget *) purple_conversation_get_data(conv,
+	    "otr-select_recent");
+
+    GTK_CHECK_MENU_ITEM(select_recent)->active = 0;
+    GTK_CHECK_MENU_ITEM(select_best)->active = 0;
+}
+
+static void select_meta_ctx(GtkWidget *widget, gpointer data)
+{
+    PurpleConversation *conv = (PurpleConversation *) data;
+    GtkWidget *select_best = (GtkWidget *) purple_conversation_get_data(conv,
+	    "otr-select_best");
+    GtkWidget *select_recent = (GtkWidget *) purple_conversation_get_data(conv,
+	    "otr-select_recent");
+    gboolean value = FALSE;
+    otrl_instag_t * selected_instance = (otrl_instag_t *)
+	    purple_conversation_get_data(conv, "otr-ui_selected_ctx");
+    ConnContext * context = NULL;
+    ConnContext * recent_context = NULL;
+
+    value = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget));
+
+    if (widget == select_best) {
+	GTK_CHECK_MENU_ITEM(select_recent)->active = !value;
+
+	if (value) {
+	    if (selected_instance) {
+		*selected_instance = OTRL_INSTAG_BEST;
+	    }
+	    context = (ConnContext *) otrg_plugin_conv_to_selected_context(conv,
+		    1);
+
+	    recent_context = (ConnContext *) otrg_plugin_conv_to_context(conv,
+		    OTRL_INSTAG_RECENT_RECEIVED, 0);
+	    if (context != recent_context) {
+		gchar *buf = g_strdup_printf(_("Warning: The selected outgoing "
+			"OTR session (%u) is not the most recently active "
+			"one (%u). Your buddy may not receive your messages."
+			" Use the icon menu above to select a different "
+			"outgoing session."),
+			get_context_instance_to_index(conv, context),
+			get_context_instance_to_index(conv, recent_context));
+		otrg_gtk_dialog_display_otr_message(context->accountname,
+			context->protocol, context->username, buf, 0);
+		g_free(buf);
+	    }
+
+	}
+
+    } else if (widget == select_recent) {
+	GTK_CHECK_MENU_ITEM(select_best)->active = !value;
+
+	if (value && selected_instance) {
+	    *selected_instance = OTRL_INSTAG_RECENT_RECEIVED;
+	}
+    }
+
+    if (!context) context = (ConnContext *)
+	    otrg_plugin_conv_to_selected_context(conv, 1);
+
+    pidgin_conv_switch_active_conversation(conv);
+    dialog_update_label(context);
+}
+
+static void select_menu_ctx(GtkWidget *widget, gpointer data)
+{
+    ConnContext *context = (ConnContext *) data;
+    PurpleConversation *conv = otrg_plugin_context_to_conv(context, 1);
+    ConnContext *recent_context = (ConnContext *) otrg_plugin_conv_to_context(
+	    conv, (otrl_instag_t)OTRL_INSTAG_RECENT_RECEIVED, 0);
+    otrl_instag_t *selected_instance = (otrl_instag_t *)
+	    purple_conversation_get_data(conv, "otr-ui_selected_ctx");
+    gboolean *is_multi_instance = purple_conversation_get_data(conv,
+		    "otr-conv_multi_instances");
+
+    if (is_multi_instance && *is_multi_instance) {
+	if (selected_instance) {
+	    *selected_instance = context->their_instance;
+	}
+	unselect_meta_ctx(conv);
+    }
+
+    pidgin_conv_switch_active_conversation(conv);
+    dialog_update_label(context);
+
+    if (is_multi_instance && *is_multi_instance && context != recent_context) {
+	gchar *buf = g_strdup_printf(_("Warning: The selected outgoing OTR "
+		"session (%u) is not the most recently active one (%u). "
+		"Your buddy may not receive your messages. Use the icon menu "
+		"above to select a different outgoing session."),
+		get_context_instance_to_index(conv, context),
+		get_context_instance_to_index(conv, recent_context));
+	otrg_gtk_dialog_display_otr_message(context->accountname,
+		context->protocol, context->username, buf, 0);
+	g_free(buf);
+    }
+}
+
+static void build_meta_instance_submenu( PurpleConversation *conv,
+	GtkWidget *menu) {
+    GtkWidget *menusep = gtk_separator_menu_item_new();
+    GtkWidget *select_best = gtk_check_menu_item_new_with_label(
+	    _("Send to most secure"));
+    GtkWidget *select_recent = gtk_check_menu_item_new_with_label(
+	    _("Send to most recent"));
+    otrl_instag_t * selected_instance = purple_conversation_get_data(conv,
+	    "otr-ui_selected_ctx");
+
+    if (!selected_instance || *selected_instance == OTRL_INSTAG_BEST) {
+	GTK_CHECK_MENU_ITEM(select_recent)->active = 0;
+	GTK_CHECK_MENU_ITEM(select_best)->active = 1;
+    } else if (*selected_instance == OTRL_INSTAG_RECENT_RECEIVED) {
+	GTK_CHECK_MENU_ITEM(select_recent)->active = 1;
+	GTK_CHECK_MENU_ITEM(select_best)->active = 0;
+    } else {
+	GTK_CHECK_MENU_ITEM(select_recent)->active = 0;
+	GTK_CHECK_MENU_ITEM(select_best)->active = 0;
+    }
+
+    purple_conversation_set_data(conv, "otr-select_best", select_best);
+    purple_conversation_set_data(conv, "otr-select_recent", select_recent);
 
+    gtk_signal_connect(GTK_OBJECT(select_best), "toggled",
+	    GTK_SIGNAL_FUNC(select_meta_ctx), conv);
+    gtk_signal_connect(GTK_OBJECT(select_recent), "toggled",
+	    GTK_SIGNAL_FUNC(select_meta_ctx), conv);
+
+    gtk_widget_show(menusep);
+    gtk_menu_shell_append(GTK_MENU_SHELL(menu), menusep);
+    gtk_widget_show(select_best);
+    gtk_menu_shell_append(GTK_MENU_SHELL(menu), select_best);
+    gtk_widget_show(select_recent);
+    gtk_menu_shell_append(GTK_MENU_SHELL(menu), select_recent);
+}
+
+/* Build an OTR buddy menu (where the root menu item is an icon corresponding
+ * to the conversation status) for a conversation that has multiple instances.
+ * The ConnContexts are given in the GList "instances". Keep track of the
+ * position this menu was inserted in the "pos" argument. "active_conv"
+ * corresponds to whether this conversation is the active PurpleConversation
+ * for this PidginConversation pane.
+ */
+static void otr_add_buddy_instances_top_menu(PidginConversation *gtkconv,
+		GList *instances, gboolean active_conv, const char *username,
+		const char *accountname, int *pos) {
+    PidginWindow *win = pidgin_conv_get_window ( gtkconv );
     GtkWidget *menu_bar = win->menu.menubar;
+    GtkWidget *menu;
+    GtkWidget *menu_image;
+    GtkWidget * tooltip_menu;
+    gchar *tooltip_text;
+    gpointer gp_instance;
+    otrl_instag_t * selected_instance = NULL;
+    gboolean selection_exists = 0;
+    ConnContext * context = instances->data;
+    TrustLevel level = TRUST_NOT_PRIVATE;
+    GHashTable * conv_or_ctx_map;
+    PurpleConversation * conv = NULL;
+    ConvOrContext convctx;
+    GList * menu_list;
+
+    conv = otrg_plugin_context_to_conv(context, 0);
+    selection_exists = g_hash_table_lookup_extended(conv->data,
+	    "otr-ui_selected_ctx", NULL, &gp_instance);
+
+    /* Find the selected or default instance */
+    if (selection_exists) {
+	selected_instance = gp_instance;
+	context = otrl_context_find(otrg_plugin_userstate,
+		context->username, context->accountname, context->protocol,
+		*selected_instance, 0, NULL, NULL, NULL);
+    } else {
+	context = otrl_context_find(otrg_plugin_userstate,
+		context->username, context->accountname, context->protocol,
+		OTRL_INSTAG_BEST, 0, NULL, NULL, NULL);
+    }
+
+    menu = gtk_menu_new();
+
+    conv_or_ctx_map = purple_conversation_get_data(conv, "otr-convorctx");
+
+    for (; instances; instances = instances->next) {
+	GtkWidget *instance_menu_item;
+	GtkWidget *instance_submenu;
+	gchar* text;
+	ConnContext *curr_context = instances->data;
+	ConvOrContext * curr_convctx = g_hash_table_lookup(conv_or_ctx_map,
+		curr_context);
+	gboolean selected = (curr_context->their_instance ==
+		context->their_instance);
+	gint instance_i = -1;
+
+	if (curr_context->m_context == curr_context &&
+		curr_context->msgstate == OTRL_MSGSTATE_PLAINTEXT) {
+	    continue;
+	}
+
+	if (!curr_convctx) {
+	    curr_convctx = malloc(sizeof(ConvOrContext));
+	    g_hash_table_insert(conv_or_ctx_map, curr_context,
+		    (gpointer)curr_convctx);
+	    curr_convctx->convctx_type = convctx_ctx;
+	    curr_convctx->context = curr_context;
+	}
+
+
+	instance_i = get_context_instance_to_index(conv, curr_context);
+
+	text = g_strdup_printf(_("Session %u"), instance_i);
+
+	instance_menu_item = gtk_image_menu_item_new_with_label(text);
+	instance_submenu = gtk_menu_new();
+
+	level = otrg_plugin_context_to_trust(curr_context);
+	menu_image = otr_icon(NULL, level, selected);
+
+	gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(instance_menu_item),
+		menu_image);
+	gtk_image_menu_item_set_always_show_image(
+		GTK_IMAGE_MENU_ITEM(instance_menu_item), 1);
+
+	build_otr_menu(curr_convctx, instance_submenu, level);
+
+	g_free(text);
+
+	if (!selection_exists ||
+		*selected_instance != curr_context->their_instance) {
+	    GtkWidget *select_ctx = gtk_menu_item_new_with_label(_("Select"));
+	    GtkWidget *menusep = gtk_separator_menu_item_new();
+
+	    gtk_signal_connect(GTK_OBJECT(select_ctx), "activate",
+		    GTK_SIGNAL_FUNC(select_menu_ctx), curr_context);
+
+	    gtk_menu_shell_prepend(GTK_MENU_SHELL(instance_submenu), menusep);
+	    gtk_widget_show(menusep);
+
+	    gtk_menu_shell_prepend(GTK_MENU_SHELL(instance_submenu),
+		    select_ctx);
+	    gtk_widget_show(select_ctx);
+	} else if (selection_exists && 
+		*selected_instance == curr_context->their_instance) {
+	    GtkWidget *selected_ctx =
+		    gtk_menu_item_new_with_label(_("Selected"));
+	    GtkWidget *menusep = gtk_separator_menu_item_new();
+
+	    gtk_signal_connect(GTK_OBJECT(selected_ctx), "select",
+		    GTK_SIGNAL_FUNC(force_deselect), NULL);
+
+	    gtk_menu_shell_prepend(GTK_MENU_SHELL(instance_submenu), menusep);
+	    gtk_widget_show(menusep);
+
+	    gtk_menu_shell_prepend(GTK_MENU_SHELL(instance_submenu),
+		    selected_ctx);
+	    gtk_widget_show(selected_ctx);
+	}
+
+	gtk_widget_show(menu_image);
+	gtk_widget_show(instance_menu_item);
+	gtk_widget_show(instance_submenu);
+	gtk_menu_item_set_submenu (GTK_MENU_ITEM (instance_menu_item),
+		instance_submenu);
 
+	gtk_menu_shell_append(GTK_MENU_SHELL(menu), instance_menu_item);
+
+    }
+
+
+    level = otrg_plugin_context_to_trust(context);
+    menu_image = otr_icon(NULL, level, active_conv);
+    convctx.convctx_type = convctx_ctx;
+    convctx.context = context;
+
+    build_meta_instance_submenu(conv, menu);
+
+    otr_build_status_submenu(win, &convctx, menu, level);
+
+    tooltip_menu = tooltip_menu_new();
+
+    gtk_widget_show ( menu_image );
+    gtk_widget_show(tooltip_menu);
+    gtk_menu_shell_insert ( GTK_MENU_SHELL(menu_bar), tooltip_menu, (*pos)++);
+    gtk_menu_item_set_submenu ( GTK_MENU_ITEM(tooltip_menu), menu);
+
+    tooltip_text = g_strdup_printf("%s (%s)", username, accountname);
+    tooltip_menu_prepend(TOOLTIP_MENU(tooltip_menu), menu_image, tooltip_text);
+    g_free(tooltip_text);
+
+    menu_list = g_hash_table_lookup ( otr_win_menus, win );
+
+    g_signal_connect(G_OBJECT(tooltip_menu), "destroy",
+	    G_CALLBACK(otr_menu_destroy), win);
+
+    menu_list = g_list_append(menu_list, tooltip_menu);
+
+    g_hash_table_replace ( otr_win_menus, win, menu_list );
+}
+
+/* Build an OTR buddy menu (where the root menu item is an icon corresponding
+ * to the conversation status) for a conversation that does not have multiple
+ * instances. A pre-allocated ConvOrContext is given. Keep track of the
+ * position this menu was inserted in the "pos" argument. "active_conv"
+ * corresponds to whether this conversation is the active PurpleConversation
+ * for this PidginConversation pane.
+ */
+static void otr_add_buddy_top_menu(PidginConversation *gtkconv,
+	ConvOrContext *convctx, gboolean active_conv, const char *username,
+	const char *accountname, int *pos) {
+    PidginWindow *win = pidgin_conv_get_window ( gtkconv );
+    GtkWidget *menu_bar = win->menu.menubar;
     GtkWidget *menu;
     GtkWidget *menu_image;
+    TrustLevel level;
+    ConnContext *context = NULL;
+    GList * menu_list;
+    GtkWidget * tooltip_menu;
+    gchar *tooltip_text;
+    GtkWidget *select_ctx = NULL;
+
+    if (convctx->convctx_type == convctx_ctx) {
+	context = convctx->context;
+    } else if (convctx->convctx_type == convctx_conv) {
+	context = otrg_plugin_conv_to_selected_context(convctx->conv, 0);
+    }
+
+    level = TRUST_NOT_PRIVATE;
+
+    if (context != NULL) {
+	level = otrg_plugin_context_to_trust(context);
+    }
+
+    menu_image = otr_icon(NULL, level, active_conv);
+
+    menu = gtk_menu_new();
+
+    build_otr_menu(convctx, menu, level);
+    otr_build_status_submenu(win, convctx, menu, level);
+
+    if (!active_conv) {
+	select_ctx = gtk_menu_item_new_with_label(_("Select"));
+
+	gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), select_ctx);
+	gtk_widget_show(select_ctx);
+
+	gtk_signal_connect(GTK_OBJECT(select_ctx), "activate",
+	GTK_SIGNAL_FUNC(select_menu_ctx), context);
+    }
+
+    tooltip_menu = tooltip_menu_new();
+
+    gtk_widget_show ( menu_image );
+    gtk_widget_show(tooltip_menu);
+    gtk_menu_shell_insert ( GTK_MENU_SHELL(menu_bar), tooltip_menu, (*pos)++);
+    gtk_menu_item_set_submenu ( GTK_MENU_ITEM ( tooltip_menu ), menu );
+
+    tooltip_text = g_strdup_printf("%s (%s)", username, accountname);
+    tooltip_menu_prepend(TOOLTIP_MENU(tooltip_menu), menu_image, tooltip_text);
+    g_free(tooltip_text);
+
+    menu_list = g_hash_table_lookup ( otr_win_menus, win );
+
+    g_signal_connect(G_OBJECT(tooltip_menu), "destroy",
+	    G_CALLBACK(otr_menu_destroy), win);
+
+    menu_list = g_list_append(menu_list, tooltip_menu);
+
+    g_hash_table_replace ( otr_win_menus, win, menu_list );
+}
+
+static void otr_add_buddy_top_menus(PurpleConversation *conv)
+{
+    PidginConversation *gtkconv = PIDGIN_CONVERSATION ( conv );
+
+    PurpleConversation * currentConv = NULL; /* Auxiliary variables re-used */
+    ConnContext *currentContext = NULL;      /* within loops. */
 
     GList *full_buddy_list = NULL;
-    GList * list_iter;
-    
-    int pos;
-    
+    GList *list_iter;
+
+    int pos = otr_get_menu_insert_pos(conv);
+
+
+    GHashTable *conv_to_context_map = g_hash_table_new(g_direct_hash,
+	    g_direct_equal);
+
+    GHashTable * conv_or_ctx_map = purple_conversation_get_data(conv,
+	    "otr-convorctx");
+
     full_buddy_list = otr_get_full_buddy_list(conv);
 
     list_iter = full_buddy_list;
 
-    pos = otr_get_menu_insert_pos(conv);
-
-    for (list_iter = g_list_last ( full_buddy_list ); list_iter != NULL; list_iter = list_iter->prev) {
-        TrustLevel level;
-        ConnContext *context;
-        GList * menu_list;
-        GtkWidget * tooltip_menu;
-        gchar *tooltip_text;
-        
-        currentConv = list_iter->data;
-
-        if (currentConv == NULL) {
-            continue;       
-        }
-
-        if (purple_conversation_get_type(currentConv) != PURPLE_CONV_TYPE_IM) continue;
-
-        level = TRUST_NOT_PRIVATE;
-        context = otrg_plugin_conv_to_context(currentConv);
-        
-        if (context != NULL) {
-            level = otrg_plugin_context_to_trust(context);
-        }
-
-        menu_image = otr_icon(NULL, level, 1);
-
-        if (currentConv == gtkconv->active_conv) {
-            menu_image = otr_icon(menu_image, level, 1);
-        } else {
-            menu_image = otr_icon(menu_image, level, 0);
-        }
-        menu = gtk_menu_new();
-            
-	build_otr_menu(currentConv, menu, level);
-        
-        tooltip_menu = tooltip_menu_new();
-        
-        gtk_widget_show ( menu_image );
-        gtk_widget_show(tooltip_menu);
-        gtk_menu_shell_insert ( GTK_MENU_SHELL ( menu_bar ), tooltip_menu, pos++ );
-        gtk_menu_item_set_submenu ( GTK_MENU_ITEM ( tooltip_menu ), menu );
-        
-        tooltip_text = g_strdup_printf("%s (%s)", currentConv->name, purple_account_get_username(currentConv->account));
-        tooltip_menu_prepend(TOOLTIP_MENU(tooltip_menu), menu_image, tooltip_text);
-        g_free(tooltip_text);
-        
-        menu_list = g_hash_table_lookup ( otr_win_menus, win );
-        menu_list = g_list_append(menu_list, tooltip_menu);
-        
-        g_hash_table_replace ( otr_win_menus, win, menu_list );
-        
-
-    }
-    
+    /* First determine how many contexts are associated with each conv */
+    for (list_iter = g_list_last ( full_buddy_list ); list_iter != NULL;
+	    list_iter = list_iter->prev) {
+	PurpleAccount *account;
+	char *username;
+	const char *accountname, *proto;
+	GList * contexts = NULL;
+
+	currentConv = list_iter->data;
+
+	if (currentConv == NULL) {
+	    continue;
+	}
+
+	if (purple_conversation_get_type(currentConv) != PURPLE_CONV_TYPE_IM) {
+	    continue;
+	}
+
+	account = purple_conversation_get_account(currentConv);
+	accountname = purple_account_get_username(account);
+	proto = purple_account_get_protocol_id(account);
+	username = g_strdup(purple_normalize(account,
+		purple_conversation_get_name(currentConv)));
+
+	for (currentContext = otrg_plugin_userstate->context_root;
+		currentContext != NULL;
+		currentContext = currentContext->next) {
+
+	    if (!strcmp(currentContext->accountname, accountname) &&
+		    !strcmp(currentContext->protocol, proto) &&
+		    !strcmp(currentContext->username, username)) {
+		contexts = g_list_append(contexts, currentContext);
+	    }
+	}
+
+	g_free(username);
+
+	g_hash_table_insert(conv_to_context_map,
+		currentConv, (gpointer) contexts);
+
+    }
+
+    list_iter = full_buddy_list;
+
+    for (list_iter = g_list_last ( full_buddy_list ); list_iter != NULL;
+	    list_iter = list_iter->prev) {
+	GList * contexts = NULL;
+	GList * contexts_iter = NULL;
+	gboolean active_conv = 0;
+	ConvOrContext * convctx = NULL;
+	ConnContext * m_context = NULL;
+	PurpleAccount * account = NULL;
+	char * username = NULL;
+	const char * accountname = NULL;
+	int num_contexts = 0;
+	gboolean * is_multi_instance;
+
+	currentConv = list_iter->data;
+
+	if (currentConv == NULL) {
+	    continue;
+	}
+
+	active_conv = (currentConv == gtkconv->active_conv);
+
+	contexts = (GList *) g_hash_table_lookup(conv_to_context_map,
+		currentConv);
+
+	if (purple_conversation_get_type(currentConv) != PURPLE_CONV_TYPE_IM) {
+	    continue;
+	}
+
+	num_contexts = g_list_length(contexts);
+
+	is_multi_instance = purple_conversation_get_data(currentConv,
+		    "otr-conv_multi_instances");
+	if (is_multi_instance) {
+	    *is_multi_instance = FALSE;
+	}
+
+	if (num_contexts > 1) {
+	    /* We will need the master context */
+	    currentContext = (ConnContext *) contexts->data;
+
+	    m_context = currentContext->m_context;
+	}
+
+	if (num_contexts <= 1) {
+	    /* Just add a menu for the possibly not yet created master inst */
+	    convctx = g_hash_table_lookup(conv_or_ctx_map, currentConv);
+
+	    if (!convctx) {
+		convctx = malloc(sizeof(ConvOrContext));
+		g_hash_table_insert(conv_or_ctx_map, currentConv,
+			(gpointer)convctx);
+		convctx->convctx_type = convctx_conv;
+		convctx->conv = currentConv;
+	    }
+
+	    account = purple_conversation_get_account(currentConv);
+	    accountname = purple_account_get_username(account);
+	    username = g_strdup(
+		    purple_normalize(account,
+			    purple_conversation_get_name(currentConv)));
+
+	    otr_add_buddy_top_menu(gtkconv, convctx, active_conv, username,
+		    accountname, &pos);
+	    g_free(username);
+
+	} else if (num_contexts == 2 &&
+		m_context->msgstate == OTRL_MSGSTATE_PLAINTEXT) {
+	    /* Just add a menu for the non_master instance */
+	    contexts_iter = contexts;
+	    currentContext = contexts_iter->data;
+
+	    while (currentContext->m_context == currentContext &&
+		    contexts_iter->next != NULL) {
+		contexts_iter = contexts_iter->next;
+		currentContext = contexts_iter->data;
+	    }
+
+	    convctx = g_hash_table_lookup(conv_or_ctx_map, currentContext);
+
+	    if (!convctx) {
+		convctx = malloc(sizeof(ConvOrContext));
+		g_hash_table_insert(conv_or_ctx_map, currentContext,
+			(gpointer)convctx);
+		convctx->convctx_type = convctx_ctx;
+		convctx->context = currentContext;
+	    }
+
+	    otr_add_buddy_top_menu(gtkconv, convctx, active_conv,
+		    currentContext->username, currentContext->accountname,
+		    &pos);
+
+	} else {
+	    /* Multi-instances */
+	    *is_multi_instance = TRUE;
+	    otr_add_buddy_instances_top_menu(gtkconv, contexts, active_conv,
+		    currentContext->username, currentContext->accountname,
+		    &pos);
+	}
+
+	if (contexts) {
+	    g_list_free(contexts);
+	}
+    }
+
+    g_hash_table_destroy (conv_to_context_map);
     g_list_free ( full_buddy_list );
 
 }
 
-static void otr_check_conv_status_change( PurpleConversation *conv) {
+
+static void otr_check_conv_status_change( PurpleConversation *conv)
+{
     PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
     TrustLevel current_level = TRUST_NOT_PRIVATE;
-    ConnContext *context = otrg_plugin_conv_to_context(conv);
-    
-    int *previous_level;
+    ConnContext *context = otrg_plugin_conv_to_context(conv,
+	    OTRL_INSTAG_RECENT, 0);
+
+    TrustLevel *previous_level;
     char *buf;
     char *status = "";
-    
+
     if (context != NULL) {
-        current_level = otrg_plugin_context_to_trust(context);
+	current_level = otrg_plugin_context_to_trust(context);
     }
-    
-    previous_level = g_hash_table_lookup ( otr_win_status, gtkconv );    
-    
-    if (!previous_level || (previous_level && *previous_level == current_level)) {
-        return;
+
+    previous_level = g_hash_table_lookup ( otr_win_status, gtkconv );
+
+    if (!previous_level ||
+	    (previous_level && *previous_level == current_level)) {
+	return;
     }
-    
-    buf = _("The privacy status of the current conversation is now: <a href=\"%s%s\">%s</a>");
-    
+
+    buf = _("The privacy status of the current conversation is now: "
+	    "<a href=\"%s%s\">%s</a>");
+
     switch(current_level) {
-        case TRUST_NOT_PRIVATE:
-            status = _("Not Private");
-            break;
-        case TRUST_UNVERIFIED:
-            status = _("Unverified");
-            break;
-        case TRUST_PRIVATE:
-            status = _("Private");
-            break;
-        case TRUST_FINISHED:
-            status = _("Finished");
-            break;
-    }
-    
+	case TRUST_NOT_PRIVATE:
+	    status = _("Not Private");
+	    break;
+	case TRUST_UNVERIFIED:
+	    status = _("Unverified");
+	    break;
+	case TRUST_PRIVATE:
+	    status = _("Private");
+	    break;
+	case TRUST_FINISHED:
+	    status = _("Finished");
+	    break;
+    }
+
     buf = g_strdup_printf(buf, LEVELS_HELPURL, _("?lang=en"), status);
-    
-    /* Write a new message indicating the level change. The timestamp image will be appended as the message
-       timestamp signal is caught, which will also update the privacy level for this gtkconv */
-    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM, time(NULL));
-    
+
+    /* Write a new message indicating the level change. The timestamp image will
+     * be appended as the message timestamp signal is caught, which will also
+     * update the privacy level for this gtkconv */
+    purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM,
+	    time(NULL));
+
     g_free(buf);
+
 }
 
 /* If the conversation switches on us */
-static void conversation_switched ( PurpleConversation *conv, void * data ) {
+static void conversation_switched ( PurpleConversation *conv, void * data )
+{
     if ( conv == NULL ) return;
 
     otrg_gtk_dialog_new_purple_conv(conv);
@@ -2152,27 +2788,63 @@ static void conversation_switched ( PurpleConversation *conv, void * data ) {
  * pointing to it. */
 static void conversation_destroyed(PurpleConversation *conv, void *data)
 {
-    GtkWidget *menu = purple_conversation_get_data(conv, "otr-menu");
+    GtkWidget *menu = (GtkWidget *) purple_conversation_get_data(conv,
+	    "otr-menu");
     PidginConversation *gtkconv;
     PidginWindow *win;
-    GList * menu_list;
-    GList * iter;
-    
+    GHashTable * conv_or_ctx_map;
+    GHashTable * conv_to_idx_map;
+    gint * max_instance_idx;
+    gboolean * is_conv_multi_instance;
+    gboolean * have_warned_instances;
+    otrl_instag_t * last_received_instance;
+
     if (menu) gtk_object_destroy(GTK_OBJECT(menu));
+
+    conv_or_ctx_map = purple_conversation_get_data(conv, "otr-convorctx");
+    g_hash_table_destroy(conv_or_ctx_map);
+
+    conv_to_idx_map = purple_conversation_get_data(conv, "otr-conv_to_idx");
+    g_hash_table_destroy(conv_to_idx_map);
+
+    max_instance_idx = purple_conversation_get_data(conv, "otr-max_idx");
+    if (max_instance_idx) {
+	g_free(max_instance_idx);
+    }
+
+    is_conv_multi_instance = purple_conversation_get_data(conv,
+	    "otr-conv_multi_instances");
+    if (is_conv_multi_instance) {
+	g_free(is_conv_multi_instance);
+    }
+
+    have_warned_instances = purple_conversation_get_data(conv,
+	    "otr-warned_instances");
+    if (have_warned_instances) {
+	g_free(have_warned_instances);
+    }
+
+    last_received_instance = purple_conversation_get_data(conv,
+	    "otr-last_received_ctx");
+    if (last_received_instance) {
+	g_free(last_received_instance);
+    }
+
     g_hash_table_remove(conv->data, "otr-label");
     g_hash_table_remove(conv->data, "otr-button");
     g_hash_table_remove(conv->data, "otr-icon");
     g_hash_table_remove(conv->data, "otr-menu");
     g_hash_table_remove(conv->data, "otr-private");
+    g_hash_table_remove(conv->data, "otr-authenticated");
     g_hash_table_remove(conv->data, "otr-finished");
-#ifdef OLD_OTR_BUTTON
-    g_hash_table_remove(conv->data, "otr-icontext");
-    g_hash_table_remove(conv->data, "otr-menuquery");
-    g_hash_table_remove(conv->data, "otr-menuend");
-    g_hash_table_remove(conv->data, "otr-menuview");
-    g_hash_table_remove(conv->data, "otr-menuverf");
-    g_hash_table_remove(conv->data, "otr-menusmp");
-#endif
+    g_hash_table_remove(conv->data, "otr-select_best");
+    g_hash_table_remove(conv->data, "otr-select_recent");
+    g_hash_table_remove(conv->data, "otr-convorctx");
+    g_hash_table_remove(conv->data, "otr-conv_to_idx");
+    g_hash_table_remove(conv->data, "otr-max_idx");
+    g_hash_table_remove(conv->data, "otr-conv_multi_instances");
+    g_hash_table_remove(conv->data, "otr-warned_instances");
+    g_hash_table_remove(conv->data, "otr-last_received_ctx");
 
     otrg_gtk_dialog_free_smp_data(conv);
 
@@ -2184,19 +2856,11 @@ static void conversation_destroyed(PurpleConversation *conv, void *data)
     }
 
     win = pidgin_conv_get_window ( gtkconv );
-    menu_list = g_hash_table_lookup ( otr_win_menus, win );
-    iter = menu_list;
 
-    while ( iter ) {
-        GList * next;
-        if ( iter->data ) gtk_object_destroy ( GTK_OBJECT ( iter->data ) );
-        next = iter->next;
-        menu_list = g_list_remove ( menu_list, iter->data );
-        iter = next;
-    }
+    otr_clear_win_menu_list(win);
 
     g_hash_table_remove(otr_win_menus, win);
-    g_list_free(menu_list);
+
 }
 
 /* Set up the per-conversation information display */
@@ -2204,24 +2868,11 @@ static void otrg_gtk_dialog_new_purple_conv(PurpleConversation *conv)
 {
     PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
     ConnContext *context;
+    ConvOrContext *convctx;
     GtkWidget *bbox;
     GtkWidget *button;
     GtkWidget *label;
     GtkWidget *bwbox;
-#ifdef OLD_OTR_BUTTON
-    GtkWidget *bvbox;
-    GtkWidget *iconbox;
-    GtkWidget *icontext;
-    GtkWidget *menuquery;
-    GtkWidget *menuend;
-    GtkWidget *menusep;
-    /*
-    GtkWidget *menuview;
-    GtkWidget *menuverf;
-    */
-    GtkWidget *menusmp;
-    GtkWidget *whatsthis;
-#endif
     GtkWidget *icon;
     GtkWidget *menu;
 
@@ -2229,6 +2880,14 @@ static void otrg_gtk_dialog_new_purple_conv(PurpleConversation *conv)
     const char *name;
     OtrgUiPrefs prefs;
 
+    GHashTable * conv_or_ctx_map;
+    GHashTable * ctx_to_idx_map;
+
+    gint * max_instance_idx;
+    gboolean * is_conv_multi_instance;
+    gboolean * have_warned_instances;
+    otrl_instag_t * last_received_instance;
+
     /* Do nothing if this isn't an IM conversation */
     if (purple_conversation_get_type(conv) != PURPLE_CONV_TYPE_IM) return;
 
@@ -2237,13 +2896,15 @@ static void otrg_gtk_dialog_new_purple_conv(PurpleConversation *conv)
     name = purple_conversation_get_name(conv);
     otrg_ui_get_prefs(&prefs, account, name);
 
-#ifdef OLD_OTR_BUTTON
-    bbox = gtkconv->lower_hbox;
-#else
+    /* OTR is disabled for this buddy */
+    if (prefs.policy == OTRL_POLICY_NEVER) {
+	otr_destroy_top_menu_objects(conv);
+	return;
+    }
+
     bbox = gtkconv->toolbar;
-#endif
 
-    context = otrg_plugin_conv_to_context(conv);
+    context = otrg_plugin_conv_to_selected_context(conv, 0);
 
     /* See if we're already set up */
     button = purple_conversation_get_data(conv, "otr-button");
@@ -2266,6 +2927,34 @@ static void otrg_gtk_dialog_new_purple_conv(PurpleConversation *conv)
 	return;
     }
 
+    conv_or_ctx_map = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL,
+	    free);
+    purple_conversation_set_data(conv, "otr-convorctx", conv_or_ctx_map);
+
+    ctx_to_idx_map = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL,
+	    g_free);
+    purple_conversation_set_data(conv, "otr-conv_to_idx", ctx_to_idx_map);
+
+    max_instance_idx = g_malloc(sizeof(gint));
+    *max_instance_idx = 0;
+    purple_conversation_set_data(conv, "otr-max_idx",
+	    (gpointer)max_instance_idx);
+
+    is_conv_multi_instance = g_malloc(sizeof(gboolean));
+    *is_conv_multi_instance = FALSE;
+    purple_conversation_set_data(conv, "otr-conv_multi_instances",
+	    (gpointer)is_conv_multi_instance);
+
+    have_warned_instances = g_malloc(sizeof(gboolean));
+    *have_warned_instances = FALSE;
+    purple_conversation_set_data(conv, "otr-warned_instances",
+	    (gpointer)have_warned_instances);
+
+    last_received_instance = g_malloc(sizeof(otrl_instag_t));
+    *last_received_instance = OTRL_INSTAG_BEST; /* cannot be received */
+    purple_conversation_set_data(conv, "otr-last_received_ctx",
+	    (gpointer)last_received_instance);
+
     /* Make the button */
     button = gtk_button_new();
 
@@ -2274,27 +2963,12 @@ static void otrg_gtk_dialog_new_purple_conv(PurpleConversation *conv)
 	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
     }
 
-#ifdef OLD_OTR_BUTTON
-    bwbox = gtk_vbox_new(FALSE, 0);
-    gtk_container_add(GTK_CONTAINER(button), bwbox);
-    bvbox = gtk_vbox_new(FALSE, 0);
-    gtk_box_pack_start(GTK_BOX(bwbox), bvbox, TRUE, FALSE, 0);
-    iconbox = gtk_hbox_new(FALSE, 3);
-    gtk_box_pack_start(GTK_BOX(bvbox), iconbox, FALSE, FALSE, 0);
-    label = gtk_label_new(NULL);
-    gtk_box_pack_start(GTK_BOX(bvbox), label, FALSE, FALSE, 0);
-    icontext = gtk_label_new(_("OTR:"));
-    gtk_box_pack_start(GTK_BOX(iconbox), icontext, FALSE, FALSE, 0);
-    icon = otr_icon(NULL, TRUST_NOT_PRIVATE, 1);
-    gtk_box_pack_start(GTK_BOX(iconbox), icon, TRUE, FALSE, 0);
-#else
     bwbox = gtk_hbox_new(FALSE, 0);
     gtk_container_add(GTK_CONTAINER(button), bwbox);
     icon = otr_icon(NULL, TRUST_NOT_PRIVATE, 1);
     gtk_box_pack_start(GTK_BOX(bwbox), icon, TRUE, FALSE, 0);
     label = gtk_label_new(NULL);
     gtk_box_pack_start(GTK_BOX(bwbox), label, FALSE, FALSE, 0);
-#endif
 
     if (prefs.show_otr_button) {
 	gtk_widget_show_all(button);
@@ -2305,87 +2979,18 @@ static void otrg_gtk_dialog_new_purple_conv(PurpleConversation *conv)
     menu = gtk_menu_new();
     gtk_menu_set_title(GTK_MENU(menu), _("OTR Messaging"));
 
-#ifdef OLD_OTR_BUTTON
-    menuquery = gtk_menu_item_new_with_mnemonic("");
-    gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuquery);
-    gtk_widget_show(menuquery);
-
-    menuend = gtk_menu_item_new_with_mnemonic(_("_End private conversation"));
-    gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuend);
-    gtk_widget_show(menuend);
-
-    menusep = gtk_separator_menu_item_new();
-    gtk_menu_shell_append(GTK_MENU_SHELL(menu), menusep);
-    gtk_widget_show(menusep);
-
-    /*
-     * Don't show the Verify fingerprint menu option any more.  You can
-     * still get to the dialog through Authenticate connection ->
-     * Advanced...
-     *
-    menuverf = gtk_menu_item_new_with_mnemonic(_("_Verify fingerprint"));
-    gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuverf);
-    gtk_widget_show(menuverf);
-    */
-
-    menusmp = gtk_menu_item_new_with_mnemonic(_("_Authenticate buddy"));
-    gtk_menu_shell_append(GTK_MENU_SHELL(menu), menusmp);
-    gtk_widget_show(menusmp);
-
-    /*
-     * Don't show the View secure session id menu option any more.  It's
-     * not really useful at all.
-     *
-    menuview = gtk_menu_item_new_with_mnemonic(_("View _secure session id"));
-    gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuview);
-    gtk_widget_show(menuview);
-    */
-
-    menusep = gtk_separator_menu_item_new();
-    gtk_menu_shell_append(GTK_MENU_SHELL(menu), menusep);
-    gtk_widget_show(menusep);
-
-    whatsthis = gtk_menu_item_new_with_mnemonic(_("_What's this?"));
-    gtk_menu_shell_append(GTK_MENU_SHELL(menu), whatsthis);
-    gtk_widget_show(whatsthis);
-#else
-    build_otr_menu(conv, menu, TRUST_NOT_PRIVATE);
-#endif
+    convctx = malloc(sizeof(ConvOrContext));
+    convctx->convctx_type = convctx_conv;
+    convctx->conv = conv;
+    g_hash_table_replace ( conv_or_ctx_map, conv, convctx );
+    build_otr_menu(convctx, menu, TRUST_NOT_PRIVATE);
+    otr_build_status_submenu(pidgin_conv_get_window(gtkconv), convctx, menu,
+	    TRUST_NOT_PRIVATE);
 
     purple_conversation_set_data(conv, "otr-label", label);
     purple_conversation_set_data(conv, "otr-button", button);
     purple_conversation_set_data(conv, "otr-icon", icon);
     purple_conversation_set_data(conv, "otr-menu", menu);
-#ifdef OLD_OTR_BUTTON
-    purple_conversation_set_data(conv, "otr-icontext", icontext);
-
-    purple_conversation_set_data(conv, "otr-menuquery", menuquery);
-    purple_conversation_set_data(conv, "otr-menuend", menuend);
-    /*
-    purple_conversation_set_data(conv, "otr-menuview", menuview);
-    purple_conversation_set_data(conv, "otr-menuverf", menuverf);
-    */
-
-    purple_conversation_set_data(conv, "otr-menusmp", menusmp);
-    gtk_signal_connect(GTK_OBJECT(menuquery), "activate",
-	    GTK_SIGNAL_FUNC(otrg_gtk_dialog_clicked_connect), conv);
-    gtk_signal_connect(GTK_OBJECT(menuend), "activate",
-	    GTK_SIGNAL_FUNC(menu_end_private_conversation), conv);
-    /*
-    gtk_signal_connect(GTK_OBJECT(menuverf), "activate",
-	    GTK_SIGNAL_FUNC(verify_fingerprint), conv);
-    */
-    gtk_signal_connect(GTK_OBJECT(menusmp), "activate",
-	    GTK_SIGNAL_FUNC(socialist_millionaires), conv);
-    /*
-    gtk_signal_connect(GTK_OBJECT(menuview), "activate",
-	    GTK_SIGNAL_FUNC(view_sessionid), conv);
-    */
-    gtk_signal_connect(GTK_OBJECT(whatsthis), "activate",
-	    GTK_SIGNAL_FUNC(menu_whatsthis), conv);
-    gtk_signal_connect(GTK_OBJECT(button), "clicked",
-	    GTK_SIGNAL_FUNC(otrg_gtk_dialog_clicked_connect), conv);
-#endif
     g_signal_connect(G_OBJECT(button), "button-press-event",
 	    G_CALLBACK(button_pressed), conv);
 
@@ -2436,7 +3041,7 @@ static void dialog_resensitize(PurpleConversation *conv)
     if (prefs.policy == OTRL_POLICY_NEVER) {
 	otrg_gtk_dialog_remove_conv(conv);
     } else {
-        otrg_gtk_dialog_new_conv(conv);
+	otrg_gtk_dialog_new_conv(conv);
     }
     button = purple_conversation_get_data(conv, "otr-button");
     if (!button) return;
@@ -2444,7 +3049,7 @@ static void dialog_resensitize(PurpleConversation *conv)
 	connection = purple_account_get_connection(account);
 	if (connection) {
 	    /* Set the button to "sensitive" */
-	    gtk_widget_set_sensitive(button, 1);   
+	    gtk_widget_set_sensitive(button, 1);
 	    return;
 	}
     }
@@ -2459,87 +3064,133 @@ static void otrg_gtk_dialog_resensitize_all(void)
     purple_conversation_foreach(dialog_resensitize);
 }
 
-static void foreach_free_lists(void * key, void * value, void* data) {
-    GList * menu_list = (GList *) value;
-    GList * iter = menu_list;
-
-    while ( iter ) {
-        GList * next;
-        if ( iter->data ) gtk_object_destroy ( GTK_OBJECT ( iter->data ) );
-        next = iter->next;
-        menu_list = g_list_remove ( menu_list, iter->data );
-        iter = next;
-    }
+static void foreach_free_lists(void * key, void * value, void* data)
+{
+    PidginWindow *win = (PidginWindow *) key;
 
-    g_list_free(menu_list);
+    otr_clear_win_menu_list(win);
 }
 
+
+
 static char* conversation_timestamp(PurpleConversation *conv, time_t mtime,
-                                gboolean show_date) {
+	gboolean show_date) {
 
     PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
     TrustLevel current_level = TRUST_NOT_PRIVATE;
-    ConnContext *context = otrg_plugin_conv_to_context(conv);
-    
-    int *previous_level;
+    ConnContext *context = (ConnContext *) otrg_plugin_conv_to_context(conv,
+	    OTRL_INSTAG_RECENT, 0);
+    TrustLevel *previous_level;
     int id;
-    
-    
+
+
     if (context != NULL) {
-        current_level = otrg_plugin_context_to_trust(context);
+	current_level = otrg_plugin_context_to_trust(context);
     }
-    
-    previous_level = g_hash_table_lookup ( otr_win_status, gtkconv );    
-    
-    
+
+    previous_level = g_hash_table_lookup ( otr_win_status, gtkconv );
+
+
     if (previous_level && *previous_level == current_level) {
-        return NULL;
+	return NULL;
     }
-    
-    /* We want to update this gtkconv's privacy level only if the new privacy level we 
-       received corresponds to the active conversation.  */
+
+    /* We want to update this gtkconv's privacy level only if the new privacy
+     * level we received corresponds to the active conversation.  */
     if (conv == gtkconv->active_conv) {
-        int * current_level_ptr = malloc(sizeof(int));  /* 'free' is handled by the hashtable */
-        *current_level_ptr = current_level;
-        g_hash_table_replace ( otr_win_status, gtkconv, current_level_ptr );
+	/* 'free' is handled by the hashtable */
+	TrustLevel * current_level_ptr = malloc(sizeof(TrustLevel));
+	*current_level_ptr = current_level;
+	g_hash_table_replace ( otr_win_status, gtkconv, current_level_ptr );
     }
-    
+
     if (!previous_level) {
-        return NULL;
+	return NULL;
     }
-    
+
     id = -1;
 
     switch(current_level) {
-        case TRUST_NOT_PRIVATE:
-            id = img_id_not_private;
-            break;
-        case TRUST_UNVERIFIED:
-            id = img_id_unverified;
-            break;
-        case TRUST_PRIVATE:
-            id = img_id_private;
-            break;
-        case TRUST_FINISHED:
-            id = img_id_finished;
-            break;
-    }
-    
+	case TRUST_NOT_PRIVATE:
+	    id = img_id_not_private;
+	    break;
+	case TRUST_UNVERIFIED:
+	    id = img_id_unverified;
+	    break;
+	case TRUST_PRIVATE:
+	    id = img_id_private;
+	    break;
+	case TRUST_FINISHED:
+	    id = img_id_finished;
+	    break;
+    }
+
 
     if (id > 0 ) {
-        char * msg = g_strdup_printf("<IMG ID=\"%d\"> ", id);
-        gtk_imhtml_append_text_with_images((GtkIMHtml*)gtkconv->imhtml, msg, 0, NULL);  
-        g_free(msg);  
+	char * msg = g_strdup_printf("<IMG ID=\"%d\"> ", id);
+	gtk_imhtml_append_text_with_images((GtkIMHtml*)gtkconv->imhtml, msg, 0,
+		NULL);
+	g_free(msg);
     }
-    
-    
+
+
     return NULL;
 }
 
+/* If the user has selected a meta instance, an incoming message may trigger an
+ * instance change... we need to update the GUI appropriately */
+static gboolean check_incoming_instance_change(PurpleAccount *account,
+	char *sender, char *message, PurpleConversation *conv,
+	PurpleMessageFlags flags) {
+    otrl_instag_t * last_received_instance;
+    otrl_instag_t selected_instance;
+    gboolean have_received = FALSE;
+    ConnContext *received_context = NULL;
+    ConnContext *current_out = NULL;
+
+    if (!conv || !conv->data) {
+	return 0;
+    }
+
+    selected_instance = otrg_plugin_conv_to_selected_instag(conv, 0);
+    current_out = otrg_plugin_conv_to_selected_context(conv, 0);
+
+    last_received_instance = g_hash_table_lookup(conv->data,
+	    "otr-last_received_ctx");
+
+    if (!last_received_instance) {
+	return 0; /* OTR disabled for this buddy */
+    }
+
+    if (*last_received_instance == OTRL_INSTAG_MASTER || 
+	    *last_received_instance >= OTRL_MIN_VALID_INSTAG) {
+	have_received = TRUE;
+    }
+
+    received_context = (ConnContext *) otrg_plugin_conv_to_context(conv,
+	    (otrl_instag_t)OTRL_INSTAG_RECENT_RECEIVED, 0);
+
+    if (!received_context) {
+	return 0;
+    }
+
+    if (have_received &&
+	    *last_received_instance != received_context->their_instance &&
+	    selected_instance != OTRL_INSTAG_MASTER &&
+	    selected_instance < OTRL_MIN_VALID_INSTAG) {
+	dialog_update_label_conv(conv,
+		otrg_plugin_context_to_trust(current_out));
+    }
+
+    *last_received_instance = received_context->their_instance;
+
+    return 0;
+}
+
 static void unref_img_by_id(int *id)
 {
     if (id && *id > 0) {
-        purple_imgstore_unref_by_id(*id);
+	purple_imgstore_unref_by_id(*id);
 	*id = -1;
     }
 }
@@ -2560,26 +3211,27 @@ static void dialog_quitting(void)
 static void otrg_gtk_dialog_init(void)
 {
     otr_win_menus = g_hash_table_new(g_direct_hash, g_direct_equal);
-    otr_win_status = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free);
-    
-    
+    otr_win_status = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL,
+	    free);
+
+
     img_id_not_private = purple_imgstore_add_with_id(
 	    g_memdup(not_private_png, sizeof(not_private_png)),
 	    sizeof(not_private_png), "");
-    
+
     img_id_unverified = purple_imgstore_add_with_id(
 	    g_memdup(unverified_png, sizeof(unverified_png)),
 	    sizeof(unverified_png), "");
-    
+
     img_id_private = purple_imgstore_add_with_id(
 	    g_memdup(private_png, sizeof(private_png)),
 	    sizeof(private_png), "");
-    
+
     img_id_finished = purple_imgstore_add_with_id(
 	    g_memdup(finished_png, sizeof(finished_png)),
 	    sizeof(finished_png), "");
 
-    
+
     purple_signal_connect(pidgin_conversations_get_handle(),
 	    "conversation-switched", otrg_plugin_handle,
 	    PURPLE_CALLBACK(conversation_switched), NULL);
@@ -2587,14 +3239,18 @@ static void otrg_gtk_dialog_init(void)
     purple_signal_connect(purple_conversations_get_handle(),
 	    "deleting-conversation", otrg_plugin_handle,
 	    PURPLE_CALLBACK(conversation_destroyed), NULL);
-        
+
     purple_signal_connect(pidgin_conversations_get_handle(),
-        "conversation-timestamp", otrg_plugin_handle,
-        PURPLE_CALLBACK(conversation_timestamp), NULL);
+	    "conversation-timestamp", otrg_plugin_handle,
+	    PURPLE_CALLBACK(conversation_timestamp), NULL);
+
+    purple_signal_connect(purple_conversations_get_handle(),
+	    "received-im-msg", otrg_plugin_handle,
+	    PURPLE_CALLBACK(check_incoming_instance_change), NULL);
 
     purple_signal_connect(purple_get_core(),
-	"quitting", otrg_plugin_handle, PURPLE_CALLBACK(dialog_quitting),
-	NULL);
+	    "quitting", otrg_plugin_handle,
+	    PURPLE_CALLBACK(dialog_quitting), NULL);
 }
 
 /* Deinitialize the OTR dialog subsystem */
@@ -2608,13 +3264,17 @@ static void otrg_gtk_dialog_cleanup(void)
 	    PURPLE_CALLBACK(conversation_switched));
 
     purple_signal_disconnect(pidgin_conversations_get_handle(),
-        "conversation-timestamp", otrg_plugin_handle,
-        PURPLE_CALLBACK(conversation_timestamp));
+	    "conversation-timestamp", otrg_plugin_handle,
+	    PURPLE_CALLBACK(conversation_timestamp));
 
     purple_signal_disconnect(purple_conversations_get_handle(),
 	    "deleting-conversation", otrg_plugin_handle,
 	    PURPLE_CALLBACK(conversation_destroyed));
 
+    purple_signal_disconnect(purple_conversations_get_handle(),
+	    "received-im-msg", otrg_plugin_handle,
+	    PURPLE_CALLBACK(check_incoming_instance_change));
+
     /* If we're quitting, the imgstore will already have been destroyed
      * by purple, but we should have already called dialog_quitting(),
      * so the img_id_* should be -1, and all should be OK. */
@@ -2622,11 +3282,11 @@ static void otrg_gtk_dialog_cleanup(void)
     unref_img_by_id(&img_id_unverified);
     unref_img_by_id(&img_id_private);
     unref_img_by_id(&img_id_finished);
-    
+
     g_hash_table_foreach(otr_win_menus, foreach_free_lists, NULL);
 
     g_hash_table_destroy(otr_win_menus);
-    
+
     g_hash_table_destroy(otr_win_status);
 }
 
diff --git a/gtk-dialog.h b/gtk-dialog.h
index 50253fa..330a3e7 100644
--- a/gtk-dialog.h
+++ b/gtk-dialog.h
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
- *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+ *                           Chris Alexander, Willy Lew,
+ *                           Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef __OTRG_GTK_DIALOG_H__
diff --git a/gtk-ui.c b/gtk-ui.c
index 46b2990..80261e7 100644
--- a/gtk-ui.c
+++ b/gtk-ui.c
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
- *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+ *                           Chris Alexander, Willy Lew,
+ *                           Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 /* config.h */
@@ -88,41 +89,46 @@ static void account_menu_changed_cb(GtkWidget *item, PurpleAccount *account,
     const char *accountname;
     const char *protocol;
     GtkWidget *fprint = ui_layout.fprint_label;
-    char s[100];
+    char *s = NULL;
     char *fingerprint;
-    
+
     if (account) {
-	char fingerprint_buf[45];
+	char fingerprint_buf[OTRL_PRIVKEY_FPRINT_HUMAN_LEN];
 	accountname = purple_account_get_username(account);
 	protocol = purple_account_get_protocol_id(account);
 	fingerprint = otrl_privkey_fingerprint(otrg_plugin_userstate,
 		fingerprint_buf, accountname, protocol);
 
 	if (fingerprint) {
-	    sprintf(s, _("Fingerprint: %.80s"), fingerprint);
+	    s = g_strdup_printf(_("Fingerprint: %.80s"), fingerprint);
 	    if (ui_layout.generate_button)
 		gtk_widget_set_sensitive(ui_layout.generate_button, 0);
 	} else {
-	    sprintf(s, _("No key present"));
+	    s = g_strdup(_("No key present"));
 	    if (ui_layout.generate_button)
 		gtk_widget_set_sensitive(ui_layout.generate_button, 1);
 	}
     } else {
-	sprintf(s, _("No account available"));
+	s = g_strdup(_("No account available"));
 	if (ui_layout.generate_button)
 	    gtk_widget_set_sensitive(ui_layout.generate_button, 0);
     }
     if (fprint) {
-	gtk_label_set_text(GTK_LABEL(fprint), s);
+	gtk_label_set_text(GTK_LABEL(fprint), s ? s : "");
 	gtk_widget_show(fprint);
     }
+    if (s) {
+	g_free(s);
+    }
 }
 
 /* Call this function when the DSA key is updated; it will redraw the
  * UI, if visible. */
 static void otrg_gtk_ui_update_fingerprint(void)
 {
-    g_signal_emit_by_name(G_OBJECT(ui_layout.accountmenu), "changed");
+    if (ui_layout.accountmenu) {
+	g_signal_emit_by_name(G_OBJECT(ui_layout.accountmenu), "changed");
+    }
 }
 
 static void account_menu_added_removed_cb(PurpleAccount *account, void *data)
@@ -132,10 +138,18 @@ static void account_menu_added_removed_cb(PurpleAccount *account, void *data)
 
 static void clist_all_unselected(void)
 {
-    gtk_widget_set_sensitive(ui_layout.connect_button, 0);
-    gtk_widget_set_sensitive(ui_layout.disconnect_button, 0);
-    gtk_widget_set_sensitive(ui_layout.forget_button, 0);
-    gtk_widget_set_sensitive(ui_layout.verify_button, 0);
+    if (ui_layout.connect_button) {
+	gtk_widget_set_sensitive(ui_layout.connect_button, 0);
+    }
+    if (ui_layout.disconnect_button) {
+	gtk_widget_set_sensitive(ui_layout.disconnect_button, 0);
+    }
+    if (ui_layout.forget_button) {
+	gtk_widget_set_sensitive(ui_layout.forget_button, 0);
+    }
+    if (ui_layout.verify_button) {
+	gtk_widget_set_sensitive(ui_layout.verify_button, 0);
+    }
     ui_layout.selected_fprint = NULL;
 }
 
@@ -143,7 +157,7 @@ static void clist_all_unselected(void)
 static void otrg_gtk_ui_update_keylist(void)
 {
     gchar *titles[5];
-    char hash[45];
+    char hash[OTRL_PRIVKEY_FPRINT_HUMAN_LEN];
     ConnContext * context;
     Fingerprint * fingerprint;
     int selected_row = -1;
@@ -161,26 +175,54 @@ static void otrg_gtk_ui_update_keylist(void)
 	int i;
 	PurplePlugin *p;
 	char *proto_name;
+
+	if (context->m_context != context) continue;
+
 	fingerprint = context->fingerprint_root.next;
 	/* If there's no fingerprint, don't add it to the known
 	 * fingerprints list */
 	while(fingerprint) {
+	    ConnContext *context_iter;
+	    TrustLevel best_level = TRUST_NOT_PRIVATE;
+	    int used = 0;
+
 	    titles[0] = context->username;
-	    if (context->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
-		    context->active_fingerprint != fingerprint) {
-		titles[1] = _("Unused");
-	    } else {
+	    titles[1] = _("Unused");
+
+	    for (context_iter = context->m_context;
+		    context_iter && context_iter->m_context == context->m_context;
+		    context_iter = context_iter->next) {
+
+		TrustLevel this_level = TRUST_NOT_PRIVATE;
+
+		if (context_iter->active_fingerprint == fingerprint) {
+		    this_level = otrg_plugin_context_to_trust(context_iter);
+		    used = 1;
+
+		    if (this_level == TRUST_PRIVATE) {
+			best_level = TRUST_PRIVATE;
+		    } else if (this_level == TRUST_UNVERIFIED
+			    && best_level != TRUST_PRIVATE) {
+			best_level = TRUST_UNVERIFIED;
+		    } else if (this_level == TRUST_FINISHED
+			    && best_level == TRUST_NOT_PRIVATE) {
+			best_level = TRUST_FINISHED;
+		    }
+		}
+	    }
+
+	    if (used) {
 		titles[1] = (gchar *)
-		    _(trust_states[otrg_plugin_context_to_trust(context)]);
+		    _(trust_states[best_level]);
 	    }
 	    titles[2] = (fingerprint->trust && fingerprint->trust[0]) ?
-		_("Yes") : _("No");
+		    _("Yes") : _("No");
 	    otrl_privkey_hash_to_human(hash, fingerprint->fingerprint);
 	    titles[3] = hash;
 	    p = purple_find_prpl(context->protocol);
 	    proto_name = (p && p->info->name) ? p->info->name : _("Unknown");
 	    titles[4] = g_strdup_printf("%s (%s)", context->accountname,
-		proto_name);
+		    proto_name);
 	    i = gtk_clist_append(GTK_CLIST(keylist), titles);
 	    g_free(titles[4]);
 	    gtk_clist_set_row_data(GTK_CLIST(keylist), i, fingerprint);
@@ -207,9 +249,9 @@ static void generate(GtkWidget *widget, gpointer data)
 {
     PurpleAccount *account;
     account = pidgin_account_option_menu_get_selected(ui_layout.accountmenu);
-	
+
     if (account == NULL) return;
-	
+
     otrg_plugin_create_privkey(purple_account_get_username(account),
 	    purple_account_get_protocol_id(account));
 }
@@ -242,26 +284,34 @@ static void clist_selected(GtkWidget *widget, gint row, gint column,
     int verify_sensitive = 0;
     Fingerprint *f = gtk_clist_get_row_data(GTK_CLIST(ui_layout.keylist),
 	    row);
-    if (f && f->context->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
-	    f->context->active_fingerprint == f) {
-	disconnect_sensitive = 1;
-    }
-    if (f && f->context->msgstate == OTRL_MSGSTATE_FINISHED) {
-	disconnect_sensitive = 1;
-    }
-    if (f && (f->context->msgstate != OTRL_MSGSTATE_ENCRYPTED ||
-	    f->context->active_fingerprint != f)) {
-	forget_sensitive = 1;
-    }
-    if (f && f->context->msgstate == OTRL_MSGSTATE_PLAINTEXT) {
-	connect_sensitive = 1;
-    }
-    if (f && f->context->msgstate == OTRL_MSGSTATE_FINISHED) {
-	connect_sensitive = 1;
-    }
+    ConnContext *context_iter;
+
     if (f) {
 	verify_sensitive = 1;
+	forget_sensitive = 1;
+
+	if (f->context && f->context->m_context) {
+	    for (context_iter = f->context;
+		    context_iter && context_iter->m_context ==
+		    f->context->m_context;
+		    context_iter = context_iter->next) {
+
+		if (context_iter->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
+		    context_iter->active_fingerprint == f) {
+		    disconnect_sensitive = 1;
+		    forget_sensitive = 0;
+		}
+		else if (context_iter->msgstate == OTRL_MSGSTATE_FINISHED) {
+		    disconnect_sensitive = 1;
+		    connect_sensitive = 1;
+		}
+		else if (context_iter->msgstate == OTRL_MSGSTATE_PLAINTEXT) {
+		    connect_sensitive = 1;
+		}
+	    }
+	}
     }
+
     gtk_widget_set_sensitive(ui_layout.connect_button,
 	    connect_sensitive);
     gtk_widget_set_sensitive(ui_layout.disconnect_button,
@@ -277,25 +327,51 @@ static void clist_unselected(GtkWidget *widget, gint row, gint column,
     clist_all_unselected();
 }
 
+/* For a given fingerprint, find the master context that the fingerprint is
+ * pointing to, iterate through it and all its children.
+ * Of the contexts that are using this fingerprint, return a value that
+ * corresponds to the "best" trust level among these.
+ */
 static int fngsortval(Fingerprint *f)
 {
-    int is_active = (f->context->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
-	    f->context->active_fingerprint == f);
-    TrustLevel level = otrg_plugin_context_to_trust(f->context);
-
-    switch(level) {
-	case TRUST_PRIVATE:
-	    return is_active ? 0 : 100;
-	case TRUST_UNVERIFIED:
-	    return is_active ? 1 : 100;
-	case TRUST_FINISHED:
-	    return 2;
-	case TRUST_NOT_PRIVATE:
-	    return 3;
+    int result = 200;
+    ConnContext *context_iter;
+
+    for (context_iter = f->context->m_context;
+	context_iter && context_iter->m_context == f->context->m_context;
+	context_iter = context_iter->next) {
+
+	int is_active = 0;
+	TrustLevel level;
+
+	if  (context_iter->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
+	    context_iter->active_fingerprint == f) {
+	    is_active = 1;
+	}
+
+	level = otrg_plugin_context_to_trust(context_iter);
+
+	if (level == TRUST_PRIVATE) {
+	    if (is_active) {
+		result = 0;
+		break;
+	    } else {
+		result = result > 100 ? 100 : result;
+	    }
+	} else if (level == TRUST_UNVERIFIED) {
+	    if (is_active) {
+		result = 1;
+	    } else {
+		result = result > 100 ? 100 : result;
+	    }
+	} else if (level == TRUST_FINISHED) {
+	    result = result > 2 ? 2 : result;
+	} else if (level == TRUST_NOT_PRIVATE) {
+	    result = result > 3 ? 3 : result;
+	}
     }
 
-    /* Shouldn't get here, but anyway. */
-    return 200;
+    return result;
 }
 
 static gint statuscmp(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2)
@@ -344,20 +420,25 @@ static void disconnect_connection(GtkWidget *widget, gpointer data)
 {
     /* Forget whatever state we've got with this context */
     ConnContext *context;
+    ConnContext *context_iter;
 
     if (ui_layout.selected_fprint == NULL) return;
 
     context = ui_layout.selected_fprint->context;
     if (context == NULL) return;
-	
-    /* Don't do anything with fingerprints other than the active one
-     * if we're in the ENCRYPTED state */
-    if (context->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
-	    context->active_fingerprint != ui_layout.selected_fprint) {
-	return;
+
+    for (context_iter = context->m_context;
+	    context_iter && context_iter->m_context == context->m_context;
+	    context_iter = context_iter->next) {
+
+	/* Don't do anything with fingerprints other than the active one
+	 * if we're in the ENCRYPTED state */
+	if (context_iter->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
+	    context_iter->active_fingerprint == ui_layout.selected_fprint) {
+	    otrg_ui_disconnect_connection(context_iter);
+	}
     }
-	
-    otrg_ui_disconnect_connection(context);
+
 }
 
 static void forget_fingerprint(GtkWidget *widget, gpointer data)
@@ -382,7 +463,7 @@ static void otrsettings_clicked_cb(GtkButton *button,
 		GTK_TOGGLE_BUTTON(os->enablebox))) {
 	gtk_widget_set_sensitive(os->automaticbox, TRUE);
 	if (gtk_toggle_button_get_active(
-		    GTK_TOGGLE_BUTTON(os->automaticbox))) {
+		GTK_TOGGLE_BUTTON(os->automaticbox))) {
 	    gtk_widget_set_sensitive(os->onlyprivatebox, TRUE);
 	} else {
 	    gtk_widget_set_sensitive(os->onlyprivatebox, FALSE);
@@ -430,13 +511,13 @@ static void create_otrsettings_buttons(struct otrsettingsdata *os,
     gtk_box_pack_start(GTK_BOX(vbox), os->avoidloggingotrbox, FALSE, FALSE, 5);
 
     g_signal_connect(G_OBJECT(os->enablebox), "clicked",
-		     G_CALLBACK(otrsettings_clicked_cb), os);
+	    G_CALLBACK(otrsettings_clicked_cb), os);
     g_signal_connect(G_OBJECT(os->automaticbox), "clicked",
-		     G_CALLBACK(otrsettings_clicked_cb), os);
+	    G_CALLBACK(otrsettings_clicked_cb), os);
     g_signal_connect(G_OBJECT(os->onlyprivatebox), "clicked",
-		     G_CALLBACK(otrsettings_clicked_cb), os);
+	    G_CALLBACK(otrsettings_clicked_cb), os);
     g_signal_connect(G_OBJECT(os->avoidloggingotrbox), "clicked",
-		     G_CALLBACK(otrsettings_clicked_cb), os);
+	    G_CALLBACK(otrsettings_clicked_cb), os);
 }
 
 static void otroptions_clicked_cb(GtkButton *button,
@@ -450,17 +531,13 @@ static void otroptions_clicked_cb(GtkButton *button,
 static void create_otroptions_buttons(struct otroptionsdata *oo,
 	GtkWidget *vbox)
 {
-#ifdef OLD_OTR_BUTTON
-    oo->showotrbutton = gtk_check_button_new_with_label(_("Show OTR button"));
-#else
     oo->showotrbutton = gtk_check_button_new_with_label(
 	    _("Show OTR button in toolbar"));
-#endif
 
     gtk_box_pack_start(GTK_BOX(vbox), oo->showotrbutton, FALSE, FALSE, 0);
 
     g_signal_connect(G_OBJECT(oo->showotrbutton), "clicked",
-		     G_CALLBACK(otroptions_clicked_cb), oo);
+	    G_CALLBACK(otroptions_clicked_cb), oo);
 }
 
 /* Load the global OTR prefs */
@@ -477,8 +554,8 @@ static void otrg_gtk_ui_global_prefs_load(gboolean *enabledp,
 	*enabledp = TRUE;
 	*automaticp = TRUE;
 	*onlyprivatep = FALSE;
-	*avoidloggingotrp = FALSE;
-    }
+	*avoidloggingotrp = TRUE;
+  }
 }
 
 /* Save the global OTR prefs */
@@ -511,7 +588,7 @@ static void otrg_gtk_ui_buddy_prefs_load(PurpleBuddy *buddy,
 	*automaticp = purple_blist_node_get_bool(node, "OTR/automatic");
 	*onlyprivatep = purple_blist_node_get_bool(node, "OTR/onlyprivate");
 	*avoidloggingotrp =
-	    purple_blist_node_get_bool(node, "OTR/avoidloggingotr");
+		purple_blist_node_get_bool(node, "OTR/avoidloggingotr");
     }
 }
 
@@ -557,11 +634,7 @@ static void otrg_gtk_ui_global_options_load(gboolean *showotrbuttonp)
     if (purple_prefs_exists("/OTR/showotrbutton")) {
 	*showotrbuttonp = purple_prefs_get_bool("/OTR/showotrbutton");
     } else {
-#ifdef OLD_OTR_BUTTON
-	*showotrbuttonp = FALSE;
-#else
 	*showotrbuttonp = TRUE;
-#endif
     }
 }
 
@@ -685,13 +758,13 @@ static void make_settings_ui(GtkWidget *vbox)
     load_otrsettings(&(ui_layout.os));
 
     g_signal_connect(G_OBJECT(ui_layout.os.enablebox), "clicked",
-		     G_CALLBACK(otrsettings_save_cb), &(ui_layout.os));
+	    G_CALLBACK(otrsettings_save_cb), &(ui_layout.os));
     g_signal_connect(G_OBJECT(ui_layout.os.automaticbox), "clicked",
-		     G_CALLBACK(otrsettings_save_cb), &(ui_layout.os));
+	    G_CALLBACK(otrsettings_save_cb), &(ui_layout.os));
     g_signal_connect(G_OBJECT(ui_layout.os.onlyprivatebox), "clicked",
-		     G_CALLBACK(otrsettings_save_cb), &(ui_layout.os));
+	    G_CALLBACK(otrsettings_save_cb), &(ui_layout.os));
     g_signal_connect(G_OBJECT(ui_layout.os.avoidloggingotrbox), "clicked",
-		     G_CALLBACK(otrsettings_save_cb), &(ui_layout.os));
+	    G_CALLBACK(otrsettings_save_cb), &(ui_layout.os));
 }
 
 /* Make the options UI, and pack it into the vbox */
@@ -712,7 +785,7 @@ static void make_options_ui(GtkWidget *vbox)
     load_otroptions(&(ui_layout.oo));
 
     g_signal_connect(G_OBJECT(ui_layout.oo.showotrbutton), "clicked",
-		     G_CALLBACK(otroptions_save_cb), &(ui_layout.oo));
+	     G_CALLBACK(otroptions_save_cb), &(ui_layout.oo));
 }
 
 /* Create the fingerprint UI, and pack it into the vbox */
@@ -730,8 +803,8 @@ static void make_fingerprints_ui(GtkWidget *vbox)
     titles[4] = _("Account");
 
     ui_layout.scrollwin = gtk_scrolled_window_new(0, 0);
-    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(ui_layout.scrollwin), 
-            GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS);
+    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(ui_layout.scrollwin),
+	    GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS);
 
     ui_layout.keylist = gtk_clist_new_with_titles(5, titles);
     gtk_clist_set_column_width(GTK_CLIST(ui_layout.keylist), 0, 90);
@@ -905,19 +978,19 @@ static void config_buddy_destroy_cb(GtkWidget *w, struct cbdata *data)
 static void config_buddy_clicked_cb(GtkButton *button, struct cbdata *data)
 {
     gboolean enabled = gtk_toggle_button_get_active(
-			     GTK_TOGGLE_BUTTON(data->os.enablebox));
-    
+	    GTK_TOGGLE_BUTTON(data->os.enablebox));
+
     /* Apply the changes */
     otrg_gtk_ui_buddy_prefs_save(data->buddy,
-	 gtk_toggle_button_get_active(
-	     GTK_TOGGLE_BUTTON(data->defaultbox)),
-	 enabled,
-	 gtk_toggle_button_get_active(
-	     GTK_TOGGLE_BUTTON(data->os.automaticbox)),
-	 gtk_toggle_button_get_active(
-	     GTK_TOGGLE_BUTTON(data->os.onlyprivatebox)),
-	 gtk_toggle_button_get_active(
-	     GTK_TOGGLE_BUTTON(data->os.avoidloggingotrbox)));
+	    gtk_toggle_button_get_active(
+	    GTK_TOGGLE_BUTTON(data->defaultbox)),
+		enabled,
+	    gtk_toggle_button_get_active(
+		GTK_TOGGLE_BUTTON(data->os.automaticbox)),
+	    gtk_toggle_button_get_active(
+		GTK_TOGGLE_BUTTON(data->os.onlyprivatebox)),
+	    gtk_toggle_button_get_active(
+		GTK_TOGGLE_BUTTON(data->os.avoidloggingotrbox)));
 
     otrg_dialog_resensitize_all();
 }
@@ -939,9 +1012,9 @@ static void otrg_gtk_ui_config_buddy(PurpleBuddy *buddy)
     if (!data) return;
 
     dialog = gtk_dialog_new_with_buttons(_("OTR Settings"),
-					 NULL, 0,
-					 GTK_STOCK_OK, GTK_RESPONSE_OK,
-					 NULL);
+	    NULL, 0,
+	    GTK_STOCK_OK, GTK_RESPONSE_OK,
+	    NULL);
     gtk_window_set_accept_focus(GTK_WINDOW(dialog), FALSE);
     gtk_window_set_role(GTK_WINDOW(dialog), "otr_settings");
 
@@ -985,25 +1058,25 @@ static void otrg_gtk_ui_config_buddy(PurpleBuddy *buddy)
     create_otrsettings_buttons(&(data->os), GTK_DIALOG(dialog)->vbox);
 
     g_signal_connect(G_OBJECT(data->defaultbox), "clicked",
-		     G_CALLBACK(default_clicked_cb), data);
+	    G_CALLBACK(default_clicked_cb), data);
     g_signal_connect(G_OBJECT(data->defaultbox), "clicked",
-		     G_CALLBACK(config_buddy_clicked_cb), data);
+	    G_CALLBACK(config_buddy_clicked_cb), data);
     g_signal_connect(G_OBJECT(data->os.enablebox), "clicked",
-		     G_CALLBACK(config_buddy_clicked_cb), data);
+	    G_CALLBACK(config_buddy_clicked_cb), data);
     g_signal_connect(G_OBJECT(data->os.automaticbox), "clicked",
-		     G_CALLBACK(config_buddy_clicked_cb), data);
+	    G_CALLBACK(config_buddy_clicked_cb), data);
     g_signal_connect(G_OBJECT(data->os.onlyprivatebox), "clicked",
-		     G_CALLBACK(config_buddy_clicked_cb), data);
+	    G_CALLBACK(config_buddy_clicked_cb), data);
     g_signal_connect(G_OBJECT(data->os.avoidloggingotrbox), "clicked",
-		     G_CALLBACK(config_buddy_clicked_cb), data);
+	    G_CALLBACK(config_buddy_clicked_cb), data);
 
     /* Set the inital states of the buttons */
     load_buddyprefs(data);
 
     g_signal_connect(G_OBJECT(dialog), "destroy",
-		     G_CALLBACK(config_buddy_destroy_cb), data);
+	    G_CALLBACK(config_buddy_destroy_cb), data);
     g_signal_connect(G_OBJECT(dialog), "response",
-		     G_CALLBACK(config_buddy_response_cb), data);
+	    G_CALLBACK(config_buddy_response_cb), data);
 
     gtk_widget_show_all(dialog);
 }
@@ -1015,12 +1088,12 @@ static void otrg_gtk_ui_get_prefs(OtrgUiPrefs *prefsp, PurpleAccount *account,
     PurpleBuddy *buddy;
     gboolean otrenabled, otrautomatic, otronlyprivate, otravoidloggingotr;
     gboolean buddyusedefault, buddyenabled, buddyautomatic, buddyonlyprivate,
-	     buddyavoidloggingotr;
+	    buddyavoidloggingotr;
 
     prefsp->policy = OTRL_POLICY_DEFAULT;
     prefsp->avoid_logging_otr = FALSE;
     prefsp->show_otr_button = FALSE;
-    
+
     /* Get the default policy */
     otrg_gtk_ui_global_prefs_load(&otrenabled, &otrautomatic, &otronlyprivate,
 	    &otravoidloggingotr);
diff --git a/gtk-ui.h b/gtk-ui.h
index 4811211..165c3bf 100644
--- a/gtk-ui.h
+++ b/gtk-ui.h
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
- *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+ *                           Chris Alexander, Willy Lew,
+ *                           Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef __OTRG_GTK_UI_H__
diff --git a/otr-icons.h b/otr-icons.h
index 64a83cf..55be30b 100644
--- a/otr-icons.h
+++ b/otr-icons.h
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
- *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+ *                           Chris Alexander, Willy Lew,
+ *                           Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 /* The new OTR icons from <cyrus_xiii at yahoo.com>; the pixbuf inline
@@ -31,9 +32,9 @@
 #pragma align 4 (not_private_pixbuf)
 #endif
 #ifdef __GNUC__
-static const guint8 not_private_pixbuf[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 not_private_pixbuf[] __attribute__ ((__aligned__ (4))) =
 #else
-static const guint8 not_private_pixbuf[] = 
+static const guint8 not_private_pixbuf[] =
 #endif
 { ""
   /* Pixbuf magic (0x47646b50) */
@@ -152,9 +153,9 @@ static const char not_private_png[] =
 #pragma align 4 (unverified_pixbuf)
 #endif
 #ifdef __GNUC__
-static const guint8 unverified_pixbuf[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 unverified_pixbuf[] __attribute__ ((__aligned__ (4))) =
 #else
-static const guint8 unverified_pixbuf[] = 
+static const guint8 unverified_pixbuf[] =
 #endif
 { ""
   /* Pixbuf magic (0x47646b50) */
@@ -269,9 +270,9 @@ static const char unverified_png[] =
 #pragma align 4 (private_pixbuf)
 #endif
 #ifdef __GNUC__
-static const guint8 private_pixbuf[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 private_pixbuf[] __attribute__ ((__aligned__ (4))) =
 #else
-static const guint8 private_pixbuf[] = 
+static const guint8 private_pixbuf[] =
 #endif
 { ""
   /* Pixbuf magic (0x47646b50) */
@@ -386,9 +387,9 @@ static const char private_png[] =
 #pragma align 4 (finished_pixbuf)
 #endif
 #ifdef __GNUC__
-static const guint8 finished_pixbuf[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 finished_pixbuf[] __attribute__ ((__aligned__ (4))) =
 #else
-static const guint8 finished_pixbuf[] = 
+static const guint8 finished_pixbuf[] =
 #endif
 { ""
   /* Pixbuf magic (0x47646b50) */
diff --git a/otr-plugin.c b/otr-plugin.c
index c82644b..bec8dd0 100644
--- a/otr-plugin.c
+++ b/otr-plugin.c
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
  *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *                           Chris Alexander, Willy Lew,
+ *                           Lisa Du, Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 /* config.h */
@@ -63,6 +64,7 @@
 #include <libotr/tlv.h>
 #include <libotr/message.h>
 #include <libotr/userstate.h>
+#include <libotr/instag.h>
 
 /* purple-otr headers */
 #include "ui.h"
@@ -74,6 +76,14 @@
 #include <glib.h>
 #include "gtk-ui.h"
 #include "gtk-dialog.h"
+
+/* Controls a beta warning/expiry dialog */
+#define BETA_DIALOG 0
+
+#if BETA_DIALOG && defined USING_GTK /* Only for beta */
+#include "gtkblist.h"
+#endif
+
 #endif
 
 /* If we're using glib on Windows, we need to use g_fopen to open files.
@@ -97,7 +107,8 @@ OtrlUserState otrg_plugin_userstate = NULL;
 
 /* GLib HashTable for storing the maximum message size for various
  * protocols. */
-GHashTable* mms_table;
+GHashTable* mms_table = NULL;
+
 
 /* Send an IM from the given account to the given recipient.  Display an
  * error dialog if that account isn't currently logged in. */
@@ -122,6 +133,54 @@ void otrg_plugin_inject_message(PurpleAccount *account, const char *recipient,
     serv_send_im(connection, recipient, message, 0);
 }
 
+/* Display a notification message for a particular accountname /
+ * protocol / username conversation. */
+static void notify(void *opdata, OtrlNotifyLevel level,
+	const char *accountname, const char *protocol, const char *username,
+	const char *title, const char *primary, const char *secondary)
+{
+    PurpleNotifyMsgType purplelevel = PURPLE_NOTIFY_MSG_ERROR;
+
+    switch (level) {
+	case OTRL_NOTIFY_ERROR:
+	    purplelevel = PURPLE_NOTIFY_MSG_ERROR;
+	    break;
+	case OTRL_NOTIFY_WARNING:
+	    purplelevel = PURPLE_NOTIFY_MSG_WARNING;
+	    break;
+	case OTRL_NOTIFY_INFO:
+	    purplelevel = PURPLE_NOTIFY_MSG_INFO;
+	    break;
+    }
+
+    otrg_dialog_notify_message(purplelevel, accountname, protocol,
+	    username, title, primary, secondary);
+}
+
+/* Display an OTR control message for a particular accountname /
+ * protocol / username conversation.  If force_create is non-zero and
+ * if the corresponding conversation window is not present, a new
+ * conversation window will be created and the message will be displayed
+ * there. If the message cannot be displayed, try notify() instead and
+ * return 1. Otherwise return 0 if message is successfully displayed. */
+static int display_otr_message_or_notify(void *opdata, const char *accountname,
+	const char *protocol, const char *username, const char *msg,
+	int force_create, OtrlNotifyLevel level, const char *title,
+	const char *primary, const char *secondary)
+{
+    if (otrg_dialog_display_otr_message(accountname, protocol,
+	    username, msg, force_create)) {
+	notify(opdata, level, accountname, protocol, username, title, primary,
+		secondary);
+	return 1;
+    } else return 0;
+}
+
+static void log_message(void *opdata, const char *message)
+{
+    purple_debug_info("otr", "%s", message);
+}
+
 static OtrlPolicy policy_cb(void *opdata, ConnContext *context)
 {
     PurpleAccount *account;
@@ -137,19 +196,6 @@ static OtrlPolicy policy_cb(void *opdata, ConnContext *context)
     return prefs.policy;
 }
 
-static const char *protocol_name_cb(void *opdata, const char *protocol)
-{
-    PurplePlugin *p = purple_find_prpl(protocol);
-    if (!p) return NULL;
-    return p->info->name;
-}
-
-static void protocol_name_free_cb(void *opdata, const char *protocol_name)
-{
-    /* Do nothing, since we didn't actually allocate any memory in
-     * protocol_name_cb. */
-}
-
 /* Generate a private key for the given accountname/protocol */
 void otrg_plugin_create_privkey(const char *accountname,
 	const char *protocol)
@@ -160,7 +206,8 @@ void otrg_plugin_create_privkey(const char *accountname,
 #endif  /* WIN32 */
     FILE *privf;
 
-    gchar *privkeyfile = g_build_filename(purple_user_dir(), PRIVKEYFNAME, NULL);
+    gchar *privkeyfile = g_build_filename(purple_user_dir(),
+	    PRIVKEYFNAME, NULL);
     if (!privkeyfile) {
 	fprintf(stderr, _("Out of memory building filenames!\n"));
 	return;
@@ -196,6 +243,37 @@ static void create_privkey_cb(void *opdata, const char *accountname,
     otrg_plugin_create_privkey(accountname, protocol);
 }
 
+/* Generate a instance tag for the given accountname/protocol */
+void otrg_plugin_create_instag(const char *accountname,
+	const char *protocol)
+{
+    FILE *instagf;
+
+    gchar *instagfile = g_build_filename(purple_user_dir(), INSTAGFNAME, NULL);
+    if (!instagfile) {
+	fprintf(stderr, _("Out of memory building filenames!\n"));
+	return;
+    }
+    instagf = g_fopen(instagfile, "w+b");
+    g_free(instagfile);
+    if (!instagf) {
+	fprintf(stderr, _("Could not write private key file\n"));
+	return;
+    }
+
+    /* Generate the instag */
+    otrl_instag_generate_FILEp(otrg_plugin_userstate, instagf,
+	    accountname, protocol);
+    fclose(instagf);
+
+}
+
+static void create_instag_cb(void *opdata, const char *accountname,
+	const char *protocol)
+{
+    otrg_plugin_create_instag(accountname, protocol);
+}
+
 static int is_logged_in_cb(void *opdata, const char *accountname,
 	const char *protocol, const char *recipient)
 {
@@ -228,35 +306,6 @@ static void inject_message_cb(void *opdata, const char *accountname,
     otrg_plugin_inject_message(account, recipient, message);
 }
 
-static void notify_cb(void *opdata, OtrlNotifyLevel level,
-	const char *accountname, const char *protocol, const char *username,
-	const char *title, const char *primary, const char *secondary)
-{
-    PurpleNotifyMsgType purplelevel = PURPLE_NOTIFY_MSG_ERROR;
-
-    switch (level) {
-	case OTRL_NOTIFY_ERROR:
-	    purplelevel = PURPLE_NOTIFY_MSG_ERROR;
-	    break;
-	case OTRL_NOTIFY_WARNING:
-	    purplelevel = PURPLE_NOTIFY_MSG_WARNING;
-	    break;
-	case OTRL_NOTIFY_INFO:
-	    purplelevel = PURPLE_NOTIFY_MSG_INFO;
-	    break;
-    }
-
-    otrg_dialog_notify_message(purplelevel, accountname, protocol,
-	    username, title, primary, secondary);
-}
-
-static int display_otr_message_cb(void *opdata, const char *accountname,
-	const char *protocol, const char *username, const char *msg)
-{
-    return otrg_dialog_display_otr_message(accountname, protocol,
-	    username, msg);
-}
-
 static void update_context_list_cb(void *opdata)
 {
     otrg_ui_update_keylist();
@@ -294,18 +343,312 @@ static void still_secure_cb(void *opdata, ConnContext *context, int is_reply)
     }
 }
 
-static void log_message_cb(void *opdata, const char *message)
-{
-    purple_debug_info("otr", "%s", message);
-}
-
 static int max_message_size_cb(void *opdata, ConnContext *context)
 {
     void* lookup_result = g_hash_table_lookup(mms_table, context->protocol);
     if (!lookup_result)
-        return 0;
+	return 0;
     else
-        return *((int*)lookup_result);
+	return *((int*)lookup_result);
+}
+
+static const char* otr_error_message_cb(void *opdata, ConnContext *context,
+	OtrlErrorCode err_code)
+{
+    char *err_msg = NULL;
+    switch (err_code)
+    {
+    case OTRL_ERRCODE_NONE :
+	break;
+    case OTRL_ERRCODE_ENCRYPTION_ERROR :
+	err_msg = g_strdup(_("Error occurred encrypting message."));
+	break;
+    case OTRL_ERRCODE_MSG_NOT_IN_PRIVATE :
+	if (context) {
+	    err_msg = g_strdup_printf(_("You sent encrypted data to %s, who"
+		    " wasn't expecting it."), context->accountname);
+	}
+	break;
+    case OTRL_ERRCODE_MSG_UNREADABLE :
+	err_msg =
+		g_strdup(_("You transmitted an unreadable encrypted message."));
+	break;
+    case OTRL_ERRCODE_MSG_MALFORMED :
+	err_msg = g_strdup(_("You transmitted a malformed data message."));
+	break;
+    }
+    return err_msg;
+}
+
+static void otr_error_message_free_cb(void *opdata, const char *err_msg)
+{
+    if (err_msg) g_free((char*)err_msg);
+}
+
+static const char *resent_msg_prefix_cb(void *opdata, ConnContext *context)
+{
+	return g_strdup(_("[resent]"));
+}
+
+static void resent_msg_prefix_free_cb(void *opdata, const char *prefix)
+{
+	if (prefix) g_free((char*)prefix);
+}
+
+static void handle_smp_event_cb(void *opdata, OtrlSMPEvent smp_event,
+	ConnContext *context, unsigned short progress_percent,
+	char *question)
+{
+    if (!context) return;
+    switch (smp_event)
+    {
+	case OTRL_SMPEVENT_NONE :
+	    break;
+	case OTRL_SMPEVENT_ASK_FOR_SECRET :
+	    otrg_dialog_socialist_millionaires(context);
+	    break;
+	case OTRL_SMPEVENT_ASK_FOR_ANSWER :
+	    otrg_dialog_socialist_millionaires_q(context, question);
+	    break;
+	case OTRL_SMPEVENT_CHEATED :
+	    otrg_plugin_abort_smp(context);
+	    /* FALLTHROUGH */
+	case OTRL_SMPEVENT_IN_PROGRESS :
+	case OTRL_SMPEVENT_SUCCESS :
+	case OTRL_SMPEVENT_FAILURE :
+	case OTRL_SMPEVENT_ABORT :
+	    otrg_dialog_update_smp(context,
+		    smp_event, ((gdouble)progress_percent)/100.0);
+	    break;
+	case OTRL_SMPEVENT_ERROR :
+	    otrg_plugin_abort_smp(context);
+	    break;
+    }
+}
+
+/* Treat this event like other incoming messages. This allows message
+ * notification events to get properly triggered. */
+static void emit_msg_received(ConnContext *context, const char* message) {
+    PurpleConversation *conv = otrg_plugin_userinfo_to_conv(
+	    context->accountname, context->protocol, context->username, 1);
+    PurpleMessageFlags flags = PURPLE_MESSAGE_RECV | PURPLE_MESSAGE_SYSTEM
+	    | PURPLE_MESSAGE_NOTIFY;
+    PurpleAccount * account = purple_conversation_get_account(conv);
+
+    purple_signal_emit(purple_conversations_get_handle(), "received-im-msg",
+	    account, context->username, message, conv, flags);
+}
+
+static void handle_msg_event_cb(void *opdata, OtrlMessageEvent msg_event,
+	ConnContext *context, const char* message, gcry_error_t err)
+{
+    PurpleConversation *conv = NULL;
+    gchar *buf;
+    OtrlMessageEvent * last_msg_event;
+
+    if (!context) return;
+
+    conv = otrg_plugin_context_to_conv(context, 1);
+    last_msg_event = g_hash_table_lookup(conv->data, "otr-last_msg_event");
+
+    switch (msg_event)
+    {
+	case OTRL_MSGEVENT_NONE:
+	    break;
+	case OTRL_MSGEVENT_ENCRYPTION_REQUIRED:
+	    buf = g_strdup_printf(_("You attempted to send an "
+		    "unencrypted message to %s"), context->username);
+	    display_otr_message_or_notify(opdata, context->accountname,
+		    context->protocol, context->username, _("Attempting to"
+		    " start a private conversation..."), 1, OTRL_NOTIFY_WARNING,
+		    _("OTR Policy Violation"), buf,
+		    _("Unencrypted messages to this recipient are "
+		    "not allowed.  Attempting to start a private "
+		    "conversation.\n\nYour message will be "
+		    "retransmitted when the private conversation "
+		    "starts."));
+	    g_free(buf);
+	    break;
+	case OTRL_MSGEVENT_ENCRYPTION_ERROR:
+	    display_otr_message_or_notify(opdata, context->accountname,
+		    context->protocol, context->username, _("An error occurred "
+		    "when encrypting your message.  The message was not sent."),
+		    1, OTRL_NOTIFY_ERROR, _("Error encrypting message"),
+		    _("An error occurred when encrypting your message"),
+		    _("The message was not sent."));
+	    break;
+	case OTRL_MSGEVENT_CONNECTION_ENDED:
+	    buf = g_strdup_printf(_("%s has already closed his/her private "
+			"connection to you"), context->username);
+	    display_otr_message_or_notify(opdata, context->accountname,
+		    context->protocol, context->username, _("Your message "
+		    "was not sent.  Either end your private conversation, "
+		    "or restart it."), 1, OTRL_NOTIFY_ERROR,
+		    _("Private connection closed"), buf,
+		    _("Your message was not sent.  Either close your "
+		    "private connection to him, or refresh it."));
+	    g_free(buf);
+	    break;
+	case OTRL_MSGEVENT_SETUP_ERROR:
+	    if (!err) {
+		err = GPG_ERR_INV_VALUE;
+	    }
+	    switch(gcry_err_code(err)) {
+		case GPG_ERR_INV_VALUE:
+		    buf = g_strdup(_("Error setting up private "
+			    "conversation: Malformed message received"));
+		    break;
+		default:
+		    buf = g_strdup_printf(_("Error setting up private "
+			    "conversation: %s"), gcry_strerror(err));
+		    break;
+	    }
+
+	    display_otr_message_or_notify(opdata, context->accountname,
+		    context->protocol, context->username, buf, 1,
+		    OTRL_NOTIFY_ERROR, _("OTR Error"), buf, NULL);
+	    g_free(buf);
+	    break;
+	case OTRL_MSGEVENT_MSG_REFLECTED:
+	    display_otr_message_or_notify(opdata,
+		    context->accountname, context->protocol,
+		    context->username,
+		    _("We are receiving our own OTR messages.  "
+		    "You are either trying to talk to yourself, "
+		    "or someone is reflecting your messages back "
+		    "at you."), 1, OTRL_NOTIFY_ERROR,
+		    _("OTR Error"), _("We are receiving our own OTR messages."),
+		    _("You are either trying to talk to yourself, "
+		    "or someone is reflecting your messages back "
+		    "at you."));
+	    break;
+	case OTRL_MSGEVENT_MSG_RESENT:
+	    buf = g_strdup_printf(_("<b>The last message to %s was resent."
+		    "</b>"), context->username);
+	    display_otr_message_or_notify(opdata, context->accountname,
+		    context->protocol, context->username, buf, 1,
+		    OTRL_NOTIFY_INFO, _("Message resent"), buf, NULL);
+	    g_free(buf);
+	    break;
+	case OTRL_MSGEVENT_RCVDMSG_NOT_IN_PRIVATE:
+	    buf = g_strdup_printf(_("<b>The encrypted message received from "
+		    "%s is unreadable, as you are not currently communicating "
+		    "privately.</b>"), context->username);
+	    display_otr_message_or_notify(opdata, context->accountname,
+		    context->protocol, context->username, buf, 1,
+		    OTRL_NOTIFY_INFO, _("Unreadable message"), buf, NULL);
+	    g_free(buf);
+	    break;
+	case OTRL_MSGEVENT_RCVDMSG_UNREADABLE:
+	    buf = g_strdup_printf(_("We received an unreadable "
+		    "encrypted message from %s."), context->username);
+	    display_otr_message_or_notify(opdata, context->accountname,
+		    context->protocol, context->username, buf, 1,
+		    OTRL_NOTIFY_ERROR, _("OTR Error"), buf, NULL);
+	    g_free(buf);
+	    break;
+	case OTRL_MSGEVENT_RCVDMSG_MALFORMED:
+	    buf = g_strdup_printf(_("We received a malformed data "
+		    "message from %s."), context->username);
+	    display_otr_message_or_notify(opdata, context->accountname,
+		    context->protocol, context->username, buf, 1,
+		    OTRL_NOTIFY_ERROR, _("OTR Error"), buf, NULL);
+	    g_free(buf);
+	    break;
+	case OTRL_MSGEVENT_LOG_HEARTBEAT_RCVD:
+	    buf = g_strdup_printf(_("Heartbeat received from %s.\n"),
+		    context->username);
+	    log_message(opdata, buf);
+	    g_free(buf);
+	    break;
+	case OTRL_MSGEVENT_LOG_HEARTBEAT_SENT:
+	    buf = g_strdup_printf(_("Heartbeat sent to %s.\n"),
+		    context->username);
+	    log_message(opdata, buf);
+	    g_free(buf);
+	    break;
+	case OTRL_MSGEVENT_RCVDMSG_GENERAL_ERR:
+	    display_otr_message_or_notify(opdata, context->accountname,
+		    context->protocol, context->username, message, 1,
+		    OTRL_NOTIFY_ERROR, _("OTR Error"), message, NULL);
+	    break;
+	case OTRL_MSGEVENT_RCVDMSG_UNENCRYPTED:
+	    buf = g_strdup_printf(_("<b>The following message received "
+		    "from %s was <i>not</i> encrypted: [</b>%s<b>]</b>"),
+		    context->username, message);
+	    display_otr_message_or_notify(opdata, context->accountname,
+		    context->protocol, context->username, buf, 1,
+		    OTRL_NOTIFY_INFO, _("Received unencrypted message"),
+		    buf, NULL);
+	    emit_msg_received(context, buf);
+	    g_free(buf);
+	    break;
+	case OTRL_MSGEVENT_RCVDMSG_UNRECOGNIZED:
+	    buf = g_strdup_printf(_("Unrecognized OTR message received "
+		    "from %s.\n"), context->username);
+	    log_message(opdata, buf);
+	    g_free(buf);
+	    break;
+	case OTRL_MSGEVENT_RCVDMSG_FOR_OTHER_INSTANCE:
+	    if (*last_msg_event == msg_event) {
+		break;
+	    }
+	    buf = g_strdup_printf(_("%s has sent a message intended for a "
+		    "different session. If you are logged in multiple times, "
+		    "another session may have received the message."),
+		    context->username);
+	    display_otr_message_or_notify(opdata, context->accountname,
+		    context->protocol, context->username, buf, 1,
+		    OTRL_NOTIFY_INFO, _("Received message for a different "
+		    "session"), buf, NULL);
+	    g_free(buf);
+	    break;
+    }
+
+    *last_msg_event = msg_event;
+}
+
+#ifdef DUMP_RECEIVED_SYMKEY
+static void dump_data(const unsigned char *d, size_t l)
+{
+    size_t i;
+    for (i=0;i<l;++i) printf("%02x", d[i]);
+}
+
+static void received_symkey_cb(void *opdata, ConnContext *context,
+	unsigned int use, const unsigned  char *usedata,
+	size_t usedatalen, const unsigned char *symkey)
+{
+    printf("Received symkey use: %08x\nKey: ", use);
+    dump_data(symkey, OTRL_EXTRAKEY_BYTES);
+    printf("\nUsedata: ");
+    dump_data(usedata, usedatalen);
+    printf("\n\n");
+}
+#endif
+
+static guint otrg_plugin_timerid = 0;
+
+/* Called by the glib main loop, as set up by stop_start_timer */
+static gboolean timer_fired_cb(gpointer data);
+
+/* Stop the timer, if it's currently running.  If interval > 0, start it
+ * to periodically fire every interval seconds. */
+static void stop_start_timer(unsigned int interval) {
+    if (otrg_plugin_timerid) {
+	g_source_remove(otrg_plugin_timerid);
+	otrg_plugin_timerid = 0;
+    }
+    if (interval > 0) {
+	otrg_plugin_timerid = g_timeout_add_seconds(interval,
+		timer_fired_cb, NULL);
+    }
+}
+
+/* Called by libotr */
+static void timer_control_cb(void *opdata, unsigned int interval)
+{
+    stop_start_timer(interval);
 }
 
 static OtrlMessageAppOps ui_ops = {
@@ -313,22 +656,38 @@ static OtrlMessageAppOps ui_ops = {
     create_privkey_cb,
     is_logged_in_cb,
     inject_message_cb,
-    notify_cb,
-    display_otr_message_cb,
     update_context_list_cb,
-    protocol_name_cb,
-    protocol_name_free_cb,
     confirm_fingerprint_cb,
     write_fingerprints_cb,
     gone_secure_cb,
     gone_insecure_cb,
     still_secure_cb,
-    log_message_cb,
     max_message_size_cb,
     NULL,                   /* account_name */
-    NULL                    /* account_name_free */
+    NULL,                   /* account_name_free */
+#ifdef DUMP_RECEIVED_SYMKEY
+    received_symkey_cb,
+#else
+    NULL,		    /* received_symkey */
+#endif
+    otr_error_message_cb,
+    otr_error_message_free_cb,
+    resent_msg_prefix_cb,
+    resent_msg_prefix_free_cb,
+    handle_smp_event_cb,
+    handle_msg_event_cb,
+    create_instag_cb,
+    NULL,		    /* convert_data */
+    NULL,		    /* convert_data_free */
+    timer_control_cb
 };
 
+/* Called by the glib main loop, as set up by stop_start_timer */
+static gboolean timer_fired_cb(gpointer data) {
+    otrl_message_poll(otrg_plugin_userstate, &ui_ops, NULL);
+    return TRUE;
+}
+
 static void process_sending_im(PurpleAccount *account, char *who,
 	char **message, void *m)
 {
@@ -337,33 +696,32 @@ static void process_sending_im(PurpleAccount *account, char *who,
     const char *protocol = purple_account_get_protocol_id(account);
     char *username;
     gcry_error_t err;
+    PurpleConversation * conv = NULL;
+    otrl_instag_t instance;
 
     if (!who || !message || !*message)
 	return;
 
     username = strdup(purple_normalize(account, who));
 
+    conv = otrg_plugin_userinfo_to_conv(accountname, protocol, username, 1);
+
+    instance = otrg_plugin_conv_to_selected_instag(conv, OTRL_INSTAG_BEST);
+
     err = otrl_message_sending(otrg_plugin_userstate, &ui_ops, NULL,
-	    accountname, protocol, username, *message, NULL, &newmessage,
-	    NULL, NULL);
+	    accountname, protocol, username, instance, *message, NULL,
+	    &newmessage, OTRL_FRAGMENT_SEND_ALL_BUT_LAST, NULL, NULL, NULL);
 
-    if (err && newmessage == NULL) {
-	/* Be *sure* not to send out plaintext */
+    if (err) {
+	/* Do not send out plain text */
 	char *ourm = strdup("");
 	free(*message);
 	*message = ourm;
     } else if (newmessage) {
-	/* Fragment the message if necessary, and send all but the last
-	 * fragment over the network.  Pidgin will send the last
-	 * fragment for us. */
-	ConnContext *context = otrl_context_find(otrg_plugin_userstate,
-		username, accountname, protocol, 0, NULL, NULL, NULL);
-	free(*message);
-	*message = NULL;
-	err = otrl_message_fragment_and_send(&ui_ops, NULL, context,
-		newmessage, OTRL_FRAGMENT_SEND_ALL_BUT_LAST, message);
-	otrl_message_free(newmessage);
+	*message = strdup(newmessage);
     }
+
+    otrl_message_free(newmessage);
     free(username);
 }
 
@@ -407,7 +765,7 @@ void otrg_plugin_send_default_query(ConnContext *context, void *vaccount)
     msg = otrl_proto_default_query_msg(context->accountname,
 	    prefs.policy);
     otrg_plugin_inject_message(account, context->username,
-	    msg ? msg : "?OTRv2?");
+	    msg ? msg : "?OTRv23?");
     free(msg);
 }
 
@@ -419,19 +777,19 @@ void otrg_plugin_send_default_query_conv(PurpleConversation *conv)
     const char *username, *accountname;
     char *msg;
     OtrgUiPrefs prefs;
-    
+
     account = purple_conversation_get_account(conv);
     accountname = purple_account_get_username(account);
     username = purple_conversation_get_name(conv);
-    
+
     otrg_ui_get_prefs(&prefs, account, username);
     msg = otrl_proto_default_query_msg(accountname, prefs.policy);
-    otrg_plugin_inject_message(account, username, msg ? msg : "?OTRv2?");
+    otrg_plugin_inject_message(account, username, msg ? msg : "?OTRv23?");
     free(msg);
 }
 
-static gboolean process_receiving_im(PurpleAccount *account, char **who, 
-        char **message, int *flags, void *m)
+static gboolean process_receiving_im(PurpleAccount *account, char **who,
+	char **message, int *flags, void *m)
 {
     char *newmessage = NULL;
     OtrlTLV *tlvs = NULL;
@@ -440,11 +798,9 @@ static gboolean process_receiving_im(PurpleAccount *account, char **who,
     gboolean res;
     const char *accountname;
     const char *protocol;
-    ConnContext *context;
-    NextExpectedSMP nextMsg;
 
     if (!who || !*who || !message || !*message)
-        return 0;
+	return 0;
 
     username = strdup(purple_normalize(account, *who));
     accountname = purple_account_get_username(account);
@@ -452,13 +808,10 @@ static gboolean process_receiving_im(PurpleAccount *account, char **who,
 
     res = otrl_message_receiving(otrg_plugin_userstate, &ui_ops, NULL,
 	    accountname, protocol, username, *message,
-	    &newmessage, &tlvs, NULL, NULL);
+	    &newmessage, &tlvs, NULL, NULL, NULL);
 
     if (newmessage) {
-	char *ourm = malloc(strlen(newmessage) + 1);
-	if (ourm) {
-	    strcpy(ourm, newmessage);
-	}
+	char *ourm = strdup(newmessage);
 	otrl_message_free(newmessage);
 	free(*message);
 	*message = ourm;
@@ -471,75 +824,6 @@ static gboolean process_receiving_im(PurpleAccount *account, char **who,
 	otrg_ui_update_keylist();
     }
 
-    /* Keep track of our current progress in the Socialist Millionaires'
-     * Protocol. */
-    context = otrl_context_find(otrg_plugin_userstate, username,
-	    accountname, protocol, 0, NULL, NULL, NULL);
-    if (context) {
-	nextMsg = context->smstate->nextExpected;
-
-	if (context->smstate->sm_prog_state == OTRL_SMP_PROG_CHEATED) {
-	    otrg_plugin_abort_smp(context);
-	    otrg_dialog_update_smp(context, 0.0);
-	    context->smstate->nextExpected = OTRL_SMP_EXPECT1;
-	    context->smstate->sm_prog_state = OTRL_SMP_PROG_OK;
-	} else {
-	    tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP1Q);
-	    if (tlv) {
-		if (nextMsg != OTRL_SMP_EXPECT1)
-		    otrg_plugin_abort_smp(context);
-		else {
-		    char *question = (char *)tlv->data;
-		    char *eoq = memchr(question, '\0', tlv->len);
-		    if (eoq) {
-			otrg_dialog_socialist_millionaires_q(context,
-				question);
-		    }
-		}
-	    }
-	    tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP1);
-	    if (tlv) {
-		if (nextMsg != OTRL_SMP_EXPECT1)
-		    otrg_plugin_abort_smp(context);
-		else {
-		    otrg_dialog_socialist_millionaires(context);
-		}
-	    }
-	    tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP2);
-	    if (tlv) {
-		if (nextMsg != OTRL_SMP_EXPECT2)
-		    otrg_plugin_abort_smp(context);
-		else {
-		    otrg_dialog_update_smp(context, 0.6);
-		    context->smstate->nextExpected = OTRL_SMP_EXPECT4;
-		}
-	    }
-	    tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP3);
-	    if (tlv) {
-		if (nextMsg != OTRL_SMP_EXPECT3)
-		    otrg_plugin_abort_smp(context);
-		else {
-		    otrg_dialog_update_smp(context, 1.0);
-		    context->smstate->nextExpected = OTRL_SMP_EXPECT1;
-		}
-	    }
-	    tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP4);
-	    if (tlv) {
-		if (nextMsg != OTRL_SMP_EXPECT4)
-		    otrg_plugin_abort_smp(context);
-		else {
-		    otrg_dialog_update_smp(context, 1.0);
-		    context->smstate->nextExpected = OTRL_SMP_EXPECT1;
-		}
-	    }
-	    tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP_ABORT);
-	    if (tlv) {
-		otrg_dialog_update_smp(context, 0.0);
-		context->smstate->nextExpected = OTRL_SMP_EXPECT1;
-	    }
-	}
-    }
-
     otrl_tlv_free(tlvs);
 
     free(username);
@@ -555,9 +839,88 @@ static gboolean process_receiving_im(PurpleAccount *account, char **who,
     return res;
 }
 
-static void process_conv_create(PurpleConversation *conv, void *data)
+/* Find the ConnContext appropriate to a given PurpleConversation. */
+ConnContext *otrg_plugin_conv_to_context(PurpleConversation *conv,
+	otrl_instag_t their_instance, int force_create)
+{
+    PurpleAccount *account;
+    char *username;
+    const char *accountname, *proto;
+    ConnContext *context;
+
+    if (!conv) return NULL;
+
+    account = purple_conversation_get_account(conv);
+    accountname = purple_account_get_username(account);
+    proto = purple_account_get_protocol_id(account);
+    username = g_strdup(
+	    purple_normalize(account, purple_conversation_get_name(conv)));
+
+    context = otrl_context_find(otrg_plugin_userstate, username, accountname,
+	    proto, their_instance, force_create, NULL, NULL, NULL);
+
+    g_free(username);
+
+    return context;
+}
+
+/* Given a PurpleConversation, return the selected instag */
+otrl_instag_t otrg_plugin_conv_to_selected_instag(PurpleConversation *conv,
+	otrl_instag_t default_val)
+{
+    otrl_instag_t *selected_instance;
+
+    if (!conv || !conv->data) {
+	return default_val;
+    }
+
+    selected_instance = purple_conversation_get_data(conv,
+	    "otr-ui_selected_ctx");
+
+    if (!selected_instance) {
+	return default_val;
+    }
+
+    return *selected_instance;
+}
+
+/* Given a PurpleConversation, return the selected ConnContext */
+ConnContext* otrg_plugin_conv_to_selected_context(PurpleConversation *conv,
+	int force_create)
+{
+    otrl_instag_t selected_instance;
+
+    selected_instance = otrg_plugin_conv_to_selected_instag(conv,
+	    OTRL_INSTAG_BEST);
+
+    return otrg_plugin_conv_to_context(conv, selected_instance, force_create);
+}
+
+static void process_conv_create(PurpleConversation *conv)
 {
-    if (conv) otrg_dialog_new_conv(conv);
+    otrl_instag_t * selected_instance;
+    OtrlMessageEvent * msg_event;
+    if (!conv) return;
+
+    /* If this malloc fails (or the other below), trouble will be
+     * unavoidable. */
+    selected_instance = g_malloc(sizeof(otrl_instag_t));
+    *selected_instance = OTRL_INSTAG_BEST;
+    purple_conversation_set_data(conv, "otr-ui_selected_ctx",
+	    (gpointer)selected_instance);
+
+    msg_event = g_malloc(sizeof(OtrlMessageEvent));
+    *msg_event = OTRL_MSGEVENT_NONE;
+    purple_conversation_set_data(conv, "otr-last_msg_event",
+	    (gpointer)msg_event);
+
+    otrg_dialog_new_conv(conv);
+}
+
+/* Wrapper around process_conv_create for callback purposes */
+static void process_conv_create_cb(PurpleConversation *conv, void *data)
+{
+    process_conv_create(conv);
 }
 
 static void process_conv_updated(PurpleConversation *conv,
@@ -571,7 +934,7 @@ static void process_conv_updated(PurpleConversation *conv,
 	PurpleAccount *account = purple_conversation_get_account(conv);
 	otrg_ui_get_prefs(&prefs, account, purple_conversation_get_name(conv));
 
-	context = otrg_plugin_conv_to_context(conv);
+	context = otrg_plugin_conv_to_selected_context(conv, 0);
 	if (context && prefs.avoid_logging_otr &&
 		context->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
 		conv->logging == TRUE) {
@@ -580,6 +943,25 @@ static void process_conv_updated(PurpleConversation *conv,
     }
 }
 
+static void process_conv_destroyed(PurpleConversation *conv)
+{
+    otrl_instag_t * selected_instance =
+	    purple_conversation_get_data(conv, "otr-ui_selected_ctx");
+    OtrlMessageEvent * msg_event =
+	    purple_conversation_get_data(conv, "otr-last_msg_event");
+
+    if (selected_instance) {
+	g_free(selected_instance);
+    }
+
+    if (msg_event) {
+	g_free(msg_event);
+    }
+
+    g_hash_table_remove(conv->data, "otr-ui_selected_ctx");
+    g_hash_table_remove(conv->data, "otr-last_msg_event");
+}
+
 static void process_connection_change(PurpleConnection *conn, void *data)
 {
     /* If we log in or out of a connection, make sure all of the OTR
@@ -617,12 +999,21 @@ static void supply_extended_menu(PurpleBlistNode *node, GList **menu)
     *menu = g_list_append(*menu, act);
 }
 
+/* Disconnect all context instances, sending a notice to the other side, if
+ * appropriate. */
+void otrg_plugin_disconnect_all_instances(ConnContext *context)
+{
+    otrl_message_disconnect_all_instances(otrg_plugin_userstate, &ui_ops, NULL,
+	    context->accountname, context->protocol, context->username);
+}
+
 /* Disconnect a context, sending a notice to the other side, if
  * appropriate. */
 void otrg_plugin_disconnect(ConnContext *context)
 {
     otrl_message_disconnect(otrg_plugin_userstate, &ui_ops, NULL,
-	    context->accountname, context->protocol, context->username);
+	    context->accountname, context->protocol, context->username,
+	    context->their_instance);
 }
 
 /* Write the fingerprints to disk. */
@@ -646,27 +1037,6 @@ void otrg_plugin_write_fingerprints(void)
     fclose(storef);
 }
 
-/* Find the ConnContext appropriate to a given PurpleConversation. */
-ConnContext *otrg_plugin_conv_to_context(PurpleConversation *conv)
-{
-    PurpleAccount *account;
-    char *username;
-    const char *accountname, *proto;
-    ConnContext *context;
-
-    account = purple_conversation_get_account(conv);
-    accountname = purple_account_get_username(account);
-    proto = purple_account_get_protocol_id(account);
-    username = g_strdup(
-	    purple_normalize(account, purple_conversation_get_name(conv)));
-
-    context = otrl_context_find(otrg_plugin_userstate, username, accountname,
-	    proto, 0, NULL, NULL, NULL);
-    g_free(username);
-
-    return context;
-}
-
 /* Find the PurpleConversation appropriate to the given userinfo.  If
  * one doesn't yet exist, create it if force_create is true. */
 PurpleConversation *otrg_plugin_userinfo_to_conv(const char *accountname,
@@ -702,7 +1072,8 @@ TrustLevel otrg_plugin_context_to_trust(ConnContext *context)
     TrustLevel level = TRUST_NOT_PRIVATE;
 
     if (context && context->msgstate == OTRL_MSGSTATE_ENCRYPTED) {
-	if (context->active_fingerprint->trust &&
+	if (context->active_fingerprint &&
+		context->active_fingerprint->trust &&
 		context->active_fingerprint->trust[0] != '\0') {
 	    level = TRUST_PRIVATE;
 	} else {
@@ -755,11 +1126,11 @@ static void mms_read_FILEp(FILE *mmsf, GHashTable *ght)
 	mms = tab + 1;
 	tab = strchr(mms, '\t');
 	if (tab) continue;
-        eol = strchr(mms, '\r');
+	eol = strchr(mms, '\r');
 	if (!eol) eol = strchr(mms, '\n');
 	if (!eol) continue;
 	*eol = '\0';
-	
+
 	prot_in_table = strdup(protocol);
 	mms_in_table = malloc(sizeof(int));
 	*mms_in_table = atoi(mms);
@@ -783,10 +1154,10 @@ static void otrg_init_mms_table()
      * protocols.  These can be overridden in the user's MAXMSGSIZEFNAME
      * file. */
     static const struct s_OtrgIdProtPair {
-        char *protid;
+	char *protid;
 	int maxmsgsize;
     } mmsPairs[8] = {{"prpl-msn", 1409}, {"prpl-icq", 2346},
-	{"prpl-aim", 2343}, {"prpl-yahoo", 832}, {"prpl-gg", 1999},
+	{"prpl-aim", 2343}, {"prpl-yahoo", 799}, {"prpl-gg", 1999},
 	{"prpl-irc", 417}, {"prpl-oscar", 2343}, {NULL, 0}};
     int i = 0;
     gchar *maxmsgsizefile;
@@ -796,10 +1167,10 @@ static void otrg_init_mms_table()
 	    otrg_str_free, otrg_int_free);
 
     for (i=0; mmsPairs[i].protid != NULL; i++) {
-    	char* nextprot = g_strdup(mmsPairs[i].protid);
-    	int* nextsize = g_malloc(sizeof(int));
-    	*nextsize = mmsPairs[i].maxmsgsize;
-    	g_hash_table_insert(mms_table, nextprot, nextsize);
+	char* nextprot = g_strdup(mmsPairs[i].protid);
+	int* nextsize = g_malloc(sizeof(int));
+	*nextsize = mmsPairs[i].maxmsgsize;
+	g_hash_table_insert(mms_table, nextprot, nextsize);
     }
 
     maxmsgsizefile = g_build_filename(purple_user_dir(),
@@ -819,6 +1190,7 @@ static void otrg_init_mms_table()
 static void otrg_free_mms_table()
 {
     g_hash_table_destroy(mms_table);
+    mms_table = NULL;
 }
 
 static gboolean otr_plugin_load(PurplePlugin *handle)
@@ -826,23 +1198,87 @@ static gboolean otr_plugin_load(PurplePlugin *handle)
     gchar *privkeyfile = g_build_filename(purple_user_dir(), PRIVKEYFNAME,
 	    NULL);
     gchar *storefile = g_build_filename(purple_user_dir(), STOREFNAME, NULL);
+    gchar *instagfile = g_build_filename(purple_user_dir(), INSTAGFNAME, NULL);
     void *conv_handle = purple_conversations_get_handle();
     void *conn_handle = purple_connections_get_handle();
     void *blist_handle = purple_blist_get_handle();
     void *core_handle = purple_get_core();
     FILE *privf;
     FILE *storef;
+    FILE *instagf;
+#if BETA_DIALOG && defined USING_GTK /* Only for beta */
+    GtkWidget *dialog;
+    GtkWidget *dialog_text;
+    PidginBuddyList *blist;
+    gchar * buf = NULL;
+#endif
+
+    if (!privkeyfile || !storefile || !instagfile) {
+	g_free(privkeyfile);
+	g_free(storefile);
+	g_free(instagfile);
+	return 0;
+    }
 
-    if (!privkeyfile || !storefile) {
+#if BETA_DIALOG && defined USING_GTK /* Only for beta */
+    blist = pidgin_blist_get_default_gtk_blist();
+
+    if (time(NULL) > 1356998400) /* 2013-01-01 */ {
+	buf = g_strdup_printf(_("OTR PLUGIN v%s"), PIDGIN_OTR_VERSION);
+	dialog = gtk_dialog_new_with_buttons (buf,
+		GTK_WINDOW(blist->window),
+		GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+		GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
+	dialog_text = gtk_label_new(NULL);
+	gtk_widget_set_size_request(dialog_text, 350, 100);
+	gtk_label_set_line_wrap(GTK_LABEL(dialog_text), TRUE);
+	g_free(buf);
+	buf = g_strdup_printf(_("This beta copy of the "
+		"Off-the-Record Messaging v%s Pidgin plugin has expired as of "
+		"2013-01-01. Please look for an updated release at "
+		"http://otr.cypherpunks.ca/"), PIDGIN_OTR_VERSION);
+	gtk_label_set_text(GTK_LABEL(dialog_text), buf);
+	gtk_widget_show(dialog_text);
+	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), dialog_text,
+		TRUE, TRUE, 0);
+	gtk_dialog_run(GTK_DIALOG(dialog));
+	gtk_widget_destroy(dialog);
+
+	g_free(buf);
 	g_free(privkeyfile);
 	g_free(storefile);
+	g_free(instagfile);
 	return 0;
     }
 
+    buf = g_strdup_printf(_("OTR PLUGIN v%s"), PIDGIN_OTR_VERSION);
+    dialog = gtk_dialog_new_with_buttons (buf,
+	    GTK_WINDOW(blist->window),
+	    GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+	    GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
+    dialog_text = gtk_label_new(NULL);
+    gtk_widget_set_size_request(dialog_text, 350, 100);
+    gtk_label_set_line_wrap(GTK_LABEL(dialog_text), TRUE);
+    g_free(buf);
+    buf = g_strdup_printf(_("You have enabled a beta "
+	    "version of the Off-the-Record Messaging v%s Pidgin plugin. "
+	    "This version is intended for testing purposes only and is not "
+	    "for general purpose use."), PIDGIN_OTR_VERSION);
+    gtk_label_set_text(GTK_LABEL(dialog_text), buf);
+    gtk_widget_show(dialog_text);
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), dialog_text,
+	    TRUE, TRUE, 0);
+    gtk_dialog_run(GTK_DIALOG(dialog));
+    gtk_widget_destroy(dialog);
+    g_free(buf);
+#endif
+
     privf = g_fopen(privkeyfile, "rb");
     storef = g_fopen(storefile, "rb");
+    instagf = g_fopen(instagfile, "rb");
     g_free(privkeyfile);
     g_free(storefile);
+    g_free(instagfile);
 
     otrg_init_mms_table();
 
@@ -851,24 +1287,30 @@ static gboolean otr_plugin_load(PurplePlugin *handle)
     /* Make our OtrlUserState; we'll only use the one. */
     otrg_plugin_userstate = otrl_userstate_create();
 
+    otrg_plugin_timerid = 0;
+
     otrl_privkey_read_FILEp(otrg_plugin_userstate, privf);
     otrl_privkey_read_fingerprints_FILEp(otrg_plugin_userstate, storef,
 	    NULL, NULL);
+    otrl_instag_read_FILEp(otrg_plugin_userstate, instagf);
     if (privf) fclose(privf);
     if (storef) fclose(storef);
+    if (instagf) fclose(instagf);
 
     otrg_ui_update_fingerprint();
 
     purple_signal_connect(core_handle, "quitting", otrg_plugin_handle,
 	    PURPLE_CALLBACK(process_quitting), NULL);
     purple_signal_connect(conv_handle, "sending-im-msg", otrg_plugin_handle,
-            PURPLE_CALLBACK(process_sending_im), NULL);
+	    PURPLE_CALLBACK(process_sending_im), NULL);
     purple_signal_connect(conv_handle, "receiving-im-msg", otrg_plugin_handle,
-            PURPLE_CALLBACK(process_receiving_im), NULL);
+	    PURPLE_CALLBACK(process_receiving_im), NULL);
     purple_signal_connect(conv_handle, "conversation-updated",
 	    otrg_plugin_handle, PURPLE_CALLBACK(process_conv_updated), NULL);
     purple_signal_connect(conv_handle, "conversation-created",
-	    otrg_plugin_handle, PURPLE_CALLBACK(process_conv_create), NULL);
+	    otrg_plugin_handle, PURPLE_CALLBACK(process_conv_create_cb), NULL);
+    purple_signal_connect(conv_handle, "deleting-conversation",
+	    otrg_plugin_handle, PURPLE_CALLBACK(process_conv_destroyed), NULL);
     purple_signal_connect(conn_handle, "signed-on", otrg_plugin_handle,
 	    PURPLE_CALLBACK(process_connection_change), NULL);
     purple_signal_connect(conn_handle, "signed-off", otrg_plugin_handle,
@@ -879,7 +1321,7 @@ static gboolean otr_plugin_load(PurplePlugin *handle)
     otrg_ui_init();
     otrg_dialog_init();
 
-    purple_conversation_foreach(otrg_dialog_new_conv);
+    purple_conversation_foreach(process_conv_create);
 
     return 1;
 }
@@ -892,10 +1334,11 @@ static gboolean otr_plugin_unload(PurplePlugin *handle)
     void *core_handle = purple_get_core();
 
     /* Clean up all of our state. */
-    otrl_userstate_free(otrg_plugin_userstate);
-    otrg_plugin_userstate = NULL;
 
-    otrg_free_mms_table();
+    purple_conversation_foreach(otrg_dialog_remove_conv);
+
+    otrg_dialog_cleanup();
+    otrg_ui_cleanup();
 
     purple_signal_disconnect(core_handle, "quitting", otrg_plugin_handle,
 	    PURPLE_CALLBACK(process_quitting));
@@ -906,7 +1349,9 @@ static gboolean otr_plugin_unload(PurplePlugin *handle)
     purple_signal_disconnect(conv_handle, "conversation-updated",
 	    otrg_plugin_handle, PURPLE_CALLBACK(process_conv_updated));
     purple_signal_disconnect(conv_handle, "conversation-created",
-	    otrg_plugin_handle, PURPLE_CALLBACK(process_conv_create));
+	    otrg_plugin_handle, PURPLE_CALLBACK(process_conv_create_cb));
+    purple_signal_disconnect(conv_handle, "deleting-conversation",
+	    otrg_plugin_handle, PURPLE_CALLBACK(process_conv_destroyed));
     purple_signal_disconnect(conn_handle, "signed-on", otrg_plugin_handle,
 	    PURPLE_CALLBACK(process_connection_change));
     purple_signal_disconnect(conn_handle, "signed-off", otrg_plugin_handle,
@@ -914,10 +1359,13 @@ static gboolean otr_plugin_unload(PurplePlugin *handle)
     purple_signal_disconnect(blist_handle, "blist-node-extended-menu",
 	    otrg_plugin_handle, PURPLE_CALLBACK(supply_extended_menu));
 
-    purple_conversation_foreach(otrg_dialog_remove_conv);
+    /* Stop the timer, if necessary */
+    stop_start_timer(0);
 
-    otrg_dialog_cleanup();
-    otrg_ui_cleanup();
+    otrl_userstate_free(otrg_plugin_userstate);
+    otrg_plugin_userstate = NULL;
+
+    otrg_free_mms_table();
 
     return 1;
 }
@@ -951,8 +1399,8 @@ static PurplePluginInfo info =
 {
 	PURPLE_PLUGIN_MAGIC,
 
-        /* Use the 2.0.x API */
-        2,                                                /* major version  */
+	/* Use the 2.0.x API */
+	2,                                                /* major version  */
 	0,                                                /* minor version  */
 
 	PURPLE_PLUGIN_STANDARD,                           /* type           */
@@ -965,10 +1413,10 @@ static PurplePluginInfo info =
 	PIDGIN_OTR_VERSION,                               /* version        */
 	NULL,                                             /* summary        */
 	NULL,                                             /* description    */
-	                                                  /* author         */
+							  /* author         */
 	"Ian Goldberg, Rob Smits,\n"
-	    "\t\t\tChris Alexander, Nikita Borisov\n"
-	    "\t\t\t<otr at cypherpunks.ca>",
+	    "\t\t\tChris Alexander, Willy Lew, Lisa Du,\n"
+	    "\t\t\tNikita Borisov <otr at cypherpunks.ca>",
 	"http://otr.cypherpunks.ca/",                     /* homepage       */
 
 	otr_plugin_load,                                  /* load           */
@@ -1006,7 +1454,7 @@ __init_plugin(PurplePlugin *plugin)
     info.name        = _("Off-the-Record Messaging");
     info.summary     = _("Provides private and secure conversations");
     info.description = _("Preserves the privacy of IM communications "
-                         "by providing encryption, authentication, "
+			 "by providing encryption, authentication, "
 			 "deniability, and perfect forward secrecy.");
 }
 
diff --git a/otr-plugin.h b/otr-plugin.h
index fbbd3f1..e33359c 100644
--- a/otr-plugin.h
+++ b/otr-plugin.h
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
- *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+ *                           Chris Alexander, Willy Lew,
+ *                           Lisa Du, Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef __OTRG_OTR_PLUGIN_H__
@@ -28,15 +29,26 @@
 /* libotr headers */
 #include <libotr/context.h>
 #include <libotr/userstate.h>
+#include <libotr/instag.h>
 
 #define PRIVKEYFNAME "otr.private_key"
 #define STOREFNAME "otr.fingerprints"
+#define INSTAGFNAME "otr.instance_tags"
 #define MAXMSGSIZEFNAME "otr.max_message_size"
 
 extern PurplePlugin *otrg_plugin_handle;
 
 extern OtrlUserState otrg_plugin_userstate;
 
+/* Given a PurpleConversation, return the ConnContext corresponding to the
+ * selected instance tag. */
+ConnContext* otrg_plugin_conv_to_selected_context(PurpleConversation *conv,
+	int force_create);
+
+/* Given a PurpleConversation, return the selected instag. */
+otrl_instag_t otrg_plugin_conv_to_selected_instag(PurpleConversation *conv,
+	otrl_instag_t default_value);
+
 /* Send an IM from the given account to the given recipient.  Display an
  * error dialog if that account isn't currently logged in. */
 void otrg_plugin_inject_message(PurpleAccount *account, const char *recipient,
@@ -46,6 +58,10 @@ void otrg_plugin_inject_message(PurpleAccount *account, const char *recipient,
 void otrg_plugin_create_privkey(const char *accountname,
 	const char *protocol);
 
+/* Generate a instance tag for the given accountname/protocol */
+void otrg_plugin_create_instag(const char *accountname,
+	const char *protocol);
+
 /* Start the Socialist Millionaires' Protocol over the current connection,
  * using the given initial secret, and optionally a question to pass to
  * the buddy. */
@@ -76,7 +92,8 @@ void otrg_plugin_disconnect(ConnContext *context);
 void otrg_plugin_write_fingerprints(void);
 
 /* Find the ConnContext appropriate to a given PurpleConversation. */
-ConnContext *otrg_plugin_conv_to_context(PurpleConversation *conv);
+ConnContext *otrg_plugin_conv_to_context(PurpleConversation *conv,
+	otrl_instag_t their_instance, int force_create);
 
 /* Find the PurpleConversation appropriate to the given userinfo.  If
  * one doesn't yet exist, create it if force_create is true. */
@@ -88,6 +105,7 @@ PurpleConversation *otrg_plugin_userinfo_to_conv(const char *accountname,
 PurpleConversation *otrg_plugin_context_to_conv(ConnContext *context,
 	int force_create);
 
+
 typedef enum {
     TRUST_NOT_PRIVATE,
     TRUST_UNVERIFIED,
diff --git a/packaging/fedora/pidgin-otr.spec b/packaging/fedora/pidgin-otr.spec
index 705360f..15fa31f 100644
--- a/packaging/fedora/pidgin-otr.spec
+++ b/packaging/fedora/pidgin-otr.spec
@@ -1,19 +1,20 @@
 Summary: Off-The-Record Messaging plugin for pidgin
 Name: pidgin-otr
-Version: 3.1.0
+Version: 4.0.0
 Release: 1%{?dist}
 Source: http://otr.cypherpunks.ca/%{name}-%{version}.tar.gz
 Url: http://otr.cypherpunks.ca/
-License: GPL
+License: GPLv2
 Group: Applications/Internet
 Provides: gaim-otr = %{version}
 Obsoletes: gaim-otr
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: pidgin >= 2.0.0, libotr >= 3.1.0
-BuildRequires: glib2-devel, gtk2-devel, libgcrypt-devel >= 1.2.0, libgpg-error-devel, pidgin-devel >= 2.0.0, libotr-devel >= 3.1.0, libpurple-devel 
+Requires: pidgin >= 2.0.0, libotr >= 4.0.0
+BuildRequires: glib2-devel, gtk2-devel, libgcrypt-devel >= 1.2.0
+BuildRequires: libgpg-error-devel, pidgin-devel >= 2.0.0
+BuildRequires: libotr-devel >= 4.0.0, perl(XML::Parser), gettext
 
 %description 
-
 This is a pidgin plugin which implements Off-the-Record (OTR) Messaging.
 It is known to work (at least) under the Linux and Windows versions of
 pidgin (2.x).
@@ -22,6 +23,11 @@ pidgin (2.x).
 %setup -q
 
 %build
+if [ \! -f configure ]; then
+	echo "Building from pre-release"
+	intltoolize --force --copy
+	autoreconf -s -i
+fi
 
 %configure 
 make %{?_smp_mflags} all
@@ -44,6 +50,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pidgin/pidgin-otr.so
 
 %changelog
+* Thu Jun 11 2009 Paul Wouters <paul at xelerance.com> - 4.0.0-1
+- Upgraded to 4.0.0.
+- Updated buildrequires
+- Fix license tag
+
 * Thu Jul 26 2007 Paul Wouters <paul at cypherpunks.ca> 3.1.0-preview2
 - Added locale support to spec file
 - Upgraded to current version
diff --git a/packaging/windows/pidgin-otr.nsi b/packaging/windows/pidgin-otr.nsi
index 3c2ac17..26d8b30 100644
--- a/packaging/windows/pidgin-otr.nsi
+++ b/packaging/windows/pidgin-otr.nsi
@@ -3,7 +3,7 @@
 ;
 ; known issue. installer induced uninstaller abortion causes overwrite
 ; by installer without uninstall.
-; v3.2.1   - New source version.
+; v4.0.0   - New source version.
 ; v3.2.0   - New source version.
 ; v3.1.0   - New source version.  Install and uninstall i18n files.
 ; v3.0.0   - Version for pidgin-2.0.0
@@ -26,7 +26,7 @@
 ; todo: SetBrandingImage
 ; HM NIS Edit Wizard helper defines
 !define PRODUCT_NAME "pidgin-otr"
-!define PRODUCT_VERSION "3.2.1-1"
+!define PRODUCT_VERSION "4.0.0-0"
 !define PRODUCT_PUBLISHER "Cypherpunks CA"
 !define PRODUCT_WEB_SITE "http://otr.cypherpunks.ca/"
 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
@@ -84,7 +84,7 @@ Section "MainSection" SEC01
     SetOverwrite on
     ; What the next line means is to recursively search /usr/share/locale
     ; and install all files under there named pidgin-otr.mo
-    File /r "/usr/share/locale/pidgin-otr.mo"
+    File /r "../../win32_export/locale/pidgin-otr.mo"
 
     SetOutPath "$INSTDIR"
     SetOverwrite on
@@ -97,7 +97,7 @@ Section "MainSection" SEC01
     File "../../win32_export/README.txt"
     File "../../win32_export/COPYING.txt"
     File "../../win32_export/COPYING.LIB.txt"
-    File "../../win32_export/Protocol-v2.html"
+    File "../../win32_export/Protocol-v3.html"
     File "../../win32_export/otr_mackey.exe"
     File "../../win32_export/otr_modify.exe"
     File "../../win32_export/otr_parse.exe"
@@ -119,16 +119,15 @@ Section -Post
   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
- 
 SectionEnd
 
 Function un.onUninstSuccess
   HideWindow
-  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
+	MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK 
 FunctionEnd
 
 Function un.onInit
-  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
+	MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2
   Abort
 FunctionEnd
 
@@ -136,7 +135,8 @@ Section Uninstall
   Delete "$INSTDIR\pidgin-otr-uninst.exe"
   Delete "$INSTDIR\README.Toolkit.txt"
   Delete "$INSTDIR\README.txt"
-  Delete "$INSTDIR\Protocol-v2.html"
+  Delete "$INSTDIR\Protocol-v3.html"
+  Delete "$INSTDIR\Protocol-v2.html" ;Left behind by v3.2.0 uninstaller
   Delete "$INSTDIR\COPYING.txt"
   Delete "$INSTDIR\COPYING.LIB.txt"
   Delete "$INSTDIR\otr_mackey.exe"
@@ -159,7 +159,7 @@ Section Uninstall
 	IfFileExists "$PidginDir\plugins\pidgin-otr.dll" dodelete
   ReadRegStr $PidginDir HKCU Software\Pidgin-otr "pidgindir"
 	IfFileExists "$PidginDir\plugins\pidgin-otr.dll" dodelete
-  MessageBox MB_OK|MB_ICONINFORMATION "Could not find pidgin plugin directory, pidgin-otr.dll not uninstalled!" IDOK ok
+	MessageBox MB_OK|MB_ICONINFORMATION "Could not find pidgin plugin directory, pidgin-otr.dll not uninstalled!" /SD IDOK IDOK ok
 dodelete:
 	Delete "$PidginDir\plugins\pidgin-otr.dll"
 
@@ -177,7 +177,7 @@ dodelete:
 	Pop $0
 	
 	IfFileExists "$PidginDir\plugins\pidgin-otr.dll" 0 +2
-		MessageBox MB_OK|MB_ICONINFORMATION "pidgin-otr.dll is busy. Probably Pidgin is still running. Please delete $PidginDir\plugins\pidgin-otr.dll manually."
+		MessageBox MB_OK|MB_ICONINFORMATION "pidgin-otr.dll is busy. Probably Pidgin is still running. Please delete $PidginDir\plugins\pidgin-otr.dll manually." /SD IDOK
 
   DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
   DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "SOFTWARE\pidgin-otr\pidgindir"
@@ -191,11 +191,11 @@ Function GetPidginInstPath
 	IfFileExists "$0\pidgin.exe" cont
 	ReadRegStr $0 HKCU "Software\pidgin" ""
 	IfFileExists "$0\pidgin.exe" cont
-  MessageBox MB_OK|MB_ICONINFORMATION "Failed to find Pidgin installation."
+		MessageBox MB_OK|MB_ICONINFORMATION "Failed to find Pidgin installation." /SD IDOK
 		Abort "Failed to find Pidgin installation. Please install Pidgin first."
 cont:
 	StrCpy $PidginDir $0
-	;MessageBox MB_OK|MB_ICONINFORMATION "Pidgin plugin directory found at $PidginDir\plugins ."
+	;MessageBox MB_OK|MB_ICONINFORMATION "Pidgin plugin directory found at $PidginDir\plugins ." /SD IDOK
   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "SOFTWARE\pidgin-otr" "pidgindir" "$PidginDir"
 FunctionEnd
 
@@ -204,21 +204,25 @@ Function UnInstOld
 	  ReadRegStr $0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
 		IfFileExists "$0" deinst cont
 	deinst:
-		MessageBox MB_OK|MB_ICONEXCLAMATION  "pidgin-otr was already found on your system and will first be uninstalled"
+		MessageBox MB_OK|MB_ICONEXCLAMATION  "pidgin-otr was already found on your system and will first be uninstalled" /SD IDOK
 		; the uninstaller copies itself to temp and execs itself there, so it can delete 
 		; everything including its own original file location. To prevent the installer and
 		; uninstaller racing you can't simply ExecWait.
 		; We hide the uninstall because otherwise it gets really confusing window-wise
 		;HideWindow
 		  ClearErrors
+		IfSilent olduninstsilent
 			ExecWait '"$0" _?=$INSTDIR'
 			IfErrors 0 cont
-				MessageBox MB_OK|MB_ICONEXCLAMATION  "Uninstall failed or aborted"
+			MessageBox MB_OK|MB_ICONEXCLAMATION  "Uninstall failed or aborted" /SD IDOK
+			Abort "Uninstalling of the previous version gave an error. Install aborted."
+olduninstsilent:
+		ExecWait '"$0" /S _?=$INSTDIR'
+		IfErrors 0 cont
 				Abort "Uninstalling of the previous version gave an error. Install aborted."
-			
 		;BringToFront
 	cont:
-		;MessageBox MB_OK|MB_ICONINFORMATION "No old pidgin-otr found, continuing."
+		;MessageBox MB_OK|MB_ICONINFORMATION "No old pidgin-otr found, continuing." /SD IDOK
 		
 FunctionEnd
 
@@ -235,7 +239,7 @@ Rename "$INSTDIR\pidgin-otr.dll" "$PidginDir\plugins\pidgin-otr.dll"
 IfErrors dllbusy
 	Return
 dllbusy:
-	MessageBox MB_RETRYCANCEL "pidgin-otr.dll is busy. Please close Pidgin (including tray icon) and try again" IDCANCEL cancel
+	MessageBox MB_RETRYCANCEL "pidgin-otr.dll is busy. Please close Pidgin (including tray icon) and try again" /SD IDCANCEL IDCANCEL cancel
 	Delete "$PidginDir\plugins\pidgin-otr.dll"
 	Goto copy
 	Return
diff --git a/po/README b/po/README
index 44982cf..b3b5f56 100644
--- a/po/README
+++ b/po/README
@@ -5,3 +5,8 @@ intltool-update --pot
 To merge the latest list into an existing translation file fr.po:
 
 intltool-update fr
+
+
+When updating a .po file, check it for sanity:
+
+msgfmt -c --check-accelerators=_ fr.po
diff --git a/po/de.po b/po/de.po
index 2cd0221..79cb2e5 100644
--- a/po/de.po
+++ b/po/de.po
@@ -1,28 +1,29 @@
 # Off-the-Record Messaging plugin for pidgin.
-# Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
-#                          Chris Alexander, Nikita Borisov
+# Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew,
+#	                       Lisa Du, Nikita Borisov
 # This file is distributed under the same license as the pidgin-otr package.
+# Ian Goldberg <otr at cypherpunks.ca>, 2012
+# Marc Ester <marc.aurel.ester at googlemail.com>, 2012
 # Michael Meier <michael.meier at mmsources.de>, 2008.
-#
 msgid ""
 msgstr ""
-"Project-Id-Version: pidgin-otr 3.2.0-de\n"
+"Project-Id-Version: pidgin-otr 4.0.0.de\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-06-17 11:50+0200\n"
-"PO-Revision-Date: 2008-06-17 11:50+0200\n"
-"Last-Translator: Michael Meier <michael.meier at mmsources.de>\n"
-"Language-Team: Michael Meier <michael.meier at mmsources.de>\n"
+"POT-Creation-Date: 2012-06-14 09:45-0400\n"
+"PO-Revision-Date: 2012-06-17 12:33+0200\n"
+"Last-Translator: Marc Ester <marc.aurel.ester at googlemail.com>\n"
+"Language-Team: Marc Ester <marc.aurel.ester at googlemail.com>\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../gtk-dialog.c:291 ../gtk-dialog.c:1085 ../gtk-dialog.c:1089
-#: ../gtk-dialog.c:1523 ../gtk-dialog.c:1626 ../gtk-dialog.c:1691
-#: ../gtk-dialog.c:2143
+#: ../gtk-dialog.c:332 ../gtk-dialog.c:1141 ../gtk-dialog.c:1145
+#: ../gtk-dialog.c:1547 ../gtk-dialog.c:1584 ../gtk-dialog.c:1673
+#: ../gtk-dialog.c:1748 ../gtk-dialog.c:2749
 msgid "?lang=en"
 msgstr "?lang=de"
 
-#: ../gtk-dialog.c:439
+#: ../gtk-dialog.c:480
 msgid ""
 "Your buddy is attempting to determine if he or she is really talking to you, "
 "or if it's someone pretending to be you.  Your buddy has asked a question, "
@@ -34,7 +35,7 @@ msgstr ""
 "gestellt. Um Ihren Buddy zu authentifizieren, geben Sie die Antwort ein und "
 "klicken Sie OK."
 
-#: ../gtk-dialog.c:446
+#: ../gtk-dialog.c:487
 msgid ""
 "To authenticate using a question, pick a question whose answer is known only "
 "to you and your buddy.  Enter this question and this answer, then wait for "
@@ -47,23 +48,27 @@ msgstr ""
 "Antworten nicht übereinstimmen, haben Sie es möglicherweise mit einem "
 "Hochstapler zu tun."
 
-#: ../gtk-dialog.c:464
+
+#: ../gtk-dialog.c:505
+#, c-format
 msgid "This is the question asked by your buddy:"
 msgstr "Diese Frage wurde von Ihrem Buddy gestellt:"
 
-#: ../gtk-dialog.c:467
+#: ../gtk-dialog.c:508
+#, c-format
 msgid "Enter question here:"
 msgstr "Frage hier eingeben:"
 
-#: ../gtk-dialog.c:498 ../gtk-dialog.c:582
+#: ../gtk-dialog.c:540 ../gtk-dialog.c:624
 msgid "This buddy is already authenticated."
 msgstr "Dieser Buddy wurde bereits authentifiziert."
 
-#: ../gtk-dialog.c:510
+#: ../gtk-dialog.c:552
+#, c-format
 msgid "Enter secret answer here (case sensitive):"
 msgstr "Geheime Antwort hier eingeben: (Groß-/Kleinschreibung relevant)"
 
-#: ../gtk-dialog.c:551
+#: ../gtk-dialog.c:593
 msgid ""
 "To authenticate, pick a secret known only to you and your buddy.  Enter this "
 "secret, then wait for your buddy to enter it too.  If the secrets don't "
@@ -75,11 +80,12 @@ msgstr ""
 "nicht übereinstimmen, haben Sie es möglicherweise mit einem Hochstapler zu "
 "tun."
 
-#: ../gtk-dialog.c:565
+#: ../gtk-dialog.c:607
+#, c-format
 msgid "Enter secret here:"
 msgstr "Geheime Passphrase hier eingeben"
 
-#: ../gtk-dialog.c:616 ../gtk-dialog.c:1384
+#: ../gtk-dialog.c:657 ../gtk-dialog.c:1408
 msgid ""
 "To verify the fingerprint, contact your buddy via some <i>other</i> "
 "authenticated channel, such as the telephone or GPG-signed email.  Each of "
@@ -90,25 +96,24 @@ msgstr ""
 "verschlüsselter E-Mail oder telefonisch. Sie sollten Sich gegenseitig Ihre "
 "Fingerprints mitteilen."
 
-#: ../gtk-dialog.c:620 ../gtk-dialog.c:1388
+#: ../gtk-dialog.c:661
 msgid ""
-"If everything matches up, you should indicate in the above dialog that you "
-"<b>have</b> verified the fingerprint."
+"If everything matches up, you should chose <b>I have</b> in the menu below."
 msgstr ""
 "Wenn alles übereinstimmt, sollten Sie im obigen Dialog angeben, dass Sie den "
 "Fingerprint </b>tatsächlich</b> verifiziert haben."
 
-#: ../gtk-dialog.c:631 ../gtk-dialog.c:1373
+#: ../gtk-dialog.c:672 ../gtk-dialog.c:1397
 msgid "[none]"
 msgstr "[keiner]"
 
-#: ../gtk-dialog.c:638 ../gtk-dialog.c:996 ../gtk-dialog.c:1380
-#: ../gtk-dialog.c:1431 ../gtk-ui.c:181 ../otr-plugin.c:116
-#: ../otr-plugin.c:213 ../ui.c:111
+#: ../gtk-dialog.c:679 ../gtk-dialog.c:1051 ../gtk-dialog.c:1404
+#: ../gtk-dialog.c:1453 ../gtk-ui.c:212 ../otr-plugin.c:127
+#: ../otr-plugin.c:300 ../ui.c:112
 msgid "Unknown"
 msgstr "Unbekannt"
 
-#: ../gtk-dialog.c:639
+#: ../gtk-dialog.c:680
 #, c-format
 msgid ""
 "Fingerprint for you, %s (%s):\n"
@@ -123,78 +128,78 @@ msgstr ""
 "Angegebener Fingerprint für %s:\n"
 "%s\n"
 
-#: ../gtk-dialog.c:691
+#: ../gtk-dialog.c:736
 msgid "How would you like to authenticate your buddy?"
 msgstr "Wie möchten Sie Ihren Buddy authentifizieren?"
 
-#: ../gtk-dialog.c:700
+#: ../gtk-dialog.c:745
 msgid "Question and answer"
 msgstr "Frage und Antwort"
 
-#: ../gtk-dialog.c:703
+#: ../gtk-dialog.c:748
 msgid "Shared secret"
 msgstr "Gemeinsam bekannte Passphrase"
 
-#: ../gtk-dialog.c:706
+#: ../gtk-dialog.c:751
 msgid "Manual fingerprint verification"
 msgstr "Manueller Fingerprint-Vergleich"
 
-#: ../gtk-dialog.c:749
+#: ../gtk-dialog.c:802
 msgid "_Authenticate"
 msgstr "_Authentifizieren"
 
-#: ../gtk-dialog.c:782
+#: ../gtk-dialog.c:836
 msgid ""
 "Authenticating a buddy helps ensure that the person you are talking to is "
 "who he or she claims to be."
 msgstr ""
 "Einen Buddy zu authentifizieren hilft sicherzustellen, dass die Person, mit "
-"der Sie sprechen die ist, die sie zu sein behauptet."
+"der Sie sprechen, die ist, die sie zu sein behauptet."
 
 #. Translators: you are asked to authenticate yourself
-#: ../gtk-dialog.c:891
+#: ../gtk-dialog.c:946
 msgid "Authenticating to Buddy"
 msgstr "Authentifiziere gegenüber Buddy"
 
 #. Translators: you asked your buddy to authenticate him/herself
-#: ../gtk-dialog.c:893
+#: ../gtk-dialog.c:948
 msgid "Authenticating Buddy"
 msgstr "Authentifiziere Buddy"
 
-#: ../gtk-dialog.c:920
+#: ../gtk-dialog.c:975
 #, c-format
 msgid "Authenticating to %s"
 msgstr "Authentifiziere gegenüber %s"
 
-#: ../gtk-dialog.c:921
+#: ../gtk-dialog.c:976
 #, c-format
 msgid "Authenticating %s"
 msgstr "Authentifiziere %s"
 
-#: ../gtk-dialog.c:954
+#: ../gtk-dialog.c:1009
 msgid "Waiting for buddy..."
 msgstr "Warte auf Buddy..."
 
-#: ../gtk-dialog.c:987
+#: ../gtk-dialog.c:1042
 msgid "Generating private key"
 msgstr "Generiere privaten Schlüssel"
 
-#: ../gtk-dialog.c:988
+#: ../gtk-dialog.c:1043
 msgid "Please wait"
 msgstr "Bitte warten"
 
 #. Create the Please Wait... dialog
-#: ../gtk-dialog.c:999
+#: ../gtk-dialog.c:1054
 #, c-format
 msgid "Generating private key for %s (%s)..."
 msgstr "Generiere privaten Schlüssel für %s (%s)..."
 
-#: ../gtk-dialog.c:1044
+#: ../gtk-dialog.c:1099
 #, c-format
 msgid "%s Done."
 msgstr "%s Fertig."
 
-#: ../gtk-dialog.c:1083
+#: ../gtk-dialog.c:1139
 #, c-format
 msgid ""
 "%s is contacting you from an unrecognized computer.  You should <a href=\"%s%"
@@ -203,7 +208,7 @@ msgstr ""
 "%s kontaktiert Sie von einem unbekannten Computer aus. Sie sollten diesen "
 "Buddy <a href=\"%s%s\">authentifizieren</a>."
 
-#: ../gtk-dialog.c:1087
+#: ../gtk-dialog.c:1143
 #, c-format
 msgid ""
 "%s has not been authenticated yet.  You should <a href=\"%s%s"
@@ -212,75 +217,59 @@ msgstr ""
 "%s wurde noch nicht authentifiziert. Sie sollten diesen Buddy <a href=\"%s%s"
 "\">authentifizieren</a>."
 
-#: ../gtk-dialog.c:1150 ../gtk-dialog.c:1181 ../gtk-dialog.c:1866
-#: ../gtk-dialog.c:2139 ../gtk-ui.c:82
+#: ../gtk-dialog.c:1195 ../gtk-dialog.c:1969 ../gtk-dialog.c:2745
+#: ../gtk-ui.c:83
 msgid "Finished"
 msgstr "Beendet"
 
-#: ../gtk-dialog.c:1151 ../gtk-dialog.c:1182 ../gtk-dialog.c:1863
-#: ../gtk-dialog.c:2136 ../gtk-ui.c:81
+#: ../gtk-dialog.c:1196 ../gtk-dialog.c:1966 ../gtk-dialog.c:2742
+#: ../gtk-ui.c:82
 msgid "Private"
 msgstr "Privat"
 
-#: ../gtk-dialog.c:1152 ../gtk-dialog.c:1183 ../gtk-dialog.c:1860
-#: ../gtk-dialog.c:2133 ../gtk-ui.c:80
+#: ../gtk-dialog.c:1197 ../gtk-dialog.c:1963 ../gtk-dialog.c:2739
+#: ../gtk-ui.c:81
 msgid "Unverified"
 msgstr "Unverifiziert"
 
-#: ../gtk-dialog.c:1153 ../gtk-dialog.c:1184 ../gtk-ui.c:79
+#: ../gtk-dialog.c:1198 ../gtk-ui.c:80
 msgid "Not private"
 msgstr "Nicht privat"
 
-#: ../gtk-dialog.c:1156
-msgid "Start a private conversation"
-msgstr "Private Unterhaltung starten"
-
-#: ../gtk-dialog.c:1157
-msgid "Refresh the private conversation"
-msgstr "Private Unterhaltung aktualisieren"
-
-#: ../gtk-dialog.c:1162 ../gtk-dialog.c:1809 ../gtk-dialog.c:1910
-msgid "Start _private conversation"
-msgstr "_Private Unterhaltung starten"
-
-#: ../gtk-dialog.c:1163 ../gtk-dialog.c:1810
-msgid "Refresh _private conversation"
-msgstr "_Private Unterhaltung aktualisieren"
-
-#: ../gtk-dialog.c:1187
+#: ../gtk-dialog.c:1201
 msgid "OTR"
 msgstr "OTR"
 
-#. Translators: the following four messages should give alternative sentences.
-#. The user selects the first or second message in a combo box;
-#. the third message, a new line, a fingerprint, a new line, and
-#. the fourth message will follow it.
-#: ../gtk-dialog.c:1327
+#. Translators: the following four messages should give alternative
+#. * sentences. The user selects the first or second message in a combo box;
+#. * the third message, a new line, a fingerprint, a new line, and
+#. * the fourth message will follow it.
+#: ../gtk-dialog.c:1351
 msgid "I have not"
 msgstr "Ich habe nicht"
 
 #. 2nd message
-#: ../gtk-dialog.c:1329
+#: ../gtk-dialog.c:1353
 msgid "I have"
 msgstr "Ich habe"
 
 #. 3rd message
-#: ../gtk-dialog.c:1332
+#: ../gtk-dialog.c:1356
 msgid " verified that this is in fact the correct"
 msgstr " überprüft, dass dies tatsächlich der richtige"
 
 #. 4th message
-#: ../gtk-dialog.c:1342
+#: ../gtk-dialog.c:1366
 #, c-format
 msgid "fingerprint for %s."
 msgstr "Fingerprint für %s ist."
 
-#: ../gtk-dialog.c:1369
+#: ../gtk-dialog.c:1393
 #, c-format
 msgid "Verify fingerprint for %s"
 msgstr "Fingerprint für %s verifizieren."
 
-#: ../gtk-dialog.c:1381
+#: ../gtk-dialog.c:1405
 #, c-format
 msgid ""
 "<small><i>%s %s\n"
@@ -299,72 +288,100 @@ msgstr ""
 "Angegebener Fingerprint für %s:\n"
 "%s\n"
 
-#: ../gtk-dialog.c:1394 ../gtk-ui.c:782
+#: ../gtk-dialog.c:1412
+msgid ""
+"If everything matches up, you should indicate in the above dialog that you "
+"<b>have</b> verified the fingerprint."
+msgstr ""
+"Wenn alles übereinstimmt, sollten Sie im obigen Dialog angeben, "
+"dass Sie den Fingerprint verifiziert <b>haben</b>."
+
+#: ../gtk-dialog.c:1418 ../gtk-ui.c:844
 msgid "Verify fingerprint"
 msgstr "Fingerprint verifizieren"
 
-#: ../gtk-dialog.c:1421
+#: ../gtk-dialog.c:1445
 #, c-format
 msgid "Authentication from %s"
 msgstr "Authentifizierung von %s"
 
-#: ../gtk-dialog.c:1424
+#: ../gtk-dialog.c:1448
 #, c-format
 msgid "Authenticate %s"
-msgstr "%s authentifizieren"
+msgstr "Authentifiziere %s"
 
-#: ../gtk-dialog.c:1434
+#: ../gtk-dialog.c:1456
 msgid "Authenticate Buddy"
-msgstr "Buddy authentifizieren"
+msgstr "Authentifiziere Buddy"
 
-#: ../gtk-dialog.c:1465
+#: ../gtk-dialog.c:1487
 msgid "An error occurred during authentication."
-msgstr "Ein Fehler ist bei der Authentifizierung aufgetreten."
+msgstr "Es trat ein Fehler bei der Authentifizierung auf."
 
-#: ../gtk-dialog.c:1480
+#: ../gtk-dialog.c:1502
 msgid "Authentication successful."
-msgstr "Authentifizierung erfolgreich."
+msgstr "Authentifizierung war erfolgreich."
 
-#: ../gtk-dialog.c:1483
+#: ../gtk-dialog.c:1505
 msgid ""
 "Your buddy has successfully authenticated you.  You may want to authenticate "
 "your buddy as well by asking your own question."
 msgstr ""
 "Ihr Buddy hat Sie erfolgreich authentifiziert. Unter Umständen möchten Sie "
-"ebenfalls eine Frage stellen um Ihren Buddy zu authentifizieren."
+"ebenfalls eine Frage stellen, um Ihren Buddy zu authentifizieren."
 
-#: ../gtk-dialog.c:1489
+#: ../gtk-dialog.c:1511
 msgid "Authentication failed."
 msgstr "Authentifizierung fehlgeschlagen."
 
-#: ../gtk-dialog.c:1517
+#: ../gtk-dialog.c:1541
 #, c-format
-msgid "Private conversation with %s started.%s"
-msgstr "Private Unterhaltung mit %s begonnen.%s"
+msgid "Private conversation with %s started.%s%s"
+msgstr "Private Unterhaltung mit %s begonnen.%s%s"
 
-#: ../gtk-dialog.c:1521
+#: ../gtk-dialog.c:1545
 #, c-format
-msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s"
+msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s%%s"
 msgstr ""
-"Nicht <a href=\"%s%s\">verifizierte</a> Unterhaltung mit %%s begonnen.%%s"
+"Nicht <a href=\"%s%s\">verifizierte</a> Unterhaltung mit %%s "
+"begonnen.%%s%%s"
 
 #. This last case should never happen, since we know
 #. * we're in ENCRYPTED.
-#: ../gtk-dialog.c:1529
+#: ../gtk-dialog.c:1553
 #, c-format
-msgid "Not private conversation with %s started.%s"
-msgstr "Nicht private Unterhaltung mit %s begonnen.%s"
+msgid "Not private conversation with %s started.%s%s"
+msgstr "Nicht private Unterhaltung mit %s begonnen.%s%s"
 
-#: ../gtk-dialog.c:1535 ../gtk-dialog.c:1639
+#: ../gtk-dialog.c:1559 ../gtk-dialog.c:1686
 msgid "  Warning: using old protocol version 1."
 msgstr "  Warnung: Verwende veraltete Protokollversion 1."
 
-#: ../gtk-dialog.c:1555
+#: ../gtk-dialog.c:1561
+msgid "  Your client is logging this conversation."
+msgstr "  Ihr Client speichert diese Unterhaltung."
+
+#: ../gtk-dialog.c:1562
+msgid "  Your client is not logging this conversation."
+msgstr "  Ihr Client speichert diese Unterhaltung nicht."
+
+#: ../gtk-dialog.c:1581
+#, c-format
+msgid ""
+"Your buddy is logged in multiple times and OTR has established <a href=\"%s%s"
+"\">multiple sessions</a>. Use the icon menu above if you wish to select the "
+"outgoing session."
+msgstr ""
+"Ihr Buddy ist mehrfach verbunden und OTR hat sich mit <a href=\"%s%s"
+"\">mehreren Sessions</a> verbunden. Nutzen Sie das Symbol Menü, wenn Sie "
+"die Verbindung wählen möchten."
+
+#: ../gtk-dialog.c:1601
 #, c-format
 msgid "Private conversation with %s lost."
 msgstr "Private Unterhaltung mit %s abgebrochen."
 
-#: ../gtk-dialog.c:1592
+#: ../gtk-dialog.c:1638
 #, c-format
 msgid ""
 "%s has ended his/her private conversation with you; you should do the same."
@@ -372,12 +389,12 @@ msgstr ""
 "%s hat seine/ihre private Unterhaltung mit Ihnen beendet. Sie sollten "
 "dasselbe tun."
 
-#: ../gtk-dialog.c:1618
+#: ../gtk-dialog.c:1665
 #, c-format
 msgid "Successfully refreshed the private conversation with %s.%s"
 msgstr "Private Unterhaltung mit %s erfolgreich aktualisiert.%s"
 
-#: ../gtk-dialog.c:1623
+#: ../gtk-dialog.c:1670
 #, c-format
 msgid ""
 "Successfully refreshed the <a href=\"%s%s\">unverified</a> conversation with "
@@ -388,51 +405,83 @@ msgstr ""
 
 #. This last case should never happen, since we know
 #. * we're in ENCRYPTED.
-#: ../gtk-dialog.c:1632
+#: ../gtk-dialog.c:1679
 #, c-format
 msgid "Successfully refreshed the not private conversation with %s.%s"
 msgstr "Nicht private Unterhaltung mit %s erfolgreich aktualisiert.%s"
 
-#: ../gtk-dialog.c:1664
+#: ../gtk-dialog.c:1712
 #, c-format
 msgid "Attempting to refresh the private conversation with %s..."
 msgstr "Versuche, die private Unterhaltung mit %s zu aktualisieren..."
 
-#: ../gtk-dialog.c:1666
+#: ../gtk-dialog.c:1714
 #, c-format
 msgid "Attempting to start a private conversation with %s..."
 msgstr "Versuche, eine private Unterhaltung mit %s zu beginnen..."
 
-#: ../gtk-dialog.c:1815
+#: ../gtk-dialog.c:1899 ../gtk-dialog.c:2026
+msgid "Start _private conversation"
+msgstr "_Private Unterhaltung starten"
+
+#: ../gtk-dialog.c:1900
+msgid "Refresh _private conversation"
+msgstr "Aktualisiere _Private Unterhaltung"
+
+#: ../gtk-dialog.c:1905
 msgid "Re_authenticate buddy"
 msgstr "Buddy erneut _authentifizieren"
 
-#.
-#. * Don't show the Verify fingerprint menu option any more.  You can
-#. * still get to the dialog through Authenticate connection ->
-#. * Advanced...
-#. *
-#. menuverf = gtk_menu_item_new_with_mnemonic(_("_Verify fingerprint"));
-#. gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuverf);
-#. gtk_widget_show(menuverf);
-#.
-#: ../gtk-dialog.c:1816 ../gtk-dialog.c:1912 ../gtk-dialog.c:2335
+#: ../gtk-dialog.c:1906 ../gtk-dialog.c:2030
 msgid "_Authenticate buddy"
 msgstr "Buddy _authentifizieren"
 
-#: ../gtk-dialog.c:1857 ../gtk-dialog.c:2130
+#: ../gtk-dialog.c:1960 ../gtk-dialog.c:2736
 msgid "Not Private"
 msgstr "Nicht privat"
 
-#: ../gtk-dialog.c:1879 ../gtk-dialog.c:2352
+#: ../gtk-dialog.c:1982
 msgid "_What's this?"
 msgstr "_Was ist das?"
 
-#: ../gtk-dialog.c:1911 ../gtk-dialog.c:2317
+#: ../gtk-dialog.c:2028
 msgid "_End private conversation"
 msgstr "Private Unterhaltung be_enden"
 
-#: ../gtk-dialog.c:2126
+#: ../gtk-dialog.c:2207 ../gtk-dialog.c:2255
+#, c-format
+msgid ""
+"Warning: The selected outgoing OTR session (%u) is not the most recently "
+"active one (%u). Your buddy may not receive your messages. Use the icon menu "
+"above to select a different outgoing session."
+msgstr ""
+"Warnung: Die gewählte ausgehende OTR Session (%u) ist nicht "
+"die kürzlich aktive (%u). Dein Buddy wird die Nachricht eventuell nicht "
+"erhalten. Nutzen Sie das obere Symbol Menü, um eine ausgehende Session "
+"zu wählen."
+
+#: ../gtk-dialog.c:2271
+msgid "Send to most secure"
+msgstr "Sende zur sichersten"
+
+#: ../gtk-dialog.c:2273
+msgid "Send to most recent"
+msgstr "Sende zur neusten"
+
+#: ../gtk-dialog.c:2377
+#, c-format
+msgid "Session %u"
+msgstr "Session %u"
+
+#: ../gtk-dialog.c:2395 ../gtk-dialog.c:2506
+msgid "Select"
+msgstr "Auswählen"
+
+#: ../gtk-dialog.c:2410
+msgid "Selected"
+msgstr "Ausgewählt"
+
+#: ../gtk-dialog.c:2731
 #, c-format
 msgid ""
 "The privacy status of the current conversation is now: <a href=\"%s%s\">%s</"
@@ -440,214 +489,406 @@ msgid ""
 msgstr ""
 "Der Status der aktuellen Unterhaltung ist jetzt: <a href=\"%s%s\">%s</a>"
 
-#: ../gtk-dialog.c:2290
-msgid "OTR:"
-msgstr "OTR:"
-
-#: ../gtk-dialog.c:2310
+#: ../gtk-dialog.c:2956
 msgid "OTR Messaging"
 msgstr "OTR Messaging"
 
-#: ../gtk-ui.c:102
+#: ../gtk-ui.c:103
 #, c-format
 msgid "Fingerprint: %.80s"
 msgstr "Fingerprint: %.80s"
 
-#: ../gtk-ui.c:106
+#: ../gtk-ui.c:107
 #, c-format
 msgid "No key present"
 msgstr "Kein Schlüssel vorhanden"
 
-#: ../gtk-ui.c:111
+#: ../gtk-ui.c:112
 #, c-format
 msgid "No account available"
-msgstr "Keine Konten verfügbar"
+msgstr "Kein Konto verfügbar"
 
-#: ../gtk-ui.c:171
+#: ../gtk-ui.c:179
 msgid "Unused"
 msgstr "Unbenutzt"
 
-#: ../gtk-ui.c:177
+#: ../gtk-ui.c:208
 msgid "Yes"
 msgstr "Ja"
 
-#: ../gtk-ui.c:177
+#: ../gtk-ui.c:208
 msgid "No"
 msgstr "Nein"
 
-#: ../gtk-ui.c:403
+#: ../gtk-ui.c:473
 msgid "Enable private messaging"
 msgstr "Privaten Nachrichtenversand aktivieren"
 
-#: ../gtk-ui.c:405
+#: ../gtk-ui.c:475
 msgid "Automatically initiate private messaging"
 msgstr "Privaten Nachrichtenversand automatisch aktivieren"
 
-#: ../gtk-ui.c:407
+#: ../gtk-ui.c:477
 msgid "Require private messaging"
 msgstr "Privaten Nachrichtenversand erzwingen"
 
-#: ../gtk-ui.c:410
+#: ../gtk-ui.c:480
 msgid "Don't log OTR conversations"
 msgstr "OTR-Unterhaltungen nicht speichern"
 
-#: ../gtk-ui.c:454
-msgid "Show OTR button"
-msgstr "OTR-Button anzeigen"
-
-#: ../gtk-ui.c:457
+#: ../gtk-ui.c:524
 msgid "Show OTR button in toolbar"
 msgstr "OTR-Button in Symbolleiste anzeigen"
 
-#: ../gtk-ui.c:601
+#: ../gtk-ui.c:663
 msgid "My private keys"
 msgstr "Meine privaten Schlüssel"
 
-#: ../gtk-ui.c:610
+#: ../gtk-ui.c:672
 msgid "Key for account:"
 msgstr "Schlüssel für Konto:"
 
-#: ../gtk-ui.c:635
+#: ../gtk-ui.c:697
 msgid "Generate"
 msgstr "Generieren"
 
-#: ../gtk-ui.c:676
+#: ../gtk-ui.c:738
 msgid "Default OTR Settings"
 msgstr "Standard OTR-Einstellungen"
 
-#: ../gtk-ui.c:703
+#: ../gtk-ui.c:765
 msgid "OTR UI Options"
 msgstr "OTR-Erscheinungsbild"
 
-#: ../gtk-ui.c:726
+#: ../gtk-ui.c:788
 msgid "Screenname"
 msgstr "Spitzname"
 
-#: ../gtk-ui.c:727
+#: ../gtk-ui.c:789
 msgid "Status"
 msgstr "Status"
 
-#: ../gtk-ui.c:728
+#: ../gtk-ui.c:790
 msgid "Verified"
 msgstr "Verifiziert"
 
-#: ../gtk-ui.c:729
+#: ../gtk-ui.c:791
 msgid "Fingerprint"
 msgstr "Fingerprint"
 
-#: ../gtk-ui.c:730
+#: ../gtk-ui.c:792
 msgid "Account"
 msgstr "Konto"
 
-#: ../gtk-ui.c:766
+#: ../gtk-ui.c:828
 msgid "Start private connection"
 msgstr "Private Unterhaltung starten"
 
-#: ../gtk-ui.c:774
+#: ../gtk-ui.c:836
 msgid "End private connection"
 msgstr "Private Unterhaltung beenden"
 
-#: ../gtk-ui.c:790
+#: ../gtk-ui.c:852
 msgid "Forget fingerprint"
 msgstr "Fingerprint vergessen"
 
-#: ../gtk-ui.c:841
+#: ../gtk-ui.c:903
 msgid "Config"
 msgstr "Konfiguration"
 
-#: ../gtk-ui.c:843
+#: ../gtk-ui.c:905
 msgid "Known fingerprints"
 msgstr "Bekannte Fingerprints"
 
-#: ../gtk-ui.c:941 ../otr-plugin.c:606
+#: ../gtk-ui.c:1003 ../otr-plugin.c:964
 msgid "OTR Settings"
 msgstr "OTR-Einstellungen"
 
 #. Set the title
-#: ../gtk-ui.c:959
+#: ../gtk-ui.c:1021
 #, c-format
 msgid "OTR Settings for %s"
 msgstr "OTR-Einstellungen für %s"
 
 #. Make the cascaded checkboxes
-#: ../gtk-ui.c:976
+#: ../gtk-ui.c:1038
 msgid "Use default OTR settings for this buddy"
 msgstr "Standard OTR-Einstellungen für diesen Buddy verwenden"
 
-#: ../otr-plugin.c:114
+#: ../otr-plugin.c:125
 #, c-format
 msgid "You are not currently connected to account %s (%s)."
-msgstr "Sie sind momentan nicht mit Konto %s verbunden(%s)."
+msgstr "Sie sind momentan nicht mit Konto %s (%s) verbunden."
 
-#: ../otr-plugin.c:118
+#: ../otr-plugin.c:129
 msgid "Not connected"
 msgstr "Nicht verbunden"
 
-#: ../otr-plugin.c:162
+#: ../otr-plugin.c:212 ../otr-plugin.c:254
 #, c-format
 msgid "Out of memory building filenames!\n"
 msgstr "Kein Speicher zum Erstellen von Dateinamen!\n"
 
-#: ../otr-plugin.c:168
+#: ../otr-plugin.c:224 ../otr-plugin.c:260
 #, c-format
 msgid "Could not write private key file\n"
 msgstr "Konnte nicht in die Private-Schlüssel-Datei schreiben\n"
 
-#: ../otr-plugin.c:211
+#: ../otr-plugin.c:298
 #, c-format
 msgid "Unknown account %s (%s)."
 msgstr "Unbekanntes Konto %s (%s)."
 
-#: ../otr-plugin.c:215
+#: ../otr-plugin.c:302
 msgid "Unknown account"
 msgstr "Unbekanntes Konto"
 
-#: ../otr-plugin.c:983
+#: ../otr-plugin.c:364
+msgid "Error occurred encrypting message."
+msgstr "Ein Fehler ist beim Verschlüsseln der Nachricht aufgetreten"
+
+#: ../otr-plugin.c:368
+#, c-format
+msgid "You sent encrypted data to %s, who wasn't expecting it."
+msgstr "Sie haben %s eine verschlüsselte Nachricht geschickt, "
+"welche er nicht erwartet hat."
+
+#: ../otr-plugin.c:374
+msgid "You transmitted an unreadable encrypted message."
+msgstr "Sie haben eine unlesbare verschlüsselte Nachricht "
+"verschickt."
+
+#: ../otr-plugin.c:377
+msgid "You transmitted a malformed data message."
+msgstr "Sie haben fehlerhafte Nachrichten versendet."
+
+#: ../otr-plugin.c:390
+msgid "[resent]"
+msgstr "[nochmal versendet]"
+
+#: ../otr-plugin.c:459
+#, c-format
+msgid "You attempted to send an unencrypted message to %s"
+msgstr "Sie haben versucht eine unverschlüsselte Nachricht an %s zu senden"
+
+#: ../otr-plugin.c:462
+msgid "Attempting to start a private conversation..."
+msgstr "Versuche private Unterhaltung zu starten..."
+
+#: ../otr-plugin.c:464
+msgid "OTR Policy Violation"
+msgstr "OTR Richtlinienverletzung"
+
+#: ../otr-plugin.c:465
+msgid ""
+"Unencrypted messages to this recipient are not allowed.  Attempting to start "
+"a private conversation.\n"
+"\n"
+"Your message will be retransmitted when the private conversation starts."
+msgstr ""
+"Unverschlüsselte Nachrichten an diesen Empfänger sind nicht erlaubt. "
+"Versuchen Sie eine private Unterhaltung zu starten.\n"
+"\n"
+"Ihre Nachricht wird nochmal gesendet, wenn die private Unterhaltung beginnt."
+
+
+#: ../otr-plugin.c:474
+msgid ""
+"An error occurred when encrypting your message.  The message was not sent."
+msgstr ""
+"Es ist ein Fehler beim Verschlüsseln ihrer Nachricht aufgetreten."
+
+#: ../otr-plugin.c:476
+msgid "Error encrypting message"
+msgstr "Fehler beim Verschlüsseln der Nachricht"
+
+#: ../otr-plugin.c:477
+msgid "An error occurred when encrypting your message"
+msgstr "Ein Fehler ist beim Verschlüsseln der Nachricht aufgetreten"
+
+#: ../otr-plugin.c:478
+msgid "The message was not sent."
+msgstr "Die Nachricht wurden nicht versendet."
+
+#: ../otr-plugin.c:481
+#, c-format
+msgid "%s has already closed his/her private connection to you"
+msgstr "%s hat bereits seine/ihre private Verbindung zu Ihnen beendet"
+
+#: ../otr-plugin.c:484
+msgid ""
+"Your message was not sent.  Either end your private conversation, or restart "
+"it."
+msgstr "Ihre Nachricht wurde nicht gesendet. Entweder beenden Sie Ihre "
+"private Unterhaltung oder Sie schalten sie wieder ein."
+
+#: ../otr-plugin.c:487
+msgid "Private connection closed"
+msgstr "Private Verbindung geschlossen"
+
+#: ../otr-plugin.c:488
+msgid ""
+"Your message was not sent.  Either close your private connection to him, or "
+"refresh it."
+msgstr "Ihre Nachricht wurde nicht gesendet. Entweder beenden Sie Ihre "
+"private Unterhaltung oder Sie aktualisieren sie."
+
+#: ../otr-plugin.c:498
+msgid "Error setting up private conversation: Malformed message received"
+msgstr "Fehler beim Aufbau der privaten Unterhaltung: Fehlerhafte Nachricht erhalten"
+
+#: ../otr-plugin.c:502
+#, c-format
+msgid "Error setting up private conversation: %s"
+msgstr "Fehler beim Aufbau der privaten Unterhaltung: %s"
+
+#: ../otr-plugin.c:509 ../otr-plugin.c:520 ../otr-plugin.c:547
+#: ../otr-plugin.c:555 ../otr-plugin.c:573
+msgid "OTR Error"
+msgstr "OTR Error"
+
+#: ../otr-plugin.c:516
+msgid ""
+"We are receiving our own OTR messages.  You are either trying to talk to "
+"yourself, or someone is reflecting your messages back at you."
+msgstr ""
+"Wir erhalten unsere eigenen OTR Nachrichten. Entweder versuchen Sie mit sich "
+"selbst zu reden oder jemand schickt Ihnen Ihre Nachrichten zurück."
+
+#: ../otr-plugin.c:520
+msgid "We are receiving our own OTR messages."
+msgstr "Wir empfangen unsere eigene OTR Nachricht."
+
+#: ../otr-plugin.c:521
+msgid ""
+"You are either trying to talk to yourself, or someone is reflecting your "
+"messages back at you."
+msgstr ""
+"Sie versuchen mit sich selbst zu reden oder jemand schickt Ihre Nachrichten"
+" zurück."
+
+#: ../otr-plugin.c:526
+#, c-format
+msgid "<b>The last message to %s was resent.</b>"
+msgstr "<b>Die letzte Nachricht an %s wurde wieder versendet.</b>"
+
+#: ../otr-plugin.c:530
+msgid "Message resent"
+msgstr "Nachricht erneut versendet"
+
+#: ../otr-plugin.c:534
+#, c-format
+msgid ""
+"<b>The encrypted message received from %s is unreadable, as you are not "
+"currently communicating privately.</b>"
+msgstr ""
+"<b>Die von %s empfangene Nachricht ist unlesbar, da Sie sich nicht in "
+"einer privaten Konversation befinden.</b>"
+
+#: ../otr-plugin.c:539
+msgid "Unreadable message"
+msgstr "Unlesbare Nachricht"
+
+#: ../otr-plugin.c:543
+#, c-format
+msgid "We received an unreadable encrypted message from %s."
+msgstr "Wir haben eine unlesbare verschlüsselte Nachricht von %s erhalten."
+
+#: ../otr-plugin.c:551
+#, c-format
+msgid "We received a malformed data message from %s."
+msgstr "Wir haben eine fehlerhafte Datennachricht von %s."
+
+#: ../otr-plugin.c:559
+#, c-format
+msgid "Heartbeat received from %s.\n"
+msgstr "Heartbeat erhalten von %s.\n"
+
+#: ../otr-plugin.c:565
+#, c-format
+msgid "Heartbeat sent to %s.\n"
+msgstr "Heartbeat zu %s gesendet.\n"
+
+#: ../otr-plugin.c:576
+#, c-format
+msgid ""
+"<b>The following message received from %s was <i>not</i> encrypted: [</b>%"
+"s<b>]</b>"
+msgstr ""
+"<b>Die folgende Nachricht von %s war <i>nicht</i> verschlüsselt: [</b>%"
+"s<b>]</b>"
+
+#: ../otr-plugin.c:581
+msgid "Received unencrypted message"
+msgstr "Unverschlüsselte Nachricht erhalten"
+
+#: ../otr-plugin.c:587
+#, c-format
+msgid "Unrecognized OTR message received from %s.\n"
+msgstr "Unbekannte OTR Nachricht erhalten von %s.\n"
+
+#: ../otr-plugin.c:596
+#, c-format
+msgid ""
+"%s has sent a message intended for a different session. If you are logged in "
+"multiple times, another session may have received the message."
+msgstr ""
+"%s hat eine Nachricht gesendet, welche für eine andere Session bestimmt "
+"war. Wenn Sie mehrfach verbunden sind, hat möglicherweise eine andere "
+"Verbindung die Nachricht erhalten."
+
+#: ../otr-plugin.c:602
+msgid "Received message for a different session"
+msgstr "Nachricht für eine andere Session erhalten"
+
+#. 2013-01-01
+#: ../otr-plugin.c:1193 ../otr-plugin.c:1220
+#, c-format
+msgid "OTR PLUGIN v%s"
+msgstr "OTR PLUGIN v%s"
+
+#: ../otr-plugin.c:1202
+#, c-format
+msgid ""
+"This beta copy of the Off-the-Record Messaging v%s Pidgin plugin has expired "
+"as of 2013-01-01. Please look for an updated release at http://otr."
+"cypherpunks.ca/"
+msgstr ""
+"Diese Beta Version von Off-the-Record Messaging v%s Pidgin Plugin ist "
+"seit dem 01.01.2013 abgelaufen. Bitte schauen Sie auf "
+"http://otr.cypherpunks.ca/ nach einem Update."
+
+#: ../otr-plugin.c:1229
+#, c-format
+msgid ""
+"You have enabled a beta version of the Off-the-Record Messaging v%s Pidgin "
+"plugin. This version is intended for testing purposes only and is not for "
+"general purpose use."
+msgstr ""
+"Sie nutzen eine Beta Version des Off-the-Record Messaging v%s Pidgin Plugins. "
+"Diese Version ist nur für Testzwecke und nicht die allgemeine Nutzung."
+
+#: ../otr-plugin.c:1414
 msgid "Off-the-Record Messaging"
 msgstr "Off-the-Record Messaging"
 
-#: ../otr-plugin.c:984
+#: ../otr-plugin.c:1415
 msgid "Provides private and secure conversations"
 msgstr "Ermöglicht private und sichere Unterhaltungen"
 
-#: ../otr-plugin.c:985
+#: ../otr-plugin.c:1416
 msgid ""
 "Preserves the privacy of IM communications by providing encryption, "
 "authentication, deniability, and perfect forward secrecy."
 msgstr ""
 "Bewahrt die Vertraulichkeit von IM-Unterhaltungen durch Verschlüsselung, "
-"Authentifizierung, Glaubhafte Bestreitbarkeit und Perfect Forward Secrecy."
+"Authentifizierung, glaubhafte Bestreitbarkeit und Perfect Forward Secrecy."
 
-#: ../ui.c:109
+#: ../ui.c:110
 #, c-format
 msgid "Account %s (%s) could not be found"
 msgstr "Konto %s (%s) konnte nicht gefunden werden"
 
-#: ../ui.c:113
+#: ../ui.c:114
 msgid "Account not found"
 msgstr "Konto nicht gefunden"
-
-#~ msgid ""
-#~ "If your buddy has more than one IM account, or uses more than one "
-#~ "computer, he may have multiple fingerprints."
-#~ msgstr ""
-#~ "Sollte Ihr Buddy mehr als ein IM-Konto oder mehrere Computer verwenden, "
-#~ "kann er mehr als einen Fingerprint haben."
-
-#~ msgid ""
-#~ "However, the only way an imposter could duplicate one of your buddy's "
-#~ "fingerprints is by stealing information from her/his computer."
-#~ msgstr ""
-#~ "Die einzige Möglichkeit für einen Hochstapler, die Fingerprints Ihres "
-#~ "Buddys zu kopieren ist das Stehlen der Informationen von seinem/ihrem "
-#~ "Computer."
-
-#~ msgid "Click here for more information about fingerprints."
-#~ msgstr "Klicken Sie hier für zusätzliche Informationen über Fingerprints."
-
-#~ msgid ""
-#~ "A <b>fingerprint</b> is a unique identifier that you should use to "
-#~ "authenticate your buddy."
-#~ msgstr ""
-#~ "Ein <b>Fingerprint</b> ist ein einmaliges Identifizierungsmerkmal, das "
-#~ "Sie verwenden sollten, um Ihren Buddy zu authentifizieren."
diff --git a/po/el.po b/po/el.po
new file mode 100644
index 0000000..741fdf7
--- /dev/null
+++ b/po/el.po
@@ -0,0 +1,854 @@
+# Off-the-Record Messaging plugin for pidgin.
+# Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew,
+#	                       Lisa Du, Nikita Borisov
+# This file is distributed under the same license as the pidgin-otr package.
+# Ian Goldberg <otr at cypherpunks.ca>, 2012
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pidgin-otr 4.0.0.el\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-06-14 09:45-0400\n"
+"PO-Revision-Date: 2012-06-20 19:50+2\n"
+"Last-Translator: Alex <irregulator at riseup.net>\n"
+"Language-Team: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-dialog.c:332 ../gtk-dialog.c:1141 ../gtk-dialog.c:1145
+#: ../gtk-dialog.c:1547 ../gtk-dialog.c:1584 ../gtk-dialog.c:1673
+#: ../gtk-dialog.c:1748 ../gtk-dialog.c:2749
+msgid "?lang=en"
+msgstr "?lang=el"
+
+#: ../gtk-dialog.c:480
+msgid ""
+"Your buddy is attempting to determine if he or she is really talking to you, "
+"or if it's someone pretending to be you.  Your buddy has asked a question, "
+"indicated below.  To authenticate to your buddy, enter the answer and click "
+"OK."
+msgstr "Η επαφή σου προσπαθεί να εξακριβώσει αν μιλάει πραγματικά μαζί σου, "
+"ή πρόκειται για κάποιον που προσποιείται ότι είναι εσύ. Η επαφή σου έκανε την ερώτηση "
+"που φαίνεται παρακάτω. Για να αποδείξεις στην επαφή σου ποιος είσαι, "
+"συμπλήρωσε την απάντηση και πάτα OK."
+
+#: ../gtk-dialog.c:487
+msgid ""
+"To authenticate using a question, pick a question whose answer is known only "
+"to you and your buddy.  Enter this question and this answer, then wait for "
+"your buddy to enter the answer too.  If the answers don't match, then you "
+"may be talking to an imposter."
+msgstr "Για να αυθεντικοποιήσεις την επαφή σου χρησιμοποιώντας μια ερώτηση, διάλεξε μια ερώτηση της οποίας "
+"η απάντηση είναι γνωστή μόνο σε σένα και την επαφή σου. Γράψε αυτή την ερώτηση καθώς και την απάντηση, "
+"και στη συνέχεια περίμενε για την επαφή σου να απαντήσει στην ίδια ερώτηση. Εάν οι απαντήσεις "
+"δεν ταιριάζουν, τότε ίσως να μιλάς με κάποιον απατεώνα."
+
+#: ../gtk-dialog.c:505
+#, c-format
+msgid "This is the question asked by your buddy:"
+msgstr "Η επαφή σου ρώτησε:"
+
+#: ../gtk-dialog.c:508
+#, c-format
+msgid "Enter question here:"
+msgstr "Βάλε μια ερώτηση εδώ:"
+
+#: ../gtk-dialog.c:540 ../gtk-dialog.c:624
+msgid "This buddy is already authenticated."
+msgstr "Η επαφή είναι ήδη αυθεντικοποιημένη."
+
+#: ../gtk-dialog.c:552
+#, c-format
+msgid "Enter secret answer here (case sensitive):"
+msgstr "Γράψτε τη μυστική απάντηση εδώ (τα κεφαλαία θεωρούνται διαφορετικά από τα μικρά γράμματα)"
+
+#: ../gtk-dialog.c:593
+msgid ""
+"To authenticate, pick a secret known only to you and your buddy.  Enter this "
+"secret, then wait for your buddy to enter it too.  If the secrets don't "
+"match, then you may be talking to an imposter."
+msgstr "Για αυθεντικοποίηση, διάλεξε ένα μυστικό γνωστό μόνο σε εσένα "
+"και την επαφή σου. Αφού εισάγεις αυτό το μυστικό, περίμενε να το εισάγει "
+"και η επαφή σου. Αν τα μυστικά δεν ταιριάζουν, τότε ίσως να μιλάς με κάποιον απατεώνα."
+
+#: ../gtk-dialog.c:607
+#, c-format
+msgid "Enter secret here:"
+msgstr "Βάλε το μυστικό εδώ:"
+
+#: ../gtk-dialog.c:657 ../gtk-dialog.c:1408
+msgid ""
+"To verify the fingerprint, contact your buddy via some <i>other</i> "
+"authenticated channel, such as the telephone or GPG-signed email.  Each of "
+"you should tell your fingerprint to the other."
+msgstr "Για να επαληθεύσεις το αποτύπωμα, επικοινώνησε με την επαφή σου μέσω "
+"ενός <i>άλλου</i> αυθεντικοποιημένου καναλιού, όπως το τηλέφωνο ή ένα email με ψηφιακή υπογραφή GPG. "
+"Ο καθένας σας θα πρέπει να πει το αποτύπωμά του στον άλλον μέσω αυτού του άλλου καναλιού."
+
+#: ../gtk-dialog.c:661
+msgid ""
+"If everything matches up, you should chose <b>I have</b> in the menu below."
+msgstr "Αν όλα ταιριάζουν, τότε πρέπει να επιλέξεις <b>Έχω επιβεβαιώσει</b> στο παρακάτω μενού."
+
+#: ../gtk-dialog.c:672 ../gtk-dialog.c:1397
+msgid "[none]"
+msgstr "[κανένα]"
+
+#: ../gtk-dialog.c:679 ../gtk-dialog.c:1051 ../gtk-dialog.c:1404
+#: ../gtk-dialog.c:1453 ../gtk-ui.c:212 ../otr-plugin.c:127
+#: ../otr-plugin.c:300 ../ui.c:112
+msgid "Unknown"
+msgstr "Άγνωστο"
+
+#: ../gtk-dialog.c:680
+#, c-format
+msgid ""
+"Fingerprint for you, %s (%s):\n"
+"%s\n"
+"\n"
+"Purported fingerprint for %s:\n"
+"%s\n"
+msgstr ""
+"Αποτύπωμα για σένα, %s (%s):\n"
+"%s\n"
+"\n"
+"Υποτιθέμενο αποτύπωμα για %s:\n"
+"%s\n"
+
+#: ../gtk-dialog.c:736
+msgid "How would you like to authenticate your buddy?"
+msgstr "Πώς θα ήθελες να αυθεντικοποιήσεις την επαφή σου;"
+
+#: ../gtk-dialog.c:745
+msgid "Question and answer"
+msgstr "Ερώτηση και απάντηση"
+
+#: ../gtk-dialog.c:748
+msgid "Shared secret"
+msgstr "Κοινό μυστικό"
+
+#: ../gtk-dialog.c:751
+msgid "Manual fingerprint verification"
+msgstr "Χειροκίνητη επαλήθευση αποτυπώματος"
+
+#: ../gtk-dialog.c:802
+msgid "_Authenticate"
+msgstr "_Επικύρωσε"
+
+#: ../gtk-dialog.c:836
+msgid ""
+"Authenticating a buddy helps ensure that the person you are talking to is "
+"who he or she claims to be."
+msgstr "Αυθεντικοποιώντας μια επαφή, επιβεβαιώνεις ότι το πρόσωπο με το "
+"οποίο μιλάς είναι αυτός ή αυτή που ισχυρίζεται ότι είναι."
+
+#. Translators: you are asked to authenticate yourself
+#: ../gtk-dialog.c:946
+msgid "Authenticating to Buddy"
+msgstr "Αυθεντικοποίηση στην επαφή"
+
+#. Translators: you asked your buddy to authenticate him/herself
+#: ../gtk-dialog.c:948
+msgid "Authenticating Buddy"
+msgstr "Αυθεντικοποίηση της επαφής"
+
+#: ../gtk-dialog.c:975
+#, c-format
+msgid "Authenticating to %s"
+msgstr "Αυθεντικοποίηση σε %s"
+
+#: ../gtk-dialog.c:976
+#, c-format
+msgid "Authenticating %s"
+msgstr "Αυθεντικοποίηση επαφής %s"
+
+#: ../gtk-dialog.c:1009
+msgid "Waiting for buddy..."
+msgstr "Περιμένουμε την επαφή..."
+
+#: ../gtk-dialog.c:1042
+msgid "Generating private key"
+msgstr "Δημιουργία ιδιωτικού κλειδιού"
+
+#: ../gtk-dialog.c:1043
+msgid "Please wait"
+msgstr "Παρακαλώ περιμένετε"
+
+#. Create the Please Wait... dialog
+#: ../gtk-dialog.c:1054
+#, c-format
+msgid "Generating private key for %s (%s)..."
+msgstr "Δημιουργία ιδιωτικού κλειδιού για %s (%s)..."
+
+#: ../gtk-dialog.c:1099
+#, c-format
+msgid "%s Done."
+msgstr "%s Έγινε."
+
+#: ../gtk-dialog.c:1139
+#, c-format
+msgid ""
+"%s is contacting you from an unrecognized computer.  You should <a href=\"%s%"
+"s\">authenticate</a> this buddy."
+msgstr "Η επαφή %s επικοινωνεί μαζί σου από έναν άγνωστο υπολογιστή. Καλό θα ήταν να<a href=\"%s%"
+"s\">αυθεντικοποιήσεις</a> την επαφή."
+
+#: ../gtk-dialog.c:1143
+#, c-format
+msgid ""
+"%s has not been authenticated yet.  You should <a href=\"%s%s"
+"\">authenticate</a> this buddy."
+msgstr "Η επαφή %s δεν έχει επικυρωθεί ακόμα. Καλό θα ήταν να <a href=\"%s%s"
+"\">αυθεντικοποιήσεις</a> την επαφή."
+
+#: ../gtk-dialog.c:1195 ../gtk-dialog.c:1969 ../gtk-dialog.c:2745
+#: ../gtk-ui.c:83
+msgid "Finished"
+msgstr "Τερματισμένη"
+
+#: ../gtk-dialog.c:1196 ../gtk-dialog.c:1966 ../gtk-dialog.c:2742
+#: ../gtk-ui.c:82
+msgid "Private"
+msgstr "Ιδιωτική"
+
+#: ../gtk-dialog.c:1197 ../gtk-dialog.c:1963 ../gtk-dialog.c:2739
+#: ../gtk-ui.c:81
+msgid "Unverified"
+msgstr "Μη επιβεβαιωμένη"
+
+#: ../gtk-dialog.c:1198 ../gtk-ui.c:80
+msgid "Not private"
+msgstr "Μη ιδιωτική"
+
+#: ../gtk-dialog.c:1201
+msgid "OTR"
+msgstr "OTR"
+
+#. Translators: the following four messages should give alternative
+#. * sentences. The user selects the first or second message in a combo box;
+#. * the third message, a new line, a fingerprint, a new line, and
+#. * the fourth message will follow it.
+#: ../gtk-dialog.c:1351
+msgid "I have not"
+msgstr "Δεν έχω"
+
+#. 2nd message
+#: ../gtk-dialog.c:1353
+msgid "I have"
+msgstr "Έχω"
+
+#. 3rd message
+#: ../gtk-dialog.c:1356
+msgid " verified that this is in fact the correct"
+msgstr "επιβεβαιώσει ότι αυτό είναι το σωστό"
+
+#. 4th message
+#: ../gtk-dialog.c:1366
+#, c-format
+msgid "fingerprint for %s."
+msgstr "αποτύπωμα για την επαφή %s"
+
+#: ../gtk-dialog.c:1393
+#, c-format
+msgid "Verify fingerprint for %s"
+msgstr "Επαλήθευσε το αποτύπωμα για την επαφή %s"
+
+#: ../gtk-dialog.c:1405
+#, c-format
+msgid ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>Fingerprint for you, %s (%s):\n"
+"%s\n"
+"\n"
+"Purported fingerprint for %s:\n"
+"%s\n"
+msgstr ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>Αποτύπωμα για εσένα, %s (%s):\n"
+"%s\n"
+"\n"
+"Υποτιθέμενο αποτύπωμα για %s:\n"
+"%s\n"
+
+#: ../gtk-dialog.c:1412
+msgid ""
+"If everything matches up, you should indicate in the above dialog that you "
+"<b>have</b> verified the fingerprint."
+msgstr "Αν όλα ταιριάζουν, επέλεξε στο παραπάνω διάλογο ότι "
+"<br>έχεις</b> επαληθεύσει το αποτύπωμα."
+
+#: ../gtk-dialog.c:1418 ../gtk-ui.c:844
+msgid "Verify fingerprint"
+msgstr "Επαλήθευσε το αποτύπωμα"
+
+#: ../gtk-dialog.c:1445
+#, c-format
+msgid "Authentication from %s"
+msgstr "Αυθεντικοποίηση για την επαφή %s"
+
+#: ../gtk-dialog.c:1448
+#, c-format
+msgid "Authenticate %s"
+msgstr "Αυθεντικοποίησε την επαφή %s"
+
+#: ../gtk-dialog.c:1456
+msgid "Authenticate Buddy"
+msgstr "Αυθεντικοποίησε την επαφή"
+
+#: ../gtk-dialog.c:1487
+msgid "An error occurred during authentication."
+msgstr "Ένα σφάλμα προέκυψε κατά την αυθεντικοποίηση."
+
+#: ../gtk-dialog.c:1502
+msgid "Authentication successful."
+msgstr "Αυθεντικοποίηση επιτυχής."
+
+#: ../gtk-dialog.c:1505
+msgid ""
+"Your buddy has successfully authenticated you.  You may want to authenticate "
+"your buddy as well by asking your own question."
+msgstr "Η επαφή σου σε αυθεντικοποίησε επιτυχώς. Ίσως θέλεις να αυθεντικοποιήσεις κι "
+"εσύ την επαφή σου, θέτοντας μια δική σου ερώτηση."
+
+#: ../gtk-dialog.c:1511
+msgid "Authentication failed."
+msgstr "Η αυθεντικοποίηση απέτυχε."
+
+#: ../gtk-dialog.c:1541
+#, c-format
+msgid "Private conversation with %s started.%s%s"
+msgstr "Ξεκίνησε ιδιωτική συνομιλία με την επαφή %s. %s%s"
+
+#: ../gtk-dialog.c:1545
+#, c-format
+msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s%%s"
+msgstr "Ξεκίνησε <a href=\"%s%s\">μη επιβεβαιωμένη</a> συνομιλία με %%s.%%s%%s"
+
+#. This last case should never happen, since we know
+#. * we're in ENCRYPTED.
+#: ../gtk-dialog.c:1553
+#, c-format
+msgid "Not private conversation with %s started.%s%s"
+msgstr "Ξεκίνησε μη ιδιωτική συνομιλία με %s. %s%s"
+
+#: ../gtk-dialog.c:1559 ../gtk-dialog.c:1686
+msgid "  Warning: using old protocol version 1."
+msgstr "Προειδοποίηση: χρησιμοποιείται παλιό πρωτόκολλο, έκδοση 1."
+
+#: ../gtk-dialog.c:1561
+msgid "  Your client is logging this conversation."
+msgstr "Η εφαρμογή σου καταγράφει αυτή τη συνομιλία."
+
+#: ../gtk-dialog.c:1562
+msgid "  Your client is not logging this conversation."
+msgstr "Η εφαρμογή σου δε καταγράφει αυτή τη συνομιλία."
+
+#: ../gtk-dialog.c:1581
+#, c-format
+msgid ""
+"Your buddy is logged in multiple times and OTR has established <a href=\"%s%s"
+"\">multiple sessions</a>. Use the icon menu above if you wish to select the "
+"outgoing session."
+msgstr ""
+"Η επαφή σου είναι συνδεδεμένη πολλαπλές φορές και το OTR έχει εγκαθιδρύσει <a href=\"%s%s"
+"\">πολλαπλές συνεδρίες</a>. Χρησιμοποίησε το μενού εικονιδίων αν επιθυμείς να επιλέξεις "
+"την εξερχόμενη συνεδρία."
+
+#: ../gtk-dialog.c:1601
+#, c-format
+msgid "Private conversation with %s lost."
+msgstr "Η ιδιωτική συνομιλία με την επαφή %s χάθηκε."
+
+#: ../gtk-dialog.c:1638
+#, c-format
+msgid ""
+"%s has ended his/her private conversation with you; you should do the same."
+msgstr "Η επαφή %s τερμάτισε την ιδιωτική της/του συνομιλία μαζί σου. Θα έπρεπε να κάνεις το ίδιο."
+
+#: ../gtk-dialog.c:1665
+#, c-format
+msgid "Successfully refreshed the private conversation with %s.%s"
+msgstr "Η ιδιωτική συνομιλία με %s ανανεώθηκε επιτυχώς. %s"
+
+#: ../gtk-dialog.c:1670
+#, c-format
+msgid ""
+"Successfully refreshed the <a href=\"%s%s\">unverified</a> conversation with "
+"%%s.%%s"
+msgstr ""
+"H <a href=\"%s%s\">μη επιβεβαιωμένη</a> συνομιλία με την επαφή "
+"%%s, ανανεώθηκε επιτυχώς.%%s"
+
+#. This last case should never happen, since we know
+#. * we're in ENCRYPTED.
+#: ../gtk-dialog.c:1679
+#, c-format
+msgid "Successfully refreshed the not private conversation with %s.%s"
+msgstr "Η μη ιδιωτική  συνομιλια με την επαφή %s ανανεώθηκε επιτυχώς.%s"
+
+#: ../gtk-dialog.c:1712
+#, c-format
+msgid "Attempting to refresh the private conversation with %s..."
+msgstr "Προσπαθούμε να ανανεώσουμε την ιδιωτική συνομιλία με %s..."
+
+#: ../gtk-dialog.c:1714
+#, c-format
+msgid "Attempting to start a private conversation with %s..."
+msgstr "Προσπαθούμε να ξεκινήσουμε ιδιωτική συνομιλία με %s..."
+
+#: ../gtk-dialog.c:1899 ../gtk-dialog.c:2026
+msgid "Start _private conversation"
+msgstr "Έναρξη _ιδιωτικής συνομιλίας"
+
+#: ../gtk-dialog.c:1900
+msgid "Refresh _private conversation"
+msgstr "Ανανέωση _ιδιωτικής συνομιλίας"
+
+#: ../gtk-dialog.c:1905
+msgid "Re_authenticate buddy"
+msgstr "Επαν_αυθεντικοποίηση επαφής"
+
+#: ../gtk-dialog.c:1906 ../gtk-dialog.c:2030
+msgid "_Authenticate buddy"
+msgstr "_Αυθεντικοποίηση επαφής"
+
+#: ../gtk-dialog.c:1960 ../gtk-dialog.c:2736
+msgid "Not Private"
+msgstr "Μη ιδιωτική"
+
+#: ../gtk-dialog.c:1982
+msgid "_What's this?"
+msgstr "_Τι είναι αυτό;"
+
+#: ../gtk-dialog.c:2028
+msgid "_End private conversation"
+msgstr "_Τερματισμός ιδιωτικής συνομιλίας"
+
+#: ../gtk-dialog.c:2207 ../gtk-dialog.c:2255
+#, c-format
+msgid ""
+"Warning: The selected outgoing OTR session (%u) is not the most recently "
+"active one (%u). Your buddy may not receive your messages. Use the icon menu "
+"above to select a different outgoing session."
+msgstr "Προειδοποίηση: Η επιλεγμένη εξερχόμενη OTR συνεδρία (%u) δεν είναι η πιο πρόσφατα "
+"ενεργή (%u). Η επαφή σου πιθανόν να μην λάβει τα μηνύματά σου. Χρησιμοποίησε τα παραπάνω εικονίδια "
+"για να επιλέξεις μια διαφορετική εξερχόμενη συνεδρία."
+
+#: ../gtk-dialog.c:2271
+msgid "Send to most secure"
+msgstr "Στείλε στις πιο ασφαλείς"
+
+#: ../gtk-dialog.c:2273
+msgid "Send to most recent"
+msgstr "Στείλε στις πιο πρόσφατες"
+
+#: ../gtk-dialog.c:2377
+#, c-format
+msgid "Session %u"
+msgstr "Συνεδρία %u"
+
+#: ../gtk-dialog.c:2395 ../gtk-dialog.c:2506
+msgid "Select"
+msgstr "Επιλογή"
+
+#: ../gtk-dialog.c:2410
+msgid "Selected"
+msgstr "Επιλεγμένη"
+
+#: ../gtk-dialog.c:2731
+#, c-format
+msgid ""
+"The privacy status of the current conversation is now: <a href=\"%s%s\">%s</"
+"a>"
+msgstr "Η κατάτασταση ιδιωτικότητας της παρούσας συνομιλίας είναι τώρα: <a href=\"%s%s\">%s</"
+"a>"
+
+#: ../gtk-dialog.c:2956
+msgid "OTR Messaging"
+msgstr "Ανταλλαγή μηνυμάτων OTR"
+
+#: ../gtk-ui.c:103
+#, c-format
+msgid "Fingerprint: %.80s"
+msgstr "Αποτύπωμα: %.80s"
+
+#: ../gtk-ui.c:107
+#, c-format
+msgid "No key present"
+msgstr "Δεν υπάρχει κλειδί"
+
+#: ../gtk-ui.c:112
+#, c-format
+msgid "No account available"
+msgstr "Δεν υπάρχει διαθέσιμος λογαριασμός"
+
+#: ../gtk-ui.c:179
+msgid "Unused"
+msgstr "Αχρησιμοποίητο"
+
+#: ../gtk-ui.c:208
+msgid "Yes"
+msgstr "Ναι"
+
+#: ../gtk-ui.c:208
+msgid "No"
+msgstr "Όχι"
+
+#: ../gtk-ui.c:473
+msgid "Enable private messaging"
+msgstr "Ενεργοποίηση ιδιωτικής ανταλλαγής μηνυμάτων"
+
+#: ../gtk-ui.c:475
+msgid "Automatically initiate private messaging"
+msgstr "Αυτόματη έναρξη ιδιωτικής ανταλλαγής μηνυμάτων"
+
+#: ../gtk-ui.c:477
+msgid "Require private messaging"
+msgstr "Απαίτηση ιδιωτικής ανταλλαγής μηνυμάτων"
+
+#: ../gtk-ui.c:480
+msgid "Don't log OTR conversations"
+msgstr "Μην καταγράφεις τις OTR συνομιλίες"
+
+#: ../gtk-ui.c:524
+msgid "Show OTR button in toolbar"
+msgstr "Εμφάνιση του κουμπιού OTR στη μπάρα εργαλείων"
+
+#: ../gtk-ui.c:663
+msgid "My private keys"
+msgstr "Τα ιδιωτικά μου κλειδιά"
+
+#: ../gtk-ui.c:672
+msgid "Key for account:"
+msgstr "Κλειδί για το λογαριασμό:"
+
+#: ../gtk-ui.c:697
+msgid "Generate"
+msgstr "Δημιουργία"
+
+#: ../gtk-ui.c:738
+msgid "Default OTR Settings"
+msgstr "Προεπιλεγμένες ρυθμίσεις OTR"
+
+#: ../gtk-ui.c:765
+msgid "OTR UI Options"
+msgstr "Επιλογές OTR για τη διεπαφή χρήστη"
+
+#: ../gtk-ui.c:788
+msgid "Screenname"
+msgstr "Όνομα οθόνης"
+
+#: ../gtk-ui.c:789
+msgid "Status"
+msgstr "Κατάσταση"
+
+#: ../gtk-ui.c:790
+msgid "Verified"
+msgstr "Επαληθευμένο"
+
+#: ../gtk-ui.c:791
+msgid "Fingerprint"
+msgstr "Αποτύπωμα"
+
+#: ../gtk-ui.c:792
+msgid "Account"
+msgstr "Λογαριασμός"
+
+#: ../gtk-ui.c:828
+msgid "Start private connection"
+msgstr "Έναρξη ιδιωτικής σύνδεσης"
+
+#: ../gtk-ui.c:836
+msgid "End private connection"
+msgstr "Λήξη ιδιωτικής σύνδεσης"
+
+#: ../gtk-ui.c:852
+msgid "Forget fingerprint"
+msgstr "Ξέχνα το αποτύπωμα"
+
+#: ../gtk-ui.c:903
+msgid "Config"
+msgstr "Ρυθμίσεις"
+
+#: ../gtk-ui.c:905
+msgid "Known fingerprints"
+msgstr "Γνωστά αποτυπώματα"
+
+#: ../gtk-ui.c:1003 ../otr-plugin.c:964
+msgid "OTR Settings"
+msgstr "Ρυθμίσεις OTR"
+
+#. Set the title
+#: ../gtk-ui.c:1021
+#, c-format
+msgid "OTR Settings for %s"
+msgstr "Ρυθμίσεις OTR για %s"
+
+#. Make the cascaded checkboxes
+#: ../gtk-ui.c:1038
+msgid "Use default OTR settings for this buddy"
+msgstr "Χρησιμοποίησε τις προεπιλεγμένες OTR ρυθμίσεις για αυτή την επαφή"
+
+#: ../otr-plugin.c:125
+#, c-format
+msgid "You are not currently connected to account %s (%s)."
+msgstr "Αυτή τη στιγμή δεν είσαι συνδεδεμένος στο λογαριασμό %s (%s)."
+
+#: ../otr-plugin.c:129
+msgid "Not connected"
+msgstr "Αποσυνδεμένοι"
+
+#: ../otr-plugin.c:212 ../otr-plugin.c:254
+#, c-format
+msgid "Out of memory building filenames!\n"
+msgstr "Μη επαρκής μνήμη κατά τη κατασκευή ονομάτων αρχείων!\n"
+
+#: ../otr-plugin.c:224 ../otr-plugin.c:260
+#, c-format
+msgid "Could not write private key file\n"
+msgstr "Δεν ήταν δυνατό να γραφτεί το αρχείο ιδιωτικού κλειδιού\n"
+
+#: ../otr-plugin.c:298
+#, c-format
+msgid "Unknown account %s (%s)."
+msgstr "Άγνωστος λογαριασμός %s (%s)."
+
+#: ../otr-plugin.c:302
+msgid "Unknown account"
+msgstr "Άγνωστος λογαριασμός"
+
+#: ../otr-plugin.c:364
+msgid "Error occurred encrypting message."
+msgstr "Προέκυψε σφάλμα κατά τη κρυπτογράφηση του μηνύματος."
+
+#: ../otr-plugin.c:368
+#, c-format
+msgid "You sent encrypted data to %s, who wasn't expecting it."
+msgstr "Έστειλες κρυπτογραφημένα δεδομένα στην επαφή %s, η οποία δεν το περιμένε."
+
+#: ../otr-plugin.c:374
+msgid "You transmitted an unreadable encrypted message."
+msgstr "Έστειλες ένα μη αναγνώσιμο κρυπτογραφημένο μήνυμα."
+
+#: ../otr-plugin.c:377
+msgid "You transmitted a malformed data message."
+msgstr "Έστειλες ένα μήνυμα με κακοδιαμορφωμένα δεδομένα."
+
+#: ../otr-plugin.c:390
+msgid "[resent]"
+msgstr "[εστάλη ξανά]"
+
+#: ../otr-plugin.c:459
+#, c-format
+msgid "You attempted to send an unencrypted message to %s"
+msgstr "Προσπάθησες να στείλεις ένα μη κρυπτογραφημένο μήνυμα στην επαφή %s"
+
+#: ../otr-plugin.c:462
+msgid "Attempting to start a private conversation..."
+msgstr "Απόπειρα να ξεκινήσει μια ιδιωτική συνομιλία..."
+
+#: ../otr-plugin.c:464
+msgid "OTR Policy Violation"
+msgstr "Παραβίαση της Πολιτικής του OTR"
+
+#: ../otr-plugin.c:465
+msgid ""
+"Unencrypted messages to this recipient are not allowed.  Attempting to start "
+"a private conversation.\n"
+"\n"
+"Your message will be retransmitted when the private conversation starts."
+msgstr "Δεν επιτρέπονται μη κρυπτογραφημένα μηνύματα προς αυτό τον παραλήπτη. Απόπειρα να ξεκινήσει "
+"μια ιδιωτική συνομιλία.\n"
+"\n"
+"Το μήνυμά σου θα μεταδοθεί ξανά, όταν ξεκινήσει η ιδιωτική συνομιλία."
+
+#: ../otr-plugin.c:474
+msgid ""
+"An error occurred when encrypting your message.  The message was not sent."
+msgstr "Ένα σφάλμα προέκυψε κατά τη κρυπτογράφηση του μηνύματος. Το μήνυμα δεν εστάλη."
+
+#: ../otr-plugin.c:476
+msgid "Error encrypting message"
+msgstr "Σφάλμα στη κρυπτογράφηση του μηνύματος"
+
+#: ../otr-plugin.c:477
+msgid "An error occurred when encrypting your message"
+msgstr "Ένα σφάλμα προέκυψε κατά τη κρυπτογράφηση του μηνύματος"
+
+#: ../otr-plugin.c:478
+msgid "The message was not sent."
+msgstr "Το μήνυμα δεν εστάλη."
+
+#: ../otr-plugin.c:481
+#, c-format
+msgid "%s has already closed his/her private connection to you"
+msgstr "η επαφή %s έχει ήδη κλείσει την ιδιωτική του/της σύνδεση με εσένα"
+
+#: ../otr-plugin.c:484
+msgid ""
+"Your message was not sent.  Either end your private conversation, or restart "
+"it."
+msgstr "Το μήνυμά σου δεν εστάλη. Είτε τερμάτισε την ιδιωτική συνομιλία με την επαφή, ή ξεκίνα την ξανά. "
+
+#: ../otr-plugin.c:487
+msgid "Private connection closed"
+msgstr "Η ιδιωτική συνομιλία έκλεισε"
+
+#: ../otr-plugin.c:488
+msgid ""
+"Your message was not sent.  Either close your private connection to him, or "
+"refresh it."
+msgstr "Το μήνυμά σου δεν εστάλη. Είτε κλείσε την ιδιωτική συνομιλία με την επαφή, ή ανανέωσέ την."
+
+#: ../otr-plugin.c:498
+msgid "Error setting up private conversation: Malformed message received"
+msgstr "Σφάλμα κατά την εγκαθίδρυση ιδιωτικής συνομιλίας: Κακοδιαμορφωμένο μήνυμα ελήφθη"
+
+#: ../otr-plugin.c:502
+#, c-format
+msgid "Error setting up private conversation: %s"
+msgstr "Σφάλμα κατά την δημιουργία ιδιωτικής συνομιλίας: %s"
+
+#: ../otr-plugin.c:509 ../otr-plugin.c:520 ../otr-plugin.c:547
+#: ../otr-plugin.c:555 ../otr-plugin.c:573
+msgid "OTR Error"
+msgstr "Σφάλμα OTR"
+
+#: ../otr-plugin.c:516
+msgid ""
+"We are receiving our own OTR messages.  You are either trying to talk to "
+"yourself, or someone is reflecting your messages back at you."
+msgstr "Λαμβάνουμε τα δικά μας OTR μηνύματα. Είτε προσπαθείς να μιλήσεις με τον εαυτό σου,"
+" ή κάποιος επιστρέφει τα μηνύματά σου πίσω σε σένα."
+
+#: ../otr-plugin.c:520
+msgid "We are receiving our own OTR messages."
+msgstr "Λαμβάνουμε τα δικά μας OTR μηνύματα."
+
+#: ../otr-plugin.c:521
+msgid ""
+"You are either trying to talk to yourself, or someone is reflecting your "
+"messages back at you."
+msgstr "Είτε προσπαθείς να μιλήσεις με τον εαυτό σου, ή κάποιος επιστρέφει τα μηνύματά σου πίσω σε σένα."
+
+#: ../otr-plugin.c:526
+#, c-format
+msgid "<b>The last message to %s was resent.</b>"
+msgstr "<b>Το τελευταίο μήνυμα προς την επαφή %s εστάλη ξανά.</b>"
+
+#: ../otr-plugin.c:530
+msgid "Message resent"
+msgstr "Το μήνυμα εστάλη ξανά"
+
+#: ../otr-plugin.c:534
+#, c-format
+msgid ""
+"<b>The encrypted message received from %s is unreadable, as you are not "
+"currently communicating privately.</b>"
+msgstr "<b>Το κρυπτογραφημένο μήνυμα που ελήφθη από %s δεν είναι αναγνώσιμο, καθώς "
+"αυτή τη στιγμή δεν επικοινωνείτε ιδιωτικά.</b>"
+
+#: ../otr-plugin.c:539
+msgid "Unreadable message"
+msgstr "Μη αναγνώσιμο μήνυμα"
+
+#: ../otr-plugin.c:543
+#, c-format
+msgid "We received an unreadable encrypted message from %s."
+msgstr "Λάβαμε ένα μη αναγνώσιμο κρυπτογραφημένο μήνυμα από %s."
+
+#: ../otr-plugin.c:551
+#, c-format
+msgid "We received a malformed data message from %s."
+msgstr "Λάβαμε ένα μήνυμα από %s με κακοσχηματισμένα δεδομένα."
+
+#: ../otr-plugin.c:559
+#, c-format
+msgid "Heartbeat received from %s.\n"
+msgstr "Παλμός ελήφθη από %s. \n"
+
+#: ../otr-plugin.c:565
+#, c-format
+msgid "Heartbeat sent to %s.\n"
+msgstr "Παλμός εστάλη σε %s.\n"
+
+#: ../otr-plugin.c:576
+#, c-format
+msgid ""
+"<b>The following message received from %s was <i>not</i> encrypted: [</b>%"
+"s<b>]</b>"
+msgstr "<b>Το ακόλουθο μήνυμα που ελήφθη από %s <i>δεν</i> ήταν κρυπτογραφημένο: [</b>%"
+"s<b>]</b>"
+
+#: ../otr-plugin.c:581
+msgid "Received unencrypted message"
+msgstr "Ελήφθη μη κρυπτογραφημένο μήνυμα"
+
+#: ../otr-plugin.c:587
+#, c-format
+msgid "Unrecognized OTR message received from %s.\n"
+msgstr "Ελήφθη μη αναγνωρίσιμο OTR μήνυμα από %s.\n"
+
+#: ../otr-plugin.c:596
+#, c-format
+msgid ""
+"%s has sent a message intended for a different session. If you are logged in "
+"multiple times, another session may have received the message."
+msgstr "%s έστειλε ένα μήνυμα που προοριζόταν για διαφορετική συνεδρία. Αν είσαι συνδεδεμένος "
+"πολλαπλές φόρες, μια άλλη συνεδρία πιθανόν να έλαβε το μήνυμα."
+
+#: ../otr-plugin.c:602
+msgid "Received message for a different session"
+msgstr "Ελήφθη μήνυμα από διαφορετική συνεδρία"
+
+#. 2013-01-01
+#: ../otr-plugin.c:1193 ../otr-plugin.c:1220
+#, c-format
+msgid "OTR PLUGIN v%s"
+msgstr "ΠΡΟΣΘΕΤΟ OTR v%s"
+
+#: ../otr-plugin.c:1202
+#, c-format
+msgid ""
+"This beta copy of the Off-the-Record Messaging v%s Pidgin plugin has expired "
+"as of 2013-01-01. Please look for an updated release at http://otr."
+"cypherpunks.ca/"
+msgstr "Αυτό το αντίγραφο του πρόσθετου Off-the-Record Messaging v%s για Pidgin "
+"έχει λήξει από τις 01-01-2013. Παρακαλούμε αναζητήστε μια ενημερωμένη έκδοση στο "
+"http://otr.cypherpunks.ca/"
+
+#: ../otr-plugin.c:1229
+#, c-format
+msgid ""
+"You have enabled a beta version of the Off-the-Record Messaging v%s Pidgin "
+"plugin. This version is intended for testing purposes only and is not for "
+"general purpose use."
+msgstr "Έχετε ενεργοποιήσει την beta έκδοση του πρόσθετου Off-the-Record Messaging v%s "
+"για Pidgin. Αυτή η έκδοση προορίζεται για δοκιμαστικούς σκοπούς μόνο και δεν είναι για γενική χρήση."
+
+#: ../otr-plugin.c:1414
+msgid "Off-the-Record Messaging"
+msgstr "Off-the-Record Messaging"
+
+#: ../otr-plugin.c:1415
+msgid "Provides private and secure conversations"
+msgstr "Παρέχει ιδιωτικές και ασφαλείς συνομιλίες"
+
+#: ../otr-plugin.c:1416
+msgid ""
+"Preserves the privacy of IM communications by providing encryption, "
+"authentication, deniability, and perfect forward secrecy."
+msgstr "Διατηρεί την ιδιωτικότητα των επικοινωνιών άμεσω μηνυμάτων, παρέχοντας "
+"κρυπτογράφηση, αυθεντικοποίηση, δυνατότητα άρνησης, και τέλεια μελλοντική μυστικότητα."
+
+#: ../ui.c:110
+#, c-format
+msgid "Account %s (%s) could not be found"
+msgstr "Ο λογαριασμός %s (%s) δεν ήταν δυνατό να βρεθεί"
+
+#: ../ui.c:114
+msgid "Account not found"
+msgstr "Ο λογαριασμός δε βρέθηκε"
diff --git a/po/es.po b/po/es.po
index d83ac21..7b386c1 100644
--- a/po/es.po
+++ b/po/es.po
@@ -1,524 +1,888 @@
 # Off-the-Record Messaging plugin for pidgin.
-# Copyright (C) 2004-2007  Ian Goldberg, Chris Alexander, Nikita Borisov
+# Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew,
+#	                       Lisa Du, Nikita Borisov
 # This file is distributed under the same license as the pidgin-otr package.
-# Ian Goldberg <otr at cypherpunks.ca>, 2007.
+# Ian Goldberg <otr at cypherpunks.ca>, 2012
 #
-#,
 msgid ""
 msgstr ""
-"Project-Id-Version: pidgin-otr 3.1.0-es\n"
+"Project-Id-Version: pidgin-otr 4.0.0.es\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2007-07-27 08:21-0400\n"
-"POT-Creation-Date: 2007-07-24 15:47-0400\n"
-"Content-Type: text/plain; charset=UTF-8\n"
+"POT-Creation-Date: 2012-06-14 09:45-0400\n"
+"PO-Revision-Date: 2012-06-24 14:35-0500\n"
+"Last-Translator: Juan Rodriguez <sevenfactors at gmail dot com>\n"
+"Language-Team: ~Español~ Juan Rodriguez <sevenfactors at gmail dot com>\n"
 "MIME-Version: 1.0\n"
-"Language-Team: Enrique Martinez Cardenas <enrique.martinez at policode.com>\n"
-"Last-Translator: Enrique Martinez Cardenas <enrique.martinez at policode.com>\n"
+"Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=0; null;\n"
 
-#: ../gtk-dialog.c:913
-#: ../gtk-dialog.c:2095
-msgid "_What's this?"
-msgstr "¿ _Que es esto ?"
+#: ../gtk-dialog.c:332 ../gtk-dialog.c:1141 ../gtk-dialog.c:1145
+#: ../gtk-dialog.c:1547 ../gtk-dialog.c:1584 ../gtk-dialog.c:1673
+#: ../gtk-dialog.c:1748 ../gtk-dialog.c:2749
+msgid "?lang=en"
+msgstr "?lang=es"
 
-#: ../gtk-dialog.c:924
-msgid "_More..."
-msgstr "_Mas..."
+#: ../gtk-dialog.c:480
+msgid ""
+"Your buddy is attempting to determine if he or she is really talking to you, "
+"or if it's someone pretending to be you.  Your buddy has asked a question, "
+"indicated below.  To authenticate to your buddy, enter the answer and click "
+"OK."
+msgstr ""
+"Tú compañero/ra está tratando de determinar si realmente está hablando "
+"contigo, o si se trata de alguien haciéndose pasar por ti. Tú compañero/ra "
+"ha hecho una pregunta, la cual se indica a continuación. Para autenticar, "
+"introduce la respuesta y has clic en OK."
+
+#: ../gtk-dialog.c:487
+msgid ""
+"To authenticate using a question, pick a question whose answer is known only "
+"to you and your buddy.  Enter this question and this answer, then wait for "
+"your buddy to enter the answer too.  If the answers don't match, then you "
+"may be talking to an imposter."
+msgstr ""
+"Para autenticar mediante una pregunta, escoge una pregunta cuya respuesta " 
+"sea conocida solamente por ti y tú compañero/ra. Ingresa esta pregunta y su "
+"respuesta, ahora espera que tú compañero/ra responda la pregunta. Si las " 
+"respuestas no coinciden, entonces puede ser que estés hablando con un "
+"impostor."
 
-#: ../gtk-dialog.c:980
-#. Create the Advanced... button, and left-justify it.  This
-#. * involves adding the button, and a blank label as a spacer, and
-#. * reordering them so that they're at the beginning.
-msgid "Advanced..."
-msgstr "Avanzado..."
+#: ../gtk-dialog.c:505
+#, c-format
+msgid "This is the question asked by your buddy:"
+msgstr "Esta es la pregunta hecha por tú compañero/ra:"
 
-#: ../gtk-dialog.c:1025
-msgid "Enter secret here"
-msgstr "Ingresa la contraseña aqui"
+#: ../gtk-dialog.c:508
+#, c-format
+msgid "Enter question here:"
+msgstr "Introduce la pregunta aquí:"
 
-#: ../gtk-dialog.c:1030
+#: ../gtk-dialog.c:540 ../gtk-dialog.c:624
 msgid "This buddy is already authenticated."
-msgstr "Este compañero ya esta autentificado."
+msgstr "Este compañero ya ha sido autenticado."
 
-#: ../gtk-dialog.c:1049
-msgid "To authenticate, pick a secret known only to you and your buddy.  Enter this"
-"secret, then wait for your buddy to enter it too.  If the secrets don't"
+#: ../gtk-dialog.c:552
+#, c-format
+msgid "Enter secret answer here (case sensitive):"
+msgstr "Ingresa la respuesta secreta aquí (sensible a mayúsculas):"
+
+#: ../gtk-dialog.c:593
+msgid ""
+"To authenticate, pick a secret known only to you and your buddy.  Enter this "
+"secret, then wait for your buddy to enter it too.  If the secrets don't "
 "match, then you may be talking to an imposter."
-msgstr "Para autentifica, selecciona una contraseña conocida unicamente por ti y por tu compañero. Ingresa esta"
-"contraseña, y espera a que tu compañero la ingrese. Si las contraseñas no"
-"concuerdan, entonces podrías estar hablando con un impostor."
-
-#: ../gtk-dialog.c:1053
-msgid "If your buddy uses multiple IM accounts or multiple computers, you may have"
-"to authenticate multiple times.  However, as long as they use an account and"
-"computer that you've seen before, you don't need to authenticate each"
-"individual conversation."
-msgstr "Si tu compañero utiliza múltiples cuentas de IM o múltiples computadoras, necesitaras"
-"autentificarte múltiples veces. Sin embargo, siempre y cuando tu compañero utilize una cuenta y"
-"computadora que ya hayan sido autentificadas anteriormente, no será necesario en"
-"cada conversación individual."
-
-#: ../gtk-dialog.c:1058
-#: ../gtk-dialog.c:1322
-#: ../gtk-dialog.c:1326
-#: ../gtk-dialog.c:1423
-#: ../gtk-dialog.c:1590
-#: ../gtk-dialog.c:1750
-#: ../gtk-dialog.c:1850
-#: ../gtk-dialog.c:1935
-msgid "?lang=en"
-msgstr "?lang=es"
+msgstr ""
+"Para autenticar, escoge un secreto conocido solamente por ti y tú "
+"compañero/ra. Ingresa este secreto, ahora espera que tú compañero/ra lo "
+"ingrese también. Si el secreto no coincide, entonces puede ser que estés "
+"hablando con un impostor."
+
+#: ../gtk-dialog.c:607
+#, c-format
+msgid "Enter secret here:"
+msgstr "Introduce el secreto aquí:"
+
+#: ../gtk-dialog.c:657 ../gtk-dialog.c:1408
+msgid ""
+"To verify the fingerprint, contact your buddy via some <i>other</i> "
+"authenticated channel, such as the telephone or GPG-signed email.  Each of "
+"you should tell your fingerprint to the other."
+msgstr ""
+"Para verificar la huella digital, contacta a tú compañero/ra por medio de "
+"<i>otro</i> canal seguro, como el teléfono o correo electrónico firmado por "
+"GPG. Cada uno deberá decirse la huella digital del otro."
+
+#: ../gtk-dialog.c:661
+msgid ""
+"If everything matches up, you should chose <b>I have</b> in the menu below."
+msgstr ""
+"Si todo concuerda, deberás indicarlo en el menú posterior eligiendo yo he "
+"<b>Verificado</b> la huella digital."
+
+#: ../gtk-dialog.c:672 ../gtk-dialog.c:1397
+msgid "[none]"
+msgstr "[nada]"
 
-#: ../gtk-dialog.c:1059
-msgid "Click here for more information about authentication in OTR."
-msgstr "Haz un click aqui para mas información acerca de la autentificación en OTR."
+#: ../gtk-dialog.c:679 ../gtk-dialog.c:1051 ../gtk-dialog.c:1404
+#: ../gtk-dialog.c:1453 ../gtk-ui.c:212 ../otr-plugin.c:127
+#: ../otr-plugin.c:300 ../ui.c:112
+msgid "Unknown"
+msgstr "Desconocido"
+
+#: ../gtk-dialog.c:680
+#, c-format
+msgid ""
+"Fingerprint for you, %s (%s):\n"
+"%s\n"
+"\n"
+"Purported fingerprint for %s:\n"
+"%s\n"
+msgstr ""
+"Huella digital para ti, %s (%s):\n"
+"%s\n"
+"\n"
+"Huella digital pretendida para %s:\n"
+"%s\n"
 
-#: ../gtk-dialog.c:1063
-msgid "Authenticating a buddy helps ensure that the person you are talking to is"
-"who they claim to be."
-msgstr "Autentificar a un compañero te asegura que la persona con la que supuestamente"
-"estas hablando sea quien dice ser."
+#: ../gtk-dialog.c:736
+msgid "How would you like to authenticate your buddy?"
+msgstr "¿Cómo te gustaría autenticar a tú compañero/ra?"
 
-#: ../gtk-dialog.c:1113
+#: ../gtk-dialog.c:745
+msgid "Question and answer"
+msgstr "Pregunta y respuesta"
+
+#: ../gtk-dialog.c:748
+msgid "Shared secret"
+msgstr "Secreto compartido"
+
+#: ../gtk-dialog.c:751
+msgid "Manual fingerprint verification"
+msgstr "Verificación manual de la huella digital"
+
+#: ../gtk-dialog.c:802
+msgid "_Authenticate"
+msgstr "_Autenticar"
+
+#: ../gtk-dialog.c:836
+msgid ""
+"Authenticating a buddy helps ensure that the person you are talking to is "
+"who he or she claims to be."
+msgstr ""
+"Autenticar a un compañero/ra te asegura que la persona con la que "
+"supuestamente estás hablando es quien dice ser."
+
+#. Translators: you are asked to authenticate yourself
+#: ../gtk-dialog.c:946
+msgid "Authenticating to Buddy"
+msgstr "Autenticando tu identidad a tú Compañero/ra"
+
+#. Translators: you asked your buddy to authenticate him/herself
+#: ../gtk-dialog.c:948
 msgid "Authenticating Buddy"
-msgstr "Autentificando Compañero"
+msgstr "Autenticando la identidad de tú compañero/ra"
 
-#: ../gtk-dialog.c:1140
-msgid "Authenticating"
-msgstr "Autentificando"
+#: ../gtk-dialog.c:975
+#, c-format
+msgid "Authenticating to %s"
+msgstr "Autenticando hacia %s"
 
-#: ../gtk-dialog.c:1201
+#: ../gtk-dialog.c:976
+#, c-format
+msgid "Authenticating %s"
+msgstr "Autenticando a %s"
+
+#: ../gtk-dialog.c:1009
+msgid "Waiting for buddy..."
+msgstr "Esperando por tú compañero/ra..."
+
+#: ../gtk-dialog.c:1042
 msgid "Generating private key"
 msgstr "Generando la llave privada"
 
-#: ../gtk-dialog.c:1202
+#: ../gtk-dialog.c:1043
 msgid "Please wait"
-msgstr "Por favor espere"
-
-#: ../gtk-dialog.c:1210
-#: ../gtk-dialog.c:1627
-#: ../gtk-dialog.c:1664
-#: ../gtk-ui.c:175
-#: ../otr-plugin.c:115
-#: ../otr-plugin.c:212
-#: ../ui.c:110
-msgid "Unknown"
-msgstr "Desconocido"
+msgstr "Por favor, espere"
 
-#: ../gtk-dialog.c:1213
 #. Create the Please Wait... dialog
+#: ../gtk-dialog.c:1054
 #, c-format
 msgid "Generating private key for %s (%s)..."
 msgstr "Generando la llave privada para %s (%s)..."
 
-#: ../gtk-dialog.c:1258
+#: ../gtk-dialog.c:1099
 #, c-format
 msgid "%s Done."
 msgstr "%s Terminado."
 
-#: ../gtk-dialog.c:1320
+#: ../gtk-dialog.c:1139
 #, c-format
-msgid "%s is contacting you from an unrecognized computer.  You should <a href=\"%s%"
+msgid ""
+"%s is contacting you from an unrecognized computer.  You should <a href=\"%s%"
 "s\">authenticate</a> this buddy."
-msgstr "%s te esta contactando desde una computadora no conocida. Necesitas "
-"<a href=\"%s%s\">autentificar</a> a este compañero."
+msgstr ""
+"%s te esta contactando desde una computadora desconocida. Deberías de "
+"<a href=\"%s%s\">autenticar</a> a este compañero/ra."
 
-#: ../gtk-dialog.c:1324
+#: ../gtk-dialog.c:1143
 #, c-format
-msgid "%s has not been authenticated yet.  You should <a href=\"%s%s"
+msgid ""
+"%s has not been authenticated yet.  You should <a href=\"%s%s"
 "\">authenticate</a> this buddy."
-msgstr "%s no ha sido autentificado todavía.  Necesitas <a href=\"%s%s\">"
-"autentificar</a> a este compañero."
+msgstr ""
+"%s todavía no ha sido autenticado. Deberías <a href=\"%s%s\">"
+"autenticar</a> a este compañero/ra."
 
-#: ../gtk-dialog.c:1365
-#: ../gtk-ui.c:76
+#: ../gtk-dialog.c:1195 ../gtk-dialog.c:1969 ../gtk-dialog.c:2745
+#: ../gtk-ui.c:83
 msgid "Finished"
 msgstr "Terminado"
 
-#: ../gtk-dialog.c:1366
-#: ../gtk-ui.c:75
+#: ../gtk-dialog.c:1196 ../gtk-dialog.c:1966 ../gtk-dialog.c:2742
+#: ../gtk-ui.c:82
 msgid "Private"
 msgstr "Privado"
 
-#: ../gtk-dialog.c:1367
-#: ../gtk-ui.c:74
+#: ../gtk-dialog.c:1197 ../gtk-dialog.c:1963 ../gtk-dialog.c:2739
+#: ../gtk-ui.c:81
 msgid "Unverified"
 msgstr "No verificado"
 
-#: ../gtk-dialog.c:1368
-#: ../gtk-ui.c:73
+#: ../gtk-dialog.c:1198 ../gtk-ui.c:80
 msgid "Not private"
 msgstr "No privado"
 
-#: ../gtk-dialog.c:1370
-msgid "Start a private conversation"
-msgstr "Iniciar conversación privada"
-
-#: ../gtk-dialog.c:1371
-msgid "Refresh the private conversation"
-msgstr "Actualizar la conversación privada"
-
-#: ../gtk-dialog.c:1375
-msgid "Start _private conversation"
-msgstr "Iniciar una conversación _privada"
-
-#: ../gtk-dialog.c:1376
-msgid "Refresh _private conversation"
-msgstr "Actualizar la conversación _privada"
-
-#: ../gtk-dialog.c:1555
+#: ../gtk-dialog.c:1201
+msgid "OTR"
+msgstr "OTR"
+
+#. Translators: the following four messages should give alternative
+#. * sentences. The user selects the first or second message in a combo box;
+#. * the third message, a new line, a fingerprint, a new line, and
+#. * the fourth message will follow it.
+#: ../gtk-dialog.c:1351
 msgid "I have not"
-msgstr "No tengo"
+msgstr "Yo no he"
 
-#: ../gtk-dialog.c:1556
+#. 2nd message
+#: ../gtk-dialog.c:1353
 msgid "I have"
-msgstr "Tengo"
+msgstr "Yo he"
 
-#: ../gtk-dialog.c:1558
+#. 3rd message
+#: ../gtk-dialog.c:1356
 msgid " verified that this is in fact the correct"
-msgstr " verificado que es correcto"
+msgstr " verificado que en verdad esta es la correcta"
 
-#: ../gtk-dialog.c:1567
+#. 4th message
+#: ../gtk-dialog.c:1366
 #, c-format
 msgid "fingerprint for %s."
 msgstr "huella digital para %s."
 
-#: ../gtk-dialog.c:1579
-msgid "To verify the fingerprint, contact your buddy via some <i>other</i>"
-"authenticated channel, such as the telephone or GPG-signed email.  Each of"
-"you should tell your fingerprint to the other."
-msgstr "Para verificar la huella digital, contacta a tu compañero por medio de <i>otro</i>"
-"canal seguro, como el telefono o correo firmado por GPG.  Cada uno"
-"deberá decirse la huella digital del otro."
-
-#: ../gtk-dialog.c:1583
-msgid "If everything matches up, you should indicate in the above dialog that you"
-"<b>have</b> verified the fingerprint."
-msgstr "Si todo concuerda, deberás indicar en el diálogo superior que tu"
-"<b>haz</b> verificado la huella digital."
-
-#: ../gtk-dialog.c:1585
-msgid "If your buddy has more than one IM account, or uses more than one computer,"
-"he may have multiple fingerprints."
-msgstr "Si tu compañero utiliza mas de una cuenta de IM, o utiliza mas de una computadora,"
-"puede tener multiples huellas digitales."
-
-#: ../gtk-dialog.c:1587
-msgid "However, the only way an imposter could duplicate one of your buddy's"
-"fingerprints is by stealing information from her/his computer."
-msgstr "Sin embargo, la unica forma que un impostor puede duplicar alguna de"
-"las huellas digitales de un/a compañero/a es robandosela de su computadora."
-
-#: ../gtk-dialog.c:1591
-msgid "Click here for more information about fingerprints."
-msgstr "Presiona aqui para mas información acerca de huellas digitales."
-
-#: ../gtk-dialog.c:1594
-msgid "A <b>fingerprint</b> is a unique identifier that you should use to"
-"authenticate your buddy."
-msgstr "Una <b>huella digital</b> es un identificador unico que sirve para"
-"autentificar a un compañero/a."
-
-#: ../gtk-dialog.c:1616
+#: ../gtk-dialog.c:1393
 #, c-format
 msgid "Verify fingerprint for %s"
-msgstr "Verificar la huella digital para %s"
+msgstr "Verificar huella digital para %s"
 
-#: ../gtk-dialog.c:1620
-msgid "[none]"
-msgstr "[ninguno]"
-
-#: ../gtk-dialog.c:1628
+#: ../gtk-dialog.c:1405
 #, c-format
-msgid "Fingerprint for you, %s (%s):\n"
+msgid ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>Fingerprint for you, %s (%s):\n"
 "%s\n"
 "\n"
 "Purported fingerprint for %s:\n"
 "%s\n"
-msgstr "Huella digital para ti, %s (%s):\n"
+msgstr ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>Huella digital para ti, %s (%s):\n"
 "%s\n"
 "\n"
 "Huella digital pretendida para %s:\n"
 "%s\n"
 
-#: ../gtk-dialog.c:1633
-#: ../gtk-ui.c:681
+#: ../gtk-dialog.c:1412
+msgid ""
+"If everything matches up, you should indicate in the above dialog that you "
+"<b>have</b> verified the fingerprint."
+msgstr ""
+"Si todo coincide, tendrás que indicar en el cuadro de diálogo que tu "
+"<b>has</b> verificado la huella digital."
+
+#: ../gtk-dialog.c:1418 ../gtk-ui.c:844
 msgid "Verify fingerprint"
-msgstr "Verificar huella digital"
+msgstr "Verificar la huella digital"
 
-#: ../gtk-dialog.c:1660
+#: ../gtk-dialog.c:1445
 #, c-format
-msgid "Authenticate %s"
-msgstr "Autentificar %s"
+msgid "Authentication from %s"
+msgstr "Autenticación de %s"
 
-#: ../gtk-dialog.c:1665
+#: ../gtk-dialog.c:1448
 #, c-format
-msgid "Enter a secret known only to %s and yourself.\n"
-msgstr "Ingresa una contraseña conocida unicamente por %s y por ti mismo.\n"
+msgid "Authenticate %s"
+msgstr "Autenticar %s"
 
-#: ../gtk-dialog.c:1668
-msgid "Authenticate buddy"
-msgstr "Atentificar a compañero/a"
+#: ../gtk-dialog.c:1456
+msgid "Authenticate Buddy"
+msgstr "Autentica a tú Compañero/ra"
 
-#: ../gtk-dialog.c:1700
+#: ../gtk-dialog.c:1487
 msgid "An error occurred during authentication."
-msgstr "A ocurrido un error en la autentificación."
+msgstr "A ocurrido un error durante la autenticación."
 
-#: ../gtk-dialog.c:1716
+#: ../gtk-dialog.c:1502
 msgid "Authentication successful."
-msgstr "Autentificación exitosa."
+msgstr "Autenticación exitosa."
 
-#: ../gtk-dialog.c:1719
+#: ../gtk-dialog.c:1505
+msgid ""
+"Your buddy has successfully authenticated you.  You may want to authenticate "
+"your buddy as well by asking your own question."
+msgstr ""
+"Tú Compañero/ra ha logrado autenticar tu identidad. Tu también deberías de "
+"autenticar a tú compañero/ra haciéndole una pregunta."
+ 
+#: ../gtk-dialog.c:1511
 msgid "Authentication failed."
-msgstr "Autentificación fallida."
+msgstr "Autenticación fallida."
 
-#: ../gtk-dialog.c:1744
+#: ../gtk-dialog.c:1541
 #, c-format
-msgid "Private conversation with %s started.%s"
-msgstr "Conversación privada con %s iniciada.%s"
+msgid "Private conversation with %s started.%s%s"
+msgstr "Conversación privada con %s iniciada.%s%s"
 
-#: ../gtk-dialog.c:1748
+#: ../gtk-dialog.c:1545
 #, c-format
-msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s"
-msgstr "Conversación <a href=\"%s%s\">No verificada</a> con %%s iniciada.%%s"
+msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s%%s"
+msgstr "Conversación <a href=\"%s%s\">No verificada</a> con %%s started.%%s%%s"
 
-#: ../gtk-dialog.c:1756
 #. This last case should never happen, since we know
 #. * we're in ENCRYPTED.
+#: ../gtk-dialog.c:1553
 #, c-format
-msgid "Not private conversation with %s started.%s"
-msgstr "Conversación NO privada con %s iniciada.%s"
+msgid "Not private conversation with %s started.%s%s"
+msgstr "Conversación NO Privada con %s iniciada.%s%s"
 
-#: ../gtk-dialog.c:1762
-#: ../gtk-dialog.c:1863
+#: ../gtk-dialog.c:1559 ../gtk-dialog.c:1686
 msgid "  Warning: using old protocol version 1."
-msgstr " Cuidado: utilizando el protocolo antiguo version 1."
+msgstr "  Cuidado: utilizando el protocolo antiguo version 1."
+
+#: ../gtk-dialog.c:1561
+msgid "  Your client is logging this conversation."
+msgstr "  Tu cliente de mensajería instantánea está transcribiendo la "
+"conversación"
+
+#: ../gtk-dialog.c:1562
+msgid "  Your client is not logging this conversation."
+msgstr "  Tu cliente de mensajería no está transcribiendo la conversación."
 
-#: ../gtk-dialog.c:1782
+#: ../gtk-dialog.c:1581
+#, c-format
+msgid ""
+"Your buddy is logged in multiple times and OTR has established <a href=\"%s%s"
+"\">multiple sessions</a>. Use the icon menu above if you wish to select the "
+"outgoing session."
+msgstr ""
+"Tú compañero/ra esta conectado/da múltiples veces y OTR ha establecido "
+"<a href=\"%s%s\">múltiple sesiones</a>. Si deseas seleccionar otra sesión "
+"de salida, utiliza el menú del icono en la parte superior."
+
+#: ../gtk-dialog.c:1601
 #, c-format
 msgid "Private conversation with %s lost."
 msgstr "Conversación privada con %s perdida."
 
-#: ../gtk-dialog.c:1817
+#: ../gtk-dialog.c:1638
 #, c-format
-msgid "%s has ended his/her private conversation with you; you should do the same."
-msgstr "%s ha terminado su conversación privada; se debería hacer lo mismo."
+msgid ""
+"%s has ended his/her private conversation with you; you should do the same."
+msgstr ""
+"%s ha terminado su conversación privada; tu deberías de hacer lo mismo."
 
-#: ../gtk-dialog.c:1842
+#: ../gtk-dialog.c:1665
 #, c-format
 msgid "Successfully refreshed the private conversation with %s.%s"
-msgstr "Se a actualizado correctamente la conversación privada con %s.%s"
+msgstr "Se ha actualizado correctamente la conversación privada con %s.%s"
 
-#: ../gtk-dialog.c:1847
+#: ../gtk-dialog.c:1670
 #, c-format
-msgid "Successfully refreshed the <a href=\"%s%s\">unverified</a> conversation with"
-"%%s.%%s"
-msgstr "Se ha actualizado correctamente la conversación <a href=\"%s%s\">no verificada</a> con"
+msgid ""
+"Successfully refreshed the <a href=\"%s%s\">unverified</a> conversation with "
 "%%s.%%s"
+msgstr ""
+"Se ha actualizado correctamente la conversación "
+"<a href=\"%s%s\">no verificada</a> con %%s.%%s"
 
-#: ../gtk-dialog.c:1856
 #. This last case should never happen, since we know
 #. * we're in ENCRYPTED.
+#: ../gtk-dialog.c:1679
 #, c-format
 msgid "Successfully refreshed the not private conversation with %s.%s"
 msgstr "Se ha actualizado correctamente la conversación no privada con %s.%s"
 
-#: ../gtk-dialog.c:1883
+#: ../gtk-dialog.c:1712
 #, c-format
 msgid "Attempting to refresh the private conversation with %s..."
 msgstr "Intentando actualizar la conversación privada con %s..."
 
-#: ../gtk-dialog.c:1885
+#: ../gtk-dialog.c:1714
 #, c-format
 msgid "Attempting to start a private conversation with %s..."
 msgstr "Intentando iniciar una conversación privada con %s..."
 
-#: ../gtk-dialog.c:2045
-msgid "OTR:"
-msgstr "OTR:"
+#: ../gtk-dialog.c:1899 ../gtk-dialog.c:2026
+msgid "Start _private conversation"
+msgstr "Iniciar conversación _privada"
 
-#: ../gtk-dialog.c:2054
-msgid "OTR Messaging"
-msgstr "Mensaje OTR"
+#: ../gtk-dialog.c:1900
+msgid "Refresh _private conversation"
+msgstr "Actualizar conversación _privada"
 
-#: ../gtk-dialog.c:2060
+#: ../gtk-dialog.c:1905
+msgid "Re_authenticate buddy"
+msgstr "Re_autentica tú compañero/ra"
+
+#: ../gtk-dialog.c:1906 ../gtk-dialog.c:2030
+msgid "_Authenticate buddy"
+msgstr "_Autentica tú compañero/ra"
+
+#: ../gtk-dialog.c:1960 ../gtk-dialog.c:2736
+msgid "Not Private"
+msgstr "No Privado"
+
+#: ../gtk-dialog.c:1982
+msgid "_What's this?"
+msgstr "¿_Qué es esto?"
+
+#: ../gtk-dialog.c:2028
 msgid "_End private conversation"
 msgstr "_Terminar la conversación privada"
 
-#: ../gtk-dialog.c:2078
-#. * Don't show the Verify fingerprint menu option any more.  You can
-#. * still get to the dialog through Authenticate connection ->
-#. * Advanced...
-#. *
-#. menuverf = gtk_menu_item_new_with_mnemonic(_("_Verify fingerprint"));
-#. gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuverf);
-#. gtk_widget_show(menuverf);
-msgid "_Authenticate buddy"
-msgstr "_Autentificar compañero"
+#: ../gtk-dialog.c:2207 ../gtk-dialog.c:2255
+#, c-format
+msgid ""
+"Warning: The selected outgoing OTR session (%u) is not the most recently "
+"active one (%u). Your buddy may not receive your messages. Use the icon menu "
+"above to select a different outgoing session."
+msgstr ""
+"Cuidado: La sesión OTR de salida seleccionada (%u) no es la más "
+"recientemente activada (% u). Puede ser que tú compañero/ra no pueda recibir "
+"tus mensajes. Para seleccionar otra sesión de salida, utiliza el menú del "
+"icono en la parte superior."
+
+#: ../gtk-dialog.c:2271
+msgid "Send to most secure"
+msgstr "Enviar al más seguro"
 
-#: ../gtk-ui.c:96
+#: ../gtk-dialog.c:2273
+msgid "Send to most recent"
+msgstr "Enviar al más reciente"
+
+#: ../gtk-dialog.c:2377
+#, c-format
+msgid "Session %u"
+msgstr "Sesión %u"
+
+#: ../gtk-dialog.c:2395 ../gtk-dialog.c:2506
+msgid "Select"
+msgstr "Seleccionar"
+
+#: ../gtk-dialog.c:2410
+msgid "Selected"
+msgstr "Seleccionado"
+
+#: ../gtk-dialog.c:2731
+#, c-format
+msgid ""
+"The privacy status of the current conversation is now: <a href=\"%s%s\">%s</"
+"a>"
+msgstr ""
+"El estado de privacidad de la conversación actual ahora es: <a href=\"%s%s"
+"\">%s</a>"
+
+#: ../gtk-dialog.c:2956
+msgid "OTR Messaging"
+msgstr "Mensajería OTR"
+
+#: ../gtk-ui.c:103
 #, c-format
 msgid "Fingerprint: %.80s"
-msgstr "Huella digital: %.80s"
+msgstr "Huella digital %.80s"
 
-#: ../gtk-ui.c:100
+#: ../gtk-ui.c:107
 #, c-format
 msgid "No key present"
-msgstr "No existe llave"
+msgstr "No existe una llave"
 
-#: ../gtk-ui.c:105
+#: ../gtk-ui.c:112
 #, c-format
 msgid "No account available"
 msgstr "No hay cuenta disponible"
 
-#: ../gtk-ui.c:165
+#: ../gtk-ui.c:179
 msgid "Unused"
-msgstr "No utilizada"
+msgstr "Sin utilizar"
 
-#: ../gtk-ui.c:171
+#: ../gtk-ui.c:208
 msgid "Yes"
-msgstr "Si"
+msgstr "Sí"
 
-#: ../gtk-ui.c:171
+#: ../gtk-ui.c:208
 msgid "No"
 msgstr "No"
 
-#: ../gtk-ui.c:396
+#: ../gtk-ui.c:473
 msgid "Enable private messaging"
 msgstr "Habilitar mensajes privados"
 
-#: ../gtk-ui.c:398
+#: ../gtk-ui.c:475
 msgid "Automatically initiate private messaging"
-msgstr "Iniciar automaticamente mensajes privados"
+msgstr "Iniciar automáticamente mensajes privados"
 
-#: ../gtk-ui.c:400
+#: ../gtk-ui.c:477
 msgid "Require private messaging"
-msgstr "Requiere mensajes privados."
+msgstr "Requerir mensajes privados"
 
-#: ../gtk-ui.c:403
+#: ../gtk-ui.c:480
 msgid "Don't log OTR conversations"
-msgstr "No grabar conversaciones OTR"
+msgstr "No transcribir conversaciones OTR"
+
+#: ../gtk-ui.c:524
+msgid "Show OTR button in toolbar"
+msgstr "Mostrar el botón de OTR en la barra de herramientas"
 
-#: ../gtk-ui.c:531
+#: ../gtk-ui.c:663
 msgid "My private keys"
 msgstr "Mis llaves privadas"
 
-#: ../gtk-ui.c:540
+#: ../gtk-ui.c:672
 msgid "Key for account:"
 msgstr "Llave para cuenta:"
 
-#: ../gtk-ui.c:565
+#: ../gtk-ui.c:697
 msgid "Generate"
 msgstr "Generar"
 
-#: ../gtk-ui.c:596
+#: ../gtk-ui.c:738
 msgid "Default OTR Settings"
-msgstr "Parametros por defecto para OTR"
+msgstr "Restaurar la configuración predeterminada de OTR"
 
-#: ../gtk-ui.c:625
+#: ../gtk-ui.c:765
+msgid "OTR UI Options"
+msgstr "Opciones de interfaz de usario OTR"
+
+#: ../gtk-ui.c:788
 msgid "Screenname"
-msgstr "Nombre de pantalla"
+msgstr "Nombre de usuario"
 
-#: ../gtk-ui.c:626
+#: ../gtk-ui.c:789
 msgid "Status"
-msgstr "Estatus"
+msgstr "Estado"
 
-#: ../gtk-ui.c:627
+#: ../gtk-ui.c:790
 msgid "Verified"
 msgstr "Verificado"
 
-#: ../gtk-ui.c:628
+#: ../gtk-ui.c:791
 msgid "Fingerprint"
 msgstr "Huella digital"
 
-#: ../gtk-ui.c:629
+#: ../gtk-ui.c:792
 msgid "Account"
 msgstr "Cuenta"
 
-#: ../gtk-ui.c:665
+#: ../gtk-ui.c:828
 msgid "Start private connection"
 msgstr "Iniciar conexión privada"
 
-#: ../gtk-ui.c:673
+#: ../gtk-ui.c:836
 msgid "End private connection"
 msgstr "Terminar conexión privada"
 
-#: ../gtk-ui.c:689
+#: ../gtk-ui.c:852
 msgid "Forget fingerprint"
 msgstr "Olvidar huella digital"
 
-#: ../gtk-ui.c:738
+#: ../gtk-ui.c:903
 msgid "Config"
 msgstr "Config"
 
-#: ../gtk-ui.c:740
+#: ../gtk-ui.c:905
 msgid "Known fingerprints"
 msgstr "Huellas digitales conocidas"
 
-#: ../gtk-ui.c:838
-#: ../otr-plugin.c:577
+#: ../gtk-ui.c:1003 ../otr-plugin.c:964
 msgid "OTR Settings"
 msgstr "Configuración de OTR"
 
-#: ../gtk-ui.c:856
 #. Set the title
+#: ../gtk-ui.c:1021
 #, c-format
 msgid "OTR Settings for %s"
 msgstr "Configuración OTR para %s"
 
-#: ../gtk-ui.c:873
 #. Make the cascaded checkboxes
+#: ../gtk-ui.c:1038
 msgid "Use default OTR settings for this buddy"
-msgstr "Utilizar configuración por defecto de OTR de este compañero"
+msgstr "Utilizar configuración predeterminada de OTR para este compañero/ra"
 
-#: ../otr-plugin.c:113
+#: ../otr-plugin.c:125
 #, c-format
 msgid "You are not currently connected to account %s (%s)."
-msgstr "Tu no estas actualmente conectado a la cuenta %s (%s)."
+msgstr "Actualmente no estas conectado a la cuenta %s (%s)."
 
-#: ../otr-plugin.c:117
+#: ../otr-plugin.c:129
 msgid "Not connected"
-msgstr "No conectado"
+msgstr "No está conectado"
 
-#: ../otr-plugin.c:161
+#: ../otr-plugin.c:212 ../otr-plugin.c:254
 #, c-format
 msgid "Out of memory building filenames!\n"
 msgstr "No hay memoria suficiente para construir nombres de archivo!\n"
 
-#: ../otr-plugin.c:167
+#: ../otr-plugin.c:224 ../otr-plugin.c:260
 #, c-format
 msgid "Could not write private key file\n"
 msgstr "No se pudo escribir el archivo de la llave privada\n"
 
-#: ../otr-plugin.c:210
+#: ../otr-plugin.c:298
 #, c-format
 msgid "Unknown account %s (%s)."
 msgstr "Cuenta desconocida %s (%s)."
 
-#: ../otr-plugin.c:214
+#: ../otr-plugin.c:302
 msgid "Unknown account"
 msgstr "Cuenta desconocida"
 
-#: ../otr-plugin.c:953
+#: ../otr-plugin.c:364
+msgid "Error occurred encrypting message."
+msgstr "Ocurrió un error durante el cifrado de mensaje."
+
+#: ../otr-plugin.c:368
+#, c-format
+msgid "You sent encrypted data to %s, who wasn't expecting it."
+msgstr "Enviaste datos cifrados a %s, quien no lo estaba esperando."
+
+#: ../otr-plugin.c:374
+msgid "You transmitted an unreadable encrypted message."
+msgstr "Transmitiste un ilegible mensaje cifrado."
+
+#: ../otr-plugin.c:377
+msgid "You transmitted a malformed data message."
+msgstr "Transmitiste un mensage de datos mal formado"
+
+#: ../otr-plugin.c:390
+msgid "[resent]"
+msgstr "[resentir]"
+
+#: ../otr-plugin.c:459
+#, c-format
+msgid "You attempted to send an unencrypted message to %s"
+msgstr "Has intentado enviar un mensaje sin cifrar a %s"
+
+#: ../otr-plugin.c:462
+msgid "Attempting to start a private conversation..."
+msgstr "Intentando iniciar una conversación privada..."
+
+#: ../otr-plugin.c:464
+msgid "OTR Policy Violation"
+msgstr "Violación de la Póliza de OTR"
+
+#: ../otr-plugin.c:465
+msgid ""
+"Unencrypted messages to this recipient are not allowed.  Attempting to start "
+"a private conversation.\n"
+"\n"
+"Your message will be retransmitted when the private conversation starts."
+msgstr ""
+"Mensajes sin cifrar a este destinatario no están permitidos. Intentando "
+"iniciar una conversación privada.\n"
+"\n"
+"Tu mensaje será retransmitido cuando la conversación privada sea iniciada."
+
+#: ../otr-plugin.c:474
+msgid ""
+"An error occurred when encrypting your message.  The message was not sent."
+msgstr "Ocurrió un error durante el cifrado de tu mensaje. El mensaje no fue "
+"enviado."
+
+#: ../otr-plugin.c:476
+msgid "Error encrypting message"
+msgstr "Error durante el cifrado del mensaje"
+
+#: ../otr-plugin.c:477
+msgid "An error occurred when encrypting your message"
+msgstr "Ocurrió un error durante el cifrado de tu mensaje"
+
+#: ../otr-plugin.c:478
+msgid "The message was not sent."
+msgstr "El mensaje no fue enviado."
+
+#: ../otr-plugin.c:481
+#, c-format
+msgid "%s has already closed his/her private connection to you"
+msgstr "%s ya ha cerrado su conexión privada"
+
+#: ../otr-plugin.c:484
+msgid ""
+"Your message was not sent.  Either end your private conversation, or restart "
+"it."
+msgstr ""
+"Tu mensaje no fue enviado. Termina o reinicia la conversación privada"
+
+#: ../otr-plugin.c:487
+msgid "Private connection closed"
+msgstr "Conexión privada cerrada"
+
+#: ../otr-plugin.c:488
+msgid ""
+"Your message was not sent.  Either close your private connection to him, or "
+"refresh it."
+msgstr ""
+"Tu mensaje no fue enviado. Termina o actualiza la conversación privada"
+
+#: ../otr-plugin.c:498
+msgid "Error setting up private conversation: Malformed message received"
+msgstr "Error al configurar la conversación privada: Mensaje mal formado "
+"recibido"
+
+#: ../otr-plugin.c:502
+#, c-format
+msgid "Error setting up private conversation: %s"
+msgstr "Error al configurar la conversación privada: %s"
+
+#: ../otr-plugin.c:509 ../otr-plugin.c:520 ../otr-plugin.c:547
+#: ../otr-plugin.c:555 ../otr-plugin.c:573
+msgid "OTR Error"
+msgstr "OTR Error"
+
+#: ../otr-plugin.c:516
+msgid ""
+"We are receiving our own OTR messages.  You are either trying to talk to "
+"yourself, or someone is reflecting your messages back at you."
+msgstr ""
+"Estamos recibiendo nuestros propios mensajes de OTR. O estas tratando de "
+"hablar contigo mismo, o alguien te esta reflejando tus mensajes."
+
+#: ../otr-plugin.c:520
+msgid "We are receiving our own OTR messages."
+msgstr "Estamos recibiendo nuestros propios mensajes de OTR"
+
+#: ../otr-plugin.c:521
+msgid ""
+"You are either trying to talk to yourself, or someone is reflecting your "
+"messages back at you."
+msgstr ""
+"O estas tratando de hablar contigo mismo, o alguien te esta reflejando tus "
+"mensajes."
+
+#: ../otr-plugin.c:526
+#, c-format
+msgid "<b>The last message to %s was resent.</b>"
+msgstr "<b>El último mensaje a %s ha sido reenviado.</b>"
+
+#: ../otr-plugin.c:530
+msgid "Message resent"
+msgstr "Mensaje reenviado"
+
+#: ../otr-plugin.c:534
+#, c-format
+msgid ""
+"<b>The encrypted message received from %s is unreadable, as you are not "
+"currently communicating privately.</b>"
+msgstr ""
+"<b>El mensaje cifrado recibido de %s es ilegible, ya que actualmente tu no "
+"estas comunicandote privadamente.</b>"
+
+#: ../otr-plugin.c:539
+msgid "Unreadable message"
+msgstr "Ilegible mensaje"
+
+#: ../otr-plugin.c:543
+#, c-format
+msgid "We received an unreadable encrypted message from %s."
+msgstr "Hemos recibido un ilegible mensaje cifrado de %s."
+
+#: ../otr-plugin.c:551
+#, c-format
+msgid "We received a malformed data message from %s."
+msgstr "Hemos recibido datos mal formados de %s."
+
+#: ../otr-plugin.c:559
+#, c-format
+msgid "Heartbeat received from %s.\n"
+msgstr "Latido recibido de %s.\n"
+
+#: ../otr-plugin.c:565
+#, c-format
+msgid "Heartbeat sent to %s.\n"
+msgstr "Latido enviado a %s.\n"
+
+#: ../otr-plugin.c:576
+#, c-format
+msgid ""
+"<b>The following message received from %s was <i>not</i> encrypted: [</b>%"
+"s<b>]</b>"
+msgstr ""
+"<b>El siguiente mensaje recibido de %s <i>no</i> está cifrado: [</b>%s<b>]"
+"</b>"
+
+#: ../otr-plugin.c:581
+msgid "Received unencrypted message"
+msgstr "Recibido mensage no cifrado"
+
+#: ../otr-plugin.c:587
+#, c-format
+msgid "Unrecognized OTR message received from %s.\n"
+msgstr "Desconocido mensaje de OTR recibido de %s.\n"
+
+#: ../otr-plugin.c:596
+#, c-format
+msgid ""
+"%s has sent a message intended for a different session. If you are logged in "
+"multiple times, another session may have received the message."
+msgstr ""
+"%s ha enviado un mensaje destinado a una sesión diferente. Si estás "
+"conectado múltiples veces, puede ser que otra sesión ha recibido el mensaje."
+
+#: ../otr-plugin.c:602
+msgid "Received message for a different session"
+msgstr "Recibí un mensaje para una sesión diferente"
+
+#. 2013-01-01
+#: ../otr-plugin.c:1193 ../otr-plugin.c:1220
+#, c-format
+msgid "OTR PLUGIN v%s"
+msgstr "OTR COMPLEMENTO v%s"
+
+#: ../otr-plugin.c:1202
+#, c-format
+msgid ""
+"This beta copy of the Off-the-Record Messaging v%s Pidgin plugin has expired "
+"as of 2013-01-01. Please look for an updated release at http://otr."
+"cypherpunks.ca/"
+msgstr ""
+"Esta copia de la beta del complemento Off-the-Record mensajería para v%s "
+"Pidgin ha expirado a partir de 2013-01-01. Por favor, busque una versión "
+"actualizada a http://otr.cypherpunks.ca/"
+
+#: ../otr-plugin.c:1229
+#, c-format
+msgid ""
+"You have enabled a beta version of the Off-the-Record Messaging v%s Pidgin "
+"plugin. This version is intended for testing purposes only and is not for "
+"general purpose use."
+msgstr ""
+"Has activado una version beta del complemento Off-the-Record Mensajería para "
+"v%s Pidgin. Esta versión está diseñada, solamente, para propósitos de prueba "
+"y no para uso general."
+
+#: ../otr-plugin.c:1414
 msgid "Off-the-Record Messaging"
-msgstr "Mensaje Fuera-de-Registro (OTR)"
+msgstr "Off-the-Record Mensajería"
 
-#: ../otr-plugin.c:954
+#: ../otr-plugin.c:1415
 msgid "Provides private and secure conversations"
-msgstr "Provee conversaciones privadas y seguras"
+msgstr "Proporciona conversaciones privadas y seguras"
 
-#: ../otr-plugin.c:955
-msgid "Preserves the privacy of IM communications by providing encryption, "
+#: ../otr-plugin.c:1416
+msgid ""
+"Preserves the privacy of IM communications by providing encryption, "
 "authentication, deniability, and perfect forward secrecy."
-msgstr "Conserva la privacía de las comunicaciones de MI mediante la encripción,"
-"autentificación, rechazó, asi como PFS ( perfect forward secrecy )"
+msgstr ""
+"Conserva la privacidad de las comunicaciones de mensajería instantánea, "
+"proporcionando cifrado, autenticación, negación, y confidencialidad directa "
+"perfecta."
 
-#: ../ui.c:108
+#: ../ui.c:110
 #, c-format
 msgid "Account %s (%s) could not be found"
-msgstr "La cuenta %s (%s) no puede ser encontrada"
+msgstr "La cuenta %s (%s) no fue encontrada"
 
-#: ../ui.c:112
+#: ../ui.c:114
 msgid "Account not found"
-msgstr "La cuenta no ha sido encontrada."
+msgstr "La cuenta no ha sido encontrada"
diff --git a/po/fa.po b/po/fa.po
new file mode 100644
index 0000000..88e9686
--- /dev/null
+++ b/po/fa.po
@@ -0,0 +1,843 @@
+# Off-the-Record Messaging plugin for pidgin.
+# Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew,
+#	                       Lisa Du, Nikita Borisov
+# This file is distributed under the same license as the pidgin-otr package.
+# Ian Goldberg <otr at cypherpunks.ca>, 2012
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pidgin-otr 4.0.0.fa\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-06-14 09:45-0400\n"
+"PO-Revision-Date: 2012-06-25 11:08-0400\n"
+"Last-Translator: Hooman Mohajeri Moghaddam هومن مهاجری مقدم <hmohajer at cs.uwaterloo.ca>\n"
+"Language-Team: Hooman Mohajeri Moghaddam هومن مهاجری مقدم <hmohajer at cs.uwaterloo.ca>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-dialog.c:332 ../gtk-dialog.c:1141 ../gtk-dialog.c:1145
+#: ../gtk-dialog.c:1547 ../gtk-dialog.c:1584 ../gtk-dialog.c:1673
+#: ../gtk-dialog.c:1748 ../gtk-dialog.c:2749
+msgid "?lang=en"
+msgstr "?lang=fa"
+
+#: ../gtk-dialog.c:480
+msgid ""
+"Your buddy is attempting to determine if he or she is really talking to you, "
+"or if it's someone pretending to be you.  Your buddy has asked a question, "
+"indicated below.  To authenticate to your buddy, enter the answer and click "
+"OK."
+msgstr "دوست شما قصد دارد اطمینان حاصل کند که در حال مکالمه با شماست و نه با فرد دیگری که قصد دارد خود را به جای شما معرفی نماید. دوست شما سوالی را  ‏مطرح کرده است که در زیر آمده است. برا احراز هویت خود جواب سوال را وارد نمود و کلید OK را کلیک کنید."
+
+#: ../gtk-dialog.c:487
+msgid ""
+"To authenticate using a question, pick a question whose answer is known only "
+"to you and your buddy.  Enter this question and this answer, then wait for "
+"your buddy to enter the answer too.  If the answers don't match, then you "
+"may be talking to an imposter."
+msgstr "برای احراز هویت به وسیله سوال، سوالی را که جواب آن را تنها شما و دوستتان می‌دانید انتخاب کنید. این سوال و جواب را وارد کرده و منتظر شوید که دوستتان نیز جواب را وارد کند. اگر جواب درست را دریافت نکردید ممکن است که با فرد دیگری (مهاجم) در حال مکالمه باشید! "
+
+#: ../gtk-dialog.c:505
+#, c-format
+msgid "This is the question asked by your buddy:"
+msgstr "سوالی که توسط دوستتان پرسیده شده است:"
+
+#: ../gtk-dialog.c:508
+#, c-format
+msgid "Enter question here:"
+msgstr "سوال را اینجا وارد نمایید:"
+
+#: ../gtk-dialog.c:540 ../gtk-dialog.c:624
+msgid "This buddy is already authenticated."
+msgstr "هویت این دوست قبلاً احراز شده است."
+
+#: ../gtk-dialog.c:552
+#, c-format
+msgid "Enter secret answer here (case sensitive):"
+msgstr "جواب سوال (مخفی) را اینجا وارد نمایید (حساس به حروف کوچک و بزرگ):"
+
+#: ../gtk-dialog.c:593
+msgid ""
+"To authenticate, pick a secret known only to you and your buddy.  Enter this "
+"secret, then wait for your buddy to enter it too.  If the secrets don't "
+"match, then you may be talking to an imposter."
+msgstr "برای احراز هویت ، پیام محرمانه را که  تنها شما و دوستتان آن را می‌دانید انتخاب کنید. این پیام را وارد کرده و منتظر شوید که دوستتان نیز آن را وارد کند. اگر پیام درست را دریافت نکردید ممکن است که با فرد دیگری (مهاجم) در حال مکالمه باشید! "
+
+
+#: ../gtk-dialog.c:607
+#, c-format
+msgid "Enter secret here:"
+msgstr "پیام محرمانه را اینجا وارد نمایید:"
+
+#: ../gtk-dialog.c:657 ../gtk-dialog.c:1408
+msgid ""
+"To verify the fingerprint, contact your buddy via some <i>other</i> "
+"authenticated channel, such as the telephone or GPG-signed email.  Each of "
+"you should tell your fingerprint to the other."
+msgstr "برای اینکه دوست شما از اثرانگشت الکترونیکی شما مطلع شود از طریق یک کانال ارتباطی امن"
+"<i>دیگر</i>"
+"مانند تلفن یا ایمیلی که توسط GPG امضا شده است با او تماس بگیرید. هریک از شما باشد اثرانگشت خود را به دیگری بگویید."
+
+#: ../gtk-dialog.c:661
+msgid ""
+"If everything matches up, you should chose <b>I have</b> in the menu below."
+msgstr "اگر همه چیز صحیح است باید در منوی زیر <b>تایید می‌کنم</b> را انتخاب نمایید."
+
+#: ../gtk-dialog.c:672 ../gtk-dialog.c:1397
+msgid "[none]"
+msgstr "[هیچ]"
+
+#: ../gtk-dialog.c:679 ../gtk-dialog.c:1051 ../gtk-dialog.c:1404
+#: ../gtk-dialog.c:1453 ../gtk-ui.c:212 ../otr-plugin.c:127
+#: ../otr-plugin.c:300 ../ui.c:112
+msgid "Unknown"
+msgstr "نامشخص"
+
+#: ../gtk-dialog.c:680
+#, c-format
+msgid ""
+"Fingerprint for you, %s (%s):\n"
+"%s\n"
+"\n"
+"Purported fingerprint for %s:\n"
+"%s\n"
+msgstr ""
+"اثر انگشت برای شما،  %s (%s):\n "
+"%s\n"
+"\n"
+"اثر انگشت ادّعا شده برای %s:\n"
+"%s\n"
+
+#: ../gtk-dialog.c:736
+msgid "How would you like to authenticate your buddy?"
+msgstr "چگونه قصد دارید هویت خود را به دوستتان ثابت نمایید؟"
+
+#: ../gtk-dialog.c:745
+msgid "Question and answer"
+msgstr "پرسش و پاسخ"
+
+#: ../gtk-dialog.c:748
+msgid "Shared secret"
+msgstr "پیام محرمانه "
+
+#: ../gtk-dialog.c:751
+msgid "Manual fingerprint verification"
+msgstr "تایید اثر انگشت به صورت دستی"
+
+#: ../gtk-dialog.c:802
+msgid "_Authenticate"
+msgstr ""
+
+#: ../gtk-dialog.c:836
+msgid ""
+"Authenticating a buddy helps ensure that the person you are talking to is "
+"who he or she claims to be."
+msgstr " احراز هویت یک دوست به شما این امکان را می‌دهد که اطمینان حاصل کنید که کسی با او در حال مکالمه هستید همان کسی است که ادعا می‌کند."
+
+#. Translators: you are asked to authenticate yourself
+#: ../gtk-dialog.c:946
+msgid "Authenticating to Buddy"
+msgstr "در حال اثبات هویت به دوست شما"
+
+#. Translators: you asked your buddy to authenticate him/herself
+#: ../gtk-dialog.c:948
+msgid "Authenticating Buddy"
+msgstr "در حال احراز هویت دوست شما"
+
+#: ../gtk-dialog.c:975
+#, c-format
+msgid "Authenticating to %s"
+msgstr "در حال اثبات هویت به %s"
+
+#: ../gtk-dialog.c:976
+#, c-format
+msgid "Authenticating %s"
+msgstr "در حال احراز هویت %s"
+
+#: ../gtk-dialog.c:1009
+msgid "Waiting for buddy..."
+msgstr "منتظر دوست شما..."
+
+#: ../gtk-dialog.c:1042
+msgid "Generating private key"
+msgstr "در حال تولید کلید خصوصی"
+
+#: ../gtk-dialog.c:1043
+msgid "Please wait"
+msgstr "لطفا صبر کنید"
+
+#. Create the Please Wait... dialog
+#: ../gtk-dialog.c:1054
+#, c-format
+msgid "Generating private key for %s (%s)..."
+msgstr "%s (%s) در حال تولید کلید خصوصی برای "
+
+#: ../gtk-dialog.c:1099
+#, c-format
+msgid "%s Done."
+msgstr " .پایان %s"
+
+#: ../gtk-dialog.c:1139
+#, c-format
+msgid ""
+"%s is contacting you from an unrecognized computer.  You should <a href=\"%s%"
+"s\">authenticate</a> this buddy."
+msgstr " از یک کامپیوتر ناشناس در حال برقراری ارتباط با شماست. شما باید او را %s"
+"<a href=\"%s%"
+"s\">احراز حویت</a>"
+"نمایید."
+
+#: ../gtk-dialog.c:1143
+#, c-format
+msgid ""
+"%s has not been authenticated yet.  You should <a href=\"%s%s"
+"\">authenticate</a> this buddy."
+msgstr " %s هویت "
+"هنوز تایید نشده است."
+"شما باید او را "
+"<a href=\"%s%"
+"s\">احراز حویت</a>"
+"نمایید."
+
+#: ../gtk-dialog.c:1195 ../gtk-dialog.c:1969 ../gtk-dialog.c:2745
+#: ../gtk-ui.c:83
+msgid "Finished"
+msgstr "پایان یافت"
+
+#: ../gtk-dialog.c:1196 ../gtk-dialog.c:1966 ../gtk-dialog.c:2742
+#: ../gtk-ui.c:82
+msgid "Private"
+msgstr "محرمانه"
+
+#: ../gtk-dialog.c:1197 ../gtk-dialog.c:1963 ../gtk-dialog.c:2739
+#: ../gtk-ui.c:81
+msgid "Unverified"
+msgstr "تایید نشده"
+
+#: ../gtk-dialog.c:1198 ../gtk-ui.c:80
+msgid "Not private"
+msgstr "غیر محرمانه"
+
+#: ../gtk-dialog.c:1201
+msgid "OTR"
+msgstr "OTR"
+
+#. Translators: the following four messages should give alternative
+#. * sentences. The user selects the first or second message in a combo box;
+#. * the third message, a new line, a fingerprint, a new line, and
+#. * the fourth message will follow it.
+#: ../gtk-dialog.c:1351
+msgid "I have not"
+msgstr "تایید نمی‌کنم"
+
+#. 2nd message
+#: ../gtk-dialog.c:1353
+msgid "I have"
+msgstr "تایید می‌کنم"
+
+#. 3rd message
+#: ../gtk-dialog.c:1356
+msgid " verified that this is in fact the correct"
+msgstr "تایید شد که این درست است"
+
+#. 4th message
+#: ../gtk-dialog.c:1366
+#, c-format
+msgid "fingerprint for %s."
+msgstr "اثرانگشت برای %s"
+
+#: ../gtk-dialog.c:1393
+#, c-format
+msgid "Verify fingerprint for %s"
+msgstr "اثر انگشت برای %s را تایید کنید"
+
+#: ../gtk-dialog.c:1405
+#, c-format
+msgid ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>Fingerprint for you, %s (%s):\n"
+"%s\n"
+"\n"
+"Purported fingerprint for %s:\n"
+"%s\n"
+msgstr ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>اثر انگشت برای شما, %s (%s):\n"
+"%s\n"
+"\n"
+"اثر انگشت ادّعا شده برای %s:\n"
+"%s\n"
+
+#: ../gtk-dialog.c:1412
+msgid ""
+"If everything matches up, you should indicate in the above dialog that you "
+"<b>have</b> verified the fingerprint."
+msgstr " شمااگر همه چیز درست است باید در پنجره بالا مشخص کنید که شما اثرانگشت  را"
+"<b>تایید کرده‌اید</b>."
+
+#: ../gtk-dialog.c:1418 ../gtk-ui.c:844
+msgid "Verify fingerprint"
+msgstr "اثر انگشت را تایید کنید"
+
+#: ../gtk-dialog.c:1445
+#, c-format
+msgid "Authentication from %s"
+msgstr "احراز هویت از طرف %s"
+
+#: ../gtk-dialog.c:1448
+#, c-format
+msgid "Authenticate %s"
+msgstr "هویت %s را تایید کنید"
+
+#: ../gtk-dialog.c:1456
+msgid "Authenticate Buddy"
+msgstr "هویت دوست خود را تایید کنید "
+
+#: ../gtk-dialog.c:1487
+msgid "An error occurred during authentication."
+msgstr "اشکالی در احراز هویت اتفاق افتاده است"
+
+#: ../gtk-dialog.c:1502
+msgid "Authentication successful."
+msgstr "احراز هویت موفقیت‌آمیز انجام شد."
+
+#: ../gtk-dialog.c:1505
+msgid ""
+"Your buddy has successfully authenticated you.  You may want to authenticate "
+"your buddy as well by asking your own question."
+msgstr "دوست شما با موفقیت هویت شما را تایید کرده است. شما هم می‌توانید با پرسیدن سوال هویت دوستتان را تایید کنید."
+
+#: ../gtk-dialog.c:1511
+msgid "Authentication failed."
+msgstr "احراز هویت انجام نشد"
+
+#: ../gtk-dialog.c:1541
+#, c-format
+msgid "Private conversation with %s started.%s%s"
+msgstr "مکالمه محرمانه با %s آغاز شد.%s%s"
+
+#: ../gtk-dialog.c:1545
+#, c-format
+msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s%%s"
+msgstr "یک مکالمه<a href=\"%s%s\">تایید نشده</a> با %%s آغاز شد.%%s%%s"
+
+#. This last case should never happen, since we know
+#. * we're in ENCRYPTED.
+#: ../gtk-dialog.c:1553
+#, c-format
+msgid "Not private conversation with %s started.%s%s"
+msgstr "مکالمه غیر محرمانه با %s آغاز شد. %s%s"
+
+#: ../gtk-dialog.c:1559 ../gtk-dialog.c:1686
+msgid "  Warning: using old protocol version 1."
+msgstr " هشدار: در حال استفاده از پروتکل قدیمی ۱."
+
+#: ../gtk-dialog.c:1561
+msgid "  Your client is logging this conversation."
+msgstr " دستگاه شما این مکالمه را ثبت می‌کند."
+
+#: ../gtk-dialog.c:1562
+msgid "  Your client is not logging this conversation."
+msgstr " دستگاه شما این مکالمه را ثبت نمی‌کند."
+
+#: ../gtk-dialog.c:1581
+#, c-format
+msgid ""
+"Your buddy is logged in multiple times and OTR has established <a href=\"%s%s"
+"\">multiple sessions</a>. Use the icon menu above if you wish to select the "
+"outgoing session."
+msgstr "ودوست شما از چند محل مختلف لاگین کرده‌است و OTR <a href=\"%s%s"
+"\">چندین نشست</a> برقرار کرده‌است. می‌توانید از منوهای بالا نشست خود را انتخاب کنید."
+
+#: ../gtk-dialog.c:1601
+#, c-format
+msgid "Private conversation with %s lost."
+msgstr "نشست محرمانه با %s قطع شد."
+
+#: ../gtk-dialog.c:1638
+#, c-format
+msgid ""
+"%s has ended his/her private conversation with you; you should do the same."
+msgstr ".نشست محرمانه خود را با شما پایان داده‌است؛ شما نیز باید همین کار را انجام دهید %s"
+
+#: ../gtk-dialog.c:1665
+#, c-format
+msgid "Successfully refreshed the private conversation with %s.%s"
+msgstr " مکالمه محرمانه با %s با موفقیت رفرش شد.%s"
+
+#: ../gtk-dialog.c:1670
+#, c-format
+msgid ""
+"Successfully refreshed the <a href=\"%s%s\">unverified</a> conversation with "
+"%%s.%%s"
+msgstr "با موفقیت مکالمه <a href=\"%s%s\">تایید نشده</a> با   "
+"%%s رفرش شد.%%s"
+
+#. This last case should never happen, since we know
+#. * we're in ENCRYPTED.
+#: ../gtk-dialog.c:1679
+#, c-format
+msgid "Successfully refreshed the not private conversation with %s.%s"
+msgstr " مکالمه غیرمحرمانه با %s با موفقیت رفرش گردید. %s"
+
+#: ../gtk-dialog.c:1712
+#, c-format
+msgid "Attempting to refresh the private conversation with %s..."
+msgstr "... %s در حال تلاش برای رفرش کردن مکالمه محرمانه با"
+
+#: ../gtk-dialog.c:1714
+#, c-format
+msgid "Attempting to start a private conversation with %s..."
+msgstr ".%s در حال تلاش برای رفرش کردن مکالمه محرمانه با "
+
+#: ../gtk-dialog.c:1899 ../gtk-dialog.c:2026
+msgid "Start _private conversation"
+msgstr "آغاز مکالکه _محرمانه"
+
+#: ../gtk-dialog.c:1900
+msgid "Refresh _private conversation"
+msgstr "رفرش مکالمه _محرمانه"
+
+#: ../gtk-dialog.c:1905
+msgid "Re_authenticate buddy"
+msgstr "_احراز هویت مجدد دوست"
+
+#: ../gtk-dialog.c:1906 ../gtk-dialog.c:2030
+msgid "_Authenticate buddy"
+msgstr "_احراز هویت دوست"
+
+#: ../gtk-dialog.c:1960 ../gtk-dialog.c:2736
+msgid "Not Private"
+msgstr "غیر محرمانه"
+
+#: ../gtk-dialog.c:1982
+msgid "_What's this?"
+msgstr "_این چیست؟"
+
+#: ../gtk-dialog.c:2028
+msgid "_End private conversation"
+msgstr "_پایان مکالکه محرمانه"
+
+#: ../gtk-dialog.c:2207 ../gtk-dialog.c:2255
+#, c-format
+msgid ""
+"Warning: The selected outgoing OTR session (%u) is not the most recently "
+"active one (%u). Your buddy may not receive your messages. Use the icon menu "
+"above to select a different outgoing session."
+msgstr "هشدار: نشست خروجی"
+ "OTR"
+ "که هم‌اکنون انتخاب شده (%u) جدیدترین نشست فعال نیست (%u). دوست شما ممکن است پیام‌های شما را دریافت نکند. "
+"برای تغییر نشست خروجی از منوی بالا استفاده کنید."
+
+#: ../gtk-dialog.c:2271
+msgid "Send to most secure"
+msgstr "به امن‌ترین بفرست"
+
+#: ../gtk-dialog.c:2273
+msgid "Send to most recent"
+msgstr "به جدیدترین بفرست"
+
+#: ../gtk-dialog.c:2377
+#, c-format
+msgid "Session %u"
+msgstr "نشست %u"
+
+#: ../gtk-dialog.c:2395 ../gtk-dialog.c:2506
+msgid "Select"
+msgstr "انتخاب کنید"
+
+#: ../gtk-dialog.c:2410
+msgid "Selected"
+msgstr "انتخاب شده"
+
+#: ../gtk-dialog.c:2731
+#, c-format
+msgid ""
+"The privacy status of the current conversation is now: <a href=\"%s%s\">%s</"
+"a>"
+msgstr "وضعیت محرمانگی مکالمه کنونی: <a href=\"%s%s\">%s</"
+"a>"
+
+#: ../gtk-dialog.c:2956
+msgid "OTR Messaging"
+msgstr "سیستم پیام‌رسانی OTR"
+
+#: ../gtk-ui.c:103
+#, c-format
+msgid "Fingerprint: %.80s"
+msgstr "اثر انگشت:  %.80s"
+
+#: ../gtk-ui.c:107
+#, c-format
+msgid "No key present"
+msgstr "کلیدی موجود نیست"
+
+#: ../gtk-ui.c:112
+#, c-format
+msgid "No account available"
+msgstr "اکانتی موجود نیست."
+
+#: ../gtk-ui.c:179
+msgid "Unused"
+msgstr "بلاستفاده"
+
+#: ../gtk-ui.c:208
+msgid "Yes"
+msgstr "بلی"
+
+#: ../gtk-ui.c:208
+msgid "No"
+msgstr "نه"
+
+#: ../gtk-ui.c:473
+msgid "Enable private messaging"
+msgstr "پیام‌دهی محرمانه را فعال کن"
+
+#: ../gtk-ui.c:475
+msgid "Automatically initiate private messaging"
+msgstr "به صورت خودکار پیام‌دهی محرمانه را فعال کن"
+
+#: ../gtk-ui.c:477
+msgid "Require private messaging"
+msgstr "پیام‌دهی محرمانه را الزامی کن"
+
+#: ../gtk-ui.c:480
+msgid "Don't log OTR conversations"
+msgstr "پیام‌های OTR را ثبت نکن"
+
+#: ../gtk-ui.c:524
+msgid "Show OTR button in toolbar"
+msgstr "دکمه OTR را در نوار ابزار نمایش بده"
+
+#: ../gtk-ui.c:663
+msgid "My private keys"
+msgstr "کلیدهای خصوصی من"
+
+#: ../gtk-ui.c:672
+msgid "Key for account:"
+msgstr "کلید برای اکانت:"
+
+#: ../gtk-ui.c:697
+msgid "Generate"
+msgstr "تولید کن"
+
+#: ../gtk-ui.c:738
+msgid "Default OTR Settings"
+msgstr "تنظیمات اولیه OTR"
+
+#: ../gtk-ui.c:765
+msgid "OTR UI Options"
+msgstr "امکانات واسط گرافیکی OTR"
+
+#: ../gtk-ui.c:788
+msgid "Screenname"
+msgstr "اسم‌نمایش"
+
+#: ../gtk-ui.c:789
+msgid "Status"
+msgstr "وضعیت"
+
+#: ../gtk-ui.c:790
+msgid "Verified"
+msgstr "تایید شده"
+
+#: ../gtk-ui.c:791
+msgid "Fingerprint"
+msgstr "اثرانگشت"
+
+#: ../gtk-ui.c:792
+msgid "Account"
+msgstr "اکانت"
+
+#: ../gtk-ui.c:828
+msgid "Start private connection"
+msgstr "مکالمه خصوصی را آغاز کن"
+
+#: ../gtk-ui.c:836
+msgid "End private connection"
+msgstr  "مکالمه خصوصی را تمام کن"
+
+#: ../gtk-ui.c:852
+msgid "Forget fingerprint"
+msgstr "اثرانگشت را فراموش کن"
+
+#: ../gtk-ui.c:903
+msgid "Config"
+msgstr "تنظیمات"
+
+#: ../gtk-ui.c:905
+msgid "Known fingerprints"
+msgstr "اثرهای انگشت شناخته شده"
+
+#: ../gtk-ui.c:1003 ../otr-plugin.c:964
+msgid "OTR Settings"
+msgstr "تنظیمات OTR"
+
+#. Set the title
+#: ../gtk-ui.c:1021
+#, c-format
+msgid "OTR Settings for %s"
+msgstr  "تنظیمات OTR برای %s"
+
+#. Make the cascaded checkboxes
+#: ../gtk-ui.c:1038
+msgid "Use default OTR settings for this buddy"
+msgstr "برای این دوست تنظیمات اولیه OTR را استفاده کن"
+
+#: ../otr-plugin.c:125
+#, c-format
+msgid "You are not currently connected to account %s (%s)."
+msgstr "شما در حال حاضر به اکانت %s متصل نیستید (%s)."
+
+#: ../otr-plugin.c:129
+msgid "Not connected"
+msgstr "ارتباط برقرار نیست"
+
+#: ../otr-plugin.c:212 ../otr-plugin.c:254
+#, c-format
+msgid "Out of memory building filenames!\n"
+msgstr "حافظه لازم برای ساختن نام فایل موجود نمی‌باشد! \n"
+
+#: ../otr-plugin.c:224 ../otr-plugin.c:260
+#, c-format
+msgid "Could not write private key file\n"
+msgstr "امکان نوشتن فایل کلید خصوصی نیست \n"
+
+#: ../otr-plugin.c:298
+#, c-format
+msgid "Unknown account %s (%s)."
+msgstr "اکانت نامشخص %s (%s)."
+
+#: ../otr-plugin.c:302
+msgid "Unknown account"
+msgstr "اکانت نامشخص"
+
+#: ../otr-plugin.c:364
+msgid "Error occurred encrypting message."
+msgstr "خطا در هنگام رمزکردن پیام."
+
+#: ../otr-plugin.c:368
+#, c-format
+msgid "You sent encrypted data to %s, who wasn't expecting it."
+msgstr "شما پیامی رمز شده به %s فرستادید که انتظار آن را نداشته‌است."
+
+#: ../otr-plugin.c:374
+msgid "You transmitted an unreadable encrypted message."
+msgstr "شما پیامی رمز شده فرستادید که قابل خواندن نبوده‌است."
+
+#: ../otr-plugin.c:377
+msgid "You transmitted a malformed data message."
+msgstr "شما پیامی ناقص فرستاده‌اید."
+
+#: ../otr-plugin.c:390
+msgid "[resent]"
+msgstr "[دوباره فرستاده شد]"
+
+#: ../otr-plugin.c:459
+#, c-format
+msgid "You attempted to send an unencrypted message to %s"
+msgstr "شما تلاش کردید یک پیام رمزنشده به %s بفرستید."
+
+#: ../otr-plugin.c:462
+msgid "Attempting to start a private conversation..."
+msgstr "در حال تلاش برای آغاز یک مکالمه محرمانه..."
+
+#: ../otr-plugin.c:464
+msgid "OTR Policy Violation"
+msgstr "تخلف از قوانین OTR"
+
+#: ../otr-plugin.c:465
+msgid ""
+"Unencrypted messages to this recipient are not allowed.  Attempting to start "
+"a private conversation.\n"
+"\n"
+"Your message will be retransmitted when the private conversation starts."
+msgstr "ارسال پیام‌های رمزنشده به این گیرنده امکان‌پذیر نمی‌باشد. در حال تلاش برای "
+"برقراری یک مکالمه محرمانه.\n"
+"\n"
+"پیام‌های شما پس از برقراری مکالمه محرمانه مجدداً فرستاده‌ خواهندشد."
+#: ../otr-plugin.c:474
+msgid ""
+"An error occurred when encrypting your message.  The message was not sent."
+msgstr "اشکالی در رمزکردن پیام شما رخ داده‌است. پیام فرستاده نشد."
+
+#: ../otr-plugin.c:476
+msgid "Error encrypting message"
+msgstr "اشکال در رمزکردن پیام "
+
+#: ../otr-plugin.c:477
+msgid "An error occurred when encrypting your message"
+msgstr "اشکالی در رمزکردن پیام شما رخ داده‌است."
+
+#: ../otr-plugin.c:478
+msgid "The message was not sent."
+msgstr " پیام فرستاده نشد"
+
+#: ../otr-plugin.c:481
+#, c-format
+msgid "%s has already closed his/her private connection to you"
+msgstr "%s مکالمه محرمانه خود را با شما پایان داده‌است."
+
+#: ../otr-plugin.c:484
+msgid ""
+"Your message was not sent.  Either end your private conversation, or restart "
+"it."
+msgstr " پیام شما فرستاده نشد. مکالمه محرمانه خود را پایان دهید یا آن را دوباره آغاز کنید."
+
+#: ../otr-plugin.c:487
+msgid "Private connection closed"
+msgstr "ارتباط محرمانه قطع شد"
+
+#: ../otr-plugin.c:488
+msgid ""
+"Your message was not sent.  Either close your private connection to him, or "
+"refresh it."
+msgstr " پیام شما فرستاده نشد. ارتباط محرمانه خود را با وی پایان دهید یا آن را دوباره آغاز کنید."
+
+#: ../otr-plugin.c:498
+msgid "Error setting up private conversation: Malformed message received"
+msgstr "اشکال در راه‌اندازی مکالمه محرمانه: پیام ناقص دریافت شد"
+
+#: ../otr-plugin.c:502
+#, c-format
+msgid "Error setting up private conversation: %s"
+msgstr "اشکال در راه‌اندازی مکالمه محرمانه: %s"
+
+#: ../otr-plugin.c:509 ../otr-plugin.c:520 ../otr-plugin.c:547
+#: ../otr-plugin.c:555 ../otr-plugin.c:573
+msgid "OTR Error"
+msgstr "اشکال در OTR"
+
+#: ../otr-plugin.c:516
+msgid ""
+"We are receiving our own OTR messages.  You are either trying to talk to "
+"yourself, or someone is reflecting your messages back at you."
+msgstr "شما در حال دریافت پیام‌های OTR خودتان هستید."
+
+#: ../otr-plugin.c:520
+msgid "We are receiving our own OTR messages."
+msgstr "شما در حال دریافت پیام‌های OTR خودتان هستید."
+"شما در حال صحبت با خودتان هستید، یا کسی پیام‌های شما را به خودتان باز می‌گرداند."
+
+#: ../otr-plugin.c:521
+msgid ""
+"You are either trying to talk to yourself, or someone is reflecting your "
+"messages back at you."
+msgstr "شما در حال صحبت با خودتان هستید، یا کسی پیام‌های شما را به خودتان باز می‌گرداند."
+
+#: ../otr-plugin.c:526
+#, c-format
+msgid "<b>The last message to %s was resent.</b>"
+msgstr "<b>پیام قبلی به %s دوباره فرستاده شد.</b>"
+
+#: ../otr-plugin.c:530
+msgid "Message resent"
+msgstr "پیام دوباره فرستاده شد"
+
+#: ../otr-plugin.c:534
+#, c-format
+msgid ""
+"<b>The encrypted message received from %s is unreadable, as you are not "
+"currently communicating privately.</b>"
+msgstr "<b>پیام رمزشده از طرف %s قابل خواندن نیست زیرا که شما در حال مکالمه محرمانه نیستید.</b>"
+
+#: ../otr-plugin.c:539
+msgid "Unreadable message"
+msgstr "پیام غیرقابل خواندن"
+
+#: ../otr-plugin.c:543
+#, c-format
+msgid "We received an unreadable encrypted message from %s."
+msgstr "ما پیامی رمز شده از %s دریافت کردیم که قابل خواندن نیست."
+
+#: ../otr-plugin.c:551
+#, c-format
+msgid "We received a malformed data message from %s."
+msgstr "ما پیامی ناقص از %s دریافت کردیم."
+
+#: ../otr-plugin.c:559
+#, c-format
+msgid "Heartbeat received from %s.\n"
+msgstr "پیام خالی از %s دریافت شد. \n"
+
+#: ../otr-plugin.c:565
+#, c-format
+msgid "Heartbeat sent to %s.\n"
+msgstr "پیام خالی به %s فرستاده شد. \n"
+
+#: ../otr-plugin.c:576
+#, c-format
+msgid ""
+"<b>The following message received from %s was <i>not</i> encrypted: [</b>%"
+"s<b>]</b>"
+msgstr ""
+"<b>پیام زیر از طرف %s دریافت شده رمز <i>نشده</i> است.  [</b>%"
+"s<b>]</b>"
+#: ../otr-plugin.c:581
+msgid "Received unencrypted message"
+msgstr "پیامی رمز نشده دریافت شد"
+
+#: ../otr-plugin.c:587
+#, c-format
+msgid "Unrecognized OTR message received from %s.\n"
+msgstr "یک پیام ناشناخته OTR از %s دریافت شد. \n"
+
+#: ../otr-plugin.c:596
+#, c-format
+msgid ""
+"%s has sent a message intended for a different session. If you are logged in "
+"multiple times, another session may have received the message."
+msgstr "%s پیامی برای نشستی دیگر فرستاد است. اگر در چندجای مختلف لاگین شده اید ممکن است نشستی دیگر پیام را دریافت کرده باشد."
+
+#: ../otr-plugin.c:602
+msgid "Received message for a different session"
+msgstr "پیامی از نشست دیگری دریافت شد"
+
+#. 2013-01-01
+#: ../otr-plugin.c:1193 ../otr-plugin.c:1220
+#, c-format
+msgid "OTR PLUGIN v%s"
+msgstr "افزونه OTR ورژن %s"
+
+#: ../otr-plugin.c:1202
+#, c-format
+msgid ""
+"This beta copy of the Off-the-Record Messaging v%s Pidgin plugin has expired "
+"as of 2013-01-01. Please look for an updated release at http://otr."
+"cypherpunks.ca/"
+msgstr " این کپی بتا از افزونه سیستم پیام‌رسانی Off-the-Record ورژن %s برای Pidgin از تاریخ 2013-01-01 منقضی شده است.  "
+"لطفا برای دریافت نسخه ارتقاء یافته به /http://otr.cypherpunks.ca مراجع کنید "
+
+#: ../otr-plugin.c:1229
+#, c-format
+msgid ""
+"You have enabled a beta version of the Off-the-Record Messaging v%s Pidgin "
+"plugin. This version is intended for testing purposes only and is not for "
+"general purpose use."
+msgstr "شما ورژنی بتا از افزونه Off-the-Record %s برای Pidgin را فعال کرده‌اید. این ورژن تنها برای تست است و نباید برای کاربردهای عمومی استفاده شود. "
+
+#: ../otr-plugin.c:1414
+msgid 	"Off-the-Record Messaging"
+msgstr "سیستم پیام‌دهی Off-the-Record"
+
+#: ../otr-plugin.c:1415
+msgid "Provides private and secure conversations"
+msgstr "مکالمات محرمانه و امن را امکان‌پذیر می‌کند"
+
+#: ../otr-plugin.c:1416
+msgid ""
+"Preserves the privacy of IM communications by providing encryption, "
+"authentication, deniability, and perfect forward secrecy."
+msgstr "محرمانگی مکالمات IM را از طریق رمزنگاری، احراز هویت، قابلیت انکار و امکان محرمانگی رو به جلو را فراهم می‌سازد."
+
+#: ../ui.c:110
+#, c-format
+msgid "Account %s (%s) could not be found"
+msgstr "اکانت %s (%s)  پیدا نشد."
+
+#: ../ui.c:114
+msgid "Account not found"
+msgstr "اکانت پیدا نشد."
diff --git a/po/fr.po b/po/fr.po
index 833f615..df44636 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -1,97 +1,113 @@
 # Off-the-Record Messaging plugin for pidgin.
-# Copyright (C) 2004-2007  Ian Goldberg, Chris Alexander, Nikita Borisov
+# Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew,
+#	                       Lisa Du, Nikita Borisov
 # This file is distributed under the same license as the pidgin-otr package.
-# Ian Goldberg <otr at cypherpunks.ca>, 2007.
+# Ian Goldberg <otr at cypherpunks.ca>, 2012
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: pidgin-otr 3.1.0.fr\n"
+"Project-Id-Version: pidgin-otr 4.0.0.fr\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-06-23 21:17+0200\n"
-"PO-Revision-Date: 2009-06-23 22:41+0200\n"
-"Last-Translator: Solveig <solveig at gendertrouble.org>\n"
-"Language-Team: Joel Reardon <jreardon at cs.uwaterloo.ca>\n"
+"POT-Creation-Date: 2012-06-14 09:45-0400\n"
+"PO-Revision-Date: 2012-06-26 12:00-0400\n"
+"Last-Translator: Paul Hendry <pshendry at uwaterloo.ca>\n"
+"Language-Team: Paul Hendry <pshendry at uwaterloo.ca>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../gtk-dialog.c:291 ../gtk-dialog.c:1085 ../gtk-dialog.c:1089
-#: ../gtk-dialog.c:1518 ../gtk-dialog.c:1621 ../gtk-dialog.c:1686
-#: ../gtk-dialog.c:2130
+#: ../gtk-dialog.c:332 ../gtk-dialog.c:1141 ../gtk-dialog.c:1145
+#: ../gtk-dialog.c:1547 ../gtk-dialog.c:1584 ../gtk-dialog.c:1673
+#: ../gtk-dialog.c:1748 ../gtk-dialog.c:2749
 msgid "?lang=en"
 msgstr "?lang=fr"
 
-#: ../gtk-dialog.c:439
+#: ../gtk-dialog.c:480
 msgid ""
 "Your buddy is attempting to determine if he or she is really talking to you, "
 "or if it's someone pretending to be you.  Your buddy has asked a question, "
 "indicated below.  To authenticate to your buddy, enter the answer and click "
 "OK."
-msgstr "Votre contact tente de s'assurer de votre identité. Il vous a posé une question, indiquée ci-dessous. Pour vous authentifier auprès de lui, écrivez la réponse et cliquez sur \"Authentification\"."
+msgstr ""
+"Votre contact tente de s'assurer de votre identité. Il ou elle vous a posé "
+"une question, indiquée ci-dessous. Pour vous authentifier auprès de lui, "
+"écrivez la réponse et cliquez sur \"Authentification\"."
 
-#: ../gtk-dialog.c:446
+#: ../gtk-dialog.c:487
 msgid ""
 "To authenticate using a question, pick a question whose answer is known only "
 "to you and your buddy.  Enter this question and this answer, then wait for "
 "your buddy to enter the answer too.  If the answers don't match, then you "
 "may be talking to an imposter."
-msgstr "Pour l'authentification en utilisant une question-réponse, choisissez une question dont seuls votre contact et vous connaissez la réponse. Écrivez la question et sa réponse, cliquez sur \"Authentifier\", puis attendez que votre contact donne sa réponse. Si vos réponses ne sont pas identiques, il est possible que votre interlocuteur ne soit pas celui qu'il prétend être."
+msgstr ""
+"Pour l'authentification en utilisant une question-réponse, choisissez une "
+"question dont seuls votre contact et vous connaissez la réponse. Écrivez la "
+"question et sa réponse, cliquez sur \"Authentifier\", puis attendez que votre "
+"contact donne sa réponse. Si vos réponses ne sont pas identiques, il est "
+"possible que votre interlocuteur ne soit pas celui qu'il prétend être."
 
-#: ../gtk-dialog.c:464
+#: ../gtk-dialog.c:505
 #, c-format
 msgid "This is the question asked by your buddy:"
-msgstr "Ceci est la question posée par votre contact :"
+msgstr "Ceci est la question posée par votre contact :"
 
-#: ../gtk-dialog.c:467
+#: ../gtk-dialog.c:508
 #, c-format
 msgid "Enter question here:"
 msgstr "Écrivez ici votre question :"
 
-#: ../gtk-dialog.c:498 ../gtk-dialog.c:582
+#: ../gtk-dialog.c:540 ../gtk-dialog.c:624
 msgid "This buddy is already authenticated."
 msgstr "Ce contact est déja authentifié."
 
-#: ../gtk-dialog.c:510
+#: ../gtk-dialog.c:552
 #, c-format
 msgid "Enter secret answer here (case sensitive):"
 msgstr "Écrivez ici la réponse (attention aux majuscules et minuscules) :"
 
-#: ../gtk-dialog.c:551
+#: ../gtk-dialog.c:593
 msgid ""
 "To authenticate, pick a secret known only to you and your buddy.  Enter this "
 "secret, then wait for your buddy to enter it too.  If the secrets don't "
 "match, then you may be talking to an imposter."
-msgstr "Pour l'authentification par secret partagé, écrivez un code secret connu uniquement par vous et votre contact, et cliquez sur \"Authentification\", puis attendez que votre contact l'ait écrit à son tour. Si vos secrets ne sont pas identiques, votre interlocuteur n'est peut-être pas celui qu'il prétend être."
+msgstr "Pour l'authentification par secret partagé, écrivez un code secret "
+"connu uniquement par vous et votre contact, et cliquez sur \"Authentification\", "
+"puis attendez que votre contact l'ait écrit à son tour. Si vos secrets ne sont "
+"pas identiques, votre interlocuteur n'est peut-être pas celui qu'il prétend être."
 
-#: ../gtk-dialog.c:565
+#: ../gtk-dialog.c:607
 #, c-format
 msgid "Enter secret here:"
 msgstr "Écrivez votre secret ici :"
 
-#: ../gtk-dialog.c:616 ../gtk-dialog.c:1379
+#: ../gtk-dialog.c:657 ../gtk-dialog.c:1408
 msgid ""
 "To verify the fingerprint, contact your buddy via some <i>other</i> "
 "authenticated channel, such as the telephone or GPG-signed email.  Each of "
 "you should tell your fingerprint to the other."
-msgstr "Pour vérifier l'empreinte, contactez votre contact par un <i>autre</i> canal authentifié, comme le téléphone ou un courriel signé par GnuPG. Chacun de vous doit donner son empreinte à l'autre."
+msgstr ""
+"Pour vérifier l'empreinte, contactez votre contact par un <i>autre</i> canal "
+"authentifié, comme le téléphone ou un courriel signé par GnuPG. Chacun de vous "
+"doit donner son empreinte à l'autre."
 
-#: ../gtk-dialog.c:620 ../gtk-dialog.c:1383
+#: ../gtk-dialog.c:661
 msgid ""
-"If everything matches up, you should indicate in the above dialog that you "
-"<b>have</b> verified the fingerprint."
-msgstr "Si les empreintes sont identiques, indiquez que vous <b>avez</b> verifié l'empreinte."
+"If everything matches up, you should chose <b>I have</b> in the menu below."
+msgstr ""
+"Si les empreintes sont identiques, indiquez que vous <b>avez</b> verifié "
+"l'empreinte."
 
-#: ../gtk-dialog.c:631 ../gtk-dialog.c:1368
+#: ../gtk-dialog.c:672 ../gtk-dialog.c:1397
 msgid "[none]"
 msgstr "[rien]"
 
-#: ../gtk-dialog.c:638 ../gtk-dialog.c:996 ../gtk-dialog.c:1375
-#: ../gtk-dialog.c:1426 ../gtk-ui.c:181 ../otr-plugin.c:116
-#: ../otr-plugin.c:213 ../ui.c:111
+#: ../gtk-dialog.c:679 ../gtk-dialog.c:1051 ../gtk-dialog.c:1404
+#: ../gtk-dialog.c:1453 ../gtk-ui.c:212 ../otr-plugin.c:127
+#: ../otr-plugin.c:300 ../ui.c:112
 msgid "Unknown"
 msgstr "Inconnu"
 
-#: ../gtk-dialog.c:639
+#: ../gtk-dialog.c:680
 #, c-format
 msgid ""
 "Fingerprint for you, %s (%s):\n"
@@ -106,83 +122,87 @@ msgstr ""
 "Empreinte prétendue pour %s:\n"
 "%s\n"
 
-#: ../gtk-dialog.c:691
+#: ../gtk-dialog.c:736
 msgid "How would you like to authenticate your buddy?"
 msgstr "Comment désirez-vous authentifier votre contact ?"
 
-#: ../gtk-dialog.c:700
+#: ../gtk-dialog.c:745
 msgid "Question and answer"
 msgstr "Question-réponse"
 
-#: ../gtk-dialog.c:703
+#: ../gtk-dialog.c:748
 msgid "Shared secret"
 msgstr "Secret partagé"
 
-#: ../gtk-dialog.c:706
+#: ../gtk-dialog.c:751
 msgid "Manual fingerprint verification"
 msgstr "Vérification manuelle d'empreinte"
 
-#: ../gtk-dialog.c:749
+#: ../gtk-dialog.c:802
 msgid "_Authenticate"
-msgstr "Authentification %s"
+msgstr "_Authentifie"
 
-#: ../gtk-dialog.c:782
+#: ../gtk-dialog.c:836
 msgid ""
 "Authenticating a buddy helps ensure that the person you are talking to is "
 "who he or she claims to be."
-msgstr "L'authentification d'un contact vous permet de vous assurer que la personne avec qui vous dialoguez est bien celle qu'elle prétend être."
+msgstr ""
+"L'authentification d'un contact vous permet de vous assurer que la personne "
+"avec qui vous dialoguez est bien celle qu'elle prétend être."
 
 #. Translators: you are asked to authenticate yourself
-#: ../gtk-dialog.c:891
+#: ../gtk-dialog.c:946
 msgid "Authenticating to Buddy"
 msgstr "Authentification auprès de votre contact"
 
 #. Translators: you asked your buddy to authenticate him/herself
-#: ../gtk-dialog.c:893
+#: ../gtk-dialog.c:948
 msgid "Authenticating Buddy"
 msgstr "Authentification de votre contact"
 
-#: ../gtk-dialog.c:920
+#: ../gtk-dialog.c:975
 #, c-format
 msgid "Authenticating to %s"
-msgstr "Authentification auprès de"
+msgstr "Authentification auprès de %s"
 
-#: ../gtk-dialog.c:921
+#: ../gtk-dialog.c:976
 #, c-format
 msgid "Authenticating %s"
-msgstr "Authentification de"
+msgstr "Authentification de %s"
 
-#: ../gtk-dialog.c:954
+#: ../gtk-dialog.c:1009
 msgid "Waiting for buddy..."
 msgstr "En attente de votre contact"
 
-#: ../gtk-dialog.c:987
+#: ../gtk-dialog.c:1042
 msgid "Generating private key"
 msgstr "Génération de la clé privée"
 
-#: ../gtk-dialog.c:988
+#: ../gtk-dialog.c:1043
 msgid "Please wait"
 msgstr "Attendez SVP"
 
 #. Create the Please Wait... dialog
-#: ../gtk-dialog.c:999
+#: ../gtk-dialog.c:1054
 #, c-format
 msgid "Generating private key for %s (%s)..."
 msgstr "Génération d'une clé privée pour %s (%s)..."
 
-#: ../gtk-dialog.c:1044
+#: ../gtk-dialog.c:1099
 #, c-format
 msgid "%s Done."
 msgstr "%s effectué."
 
-#: ../gtk-dialog.c:1083
+#: ../gtk-dialog.c:1139
 #, c-format
 msgid ""
 "%s is contacting you from an unrecognized computer.  You should <a href=\"%s%"
 "s\">authenticate</a> this buddy."
-msgstr "%s vous contacte d'un ordinateur inconnu. Vous devriez <a href=\"%s%s\">authentifier</a> ce contact."
+msgstr ""
+"%s vous contacte d'un ordinateur inconnu. Vous devriez <a href=\"%s%s\">"
+"authentifier</a> ce contact."
 
-#: ../gtk-dialog.c:1087
+#: ../gtk-dialog.c:1143
 #, c-format
 msgid ""
 "%s has not been authenticated yet.  You should <a href=\"%s%s"
@@ -191,75 +211,59 @@ msgstr ""
 "%s n'a pas encore été authentifié. Vous devriez <a href=\"%s%s"
 "\">authentifier</a> ce contact."
 
-#: ../gtk-dialog.c:1150 ../gtk-dialog.c:1181 ../gtk-dialog.c:1853
-#: ../gtk-dialog.c:2126 ../gtk-ui.c:82
+#: ../gtk-dialog.c:1195 ../gtk-dialog.c:1969 ../gtk-dialog.c:2745
+#: ../gtk-ui.c:83
 msgid "Finished"
 msgstr "Terminé"
 
-#: ../gtk-dialog.c:1151 ../gtk-dialog.c:1182 ../gtk-dialog.c:1850
-#: ../gtk-dialog.c:2123 ../gtk-ui.c:81
+#: ../gtk-dialog.c:1196 ../gtk-dialog.c:1966 ../gtk-dialog.c:2742
+#: ../gtk-ui.c:82
 msgid "Private"
 msgstr "Privé"
 
-#: ../gtk-dialog.c:1152 ../gtk-dialog.c:1183 ../gtk-dialog.c:1847
-#: ../gtk-dialog.c:2120 ../gtk-ui.c:80
+#: ../gtk-dialog.c:1197 ../gtk-dialog.c:1963 ../gtk-dialog.c:2739
+#: ../gtk-ui.c:81
 msgid "Unverified"
 msgstr "Non-verifié"
 
-#: ../gtk-dialog.c:1153 ../gtk-dialog.c:1184 ../gtk-ui.c:79
+#: ../gtk-dialog.c:1198 ../gtk-ui.c:80
 msgid "Not private"
 msgstr "Non-privé"
 
-#: ../gtk-dialog.c:1156
-msgid "Start a private conversation"
-msgstr "Commencer une conversation privée"
-
-#: ../gtk-dialog.c:1157
-msgid "Refresh the private conversation"
-msgstr "Rafraîchir la conversation privée"
-
-#: ../gtk-dialog.c:1162 ../gtk-dialog.c:1802 ../gtk-dialog.c:1897
-msgid "Start _private conversation"
-msgstr "Commencer une conversation _privée"
-
-#: ../gtk-dialog.c:1163 ../gtk-dialog.c:1803
-msgid "Refresh _private conversation"
-msgstr "Rafraîchir la conversation _privée"
-
-#: ../gtk-dialog.c:1187
+#: ../gtk-dialog.c:1201
 msgid "OTR"
-msgstr "OTR :"
+msgstr "OTR"
 
-#. Translators: the following four messages should give alternative sentences.
-#. The user selects the first or second message in a combo box;
-#. the third message, a new line, a fingerprint, a new line, and
-#. the fourth message will follow it.
-#: ../gtk-dialog.c:1322
+#. Translators: the following four messages should give alternative
+#. * sentences. The user selects the first or second message in a combo box;
+#. * the third message, a new line, a fingerprint, a new line, and
+#. * the fourth message will follow it.
+#: ../gtk-dialog.c:1351
 msgid "I have not"
 msgstr "Je n'ai pas"
 
 #. 2nd message
-#: ../gtk-dialog.c:1324
+#: ../gtk-dialog.c:1353
 msgid "I have"
 msgstr "J'ai"
 
 #. 3rd message
-#: ../gtk-dialog.c:1327
+#: ../gtk-dialog.c:1356
 msgid " verified that this is in fact the correct"
-msgstr "verifié que c'est en effet"
+msgstr " verifié que c'est en effet"
 
 #. 4th message
-#: ../gtk-dialog.c:1337
+#: ../gtk-dialog.c:1366
 #, c-format
 msgid "fingerprint for %s."
 msgstr "l'empreinte pour %s."
 
-#: ../gtk-dialog.c:1364
+#: ../gtk-dialog.c:1393
 #, c-format
 msgid "Verify fingerprint for %s"
 msgstr "Vérifier l'empreinte pour %s"
 
-#: ../gtk-dialog.c:1376
+#: ../gtk-dialog.c:1405
 #, c-format
 msgid ""
 "<small><i>%s %s\n"
@@ -270,86 +274,117 @@ msgid ""
 "Purported fingerprint for %s:\n"
 "%s\n"
 msgstr ""
+"<small><i>%s %s\n"
+"\n"
 "Votre empreinte, %s (%s):\n"
 "%s\n"
 "\n"
 "Empreinte prétendue de %s:\n"
 "%s\n"
 
-#: ../gtk-dialog.c:1389 ../gtk-ui.c:782
+#: ../gtk-dialog.c:1412
+msgid ""
+"If everything matches up, you should indicate in the above dialog that you "
+"<b>have</b> verified the fingerprint."
+msgstr ""
+
+#: ../gtk-dialog.c:1418 ../gtk-ui.c:844
 msgid "Verify fingerprint"
-msgstr "Vérifier l'empreinte"
+msgstr ""
+"Si les empreintes sont identiques, indiquez que vous <b>avez</b> verifié "
+"l'empreinte."
 
-#: ../gtk-dialog.c:1416
+#: ../gtk-dialog.c:1445
 #, c-format
 msgid "Authentication from %s"
 msgstr "Authentifier auprès de %s"
 
-#: ../gtk-dialog.c:1419
+#: ../gtk-dialog.c:1448
 #, c-format
 msgid "Authenticate %s"
 msgstr "Authentifier %s"
 
-#: ../gtk-dialog.c:1429
+#: ../gtk-dialog.c:1456
 msgid "Authenticate Buddy"
 msgstr "Authentifier contact"
 
-#: ../gtk-dialog.c:1460
+#: ../gtk-dialog.c:1487
 msgid "An error occurred during authentication."
 msgstr "Une erreur s'est produite durant l'authentification."
 
-#: ../gtk-dialog.c:1475
+#: ../gtk-dialog.c:1502
 msgid "Authentication successful."
 msgstr "Authentification réussie."
 
-#: ../gtk-dialog.c:1478
+#: ../gtk-dialog.c:1505
 msgid ""
 "Your buddy has successfully authenticated you.  You may want to authenticate "
 "your buddy as well by asking your own question."
-msgstr "Votre contact vous a authentifié avec succès ; Vous devriez l'authentifier à votre tour en lui posant votre propre question."
+msgstr ""
+"Votre contact vous a authentifié avec succès ; Vous devriez l'authentifier "
+"à votre tour en lui posant votre propre question."
 
-#: ../gtk-dialog.c:1484
+#: ../gtk-dialog.c:1511
 msgid "Authentication failed."
 msgstr "Authentification non réussie."
 
-#: ../gtk-dialog.c:1512
+#: ../gtk-dialog.c:1541
 #, c-format
-msgid "Private conversation with %s started.%s"
-msgstr "Une conversation privée avec %s a commencé.%s"
+msgid "Private conversation with %s started.%s%s"
+msgstr "Une conversation privée avec %s a commencé.%s%s"
 
-#: ../gtk-dialog.c:1516
+#: ../gtk-dialog.c:1545
 #, c-format
-msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s"
-msgstr "Une conversation <a href=\"%s%s\">non-verifiée</a> avec %%s a commencé.%%s"
+msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s%%s"
+msgstr "Une conversation <a href=\"%s%s\">non-verifiée</a> avec %%s a commencé.%%s%%s"
 
 #. This last case should never happen, since we know
 #. * we're in ENCRYPTED.
-#: ../gtk-dialog.c:1524
+#: ../gtk-dialog.c:1553
 #, c-format
-msgid "Not private conversation with %s started.%s"
-msgstr "Une conversation non-privée avec %s a commencé.%s"
+msgid "Not private conversation with %s started.%s%s"
+msgstr "Une conversation non-privée avec %s a commencé.%s%s"
 
-#: ../gtk-dialog.c:1530 ../gtk-dialog.c:1634
+#: ../gtk-dialog.c:1559 ../gtk-dialog.c:1686
 msgid "  Warning: using old protocol version 1."
 msgstr "  Attention : utilisation du protocole obsolète version 1."
 
-#: ../gtk-dialog.c:1550
+#: ../gtk-dialog.c:1561
+msgid "  Your client is logging this conversation."
+msgstr "  Votre client est configuré pour archiver cette conversation."
+
+#: ../gtk-dialog.c:1562
+msgid "  Your client is not logging this conversation."
+msgstr "  Votre client est configuré pour ne pas archiver cette conversation."
+
+#: ../gtk-dialog.c:1581
+#, c-format
+msgid ""
+"Your buddy is logged in multiple times and OTR has established <a href=\"%s%s"
+"\">multiple sessions</a>. Use the icon menu above if you wish to select the "
+"outgoing session."
+msgstr ""
+"Votre contact est connecté plusieurs fois et OTR s'est établi <a href=\"%s%s"
+"\">plusieurs sessions</a>. Utilisez le menu d'icônes si vous désirez sélectionner "
+"la session sortante."
+
+#: ../gtk-dialog.c:1601
 #, c-format
 msgid "Private conversation with %s lost."
 msgstr "La conversation privée avec %s est interrompue."
 
-#: ../gtk-dialog.c:1587
+#: ../gtk-dialog.c:1638
 #, c-format
 msgid ""
 "%s has ended his/her private conversation with you; you should do the same."
-msgstr "%s a arrêté sa conversation privée avec vous ; vous devriez faire de même."
+msgstr "%s a arrêté sa conversation privée avec vous ; vous devriez faire de même."
 
-#: ../gtk-dialog.c:1613
+#: ../gtk-dialog.c:1665
 #, c-format
 msgid "Successfully refreshed the private conversation with %s.%s"
 msgstr "La conversation privée avec %s a été rafraîchie avec succès.%s"
 
-#: ../gtk-dialog.c:1618
+#: ../gtk-dialog.c:1670
 #, c-format
 msgid ""
 "Successfully refreshed the <a href=\"%s%s\">unverified</a> conversation with "
@@ -360,278 +395,491 @@ msgstr ""
 
 #. This last case should never happen, since we know
 #. * we're in ENCRYPTED.
-#: ../gtk-dialog.c:1627
+#: ../gtk-dialog.c:1679
 #, c-format
 msgid "Successfully refreshed the not private conversation with %s.%s"
 msgstr "La conversation non-privée avec %s a été rafraîchie avec succès.%s"
 
-#: ../gtk-dialog.c:1659
+#: ../gtk-dialog.c:1712
 #, c-format
 msgid "Attempting to refresh the private conversation with %s..."
 msgstr "Rafraîchissement de la conversation privée avec %s..."
 
-#: ../gtk-dialog.c:1661
+#: ../gtk-dialog.c:1714
 #, c-format
 msgid "Attempting to start a private conversation with %s..."
 msgstr "Création d'une conversation privée avec %s..."
 
-#: ../gtk-dialog.c:1844 ../gtk-dialog.c:2117
+#: ../gtk-dialog.c:1899 ../gtk-dialog.c:2026
+msgid "Start _private conversation"
+msgstr "Commencer une conversation _privée"
+
+#: ../gtk-dialog.c:1900
+msgid "Refresh _private conversation"
+msgstr "Rafraîchir la conversation _privée"
+
+#: ../gtk-dialog.c:1905
+msgid "Re_authenticate buddy"
+msgstr ""
+
+#: ../gtk-dialog.c:1906 ../gtk-dialog.c:2030
+msgid "_Authenticate buddy"
+msgstr "Ré-_Authentifier contact"
+
+#: ../gtk-dialog.c:1960 ../gtk-dialog.c:2736
 msgid "Not Private"
 msgstr "Non-privé"
 
-#: ../gtk-dialog.c:1866 ../gtk-dialog.c:2338
+#: ../gtk-dialog.c:1982
 msgid "_What's this?"
 msgstr "_Qu'est que c'est ?"
 
-#: ../gtk-dialog.c:1898 ../gtk-dialog.c:2303
+#: ../gtk-dialog.c:2028
 msgid "_End private conversation"
-msgstr "_Terminer la conversation privée"
-
-#.
-#. * Don't show the Verify fingerprint menu option any more.  You can
-#. * still get to the dialog through Authenticate connection ->
-#. * Advanced...
-#. *
-#. menuverf = gtk_menu_item_new_with_mnemonic(_("_Verify fingerprint"));
-#. gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuverf);
-#. gtk_widget_show(menuverf);
-#.
-#: ../gtk-dialog.c:1899 ../gtk-dialog.c:2321
-msgid "_Authenticate buddy"
-msgstr "_Authentifier le contact"
+msgstr ""
+
+#: ../gtk-dialog.c:2207 ../gtk-dialog.c:2255
+#, c-format
+msgid ""
+"Warning: The selected outgoing OTR session (%u) is not the most recently "
+"active one (%u). Your buddy may not receive your messages. Use the icon menu "
+"above to select a different outgoing session."
+msgstr ""
+"Attention : La session sortante OTR sélectionnée (%u) n'est pas celui qui est "
+"le plus récemment actif (%u). Votre contact ne recevra peut-être pas vos "
+"messages. Utilisez le menu d'icônes ci-dessus pour sélectionner une autre "
+"session sortante."
+
+#: ../gtk-dialog.c:2271
+msgid "Send to most secure"
+msgstr "Envoyer au plus sécurisé"
+
+#: ../gtk-dialog.c:2273
+msgid "Send to most recent"
+msgstr "Envoyer au plus récent"
+
+#: ../gtk-dialog.c:2377
+#, c-format
+msgid "Session %u"
+msgstr "Session %u"
+
+#: ../gtk-dialog.c:2395 ../gtk-dialog.c:2506
+msgid "Select"
+msgstr "Choisir"
+
+#: ../gtk-dialog.c:2410
+msgid "Selected"
+msgstr "Choisi"
 
-#: ../gtk-dialog.c:2113
+#: ../gtk-dialog.c:2731
 #, c-format
 msgid ""
 "The privacy status of the current conversation is now: <a href=\"%s%s\">%s</"
 "a>"
-msgstr "La confidentialité de cette conversation est désormais :"
-
-#: ../gtk-dialog.c:2276
-msgid "OTR:"
-msgstr "OTR :"
+msgstr ""
+"La confidentialité de cette conversation est désormais : <a href=\"%s%s\">"
+"%s</a>"
 
-#: ../gtk-dialog.c:2296
+#: ../gtk-dialog.c:2956
 msgid "OTR Messaging"
 msgstr "Messagerie OTR"
 
-#: ../gtk-ui.c:102
+#: ../gtk-ui.c:103
 #, c-format
 msgid "Fingerprint: %.80s"
 msgstr "L'empreinte : %.80s"
 
-#: ../gtk-ui.c:106
+#: ../gtk-ui.c:107
 #, c-format
 msgid "No key present"
 msgstr "Aucune clé présente"
 
-#: ../gtk-ui.c:111
+#: ../gtk-ui.c:112
 #, c-format
 msgid "No account available"
 msgstr "Aucun compte disponible"
 
-#: ../gtk-ui.c:171
+#: ../gtk-ui.c:179
 msgid "Unused"
 msgstr "Inutilisé"
 
-#: ../gtk-ui.c:177
+#: ../gtk-ui.c:208
 msgid "Yes"
 msgstr "Oui"
 
-#: ../gtk-ui.c:177
+#: ../gtk-ui.c:208
 msgid "No"
 msgstr "Non"
 
-#: ../gtk-ui.c:403
+#: ../gtk-ui.c:473
 msgid "Enable private messaging"
 msgstr "Permettre messagerie privée"
 
-#: ../gtk-ui.c:405
+#: ../gtk-ui.c:475
 msgid "Automatically initiate private messaging"
 msgstr "Commencer messagerie privée automatiquement"
 
-#: ../gtk-ui.c:407
+#: ../gtk-ui.c:477
 msgid "Require private messaging"
 msgstr "Exiger messagerie privée"
 
-#: ../gtk-ui.c:410
+#: ../gtk-ui.c:480
 msgid "Don't log OTR conversations"
 msgstr "Ne pas archiver les conversations d'OTR"
 
-#: ../gtk-ui.c:454
-msgid "Show OTR button"
-msgstr "Montrer le bouton OTR"
-
-#: ../gtk-ui.c:457
+#: ../gtk-ui.c:524
 msgid "Show OTR button in toolbar"
 msgstr "Montrer le bouton OTR dans la barre des tâches"
 
-#: ../gtk-ui.c:601
+#: ../gtk-ui.c:663
 msgid "My private keys"
 msgstr "Mes clés privées"
 
-#: ../gtk-ui.c:610
+#: ../gtk-ui.c:672
 msgid "Key for account:"
 msgstr "Clé pour le compte :"
 
-#: ../gtk-ui.c:635
+#: ../gtk-ui.c:697
 msgid "Generate"
 msgstr "Produire"
 
-#: ../gtk-ui.c:676
+#: ../gtk-ui.c:738
 msgid "Default OTR Settings"
 msgstr "Paramètres d'OTR par défaut"
 
-#: ../gtk-ui.c:703
+#: ../gtk-ui.c:765
 msgid "OTR UI Options"
 msgstr "Paramètres d'OTR"
 
-#: ../gtk-ui.c:726
+#: ../gtk-ui.c:788
 msgid "Screenname"
 msgstr "Nom d'utilisateur"
 
-#: ../gtk-ui.c:727
+#: ../gtk-ui.c:789
 msgid "Status"
 msgstr "État"
 
-#: ../gtk-ui.c:728
+#: ../gtk-ui.c:790
 msgid "Verified"
 msgstr "Vérifié"
 
-#: ../gtk-ui.c:729
+#: ../gtk-ui.c:791
 msgid "Fingerprint"
 msgstr "L'empreinte"
 
-#: ../gtk-ui.c:730
+#: ../gtk-ui.c:792
 msgid "Account"
 msgstr "Compte"
 
-#: ../gtk-ui.c:766
+#: ../gtk-ui.c:828
 msgid "Start private connection"
-msgstr "Commencer connection privée"
+msgstr "Commencer connexion privée"
 
-#: ../gtk-ui.c:774
+#: ../gtk-ui.c:836
 msgid "End private connection"
-msgstr "Finir connection privée"
+msgstr "Finir connexion privée"
 
-#: ../gtk-ui.c:790
+#: ../gtk-ui.c:852
 msgid "Forget fingerprint"
 msgstr "Oublier l'empreinte"
 
-#: ../gtk-ui.c:841
+#: ../gtk-ui.c:903
 msgid "Config"
 msgstr "Configuration"
 
-#: ../gtk-ui.c:843
+#: ../gtk-ui.c:905
 msgid "Known fingerprints"
 msgstr "Empreintes connues"
 
-#: ../gtk-ui.c:941 ../otr-plugin.c:606
+#: ../gtk-ui.c:1003 ../otr-plugin.c:964
 msgid "OTR Settings"
 msgstr "Paramètres d'OTR"
 
 #. Set the title
-#: ../gtk-ui.c:959
+#: ../gtk-ui.c:1021
 #, c-format
 msgid "OTR Settings for %s"
 msgstr "Paramètres d'OTR pour %s"
 
 #. Make the cascaded checkboxes
-#: ../gtk-ui.c:976
+#: ../gtk-ui.c:1038
 msgid "Use default OTR settings for this buddy"
 msgstr "Utiliser les paramètres par défaut d'OTR pour ce contact"
 
-#: ../otr-plugin.c:114
+#: ../otr-plugin.c:125
 #, c-format
 msgid "You are not currently connected to account %s (%s)."
 msgstr "Vous n'êtes pas actuellement connecté au compte %s (%s)."
 
-#: ../otr-plugin.c:118
+#: ../otr-plugin.c:129
 msgid "Not connected"
 msgstr "Non connecté"
 
-#: ../otr-plugin.c:162
+#: ../otr-plugin.c:212 ../otr-plugin.c:254
 #, c-format
 msgid "Out of memory building filenames!\n"
 msgstr "Manque de mémoire lors de la construction des noms de fichiers !\n"
 
-#: ../otr-plugin.c:168
+#: ../otr-plugin.c:224 ../otr-plugin.c:260
 #, c-format
 msgid "Could not write private key file\n"
 msgstr "Échec lors de l'écriture du fichier des clés privées\n"
 
-#: ../otr-plugin.c:211
+#: ../otr-plugin.c:298
 #, c-format
 msgid "Unknown account %s (%s)."
 msgstr "Compte %s inconnu (%s)."
 
-#: ../otr-plugin.c:215
+#: ../otr-plugin.c:302
 msgid "Unknown account"
 msgstr "Compte inconnu"
 
-#: ../otr-plugin.c:983
+#: ../otr-plugin.c:364
+msgid "Error occurred encrypting message."
+msgstr "Échec lors du cryptage du message."
+
+#: ../otr-plugin.c:368
+#, c-format
+msgid "You sent encrypted data to %s, who wasn't expecting it."
+msgstr "Vous avez envoyé à %s des données cryptés, mail il ou elle ne s'y"
+"attendait pas."
+
+#: ../otr-plugin.c:374
+msgid "You transmitted an unreadable encrypted message."
+msgstr "Vous avez transmi un message crypté illisible."
+
+#: ../otr-plugin.c:377
+msgid "You transmitted a malformed data message."
+msgstr "Vous avez transmi un message de données malformé."
+
+#: ../otr-plugin.c:390
+msgid "[resent]"
+msgstr "[envoyé de nouveau]"
+
+#: ../otr-plugin.c:459
+#, c-format
+msgid "You attempted to send an unencrypted message to %s"
+msgstr "Vous avez tenté d'envoyer à %s un message non-crypté"
+
+#: ../otr-plugin.c:462
+msgid "Attempting to start a private conversation..."
+msgstr "Création d'une conversation privée..."
+
+#: ../otr-plugin.c:464
+msgid "OTR Policy Violation"
+msgstr "Violation de Politique OTR"
+
+#: ../otr-plugin.c:465
+msgid ""
+"Unencrypted messages to this recipient are not allowed.  Attempting to start "
+"a private conversation.\n"
+"\n"
+"Your message will be retransmitted when the private conversation starts."
+msgstr ""
+"L'envoi à ce destinaire de messages non-cryptés est interdit. Création d'une "
+"conversation privée...\n"
+"\n"
+"Votre message sera transmi de nouveau suite au début de la conversation "
+"privée."
+
+#: ../otr-plugin.c:474
+msgid ""
+"An error occurred when encrypting your message.  The message was not sent."
+msgstr ""
+"Une erreur s'est produite durant le cryptage de votre message. Le message n'a "
+"pas été envoyé."
+
+#: ../otr-plugin.c:476
+msgid "Error encrypting message"
+msgstr "Échec lors du cryptage du message"
+
+#: ../otr-plugin.c:477
+msgid "An error occurred when encrypting your message"
+msgstr "Une erreur s'est produite durant le cryptage de votre message"
+
+#: ../otr-plugin.c:478
+msgid "The message was not sent."
+msgstr "Le message n'a pas été envoyé."
+
+#: ../otr-plugin.c:481
+#, c-format
+msgid "%s has already closed his/her private connection to you"
+msgstr "%s a déjà fermé la connexion entre vous deux."
+
+#: ../otr-plugin.c:484
+msgid ""
+"Your message was not sent.  Either end your private conversation, or restart "
+"it."
+msgstr ""
+"Votre message n'a pas été envoyé. Soit mettre fin à votre session ou "
+"redémarrer-le."
+
+#: ../otr-plugin.c:487
+msgid "Private connection closed"
+msgstr "Connexion privée fermé."
+
+#: ../otr-plugin.c:488
+msgid ""
+"Your message was not sent.  Either close your private connection to him, or "
+"refresh it."
+msgstr ""
+"Votre message n'a pas été envoyé. Soit mettre fin à votre session ou rafraîchir-le."
+
+#: ../otr-plugin.c:498
+msgid "Error setting up private conversation: Malformed message received"
+msgstr "Échec lors de la mise en place d'une conversation privée : Message malformé reçu."
+
+#: ../otr-plugin.c:502
+#, c-format
+msgid "Error setting up private conversation: %s"
+msgstr "Échec lors de la mise en place d'une conversatation privée : %s"
+
+#: ../otr-plugin.c:509 ../otr-plugin.c:520 ../otr-plugin.c:547
+#: ../otr-plugin.c:555 ../otr-plugin.c:573
+msgid "OTR Error"
+msgstr "Échec OTR"
+
+#: ../otr-plugin.c:516
+msgid ""
+"We are receiving our own OTR messages.  You are either trying to talk to "
+"yourself, or someone is reflecting your messages back at you."
+msgstr ""
+"Nous reçevons nos propres messages OTR. Soit que vous tentez parler à "
+"vous-même, ou que quelqu'un vous renvoie vos messages."
+
+#: ../otr-plugin.c:520
+msgid "We are receiving our own OTR messages."
+msgstr "Nous reçevons nos propres messages OTR."
+
+#: ../otr-plugin.c:521
+msgid ""
+"You are either trying to talk to yourself, or someone is reflecting your "
+"messages back at you."
+msgstr ""
+"Soit que vous tentez parler à vous-même, ou que quelqu'un vous renvoie vos messages."
+
+#: ../otr-plugin.c:526
+#, c-format
+msgid "<b>The last message to %s was resent.</b>"
+msgstr "<b>Le dernier message pour %s a été envoyé de nouveau.</b>"
+
+#: ../otr-plugin.c:530
+msgid "Message resent"
+msgstr "Message envoyé de nouveau"
+
+#: ../otr-plugin.c:534
+#, c-format
+msgid ""
+"<b>The encrypted message received from %s is unreadable, as you are not "
+"currently communicating privately.</b>"
+msgstr ""
+"<b>Le message crypté reçu de %s est illisible, puisque vous ne communiquez pas en "
+"privé à présent."
+
+#: ../otr-plugin.c:539
+msgid "Unreadable message"
+msgstr "Message illisible"
+
+#: ../otr-plugin.c:543
+#, c-format
+msgid "We received an unreadable encrypted message from %s."
+msgstr "Nous avons reçu de %s un message crypté illisible."
+
+#: ../otr-plugin.c:551
+#, c-format
+msgid "We received a malformed data message from %s."
+msgstr "Nous avons reçu de %s un message malformé."
+
+#: ../otr-plugin.c:559
+#, c-format
+msgid "Heartbeat received from %s.\n"
+msgstr "Pulsation reçu de %s.\n"
+
+#: ../otr-plugin.c:565
+#, c-format
+msgid "Heartbeat sent to %s.\n"
+msgstr "Pulsation envoyé à %s.\n"
+
+#: ../otr-plugin.c:576
+#, c-format
+msgid ""
+"<b>The following message received from %s was <i>not</i> encrypted: [</b>%"
+"s<b>]</b>"
+msgstr ""
+"<b>Le message suivant reçu de %s n'a <i>pas</i> été crypté : [</b>%s<b>]</b>"
+
+#: ../otr-plugin.c:581
+msgid "Received unencrypted message"
+msgstr "Message non-crypté reçu"
+
+#: ../otr-plugin.c:587
+#, c-format
+msgid "Unrecognized OTR message received from %s.\n"
+msgstr "Message OTR non-reconnu reçu de %s.\n"
+
+#: ../otr-plugin.c:596
+#, c-format
+msgid ""
+"%s has sent a message intended for a different session. If you are logged in "
+"multiple times, another session may have received the message."
+msgstr ""
+"%s a envoyé un message destiné à une autre session. Si vous êtez connectés plusieurs "
+"fois, il se peut qu'une autre session a reçu le message."
+
+#: ../otr-plugin.c:602
+msgid "Received message for a different session"
+msgstr "Message destiné à une autre session reçu"
+
+#. 2013-01-01
+#: ../otr-plugin.c:1193 ../otr-plugin.c:1220
+#, c-format
+msgid "OTR PLUGIN v%s"
+msgstr "PLUGIN OTR v%s"
+
+#: ../otr-plugin.c:1202
+#, c-format
+msgid ""
+"This beta copy of the Off-the-Record Messaging v%s Pidgin plugin has expired "
+"as of 2013-01-01. Please look for an updated release at http://otr."
+"cypherpunks.ca/"
+msgstr ""
+"Cette copie béta du plugin pour Pidgin Messagerie Confidentielle 'Off-the-Record' "
+"v%s est expiré depuis 2013-01-01. SVP rechercher la version actuelle à "
+"http://otr.cypherpunks.ca/"
+
+#: ../otr-plugin.c:1229
+#, c-format
+msgid ""
+"You have enabled a beta version of the Off-the-Record Messaging v%s Pidgin "
+"plugin. This version is intended for testing purposes only and is not for "
+"general purpose use."
+msgstr ""
+"Vous avez activé une version béta du plugin pour Pidgin Messagerie Confidentielle "
+"'Off-the-Record' v%s. Cette version est conçu uniquement pour la mise en essai et "
+"non pour l'usage général."
+
+#: ../otr-plugin.c:1414
 msgid "Off-the-Record Messaging"
 msgstr "Messagerie Confidentielle 'Off-the-Record'"
 
-#: ../otr-plugin.c:984
+#: ../otr-plugin.c:1415
 msgid "Provides private and secure conversations"
 msgstr "Propose des conversations confidentielles et sûres"
 
-#: ../otr-plugin.c:985
+#: ../otr-plugin.c:1416
 msgid ""
 "Preserves the privacy of IM communications by providing encryption, "
 "authentication, deniability, and perfect forward secrecy."
-msgstr "Préserve l'intimité de votre messagerie instantanée en offrant le chiffrement, l'authentification, la possibilité de dénégation, et un secret durable (perfect forward secrecy)."
+msgstr ""
+"Préserve l'intimité de votre messagerie instantanée en offrant le chiffrement, "
+"l'authentification, la possibilité de dénégation, et un secret durable "
+"('perfect forward secrecy')."
 
-#: ../ui.c:109
+#: ../ui.c:110
 #, c-format
 msgid "Account %s (%s) could not be found"
 msgstr "Le compte %s (%s) n'a pas pu être trouvé"
 
-#: ../ui.c:113
+#: ../ui.c:114
 msgid "Account not found"
 msgstr "Le compte n'a pas pu être trouvé"
-
-#~ msgid "_More..."
-#~ msgstr "_Plus..."
-
-#~ msgid "Advanced..."
-#~ msgstr "Avancé..."
-
-#~ msgid ""
-#~ "If your buddy uses multiple IM accounts or multiple computers, you may "
-#~ "have to authenticate multiple times.  However, as long as they use an "
-#~ "account and computer that you've seen before, you don't need to "
-#~ "authenticate each individual conversation."
-#~ msgstr ""
-#~ "Si votre contact utilise plusieurs comptes ou plusieurs ordinateurs, \n"
-#~ "vous devrez l'authentifier pour chaque compte et ordinateur. Mais\n"
-#~ "lorsque le compte et l'ordinateur ont été authentifiés une fois, vous\n"
-#~ "n'avez pas à le refaire."
-
-#~ msgid "Click here for more information about authentication in OTR."
-#~ msgstr "Cliquez ici pour plus d'informationq à propos de l'authentification en OTR."
-
-#~ msgid ""
-#~ "If your buddy has more than one IM account, or uses more than one "
-#~ "computer, he may have multiple fingerprints."
-#~ msgstr ""
-#~ "Si votre contact utilise plus d'un compte ou plus d'un ordinateur, il a "
-#~ "peut-être plus d'une empreinte."
-
-#~ msgid ""
-#~ "However, the only way an imposter could duplicate one of your buddy's "
-#~ "fingerprints is by stealing information from her/his computer."
-#~ msgstr "Par contre, la seule façon pour un imposteur de dupliquer une des empreintes de votre contact est de voler l'information sur son ordinateur."
-
-#~ msgid "Click here for more information about fingerprints."
-#~ msgstr "Cliquez ici pour plus d'informations à propos des empreintes."
-
-#~ msgid ""
-#~ "A <b>fingerprint</b> is a unique identifier that you should use to "
-#~ "authenticate your buddy."
-#~ msgstr "Une <b>empreinte</b> est une identification unique que vous devez utiliser pour authentifier votre contact."
-
-#~ msgid "Enter a secret known only to %s and yourself.\n"
-#~ msgstr "Entrez un secret connu seulement par %s et vous-même.\n"
-
diff --git a/po/my_MM.po b/po/my_MM.po
new file mode 100644
index 0000000..a0a2fa9
--- /dev/null
+++ b/po/my_MM.po
@@ -0,0 +1,797 @@
+# Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew,
+#	                       Lisa Du, Nikita Borisov
+# This file is distributed under the same license as the pidgin-otr package.
+# Ian Goldberg <otr at cypherpunks.ca>, 2012
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pidgin-otr 4.0.0.my_MM\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-06-14 09:45-0400\n"
+"PO-Revision-Date: 2012-07-01 22:01+0530\n"
+"Last-Translator: Russell Kyaw <russellkyaw at gmail.com>\n"
+"Language-Team: MM L10N Team <mm.l10n.team at gmail.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-dialog.c:332
+#: ../gtk-dialog.c:1141
+#: ../gtk-dialog.c:1145
+#: ../gtk-dialog.c:1547
+#: ../gtk-dialog.c:1584
+#: ../gtk-dialog.c:1673
+#: ../gtk-dialog.c:1748
+#: ../gtk-dialog.c:2749
+msgid "?lang=en"
+msgstr "?lang=my_MM"
+
+#: ../gtk-dialog.c:480
+msgid "Your buddy is attempting to determine if he or she is really talking to you, or if it's someone pretending to be you.  Your buddy has asked a question, indicated below.  To authenticate to your buddy, enter the answer and click OK."
+msgstr "သင့်မိတ်ဆွေသည် သူခေါ်နေသော သူသည် သင်တကယ် ဟုတ်မဟုတ်၊ (သို့) တစ်စုံတစ်ယောက်သည် သင့်အယောင်ကို ဆောင်မဆောင် စစ်ဆေးရန် ကြိုးစားနေသည်။ သင့်မိတ်ဆွေသည် အောက်ပါအတိုင်း သင့်ကို မေးခွန်း တစ်ပုဒ်​ မေးနေသည်။ သင့်​မိတ်ဆွေကို အတည်ပြုရန်၊ အဖြေကို ရေးထည့်ပြီး ကောင်းပြီ ကို နှိပ်ပါ။"
+
+#: ../gtk-dialog.c:487
+msgid "To authenticate using a question, pick a question whose answer is known only to you and your buddy.  Enter this question and this answer, then wait for your buddy to enter the answer too.  If the answers don't match, then you may be talking to an imposter."
+msgstr "​မေးခွန်း တစ်ပုဒ်ကို အသုံးပြုပြီး အတည်ပြုရန်၊ သင်နှင့် သင့်မိတ်ဆွေတို့ကသာ အဖြေ သိရှိသော မေးခွန်း တစ်ပုဒ်ကို ရွေးပါ။ ဤမေးခွန်းနှင့် အဖြေကို ရေးထည့်ပြီး၊ သင့်မိတ်ဆွေက အဖြေကို ရေးထည့်ရန် စောင့်ဆိုင်းပါ။ အကယ်၍ အဖြေ ကိုက်ညီမှု မရှိပါက၊ သူ့ကို ​အယောင်ဆောင်သူ တစ်ဦးအဖြစ် သတ်မှတ်နိုင်သည်။"
+
+#: ../gtk-dialog.c:505
+#, c-format
+msgid "This is the question asked by your buddy:"
+msgstr "ဤမေးခွန်းသည် သင့်မိတ်ဆွေ မေးသော မေးခွန်း ဖြစ်သည် -"
+
+#: ../gtk-dialog.c:508
+#, c-format
+msgid "Enter question here:"
+msgstr "ဤနေရာ၌ မေးခွန်း ရေးပါ -"
+
+#: ../gtk-dialog.c:540
+#: ../gtk-dialog.c:624
+msgid "This buddy is already authenticated."
+msgstr "သင့် မိတ်ဆွေကို စစ်ဆေး အတည်ပြုလိုက်ပြီ။"
+
+#: ../gtk-dialog.c:552
+#, c-format
+msgid "Enter secret answer here (case sensitive):"
+msgstr "လျှို့ဝှက် အဖြေကို ဤနေရာ၌ ရေးထည့်ပါ (အမှားမခံ) -"
+
+#: ../gtk-dialog.c:593
+msgid "To authenticate, pick a secret known only to you and your buddy.  Enter this secret, then wait for your buddy to enter it too.  If the secrets don't match, then you may be talking to an imposter."
+msgstr "အတည်ပြုနိုင်ရန်၊ သင်နှင့် သင့်မိတ်ဆွေတို့ကသာ သိရှိသော လျှို့ဝှက်ချက် တစ်ခုကို ရွေးပါ။ ဤလျှို့ဝှက်ချက်ကို ရေးပြီးနောက်၊ သင့် မိတ်ဆွေလည်း ၄င်းကို ရေးသည့်အထိ စောင့်ဆိုင်းပါ။ အကယ်၍ လျှို့ဝှက် မကိုက်ညီပါက၊ သူ့အယောင်ဆောင်သော သူကို စကားပြောနေခြင်း ဖြစ်နိုင်သည်။"
+
+#: ../gtk-dialog.c:607
+#, c-format
+msgid "Enter secret here:"
+msgstr "ဤနေရာ၌ လျှို့ဝှက်ချက် ရေးထည့်ရန် -"
+
+#: ../gtk-dialog.c:657
+#: ../gtk-dialog.c:1408
+msgid "To verify the fingerprint, contact your buddy via some <i>other</i> authenticated channel, such as the telephone or GPG-signed email.  Each of you should tell your fingerprint to the other."
+msgstr "လက်ဗွေကို စစ်ဆေး အတည်ပြုရန်၊ သင့် မိတ်ဆွေကို တယ်လီဖုန်း (သို့) GPG-လက်မှတ်ထိုးထား​သော အီးမေးလ် စသည်ဖြင့် စစ်ဆေး အတည်ပြုသော <i>အခြား</i> လမ်းကြောင်း မှတစ်ဆင့် ဆက်သွယ်ပါ။ သင်တို့ တစ်ဦးကို တစ်ဦး မိမိတို့၏ လက်ဗွေကို ပြောပြရမည် ဖြစ်သည်။"
+
+#: ../gtk-dialog.c:661
+msgid "If everything matches up, you should chose <b>I have</b> in the menu below."
+msgstr "အကယ်၍ အားလုံး ကိုက်ညီပါက၊ အောက် မီနူးရှိ <b>ကျွန်တော့်ဆီ ရှိသည်</b> ကို ရွေးပါ။"
+
+#: ../gtk-dialog.c:672
+#: ../gtk-dialog.c:1397
+msgid "[none]"
+msgstr "[ဘာမှမရှိ]"
+
+#: ../gtk-dialog.c:679
+#: ../gtk-dialog.c:1051
+#: ../gtk-dialog.c:1404
+#: ../gtk-dialog.c:1453
+#: ../gtk-ui.c:212
+#: ../otr-plugin.c:127
+#: ../otr-plugin.c:300
+#: ../ui.c:112
+msgid "Unknown"
+msgstr "အမည်မသိ"
+
+#: ../gtk-dialog.c:680
+#, c-format
+msgid ""
+"Fingerprint for you, %s (%s):\n"
+"%s\n"
+"\n"
+"Purported fingerprint for %s:\n"
+"%s\n"
+msgstr ""
+"သင့်အတွက် လက်ဗွေ၊  %s (%s):\n"
+"%s\n"
+"\n"
+"​​အယောင်ဆောင် လက်​ဗွေ ပိုင်ရှင် %s:\n"
+"%s\n"
+
+#: ../gtk-dialog.c:736
+msgid "How would you like to authenticate your buddy?"
+msgstr "သင့်မိတ်ဆွေကို မည်ကဲ့သို့ စစ်ဆေး အတည်ပြုမည်နည်း?"
+
+#: ../gtk-dialog.c:745
+msgid "Question and answer"
+msgstr "မေးခွန်းနှင့် အ​ဖြေ"
+
+#: ../gtk-dialog.c:748
+msgid "Shared secret"
+msgstr "မျှဝေထားသော လျှို့ဝှက်ချက်"
+
+#: ../gtk-dialog.c:751
+msgid "Manual fingerprint verification"
+msgstr "လက်ဗွေကို ကိုယ်တိုင် အတည်ပြုခြင်း"
+
+#: ../gtk-dialog.c:802
+msgid "_Authenticate"
+msgstr "အတည်ပြုခြင်း (_A)"
+
+#: ../gtk-dialog.c:836
+msgid "Authenticating a buddy helps ensure that the person you are talking to is who he or she claims to be."
+msgstr "မိတ်ဆွေ တစ်ဦးကို စစ်​ဆေး အတည်ပြုခြင်းဖြင့် သင်နှစ် စကားပြောနေသူသည် သင်ရည်ရွယ်ထားသော ပုဂ္ဂိုလ် အမှန် ဖြစ်ကြောင်း သေချာစေသည်။"
+
+#. Translators: you are asked to authenticate yourself
+#: ../gtk-dialog.c:946
+msgid "Authenticating to Buddy"
+msgstr "မိတ်ဆွေကို စစ်ဆေး အတည်ပြုရန်"
+
+#. Translators: you asked your buddy to authenticate him/herself
+#: ../gtk-dialog.c:948
+msgid "Authenticating Buddy"
+msgstr "မိတ်ဆွေကို အတည်ပြုနေသည်"
+
+#: ../gtk-dialog.c:975
+#, c-format
+msgid "Authenticating to %s"
+msgstr "%s ကို အတည်ပြုနေသည်"
+
+#: ../gtk-dialog.c:976
+#, c-format
+msgid "Authenticating %s"
+msgstr "%s ကို အတည်ပြုနေသည်"
+
+#: ../gtk-dialog.c:1009
+msgid "Waiting for buddy..."
+msgstr "မိတ်ဆွေကို စောင့်ဆိုင်းနေသည်..."
+
+#: ../gtk-dialog.c:1042
+msgid "Generating private key"
+msgstr "Private key ကို ထုတ်လုပ်နေသည်"
+
+#: ../gtk-dialog.c:1043
+msgid "Please wait"
+msgstr "ခေတ္တ စောင့်ဆိုင်းပါ"
+
+#. Create the Please Wait... dialog
+#: ../gtk-dialog.c:1054
+#, c-format
+msgid "Generating private key for %s (%s)..."
+msgstr "%s (%s) အတွက် private key ထုတ်လုပ်နေသည်..."
+
+#: ../gtk-dialog.c:1099
+#, c-format
+msgid "%s Done."
+msgstr "%s ကို ပြီးသွားပြီ။"
+
+#: ../gtk-dialog.c:1139
+#, c-format
+msgid "%s is contacting you from an unrecognized computer.  You should <a href=\"%s%s\">authenticate</a> this buddy."
+msgstr "%s သည် အမည်မသိသော ကွန်ပျူတာမှ သင့်ကို ဆက်သွယ်နေသည်။ ဤမိတ်ဆွေကို <a href=\"%s%s\">စစ်ဆေး အတည်ပြု</a>ပါ။"
+
+#: ../gtk-dialog.c:1143
+#, c-format
+msgid "%s has not been authenticated yet.  You should <a href=\"%s%s\">authenticate</a> this buddy."
+msgstr "%s ကို စစ်ဆေး အတည်ပြုခြင်း မလုပ်သေးပါ။ ဤမိတ်ဆွေကို <a href=\"%s%s\">စစ်ဆေး အတည်ပြု</a> ပါ။"
+
+#: ../gtk-dialog.c:1195
+#: ../gtk-dialog.c:1969
+#: ../gtk-dialog.c:2745
+#: ../gtk-ui.c:83
+msgid "Finished"
+msgstr "အပြီးသတ်ပြီ"
+
+#: ../gtk-dialog.c:1196
+#: ../gtk-dialog.c:1966
+#: ../gtk-dialog.c:2742
+#: ../gtk-ui.c:82
+msgid "Private"
+msgstr "သီးသန့်"
+
+#: ../gtk-dialog.c:1197
+#: ../gtk-dialog.c:1963
+#: ../gtk-dialog.c:2739
+#: ../gtk-ui.c:81
+msgid "Unverified"
+msgstr "အတည်မပြုသေး"
+
+#: ../gtk-dialog.c:1198
+#: ../gtk-ui.c:80
+msgid "Not private"
+msgstr "သီးသန့်မဟုတ်"
+
+#: ../gtk-dialog.c:1201
+msgid "OTR"
+msgstr "OTR"
+
+#. Translators: the following four messages should give alternative
+#. * sentences. The user selects the first or second message in a combo box;
+#. * the third message, a new line, a fingerprint, a new line, and
+#. * the fourth message will follow it.
+#: ../gtk-dialog.c:1351
+msgid "I have not"
+msgstr "ကျွန်တော့်ဆီ မရှိပါ"
+
+#. 2nd message
+#: ../gtk-dialog.c:1353
+msgid "I have"
+msgstr "ကျွန်တော့်ဆီ ရှိသည်"
+
+#. 3rd message
+#: ../gtk-dialog.c:1356
+msgid " verified that this is in fact the correct"
+msgstr "ဤအ​ရာသည် မှန်ကန်ကြောင်း အတည်ပြုသည်"
+
+#. 4th message
+#: ../gtk-dialog.c:1366
+#, c-format
+msgid "fingerprint for %s."
+msgstr "%s အတွက် လက်ဗွေ။"
+
+#: ../gtk-dialog.c:1393
+#, c-format
+msgid "Verify fingerprint for %s"
+msgstr "%s အတွက် လက်ဗွေကို အတည်ပြုပါ"
+
+#: ../gtk-dialog.c:1405
+#, c-format
+msgid ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>Fingerprint for you, %s (%s):\n"
+"%s\n"
+"\n"
+"Purported fingerprint for %s:\n"
+"%s\n"
+msgstr ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>သင့်အတွက် လက်ဗွေ၊ %s (%s):\n"
+"%s\n"
+"\n"
+"​အယောင်ဆောင် လက်ဗွေပိုင်ရှင် %s:\n"
+"%s\n"
+
+#: ../gtk-dialog.c:1412
+msgid "If everything matches up, you should indicate in the above dialog that you <b>have</b> verified the fingerprint."
+msgstr "အကယ်၍ အရာအားလုံး ကိုက်ညီပါက၊ အထက်ပါ အညွှန်း စာမျက်နှာရှိ လက်ဗွေကို သင် အတည်ပြု<b>လိုက်ပြီ</b>၌ အမှတ်အသား ပြုလိုက်ပါ။"
+
+#: ../gtk-dialog.c:1418
+#: ../gtk-ui.c:844
+msgid "Verify fingerprint"
+msgstr "လက်ဗွေ အတည်ပြုပါ"
+
+#: ../gtk-dialog.c:1445
+#, c-format
+msgid "Authentication from %s"
+msgstr "%s မှ အတည်ပြုချက်"
+
+#: ../gtk-dialog.c:1448
+#, c-format
+msgid "Authenticate %s"
+msgstr "%s ကို အတည်ပြုရန်"
+
+#: ../gtk-dialog.c:1456
+msgid "Authenticate Buddy"
+msgstr "မိတ်ဆွေကို အတည်ပြုရန်"
+
+#: ../gtk-dialog.c:1487
+msgid "An error occurred during authentication."
+msgstr "စစ်ဆေး အတည်ပြုနေစဉ် ချို့ယွင်းချက် တစ်ခု ဖြစ်ပွားခဲ့သည်။"
+
+#: ../gtk-dialog.c:1502
+msgid "Authentication successful."
+msgstr "အတည်ပြုခြင်း အောင်မြင်သည်။"
+
+#: ../gtk-dialog.c:1505
+msgid "Your buddy has successfully authenticated you.  You may want to authenticate your buddy as well by asking your own question."
+msgstr "သင့်မိတ်ဆွေသည် သင့်ကို အောင်မြင်စွာ အတည်ပြုလိုက်ပြီ။ သင့်ကိုယ်တိုင် မေးခွန်းဖြင့်လည်း သင့်မိတ်ဆွေကို စစ်ဆေး အတည်ပြုနိုင်သည်။"
+
+#: ../gtk-dialog.c:1511
+msgid "Authentication failed."
+msgstr "အတည်ပြခြင်း မအောင်မြင်ပါ။"
+
+#: ../gtk-dialog.c:1541
+#, c-format
+msgid "Private conversation with %s started.%s%s"
+msgstr "%s နှင့် သီးသန့် စကားပြောဆိုမှု စတင်သည်။%s%s"
+
+#: ../gtk-dialog.c:1545
+#, c-format
+msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s%%s"
+msgstr "%%s နှင့် <a href=\"%s%s\">အတည်မပြုရသေး</a>သော စကားပြောဆိုမှု စတင်သည်။%%s%%s"
+
+#. This last case should never happen, since we know
+#. * we're in ENCRYPTED.
+#: ../gtk-dialog.c:1553
+#, c-format
+msgid "Not private conversation with %s started.%s%s"
+msgstr "%s နှင့် သီးသန့်မဟုတ်သော စကားပြောဆိုမှု စတင်သည်။%s%s"
+
+#: ../gtk-dialog.c:1559
+#: ../gtk-dialog.c:1686
+msgid "  Warning: using old protocol version 1."
+msgstr "သတိပေးချက် - ပရိုတိုကော ဗားရှင်း အဟောင်း ၁ ကို သုံးစွဲနေသည်။"
+
+#: ../gtk-dialog.c:1561
+msgid "  Your client is logging this conversation."
+msgstr "သင့်မိတ်ဆွေသည် ဤစကားပြောဆိုမှုထဲ ၀င်ရောက်လာ်သည်။"
+
+#: ../gtk-dialog.c:1562
+msgid "  Your client is not logging this conversation."
+msgstr "သင့်မိတ်ဆွေသည် ဤစကားပြောဆိုမှုထဲ ၀င်မ​လာပါ။"
+
+#: ../gtk-dialog.c:1581
+#, c-format
+msgid "Your buddy is logged in multiple times and OTR has established <a href=\"%s%s\">multiple sessions</a>. Use the icon menu above if you wish to select the outgoing session."
+msgstr "သင့်မိတ်ဆွေသည် အကြိမ်ကြမ် ၀င်ရောက်လာပြီး OTR <a href=\"%s%s\">စကား​ပြောမှု အများ</a> ဖန်တီးနေသည်။ စကားပြောဆိုမှု အထွက်ကို ရွေးချယ်လိုပါက အထက်မှ အိုင်ကွန် ​မီနူးကို သုံးစွဲပါ။"
+
+#: ../gtk-dialog.c:1601
+#, c-format
+msgid "Private conversation with %s lost."
+msgstr "%s နှင့် သီးသန့် စကားပြောဆိုမှု ပျက်သွားသည်။"
+
+#: ../gtk-dialog.c:1638
+#, c-format
+msgid "%s has ended his/her private conversation with you; you should do the same."
+msgstr "%s သည် သင်နှင့် သီးသန့် စကားပြောဆိုမှုကို အဆုံးသတ်လိုက်သည်။ အလားတူ သင် ပြုလုပ်ပါ။"
+
+#: ../gtk-dialog.c:1665
+#, c-format
+msgid "Successfully refreshed the private conversation with %s.%s"
+msgstr "%s နှင့် သီးသန့် စ​ကား​ပြောဆိုမှုကို အောင်မြင်စွာ ပြန်ခေါ်လိုက်ပြီ။%s"
+
+#: ../gtk-dialog.c:1670
+#, c-format
+msgid "Successfully refreshed the <a href=\"%s%s\">unverified</a> conversation with %%s.%%s"
+msgstr "<a href=\"%s%s\">အတည်မပြုသေး</a>သော %%s နှင့် စကားပြောဆိုမှုကို အောင်မြင်စွာ ပြန်ခေါ်လိုက်ပြီ။%%s"
+
+#. This last case should never happen, since we know
+#. * we're in ENCRYPTED.
+#: ../gtk-dialog.c:1679
+#, c-format
+msgid "Successfully refreshed the not private conversation with %s.%s"
+msgstr "%s နှင့် သီးခြား မဟုတ်သော စကားပြောဆိုမှုကို အောင်မြင်စွာ ပြန်ခေါ်လိုက်ပြီ။%s"
+
+#: ../gtk-dialog.c:1712
+#, c-format
+msgid "Attempting to refresh the private conversation with %s..."
+msgstr "%s သီးသန့် စကားပြောဆိုမှုကို ပြန်ခေါ်ရန် ကြိုးစားနေသည်..."
+
+#: ../gtk-dialog.c:1714
+#, c-format
+msgid "Attempting to start a private conversation with %s..."
+msgstr "%s နှင့် သီးသန့် စကားပြောဆိုမှု စတင်ရန် ကြိုးစားနေသည်..."
+
+#: ../gtk-dialog.c:1899
+#: ../gtk-dialog.c:2026
+msgid "Start _private conversation"
+msgstr "သီးသန့် စ​ကားပြောဆိုမှု စတင်ရန် (_p)"
+
+#: ../gtk-dialog.c:1900
+msgid "Refresh _private conversation"
+msgstr "သီးသန့် ​စ​ကားပြောဆိုမှု ပြန်ခေါ်ရန် (_p)"
+
+#: ../gtk-dialog.c:1905
+msgid "Re_authenticate buddy"
+msgstr "မိတ်ဆွေကို ပြန်လည် အတည်ပြုရန် (_a)"
+
+#: ../gtk-dialog.c:1906
+#: ../gtk-dialog.c:2030
+msgid "_Authenticate buddy"
+msgstr "မိတ်ဆွေကို အတည်ပြုရန် (_A)"
+
+#: ../gtk-dialog.c:1960
+#: ../gtk-dialog.c:2736
+msgid "Not Private"
+msgstr "သီးသန့်မဟုတ်"
+
+#: ../gtk-dialog.c:1982
+msgid "_What's this?"
+msgstr "ဒါဘာလဲ? (_W)"
+
+#: ../gtk-dialog.c:2028
+msgid "_End private conversation"
+msgstr "သီးသန့် စကားပြောဆိုမှု အဆုံးသတ်ရန် (_E)"
+
+#: ../gtk-dialog.c:2207
+#: ../gtk-dialog.c:2255
+#, c-format
+msgid "Warning: The selected outgoing OTR session (%u) is not the most recently active one (%u). Your buddy may not receive your messages. Use the icon menu above to select a different outgoing session."
+msgstr "သတိပေးချက် - ရွေးထားသော OTR လိုင်းအထွက် (%u) သည် လက်ရှိ သက်၀င်မှု အရှိဆုံး (%u) မဟုတ်ပါ။ သင့် မိတ်ဆွေသည် သင့် စာတိုပေးပို့ချက်များကို မရရှိပဲ နေနိုင်သည်။ အခြား လိုင်းအထွက်များကို ရွေးရန် အထက်မှ အိုင်ကွန် ​မီနူးကို ​သုံးစွဲပါ။"
+
+#: ../gtk-dialog.c:2271
+msgid "Send to most secure"
+msgstr "လုံခြုံမှု အရှိဆုံးစနစ်ဖြင့် ပေးပို့ရန်"
+
+#: ../gtk-dialog.c:2273
+msgid "Send to most recent"
+msgstr "လက်ငင်း ပေးပို့ပါ"
+
+#: ../gtk-dialog.c:2377
+#, c-format
+msgid "Session %u"
+msgstr "%u လုပ်ဆောင်မှု"
+
+#: ../gtk-dialog.c:2395
+#: ../gtk-dialog.c:2506
+msgid "Select"
+msgstr "ရွေးချယ်ရန်"
+
+#: ../gtk-dialog.c:2410
+msgid "Selected"
+msgstr "ရွေးထားချက်"
+
+#: ../gtk-dialog.c:2731
+#, c-format
+msgid "The privacy status of the current conversation is now: <a href=\"%s%s\">%s</a>"
+msgstr "လက်ရှိ စကားပြောဆိုချက်၏ သီးသန့်ရပ်တည်မှု အနေအထား - <a href=\"%s%s\">%s</a>"
+
+#: ../gtk-dialog.c:2956
+msgid "OTR Messaging"
+msgstr "OTR စာတိုပေးပို့ခြင်း"
+
+#: ../gtk-ui.c:103
+#, c-format
+msgid "Fingerprint: %.80s"
+msgstr "လက်ဗွေ - %.80s"
+
+#: ../gtk-ui.c:107
+#, c-format
+msgid "No key present"
+msgstr "ကီး မရှိပါ"
+
+#: ../gtk-ui.c:112
+#, c-format
+msgid "No account available"
+msgstr "အကောင့် မရှိပါ"
+
+#: ../gtk-ui.c:179
+msgid "Unused"
+msgstr "သုံးစွဲခြင်း မပြုပါ"
+
+#: ../gtk-ui.c:208
+msgid "Yes"
+msgstr "ဟုတ်ကဲ့"
+
+#: ../gtk-ui.c:208
+msgid "No"
+msgstr "မဟုတ်ပါ"
+
+#: ../gtk-ui.c:473
+msgid "Enable private messaging"
+msgstr "သီးသန့် စာပိုပေးပို့ခြင်း စတင်ရန်"
+
+#: ../gtk-ui.c:475
+msgid "Automatically initiate private messaging"
+msgstr "သီးသန့် စာတိုပေးပို့ခြင်းကို အလိုအလျောက် အစပြုရန်"
+
+#: ../gtk-ui.c:477
+msgid "Require private messaging"
+msgstr "သီးသန့် စာတိုပေးပို့ရန် လိုအပ်သည်"
+
+#: ../gtk-ui.c:480
+msgid "Don't log OTR conversations"
+msgstr "OTR စကားပြောဆိုချက်ကို မှတ်တမ်း မတင်ရန်"
+
+#: ../gtk-ui.c:524
+msgid "Show OTR button in toolbar"
+msgstr "OTR ခလုတ်ကို တူးဘား၌ ဖေါ်ပြရန်"
+
+#: ../gtk-ui.c:663
+msgid "My private keys"
+msgstr "ကျွန်တော့် private keys များ"
+
+#: ../gtk-ui.c:672
+msgid "Key for account:"
+msgstr "အကောင့်၌ သုံးသော ကီး -"
+
+#: ../gtk-ui.c:697
+msgid "Generate"
+msgstr "ထုတ်လုပ်ရန်"
+
+#: ../gtk-ui.c:738
+msgid "Default OTR Settings"
+msgstr "ပုံမှန် OTR ချိန်ညှိချက်များ"
+
+#: ../gtk-ui.c:765
+msgid "OTR UI Options"
+msgstr "OTR UI ရွေးစရာများ"
+
+#: ../gtk-ui.c:788
+msgid "Screenname"
+msgstr "မျက်နှာပြင်အမည်"
+
+#: ../gtk-ui.c:789
+msgid "Status"
+msgstr "အနေအထား"
+
+#: ../gtk-ui.c:790
+msgid "Verified"
+msgstr "အတည်ပြုပြီ"
+
+#: ../gtk-ui.c:791
+msgid "Fingerprint"
+msgstr "လက်ဗွေ"
+
+#: ../gtk-ui.c:792
+msgid "Account"
+msgstr "အကောင့်"
+
+#: ../gtk-ui.c:828
+msgid "Start private connection"
+msgstr "သီးသန့် ​စ​ကားပြောဆိုမှု စတင်ရန်"
+
+#: ../gtk-ui.c:836
+msgid "End private connection"
+msgstr "သီးသန့် စကားပြောဆိုမှု အဆုံးသတ်ရန်"
+
+#: ../gtk-ui.c:852
+msgid "Forget fingerprint"
+msgstr "လက်ဗွေ မေ့နေသည်"
+
+#: ../gtk-ui.c:903
+msgid "Config"
+msgstr "ပြုပြင်ဖန်တီးရန်"
+
+#: ../gtk-ui.c:905
+msgid "Known fingerprints"
+msgstr "သိ​ထားသော လက်ဗွေများ"
+
+#: ../gtk-ui.c:1003
+#: ../otr-plugin.c:964
+msgid "OTR Settings"
+msgstr "OTR ချိန်ညှိချက်များ"
+
+#. Set the title
+#: ../gtk-ui.c:1021
+#, c-format
+msgid "OTR Settings for %s"
+msgstr "%s အတွက် OTR ချိန်ညှိချက်များ"
+
+#. Make the cascaded checkboxes
+#: ../gtk-ui.c:1038
+msgid "Use default OTR settings for this buddy"
+msgstr "ဤမိ​တ်ဆွေအတွက် ပုံမှတ် OTR ချိန်ညှိချက်များ သုံးစွဲရန်"
+
+#: ../otr-plugin.c:125
+#, c-format
+msgid "You are not currently connected to account %s (%s)."
+msgstr "သင်သည် လောလောဆယ် အကောင့် %s (%s) နှင့် ဆက်သွယ် မထားပါ။"
+
+#: ../otr-plugin.c:129
+msgid "Not connected"
+msgstr "ဆက်သွယ်မထားပါ"
+
+#: ../otr-plugin.c:212
+#: ../otr-plugin.c:254
+#, c-format
+msgid "Out of memory building filenames!\n"
+msgstr "ဖိုင်အမည် ပြုလုပ်ရာတွင် မှတ်ဉာဏ် ကုန်သွားသည်။\n"
+
+#: ../otr-plugin.c:224
+#: ../otr-plugin.c:260
+#, c-format
+msgid "Could not write private key file\n"
+msgstr "သီးသန့် ကီးဖိုင်ကို ရေးသားခြင်း မပြုနိုင်ပါ\n"
+
+#: ../otr-plugin.c:298
+#, c-format
+msgid "Unknown account %s (%s)."
+msgstr "အမည်မသိ အကောင့် %s (%s)။"
+
+#: ../otr-plugin.c:302
+msgid "Unknown account"
+msgstr "အမည်မသိ အကောင့်"
+
+#: ../otr-plugin.c:364
+msgid "Error occurred encrypting message."
+msgstr "စာတိုကို စာဝှက်နေစဉ် ချို့ယွင်းချက် ဖြစ်ပေါ်နေသည်။"
+
+#: ../otr-plugin.c:368
+#, c-format
+msgid "You sent encrypted data to %s, who wasn't expecting it."
+msgstr "စာဝှက်ထားသော ဒေတာကို %s ထံ သင် ပေးပို့​ခဲ့သည်၊ ၄င်းကို သူ မျှော်လင့် မထားပါ။"
+
+#: ../otr-plugin.c:374
+msgid "You transmitted an unreadable encrypted message."
+msgstr "သင်သည် ဖတ်ရှု၍ မရသော စာဝှက်ထား​သည့် စာကို ထုတ်လွှင့်နေသည်။"
+
+#: ../otr-plugin.c:377
+msgid "You transmitted a malformed data message."
+msgstr "သင်သည် ပုံပျက်နေသော ဒေတာ စာ တစ်စောင်ကို ထုတ်လွှင့်နေသည်။"
+
+#: ../otr-plugin.c:390
+msgid "[resent]"
+msgstr "[ပြန်လည်ပေးပို့ချက်]"
+
+#: ../otr-plugin.c:459
+#, c-format
+msgid "You attempted to send an unencrypted message to %s"
+msgstr "သင်သည် စာဝှက်မထားသော စာကို %s ထံ ပေးပို့ရန် ကြိုးစားနေသည်"
+
+#: ../otr-plugin.c:462
+msgid "Attempting to start a private conversation..."
+msgstr "သီးသန့် စကားပြောဆိုမှု တစ်ခုကို စတင်ရန် ကြိုးစားနေသည်..."
+
+#: ../otr-plugin.c:464
+msgid "OTR Policy Violation"
+msgstr "OTR မူဝါဒ ချိုးဖေါက်မှု"
+
+#: ../otr-plugin.c:465
+msgid ""
+"Unencrypted messages to this recipient are not allowed.  Attempting to start a private conversation.\n"
+"\n"
+"Your message will be retransmitted when the private conversation starts."
+msgstr ""
+"ဤလက်ခံသူထံ ပေးပို့သော စာဝှက်မထားသော စာတိုများကို ခွင့်မပြုပါ။ သီးသန့် စ​ကားပြောဆိုမှု စတင်ရန် ကြိုးစားနေသည်။\n"
+"\n"
+"သီးသန့် စကားပြောဆိုမှု စတင်သည့်အခါ သင့်စာတိုကို ပြန်လည် ထုတ်လွှင့်ပေးမည်။"
+
+#: ../otr-plugin.c:474
+msgid "An error occurred when encrypting your message.  The message was not sent."
+msgstr "သင့်စာတိုကို စာဝှက်နေစဉ် ချို့ယွင်းချက် တစ်ခု ဖြစ်ပေါ်နေသည်။ ၄င်းစာတိုကို ပေးပို့ခြင်း မပြုပါ။"
+
+#: ../otr-plugin.c:476
+msgid "Error encrypting message"
+msgstr "​စာတို စာဝှက်ခြင်း ချို့ယွင်းချက်"
+
+#: ../otr-plugin.c:477
+msgid "An error occurred when encrypting your message"
+msgstr "သင့်စာတိုကို စာဝှက်နေစဉ် ချို့ယွင်းချက် ဖြစ်ပေါ်နေသည်"
+
+#: ../otr-plugin.c:478
+msgid "The message was not sent."
+msgstr "ဤစာတိုကို ပေးပို့ခြင်း မပြုပါ။"
+
+#: ../otr-plugin.c:481
+#, c-format
+msgid "%s has already closed his/her private connection to you"
+msgstr "%s သည် သင်နှင့် သီးသန့် စကားပြောဆိုမှုကို ပိတ်လိုက်ပြီ"
+
+#: ../otr-plugin.c:484
+msgid "Your message was not sent.  Either end your private conversation, or restart it."
+msgstr "သင့်စာတိုကို ပေးပို့ခြင်း မပြပါ။ သင့် သီးသန့် စကားပြောဆိုမှုကို အဆုံးသတ်ပါ၊ သို့မဟုတ် ၄င်းကို ပြန်ဖွင့်ပါ။"
+
+#: ../otr-plugin.c:487
+msgid "Private connection closed"
+msgstr "သီးသန့် စကားပြောဆိုမှု ပိတ်သွားသည်"
+
+#: ../otr-plugin.c:488
+msgid "Your message was not sent.  Either close your private connection to him, or refresh it."
+msgstr "သင့် စာတိုကို ပေးပို့ခြင်း မပြုပါ။ သူနှင့် သီးသန့် စကားပြောဆိုမှုကို ပိတ်ပါ၊ သို့မဟုတ် ၄င်းကို ပြန်ခေါ်ပါ။"
+
+#: ../otr-plugin.c:498
+msgid "Error setting up private conversation: Malformed message received"
+msgstr "သီးသန့် စကားပြောဆိုမှု တပ်ဆင်ခြင်း ချို့ယွင်းချက် - ပုံပျက်နေသော စာတို ရရှိသည်"
+
+#: ../otr-plugin.c:502
+#, c-format
+msgid "Error setting up private conversation: %s"
+msgstr "သီးသန့် စကားပြောဆိုမှု တပ်ဆင်ခြင်း ချို့ယွင်းချက် - %s"
+
+#: ../otr-plugin.c:509
+#: ../otr-plugin.c:520
+#: ../otr-plugin.c:547
+#: ../otr-plugin.c:555
+#: ../otr-plugin.c:573
+msgid "OTR Error"
+msgstr "OTR ချို့ယွင်းချက်"
+
+#: ../otr-plugin.c:516
+msgid "We are receiving our own OTR messages.  You are either trying to talk to yourself, or someone is reflecting your messages back at you."
+msgstr "ကျွန်တော်တို့သည် ကျွန်ုပ်တို့ ကိုယ်တိုင် ရေးသားသော OTR စာတိုများကို လက်ခံရရှိနေကြသည်။ သင့်ကိုသင် စကားပြောရန် ကြိုးစားနေခြင်း ဖြစ်နိုင်သည်၊ (သို့) တစ်စုံတစ်ယောက်သည် သင့် ​စာတိုများကို သင့်ထံ ပြန်ပို့ခြင်း ဖြစ်နိုင်သည်။"
+
+#: ../otr-plugin.c:520
+msgid "We are receiving our own OTR messages."
+msgstr "ကျွန်တော်တို့သည် ကျွန်ုပ်တို့ ကိုယ်တိုင် ရေးသားသော OTR စာတိုများကို လက်ခံရရှိနေကြသည်။ "
+
+#: ../otr-plugin.c:521
+msgid "You are either trying to talk to yourself, or someone is reflecting your messages back at you."
+msgstr "သင့်ကို သင် စကားပြောရန် ကြိုးစားနေခြင်း ဖြစ်နိုင်သည်၊ (သို့) တစ်စုံတစ်ယောက်သည် သင့် ​စာတိုများကို သင့်ထံ ပြန်ပို့ခြင်း ဖြစ်နိုင်သည်။"
+
+#: ../otr-plugin.c:526
+#, c-format
+msgid "<b>The last message to %s was resent.</b>"
+msgstr "<b>%s ထံ ပေးပို့သော နောက်ဆုံး စာတိုကို ပြန်ပို့လိုက်ပြီ။</b>"
+
+#: ../otr-plugin.c:530
+msgid "Message resent"
+msgstr "ပေးစာ ပြန်ပို့လိုက်ပြီ"
+
+#: ../otr-plugin.c:534
+#, c-format
+msgid "<b>The encrypted message received from %s is unreadable, as you are not currently communicating privately.</b>"
+msgstr "<b>သင်သည် လောလောဆယ် သီးသန့် ဆက်သွယ်ခြင်း မပြုသည့်အတွက်၊ %s ထံမှ ရရှိသော စာဝှက်ထား​သည့် ပေးစာကို ဖတ်ရှု၍ မရနိုင်ပါ။</b>"
+
+#: ../otr-plugin.c:539
+msgid "Unreadable message"
+msgstr "ဖတ်ရှု၍ မရသော ပေးစာ"
+
+#: ../otr-plugin.c:543
+#, c-format
+msgid "We received an unreadable encrypted message from %s."
+msgstr "%s ထံမှ စာဝှက်ထားပြီး ဖတ်ရှု၍ မရသည့် စာတို တစ်စောင်ကို ကျွန်တော်တို့ လက်ခံရရှိသည်။"
+
+#: ../otr-plugin.c:551
+#, c-format
+msgid "We received a malformed data message from %s."
+msgstr "ကျွန်တော်တို့သည် %s ထံမှ ပုံပျက်နေသော ဒေတာ ​စာတို တစ်စောင်ကို လက်ခံရရှိကြသည်။"
+
+#: ../otr-plugin.c:559
+#, c-format
+msgid "Heartbeat received from %s.\n"
+msgstr "%s ထံမှ Heartbeat လက်ခံရရှိသည်။\n"
+
+#: ../otr-plugin.c:565
+#, c-format
+msgid "Heartbeat sent to %s.\n"
+msgstr "%s ထံ Heartbeat ပေးပို့လိုက်သည်။\n"
+
+#: ../otr-plugin.c:576
+#, c-format
+msgid "<b>The following message received from %s was <i>not</i> encrypted: [</b>%s<b>]</b>"
+msgstr "<b>%s ထံမှ အောက်ပါ စာတိုကို စာဝှက်<i>မထား</i>ပါ -[</b>%s<b>]</b>"
+
+#: ../otr-plugin.c:581
+msgid "Received unencrypted message"
+msgstr "စာဝှက်မထားသော စာတို လက်ခံရရှိသည်"
+
+#: ../otr-plugin.c:587
+#, c-format
+msgid "Unrecognized OTR message received from %s.\n"
+msgstr "%s ထံမှ အမည်မသိ OTR စာတို လက်ခံရရှိသည်။\n"
+
+#: ../otr-plugin.c:596
+#, c-format
+msgid "%s has sent a message intended for a different session. If you are logged in multiple times, another session may have received the message."
+msgstr "%s သည် အခြား လုပ်ငန်းအတွက် ရည်ရွယ်သော စာတို တစ်စောင် ပေးပို့ခဲ့သသည်။ အကယ်၍ သင်သည် အကြိမ်ကြမ် ၀င်ရောက်ခဲ့ပါက၊ ၄င်းစာတိုကို အခြား လုပ်ငန်းမှ ရရှိနိုင်သည်။"
+
+#: ../otr-plugin.c:602
+msgid "Received message for a different session"
+msgstr "အခြား နေရာမှ စာတို တစ်စောင် လက်ခံရရှိသည်"
+
+#. 2013-01-01
+#: ../otr-plugin.c:1193
+#: ../otr-plugin.c:1220
+#, c-format
+msgid "OTR PLUGIN v%s"
+msgstr "OTR ပလပ်အင် v%s"
+
+#: ../otr-plugin.c:1202
+#, c-format
+msgid "This beta copy of the Off-the-Record Messaging v%s Pidgin plugin has expired as of 2013-01-01. Please look for an updated release at http://otr.cypherpunks.ca/"
+msgstr "ဤ Off-the-Record စာတိုပေးပို့ခြင်း ဘီတာ ဗားရှင်း v%s ပလပ်အင်သည် 2012-01-01 ကတည်းက သက်တမ်းကုန်ဆုံးခဲ့ပြီ။ မွမ်းမံထားသော ထုတ်ပြန်ချက် တစ်ခုကို http://otr.cypherpunks.ca/ ၌ ရယူပါ။"
+
+#: ../otr-plugin.c:1229
+#, c-format
+msgid "You have enabled a beta version of the Off-the-Record Messaging v%s Pidgin plugin. This version is intended for testing purposes only and is not for general purpose use."
+msgstr "သင်သည် Off-the-Record စာတိုပေးပိုခြင်း ဗားရှင်း v%s Pidgin ပလပ်အပ် ဘီတာ ဗားရှင်း တစ်ခုကို သုံးစွဲနေသည်။ ဤဗားရှင်းသည် စမ်းသပ်ရန်သာ ရည်ရွယ်ထားပြီး အထွေထွေ သုံးစွဲရန် ရည်ရွယ်မထားပါ။"
+
+#: ../otr-plugin.c:1414
+msgid "Off-the-Record Messaging"
+msgstr "Off-the-Record စာတိုပေးပိုခြင်း"
+
+#: ../otr-plugin.c:1415
+msgid "Provides private and secure conversations"
+msgstr "သီးသန့်ဖြစ်ပြီး လုံခြုံသော စကားပြောဆိုမှုများ လုပ်ဆောင်ရန်"
+
+#: ../otr-plugin.c:1416
+msgid "Preserves the privacy of IM communications by providing encryption, authentication, deniability, and perfect forward secrecy."
+msgstr "စာဝှက်စနစ်၊ စစ်ဆေး အတည်ပြုခြင်း၊ ငြင်းပယ်နိုင်မှုစနစ်နှင့် ပြည့်စုံသော တစ်ဆင့် ပေးပို့မှု လျှို့ဝှက်ချက်ကို ပံ့ပိုးခြင်းဖြင့် IM ဆက်သွယ်မှု လမ်းကြောင်းများကို ထိန်းသိမ်းပါ။"
+
+#: ../ui.c:110
+#, c-format
+msgid "Account %s (%s) could not be found"
+msgstr "အကောင့် %s (%s) ကို ရှာ​မ​တွေ့ပါ"
+
+#: ../ui.c:114
+msgid "Account not found"
+msgstr "​အကောင့်ကို ရှာမတွေ့ပါ"
+
diff --git a/po/nl.po b/po/nl.po
index 75ef626..f9cce78 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -1,528 +1,882 @@
 # Off-the-Record Messaging plugin for pidgin.
-# Copyright (C) 2004-2007  Ian Goldberg, Chris Alexander, Nikita Borisov
+# Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew,
+#	                       Lisa Du, Nikita Borisov
 # This file is distributed under the same license as the pidgin-otr package.
-# Ian Goldberg <otr at cypherpunks.ca>, 2007.
+# Ian Goldberg <otr at cypherpunks.ca>, 2012
 #
-#,
 msgid ""
 msgstr ""
-"Project-Id-Version: pidgin-otr 3.1.0-nl\n"
+"Project-Id-Version: pidgin-otr 4.0.0.nl\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-07-24 15:47-0400\n"
-"PO-Revision-Date: 2007-07-25 12:41+EDT\n"
+"POT-Creation-Date: 2012-06-14 09:45-0400\n"
+"PO-Revision-Date: 2012-06-28 00:00+EDT\n"
 "Last-Translator: Paul Wouters <paul at cypherpunks.ca>\n"
 "Language-Team: Paul Wouters <paul at cypherpunks.ca>\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../gtk-dialog.c:913 ../gtk-dialog.c:2095
-msgid "_What's this?"
-msgstr "_Wat betekent dit?"
+#: ../gtk-dialog.c:332 ../gtk-dialog.c:1141 ../gtk-dialog.c:1145
+#: ../gtk-dialog.c:1547 ../gtk-dialog.c:1584 ../gtk-dialog.c:1673
+#: ../gtk-dialog.c:1748 ../gtk-dialog.c:2749
+msgid "?lang=en"
+msgstr "?lang=nl"
 
-#: ../gtk-dialog.c:924
-msgid "_More..."
-msgstr "_Meer..."
+#: ../gtk-dialog.c:480
+msgid ""
+"Your buddy is attempting to determine if he or she is really talking to you, "
+"or if it's someone pretending to be you.  Your buddy has asked a question, "
+"indicated below.  To authenticate to your buddy, enter the answer and click "
+"OK."
+msgstr ""
+"Jouw vriend probeert te detecteren of ze echt met jou aan het praten is, of "
+"met iemand die zicht probeert voor te doen als jou. Je vriend heeft je de "
+"onderstaande vraag gesteld . Beantwoord deze vraag en selecteer OK om je te "
+"authenticiteren aan je vriend."
+
+#: ../gtk-dialog.c:487
+msgid ""
+"To authenticate using a question, pick a question whose answer is known only "
+"to you and your buddy.  Enter this question and this answer, then wait for "
+"your buddy to enter the answer too.  If the answers don't match, then you "
+"may be talking to an imposter."
+msgstr ""
+"Om je te authenticiteren via een vraag moet je een vraag stellen die alleen "
+"door je vriend beantwoord kan worden. Vul de vraag en het antwoord in, en "
+"wacht op je vriend's antwoord. Als zijn of haar antwoord niet klopt, dan "
+"kan het zijn dat iemand anders zich als jouw vriend voordoet."
 
-#. Create the Advanced... button, and left-justify it.  This
-#. * involves adding the button, and a blank label as a spacer, and
-#. * reordering them so that they're at the beginning.
-#: ../gtk-dialog.c:980
-msgid "Advanced..."
-msgstr "Geavanceerd..."
+#: ../gtk-dialog.c:505
+#, c-format
+msgid "This is the question asked by your buddy:"
+msgstr "Dit is de vraag die door jouw vriend gesteld werd"
 
-#: ../gtk-dialog.c:1025
-msgid "Enter secret here"
-msgstr "Voer de geheime code hier in"
+#: ../gtk-dialog.c:508
+#, c-format
+msgid "Enter question here:"
+msgstr "Vul de vraag hier in"
 
-#: ../gtk-dialog.c:1030
+#: ../gtk-dialog.c:540 ../gtk-dialog.c:624
 msgid "This buddy is already authenticated."
-msgstr "Deze friend is al ge-authentificeerd."
+msgstr "Deze vriend is al geauthenticiteerd"
 
-#: ../gtk-dialog.c:1049
+#: ../gtk-dialog.c:552
+#, c-format
+msgid "Enter secret answer here (case sensitive):"
+msgstr "Vul het geheime antwoord hier in (hoofdletters zijn verschillend van kleine letters):"
+
+#: ../gtk-dialog.c:593
 msgid ""
 "To authenticate, pick a secret known only to you and your buddy.  Enter this "
 "secret, then wait for your buddy to enter it too.  If the secrets don't "
 "match, then you may be talking to an imposter."
-msgstr "Om te authoriseren dien je een geheime code te bedenken die alleen "
-"jij en je vriend kennen. Voer dit geheim in, en wacht op je vriend om "
-"hetzelfde te doen. Als de geheimen niet overeenkomen, dan kun je te maken "
-"hebben met een bedrieger."
+msgstr ""
+"Om te autenticiteren moet je een geheim kiezen dat alleen jij en jouw vriend kennen. "
+"Vul dit geheime antwoord in, en wacht tot je vriend de vraag ook beantwoordt heeft. "
+"Als de antwoorden niet overeen komen, kan het zijn dat iemand anders zich als jouw "
+"vriend voordoet."
+
+#: ../gtk-dialog.c:607
+#, c-format
+msgid "Enter secret here:"
+msgstr "vul het geheime antwoord hier in:"
 
-#: ../gtk-dialog.c:1053
+#: ../gtk-dialog.c:657 ../gtk-dialog.c:1408
 msgid ""
-"If your buddy uses multiple IM accounts or multiple computers, you may have "
-"to authenticate multiple times.  However, as long as they use an account and "
-"computer that you've seen before, you don't need to authenticate each "
-"individual conversation."
-msgstr "Als je vriend meerdere IM accounts of meerdere computers gebruikt, kan "
-"het zijn dat je meerdere keren moet authenticeren. Zolang je vriend een account "
-" of een computer gebruikt die je al eerder gezien hebt, hoef je niet elke "
-" individueel gesprek apart te authenticeren."
-
-#: ../gtk-dialog.c:1058 ../gtk-dialog.c:1322 ../gtk-dialog.c:1326
-#: ../gtk-dialog.c:1423 ../gtk-dialog.c:1590 ../gtk-dialog.c:1750
-#: ../gtk-dialog.c:1850 ../gtk-dialog.c:1935
-msgid "?lang=en"
-msgstr "?lang=nl"
+"To verify the fingerprint, contact your buddy via some <i>other</i> "
+"authenticated channel, such as the telephone or GPG-signed email.  Each of "
+"you should tell your fingerprint to the other."
+msgstr ""
+"Om de vingerafdruk te controleren moet je contact opnemen met je vriend, via "
+"een <i>andere<i> vertrouwde manier, zoals een telefoon of via een GPG ondertekende "
+"email. Jullie moeten dan elkaar je eigen vingerafdruk vertellen."
+
+#: ../gtk-dialog.c:661
+msgid ""
+"If everything matches up, you should chose <b>I have</b> in the menu below."
+msgstr ""
+"Als alles klopt, dan kun je nu <b>Ik heb</b> in het onderstaande menu selecteren."
+
+#: ../gtk-dialog.c:672 ../gtk-dialog.c:1397
+msgid "[none]"
+msgstr "[geen]"
+
+#: ../gtk-dialog.c:679 ../gtk-dialog.c:1051 ../gtk-dialog.c:1404
+#: ../gtk-dialog.c:1453 ../gtk-ui.c:212 ../otr-plugin.c:127
+#: ../otr-plugin.c:300 ../ui.c:112
+msgid "Unknown"
+msgstr "Onbekend"
+
+#: ../gtk-dialog.c:680
+#, c-format
+msgid ""
+"Fingerprint for you, %s (%s):\n"
+"%s\n"
+"\n"
+"Purported fingerprint for %s:\n"
+"%s\n"
+msgstr ""
+"Jouw vingerafdruk, %s (%s):\n"
+"%s\n"
+"\n"
+"Vermeende vingerafdruk van %s:\n"
+"%s\n"
+
+#: ../gtk-dialog.c:736
+msgid "How would you like to authenticate your buddy?"
+msgstr "Hoe wil je jouw vriend authenticeren"
+
+#: ../gtk-dialog.c:745
+msgid "Question and answer"
+msgstr "Vraag en antwoord"
+
+#: ../gtk-dialog.c:748
+msgid "Shared secret"
+msgstr "Gedeeld geheim"
 
-#: ../gtk-dialog.c:1059
-msgid "Click here for more information about authentication in OTR."
-msgstr "Klik hier voor meer informatie over OTR authenticatie."
+#: ../gtk-dialog.c:751
+msgid "Manual fingerprint verification"
+msgstr "Handmatige vingerafdruk verificatie"
 
-#: ../gtk-dialog.c:1063
+#: ../gtk-dialog.c:802
+msgid "_Authenticate"
+msgstr "_Authenticeer"
+
+#: ../gtk-dialog.c:836
 msgid ""
 "Authenticating a buddy helps ensure that the person you are talking to is "
-"who they claim to be."
-msgstr "Door middel van het authenticeren van een vriend kun je gegarandeerd "
-"weten dat de persoon waarmee je praat, daadwerkelijk je vriend is."
+"who he or she claims to be."
+msgstr ""
+"Authenticeren van een vriend garandeert dat de persoon waarmee je aan het "
+"praten bent, daadwerkelijk de vriend is waarmee je denkt te praten."
+
+#. Translators: you are asked to authenticate yourself
+#: ../gtk-dialog.c:946
+msgid "Authenticating to Buddy"
+msgstr "Authenticeer jezelf aan je vriend"
 
-#: ../gtk-dialog.c:1113
+#. Translators: you asked your buddy to authenticate him/herself
+#: ../gtk-dialog.c:948
 msgid "Authenticating Buddy"
-msgstr "Vriend Authenticatie"
+msgstr "Authenticeren van vriend"
 
-#: ../gtk-dialog.c:1140
-msgid "Authenticating"
-msgstr "Authenticeren"
+#: ../gtk-dialog.c:975
+#, c-format
+msgid "Authenticating to %s"
+msgstr "Authenticeren aan %s"
 
-#: ../gtk-dialog.c:1201
+#: ../gtk-dialog.c:976
+#, c-format
+msgid "Authenticating %s"
+msgstr "Authenticeren %s"
+
+#: ../gtk-dialog.c:1009
+msgid "Waiting for buddy..."
+msgstr "We wachten op de vriend..."
+
+#: ../gtk-dialog.c:1042
 msgid "Generating private key"
-msgstr "Geheime sleutel aan het genereren"
+msgstr "Genereer geheime sleutel"
 
-#: ../gtk-dialog.c:1202
+#: ../gtk-dialog.c:1043
 msgid "Please wait"
-msgstr "Een moment a.u.b."
-
-#: ../gtk-dialog.c:1210 ../gtk-dialog.c:1627 ../gtk-dialog.c:1664
-#: ../gtk-ui.c:175 ../otr-plugin.c:115 ../otr-plugin.c:212 ../ui.c:110
-msgid "Unknown"
-msgstr "Onbekend"
+msgstr "Een moment A.U.B."
 
 #. Create the Please Wait... dialog
-#: ../gtk-dialog.c:1213
+#: ../gtk-dialog.c:1054
 #, c-format
 msgid "Generating private key for %s (%s)..."
-msgstr "Geheime sleutel voor %s (%s) aan het genereren..."
+msgstr "Genereren van geheime sleutel voor %s (%s)..."
 
-#: ../gtk-dialog.c:1258
+#: ../gtk-dialog.c:1099
 #, c-format
 msgid "%s Done."
 msgstr "%s Klaar."
 
-#: ../gtk-dialog.c:1320
+#: ../gtk-dialog.c:1139
 #, c-format
 msgid ""
 "%s is contacting you from an unrecognized computer.  You should <a href=\"%s%"
 "s\">authenticate</a> this buddy."
-msgstr "%s zoekt contact met je vanaf een onherkenbare computer. Je kunt het beste "
-"deze vriend <a href=\"%s%s\">authenticeren</a>."
+msgstr ""
+"%s benadert je vanaf een onbekende computer. Je kunt het beste je vriend opnieuw <a href=\"%s%"
+"s\">authenticeren</a>."
 
-#: ../gtk-dialog.c:1324
+#: ../gtk-dialog.c:1143
 #, c-format
 msgid ""
 "%s has not been authenticated yet.  You should <a href=\"%s%s"
 "\">authenticate</a> this buddy."
-msgstr "%s is nog niet ge-authenticeerd. Je kunt het beste "
-"deze vriend <a href=\"%s%s\">authenticeren</a>."
+msgstr ""
+"%s is nog niet ge-authenticeerd. Je kunt het beste je vriend nu <a href=\"%s%s"
+"\">authenticeren</a>."
+
 
-#: ../gtk-dialog.c:1365 ../gtk-ui.c:76
+#: ../gtk-dialog.c:1195 ../gtk-dialog.c:1969 ../gtk-dialog.c:2745
+#: ../gtk-ui.c:83
 msgid "Finished"
 msgstr "Klaar"
 
-#: ../gtk-dialog.c:1366 ../gtk-ui.c:75
+#: ../gtk-dialog.c:1196 ../gtk-dialog.c:1966 ../gtk-dialog.c:2742
+#: ../gtk-ui.c:82
 msgid "Private"
-msgstr "Besloten"
+msgstr "Prive"
 
-#: ../gtk-dialog.c:1367 ../gtk-ui.c:74
+#: ../gtk-dialog.c:1197 ../gtk-dialog.c:1963 ../gtk-dialog.c:2739
+#: ../gtk-ui.c:81
 msgid "Unverified"
-msgstr "Ongeverificeerd"
+msgstr "Onbekend"
 
-#: ../gtk-dialog.c:1368 ../gtk-ui.c:73
+#: ../gtk-dialog.c:1198 ../gtk-ui.c:80
 msgid "Not private"
-msgstr "Niet besloten"
-
-#: ../gtk-dialog.c:1370
-msgid "Start a private conversation"
-msgstr "Start een besloten conversatie"
-
-#: ../gtk-dialog.c:1371
-msgid "Refresh the private conversation"
-msgstr "Hernieuw een besloten conversatie"
+msgstr "Niet prive"
 
-#: ../gtk-dialog.c:1375
-msgid "Start _private conversation"
-msgstr "Start _besloten conversatie"
-
-#: ../gtk-dialog.c:1376
-msgid "Refresh _private conversation"
-msgstr "Hernieuw _besloten conversatie"
-
-#: ../gtk-dialog.c:1555
+#: ../gtk-dialog.c:1201
+msgid "OTR"
+msgstr "OTR"
+
+#. Translators: the following four messages should give alternative
+#. * sentences. The user selects the first or second message in a combo box;
+#. * the third message, a new line, a fingerprint, a new line, and
+#. * the fourth message will follow it.
+#: ../gtk-dialog.c:1351
 msgid "I have not"
 msgstr "Ik heb niet"
 
-#: ../gtk-dialog.c:1556
+#. 2nd message
+#: ../gtk-dialog.c:1353
 msgid "I have"
 msgstr "Ik heb"
 
-#: ../gtk-dialog.c:1558
+#. 3rd message
+#: ../gtk-dialog.c:1356
 msgid " verified that this is in fact the correct"
-msgstr " bevestigd of dit daadwerkelijk de correcte"
+msgstr "geverificeerd dat dit inderdaad de correcte"
 
-#: ../gtk-dialog.c:1567
+#. 4th message
+#: ../gtk-dialog.c:1366
 #, c-format
 msgid "fingerprint for %s."
-msgstr "vingerafdruk is voor %s."
-
-#: ../gtk-dialog.c:1579
-msgid ""
-"To verify the fingerprint, contact your buddy via some <i>other</i> "
-"authenticated channel, such as the telephone or GPG-signed email.  Each of "
-"you should tell your fingerprint to the other."
-msgstr ""
-"Om de vingerafdruk te controleren dien je contact op te nemen met je "
-"vriend, via een <i>ander</i> bertouwbaar communicatie kanaal, zoals de "
-"telefoon, of een GPG ondertekende email.  Je moet vervolgens elkaar de "
-"vingerafdruk van de ander doorgeven en controleren."
-
-#: ../gtk-dialog.c:1583
-msgid ""
-"If everything matches up, you should indicate in the above dialog that you "
-"<b>have</b> verified the fingerprint."
-msgstr "Als alles precies klopt, kun je in het bovenstaande dialoogvenster "
-"aangeven dat je de vingerafdruk hebt <b>bevestigd</b>."
-
-#: ../gtk-dialog.c:1585
-msgid ""
-"If your buddy has more than one IM account, or uses more than one computer, "
-"he may have multiple fingerprints."
-msgstr "Als je vriend meerdere IM accounts heeft, of meer dan een computer"
-"gebruikt, dan kan het zijn dat de vriend meerdere vingerafdrukken heeft."
-
-#: ../gtk-dialog.c:1587
-msgid ""
-"However, the only way an imposter could duplicate one of your buddy's "
-"fingerprints is by stealing information from her/his computer."
-msgstr "Echter, de enige methode waarop een bedrieger je vriend's "
-"vingerafdrukken kan namaken, is door geheime informatie te stelen "
-"van je vriend's computer."
-
-#: ../gtk-dialog.c:1591
-msgid "Click here for more information about fingerprints."
-msgstr "Klik hier voor meer informatie over vingerafdrukken."
-
-#: ../gtk-dialog.c:1594
-msgid ""
-"A <b>fingerprint</b> is a unique identifier that you should use to "
-"authenticate your buddy."
-msgstr "Een <b>vingerafdruk</b> is een unieke herkenbare eigenschap waarmee"
-"je je vriend kunt authenticeren."
+msgstr "vingerafdruk van %s"
 
-#: ../gtk-dialog.c:1616
+#: ../gtk-dialog.c:1393
 #, c-format
 msgid "Verify fingerprint for %s"
-msgstr "Bevestig de vingerafdruk van %s"
-
-#: ../gtk-dialog.c:1620
-msgid "[none]"
-msgstr "[geen]"
+msgstr "Controleer vingerafdruk voor %s"
 
-#: ../gtk-dialog.c:1628
+#: ../gtk-dialog.c:1405
 #, c-format
 msgid ""
-"Fingerprint for you, %s (%s):\n"
+"<small><i>%s %s\n"
+"\n"
+"</i></small>Fingerprint for you, %s (%s):\n"
 "%s\n"
 "\n"
 "Purported fingerprint for %s:\n"
 "%s\n"
-msgstr "Jouw vingerafdruk, %s (%s):\n"
+msgstr ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>Vingerafdruk van you, %s (%s):\n"
 "%s\n"
 "\n"
 "Vermeende vingerafdruk van %s:\n"
 "%s\n"
 
-#: ../gtk-dialog.c:1633 ../gtk-ui.c:681
+#: ../gtk-dialog.c:1412
+msgid ""
+"If everything matches up, you should indicate in the above dialog that you "
+"<b>have</b> verified the fingerprint."
+msgstr ""
+"Als alles klopt, kun je in het bovenstaande dialoogvenster "
+"aangeven dat je de vingerafdruk hebt <b>geverificeerd</b>."
+
+#: ../gtk-dialog.c:1418 ../gtk-ui.c:844
 msgid "Verify fingerprint"
-msgstr "Bevestig vingerafdruk"
+msgstr "Controleer vingerafdruk"
 
-#: ../gtk-dialog.c:1660
+#: ../gtk-dialog.c:1445
 #, c-format
-msgid "Authenticate %s"
-msgstr "Authenticeer %s"
+msgid "Authentication from %s"
+msgstr "Authenticatie van %s"
 
-#: ../gtk-dialog.c:1665
+#: ../gtk-dialog.c:1448
 #, c-format
-msgid "Enter a secret known only to %s and yourself.\n"
-msgstr "Voer het geheim in dat alleen jij en je vriend %s kennen.\n"
+msgid "Authenticate %s"
+msgstr "Authenticeer %s"
 
-#: ../gtk-dialog.c:1668
-msgid "Authenticate buddy"
+#: ../gtk-dialog.c:1456
+msgid "Authenticate Buddy"
 msgstr "Authenticeer vriend"
 
-#: ../gtk-dialog.c:1700
+#: ../gtk-dialog.c:1487
 msgid "An error occurred during authentication."
 msgstr "Er is een fout opgetreden tijdens de authenticatie."
 
-#: ../gtk-dialog.c:1716
+#: ../gtk-dialog.c:1502
 msgid "Authentication successful."
 msgstr "Authenticatie successvol."
 
-#: ../gtk-dialog.c:1719
+#: ../gtk-dialog.c:1505
+msgid ""
+"Your buddy has successfully authenticated you.  You may want to authenticate "
+"your buddy as well by asking your own question."
+msgstr ""
+"Jouw vriend heeft jou geauthenticiteerd. Wellicht wil je nu jouw vriend "
+"authenticeren door middel van jouw eigen vraag voor je vriend."
+
+#: ../gtk-dialog.c:1511
 msgid "Authentication failed."
-msgstr "Authenticatie mislukt."
+msgstr "Authenticatie mislukt"
 
-#: ../gtk-dialog.c:1744
+#: ../gtk-dialog.c:1541
 #, c-format
-msgid "Private conversation with %s started.%s"
-msgstr "Besloten conversatie gestart met %s.%s"
+msgid "Private conversation with %s started.%s%s"
+msgstr "Prive gesprek met %s gestart.%s%s"
 
-#: ../gtk-dialog.c:1748
+#: ../gtk-dialog.c:1545
 #, c-format
-msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s"
-msgstr "<a href=\"%s%s\">Onbeschermde</a> conversatie gestart met %%s.%%s"
+msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s%%s"
+msgstr "<a href=\"%s%s\">Ongeverifieerd</a> gesprek gestart met %%s.%%s%%s"
 
 #. This last case should never happen, since we know
 #. * we're in ENCRYPTED.
-#: ../gtk-dialog.c:1756
+#: ../gtk-dialog.c:1553
 #, c-format
-msgid "Not private conversation with %s started.%s"
-msgstr "Geen besloten conversatie gestart met %s.%s"
+msgid "Not private conversation with %s started.%s%s"
+msgstr "Onbeveiligd gesprek gestart met %s.%s%s"
 
-#: ../gtk-dialog.c:1762 ../gtk-dialog.c:1863
+#: ../gtk-dialog.c:1559 ../gtk-dialog.c:1686
 msgid "  Warning: using old protocol version 1."
-msgstr "  Waarschuwing: het oude protocol versie 1 is gebruikt."
+msgstr " Waarschuwing: het oude versie 1 protocol wordt gebruikt"
+
+#: ../gtk-dialog.c:1561
+msgid "  Your client is logging this conversation."
+msgstr " Jouw programma slaat dit gesprek op."
+
+#: ../gtk-dialog.c:1562
+msgid "  Your client is not logging this conversation."
+msgstr " Jouw programma slaat dit gesprek niet op."
+
+#: ../gtk-dialog.c:1581
+#, c-format
+msgid ""
+"Your buddy is logged in multiple times and OTR has established <a href=\"%s%s"
+"\">multiple sessions</a>. Use the icon menu above if you wish to select the "
+"outgoing session."
+msgstr ""
+"Jouw vriend is meerdere keren ingelogd en OTR heeft <a href=\"%s%s"
+"\">meerdere sessies</a> tot stand gebracht. Gebruik het OTR ikoon menu hierboven als "
+"je wilt selecteren welk uitgaand gesprek je wilt gebruiken." 
+
 
-#: ../gtk-dialog.c:1782
+#: ../gtk-dialog.c:1601
 #, c-format
 msgid "Private conversation with %s lost."
-msgstr "Besloten conversatie met %s verloren."
+msgstr "Prive gesprek met %s verloren."
 
-#: ../gtk-dialog.c:1817
+#: ../gtk-dialog.c:1638
 #, c-format
 msgid ""
 "%s has ended his/her private conversation with you; you should do the same."
-msgstr "%s heeft de besloten conversatie met jou afgesloten. Jij kunt dit "
-"het beste nu ook zelf afsluiten."
+msgstr ""
+"%s heeft het prive gesprek afgesloten; jij kunt dat het beste nu ook doen."
 
-#: ../gtk-dialog.c:1842
+#: ../gtk-dialog.c:1665
 #, c-format
 msgid "Successfully refreshed the private conversation with %s.%s"
-msgstr "De besloten conversatie met %s is successvol hernieuwd.%s"
+msgstr "Prive gesprek met %s opnieuw tot stand gebracht.%s"
 
-#: ../gtk-dialog.c:1847
+#: ../gtk-dialog.c:1670
 #, c-format
 msgid ""
 "Successfully refreshed the <a href=\"%s%s\">unverified</a> conversation with "
 "%%s.%%s"
-msgstr "De <a href=\"%s%s\">onbeschermde</a> conversatie met %%s is met "
-"success hernieuwd.%%s"
+msgstr ""
+"<a href=\"%s%s\">Ongeverifieerd</a>gesprek met %%s opnieuw tot stand gebracht.%%s"
 
 #. This last case should never happen, since we know
 #. * we're in ENCRYPTED.
-#: ../gtk-dialog.c:1856
+#: ../gtk-dialog.c:1679
 #, c-format
 msgid "Successfully refreshed the not private conversation with %s.%s"
-msgstr "De onbeschermde conversatie met %s is met success hernieuwd.%s"
+msgstr "Niet-prive gesprek met %s opnieuw tot stand gebracht.%s"
 
-#: ../gtk-dialog.c:1883
+#: ../gtk-dialog.c:1712
 #, c-format
 msgid "Attempting to refresh the private conversation with %s..."
-msgstr "Bezig met het vernieuwen van de beschermde conversatie met %s..."
+msgstr "Poging prive gesprek met %s opnieuw tot stand te brengen..."
 
-#: ../gtk-dialog.c:1885
+#: ../gtk-dialog.c:1714
 #, c-format
 msgid "Attempting to start a private conversation with %s..."
-msgstr "Een poging is gestart om een beschermde conversatie te beginnen met %s..."
+msgstr "Poging een prive gesprek te starten met %s..."
 
-# Paul to Ian: Should/can we really translate these entries here?
-#: ../gtk-dialog.c:2045
-msgid "OTR:"
-msgstr "OTR:"
+#: ../gtk-dialog.c:1899 ../gtk-dialog.c:2026
+msgid "Start _private conversation"
+msgstr "Start _prive gesprek"
 
-#: ../gtk-dialog.c:2054
-msgid "OTR Messaging"
-msgstr "OTR Berichtgeving"
+#: ../gtk-dialog.c:1900
+msgid "Refresh _private conversation"
+msgstr "Herstart _prive gesprek"
 
-#: ../gtk-dialog.c:2060
-msgid "_End private conversation"
-msgstr "_Beeindig beschermde conversatie"
-
-#.
-#. * Don't show the Verify fingerprint menu option any more.  You can
-#. * still get to the dialog through Authenticate connection ->
-#. * Advanced...
-#. *
-#. menuverf = gtk_menu_item_new_with_mnemonic(_("_Verify fingerprint"));
-#. gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuverf);
-#. gtk_widget_show(menuverf);
-#.
-#: ../gtk-dialog.c:2078
+#: ../gtk-dialog.c:1905
+msgid "Re_authenticate buddy"
+msgstr "_Authenticiteer vriend opnieuw"
+
+#: ../gtk-dialog.c:1906 ../gtk-dialog.c:2030
 msgid "_Authenticate buddy"
-msgstr "_Authenticeer vriend"
+msgstr "_Authenticiteer vriend"
+
+#: ../gtk-dialog.c:1960 ../gtk-dialog.c:2736
+msgid "Not Private"
+msgstr "Niet prive"
+
+#: ../gtk-dialog.c:1982
+msgid "_What's this?"
+msgstr "_Wat is dit?"
+
+#: ../gtk-dialog.c:2028
+msgid "_End private conversation"
+msgstr "_Stop prive gesprek"
+
+#: ../gtk-dialog.c:2207 ../gtk-dialog.c:2255
+#, c-format
+msgid ""
+"Warning: The selected outgoing OTR session (%u) is not the most recently "
+"active one (%u). Your buddy may not receive your messages. Use the icon menu "
+"above to select a different outgoing session."
+msgstr ""
+"Waarschuwing: De gekozen uitgaande OTR sessie (%u) is niet de meest recente "
+"actieve sessie (%u). Je vriend kan je berichten wellicht nu niet zien. Gebruik "
+
+
+#: ../gtk-dialog.c:2271
+msgid "Send to most secure"
+msgstr "Stuur naar de best beveiligde"
+
+#: ../gtk-dialog.c:2273
+msgid "Send to most recent"
+msgstr "Stuur naar de meest recente"
+
+#: ../gtk-dialog.c:2377
+#, c-format
+msgid "Session %u"
+msgstr "Sessie %u"
+
+#: ../gtk-dialog.c:2395 ../gtk-dialog.c:2506
+msgid "Select"
+msgstr "Selecteer"
+
+#: ../gtk-dialog.c:2410
+msgid "Selected"
+msgstr "Geselecteerd"
+
+#: ../gtk-dialog.c:2731
+#, c-format
+msgid ""
+"The privacy status of the current conversation is now: <a href=\"%s%s\">%s</"
+"a>"
+msgstr ""
+"De privacy status van het huidige gesprek is nu: <a href=\"%s%s\">%s</a>"
 
-#: ../gtk-ui.c:96
+#: ../gtk-dialog.c:2956
+msgid "OTR Messaging"
+msgstr "OTR Messaging"
+
+#: ../gtk-ui.c:103
 #, c-format
 msgid "Fingerprint: %.80s"
 msgstr "Vingerafdruk: %.80s"
 
-#: ../gtk-ui.c:100
+#: ../gtk-ui.c:107
 #, c-format
 msgid "No key present"
-msgstr "Geen sleutel aanwezig"
+msgstr "Geen sleutel gevonden"
 
-#: ../gtk-ui.c:105
+#: ../gtk-ui.c:112
 #, c-format
 msgid "No account available"
 msgstr "Geen account beschikbaar"
 
-#: ../gtk-ui.c:165
+#: ../gtk-ui.c:179
 msgid "Unused"
 msgstr "Ongebruikt"
 
-#: ../gtk-ui.c:171
+#: ../gtk-ui.c:208
 msgid "Yes"
 msgstr "Ja"
 
-#: ../gtk-ui.c:171
+#: ../gtk-ui.c:208
 msgid "No"
 msgstr "Nee"
 
-#: ../gtk-ui.c:396
+#: ../gtk-ui.c:473
 msgid "Enable private messaging"
-msgstr "Start beschermde conversatie"
+msgstr "Prive gesprekken aanzetten"
 
-#: ../gtk-ui.c:398
+#: ../gtk-ui.c:475
 msgid "Automatically initiate private messaging"
-msgstr "Automatisch initieeren van beschermde berichten"
+msgstr "Automatisch prive gesprekken beginnen"
 
-#: ../gtk-ui.c:400
+#. Paul: Not sure why sometimes you say "privage messaging" and sometimes "OTR conversations"
+#: ../gtk-ui.c:477
 msgid "Require private messaging"
-msgstr "Alleen beschermde berichten toestaan"
+msgstr "Prive gesprekken verplicht stellen"
 
-#: ../gtk-ui.c:403
+#: ../gtk-ui.c:480
 msgid "Don't log OTR conversations"
-msgstr "OTR conversaties niet opslaan"
+msgstr "Bewaar geen log bestanden van prive gesprekken."
 
-#: ../gtk-ui.c:531
+#: ../gtk-ui.c:524
+msgid "Show OTR button in toolbar"
+msgstr "Laat OTR knop in de toolbar zien"
+
+#: ../gtk-ui.c:663
 msgid "My private keys"
-msgstr "Mijn geheime sleutels"
+msgstr "Mijn prive sleutels"
 
-#: ../gtk-ui.c:540
+#: ../gtk-ui.c:672
 msgid "Key for account:"
 msgstr "Sleutel voor account:"
 
-#: ../gtk-ui.c:565
+#: ../gtk-ui.c:697
 msgid "Generate"
 msgstr "Genereer"
 
-#: ../gtk-ui.c:596
+#: ../gtk-ui.c:738
 msgid "Default OTR Settings"
 msgstr "Standaard OTR instellingen"
 
-#: ../gtk-ui.c:625
+#: ../gtk-ui.c:765
+msgid "OTR UI Options"
+msgstr "OTR UI opties"
+
+#: ../gtk-ui.c:788
 msgid "Screenname"
-msgstr "Naam"
+msgstr "IM naam"
 
-#: ../gtk-ui.c:626
+#: ../gtk-ui.c:789
 msgid "Status"
 msgstr "Status"
 
-#: ../gtk-ui.c:627
+#: ../gtk-ui.c:790
 msgid "Verified"
-msgstr "Geverificeerd"
+msgstr "Gecontroleerd"
 
-#: ../gtk-ui.c:628
+#: ../gtk-ui.c:791
 msgid "Fingerprint"
 msgstr "Vingerafdruk"
 
-#: ../gtk-ui.c:629
+#: ../gtk-ui.c:792
 msgid "Account"
 msgstr "Account"
 
-#: ../gtk-ui.c:665
+#: ../gtk-ui.c:828
 msgid "Start private connection"
-msgstr "Start besloten verbinding"
+msgstr "Start prive gesprek"
 
-#: ../gtk-ui.c:673
+#: ../gtk-ui.c:836
 msgid "End private connection"
-msgstr "Stop besloten verbinding"
+msgstr "Stop prive gesprek"
 
-#: ../gtk-ui.c:689
+#: ../gtk-ui.c:852
 msgid "Forget fingerprint"
-msgstr "Vergeet vingerafdruk"
+msgstr "Vergeet deze vingerafdruk"
 
-#: ../gtk-ui.c:738
+#: ../gtk-ui.c:903
 msgid "Config"
 msgstr "Configuratie"
 
-#: ../gtk-ui.c:740
+#: ../gtk-ui.c:905
 msgid "Known fingerprints"
 msgstr "Bekende vingerafdrukken"
 
-#: ../gtk-ui.c:838 ../otr-plugin.c:577
+#: ../gtk-ui.c:1003 ../otr-plugin.c:964
 msgid "OTR Settings"
 msgstr "OTR Instellingen"
 
 #. Set the title
-#: ../gtk-ui.c:856
+#: ../gtk-ui.c:1021
 #, c-format
 msgid "OTR Settings for %s"
 msgstr "OTR Instellingen voor %s"
 
 #. Make the cascaded checkboxes
-#: ../gtk-ui.c:873
+#: ../gtk-ui.c:1038
 msgid "Use default OTR settings for this buddy"
 msgstr "Gebruik de standaard OTR instellingen voor deze vriend"
 
-#: ../otr-plugin.c:113
+#: ../otr-plugin.c:125
 #, c-format
 msgid "You are not currently connected to account %s (%s)."
-msgstr "Je bent op dit moment niet verbonden aan het account %s (%s)."
+msgstr "Je bent niet online met het account %s (%s)."
 
-#: ../otr-plugin.c:117
+#: ../otr-plugin.c:129
 msgid "Not connected"
-msgstr "Niet verbonden"
+msgstr "Niet online"
 
-#: ../otr-plugin.c:161
+#: ../otr-plugin.c:212 ../otr-plugin.c:254
 #, c-format
 msgid "Out of memory building filenames!\n"
-msgstr "Te weinig geheugen voor het opbouwen van bestandsnamen!\n"
+msgstr "Geen geheugen meer om bestandsnamen op te bouwen!\n"
 
-#: ../otr-plugin.c:167
+#: ../otr-plugin.c:224 ../otr-plugin.c:260
 #, c-format
 msgid "Could not write private key file\n"
-msgstr "Kon het geheime sleutel bestand niet schrijven\n"
+msgstr "Kon prive sleutel niet schrijven!\n"
 
-#: ../otr-plugin.c:210
+#: ../otr-plugin.c:298
 #, c-format
 msgid "Unknown account %s (%s)."
 msgstr "Onbekend account %s (%s)."
 
-#: ../otr-plugin.c:214
+#: ../otr-plugin.c:302
 msgid "Unknown account"
 msgstr "Onbekend account"
 
-#: ../otr-plugin.c:953
+#: ../otr-plugin.c:364
+msgid "Error occurred encrypting message."
+msgstr "Fout opgetreden tijdens het versleutelen van een bericht"
+
+#: ../otr-plugin.c:368
+#, c-format
+msgid "You sent encrypted data to %s, who wasn't expecting it."
+msgstr "Je stuurde een versleuteld bericht aan %s, maar die verwachtte dat niet."
+
+#: ../otr-plugin.c:374
+msgid "You transmitted an unreadable encrypted message."
+msgstr "Je verstuurde een onleesbaar versleuteld bericht"
+
+#: ../otr-plugin.c:377
+msgid "You transmitted a malformed data message."
+msgstr "Je verstuurde een misvormt bericht"
+
+#: ../otr-plugin.c:390
+msgid "[resent]"
+msgstr "[opnieuw verzonden]"
+
+#: ../otr-plugin.c:459
+#, c-format
+msgid "You attempted to send an unencrypted message to %s"
+msgstr "Je probeerde een niet-versleuteld bericht te sturen naar %s"
+
+#: ../otr-plugin.c:462
+msgid "Attempting to start a private conversation..."
+msgstr "Probeer een prive gesprek te starten..."
+
+#: ../otr-plugin.c:464
+msgid "OTR Policy Violation"
+msgstr "OTR Policy Violation"
+
+#. PAUL: I think "retransmitted" is the wrong word here, as it was never transmitted before!
+#: ../otr-plugin.c:465
+msgid ""
+"Unencrypted messages to this recipient are not allowed.  Attempting to start "
+"a private conversation.\n"
+"\n"
+"Your message will be retransmitted when the private conversation starts."
+msgstr ""
+"Niet-versleutelde berichten naar deze ontvanger zijn niet toegestaan. Er wordt "
+"nu geprobeerd een prive gesprek te beginnen.\n"
+"\n"
+"Je bericht zal verzonden worden nadat een prive gesprek is gestart."
+
+#: ../otr-plugin.c:474
+msgid ""
+"An error occurred when encrypting your message.  The message was not sent."
+msgstr "Er is een fout opgetreden tijdens het versleutelen van je bericht. Dit "
+"bericht kon niet verstuurd worden"
+
+#: ../otr-plugin.c:476
+msgid "Error encrypting message"
+msgstr "Fout bij besleutelen bericht"
+
+#: ../otr-plugin.c:477
+msgid "An error occurred when encrypting your message"
+msgstr "Er is een fout opgetreden tijdens het versleutelen van je bericht"
+
+#: ../otr-plugin.c:478
+msgid "The message was not sent."
+msgstr "Dit bericht kon niet vestuurd worden"
+
+
+#: ../otr-plugin.c:481
+#, c-format
+msgid "%s has already closed his/her private connection to you"
+msgstr "%s heeft het prive gesprek met jou gestopt."
+
+#: ../otr-plugin.c:484
+msgid ""
+"Your message was not sent.  Either end your private conversation, or restart "
+"it."
+msgstr ""
+"Je bericht is niet verstuurd. Je moet je prive gesprek herstarten of stoppen."
+
+#: ../otr-plugin.c:487
+msgid "Private connection closed"
+msgstr "Prive gesprek afgesloten"
+
+#: ../otr-plugin.c:488
+msgid ""
+"Your message was not sent.  Either close your private connection to him, or "
+"refresh it."
+msgstr ""
+"Je bericht is niet verstuurd. Je moet je prive gesprek herstarten of stoppen."
+
+#: ../otr-plugin.c:498
+msgid "Error setting up private conversation: Malformed message received"
+msgstr "Fout bij opzetten prive gesprek. Misvormd bericht ontvangen"
+
+#: ../otr-plugin.c:502
+#, c-format
+msgid "Error setting up private conversation: %s"
+msgstr "Fout bij opzetten prive gesprek: %s"
+
+#: ../otr-plugin.c:509 ../otr-plugin.c:520 ../otr-plugin.c:547
+#: ../otr-plugin.c:555 ../otr-plugin.c:573
+msgid "OTR Error"
+msgstr "OTR Fout"
+
+#: ../otr-plugin.c:516
+msgid ""
+"We are receiving our own OTR messages.  You are either trying to talk to "
+"yourself, or someone is reflecting your messages back at you."
+msgstr "We ontvangen onze eigen OTR berichten. Je bent of met jezelf aan het "
+"praten, of iemand stuurt jouw versleutelde berichten terug naar jou."
+
+#: ../otr-plugin.c:520
+msgid "We are receiving our own OTR messages."
+msgstr "We ontvangen onze eigen OTR berichten"
+
+#: ../otr-plugin.c:521
+msgid ""
+"You are either trying to talk to yourself, or someone is reflecting your "
+"messages back at you."
+msgstr ""
+"Je bent of met jezelf aan het praten, of iemand stuurt jouw versleutelde "
+"berichten terug naar jou."
+
+#: ../otr-plugin.c:526
+#, c-format
+msgid "<b>The last message to %s was resent.</b>"
+msgstr "<b>Het laatste bericht aan %s is opnieuw verzonden.<b>"
+
+#: ../otr-plugin.c:530
+msgid "Message resent"
+msgstr "Bericht opnieuw gestuurd"
+
+#: ../otr-plugin.c:534
+#, c-format
+msgid ""
+"<b>The encrypted message received from %s is unreadable, as you are not "
+"currently communicating privately.</b>"
+msgstr "Het versleutelde bericht dat je van %s ontvangen hebt is onleesbaar, "
+"omdat je op dit moment geen aktief prive gesprek hebt."
+
+#: ../otr-plugin.c:539
+msgid "Unreadable message"
+msgstr "Onleesbaar bericht"
+
+#: ../otr-plugin.c:543
+#, c-format
+msgid "We received an unreadable encrypted message from %s."
+msgstr "We ontvingen een onleesbaar versleuteld bericht van %s."
+
+#: ../otr-plugin.c:551
+#, c-format
+msgid "We received a malformed data message from %s."
+msgstr "We ontvingen een misvormd data bericht van %s."
+
+#: ../otr-plugin.c:559
+#, c-format
+msgid "Heartbeat received from %s.\n"
+msgstr "Hartslag ontvangen van %s.\n"
+
+#: ../otr-plugin.c:565
+#, c-format
+msgid "Heartbeat sent to %s.\n"
+msgstr "Hartslag gestuurd naar %s.\n"
+
+#: ../otr-plugin.c:576
+#, c-format
+msgid ""
+"<b>The following message received from %s was <i>not</i> encrypted: [</b>%"
+"s<b>]</b>"
+msgstr ""
+
+#: ../otr-plugin.c:581
+msgid "Received unencrypted message"
+msgstr "Ontving een niet-versleuteld bericht"
+
+#: ../otr-plugin.c:587
+#, c-format
+msgid "Unrecognized OTR message received from %s.\n"
+msgstr "Onbekend OTR bericht onvangen van %s.\n"
+
+#: ../otr-plugin.c:596
+#, c-format
+msgid ""
+"%s has sent a message intended for a different session. If you are logged in "
+"multiple times, another session may have received the message."
+msgstr ""
+"%s heeft een bericht gestuurd dat bedoeld was voor een andere sessie. A;s je "
+"meerdere keren ingelogd bent, heeft een andere sessie waarschijnlijk het bericht "
+"ontvangen."
+
+#: ../otr-plugin.c:602
+msgid "Received message for a different session"
+msgstr "Bericht ontvangen voor een andere sessie"
+
+#. 2013-01-01
+#: ../otr-plugin.c:1193 ../otr-plugin.c:1220
+#, c-format
+msgid "OTR PLUGIN v%s"
+msgstr "OTR PLUGIN v%s"
+
+#: ../otr-plugin.c:1202
+#, c-format
+msgid ""
+"This beta copy of the Off-the-Record Messaging v%s Pidgin plugin has expired "
+"as of 2013-01-01. Please look for an updated release at http://otr."
+"cypherpunks.ca/"
+msgstr ""
+"Deze test versie van Off-the-Record Messaging v%s Pidgin plugin is vanaf "
+"2013 niet meer geldig. Kijk op http://otr.cypherpunks.ca/ voor een nieuwere "
+"versie."
+
+#: ../otr-plugin.c:1229
+#, c-format
+msgid ""
+"You have enabled a beta version of the Off-the-Record Messaging v%s Pidgin "
+"plugin. This version is intended for testing purposes only and is not for "
+"general purpose use."
+msgstr ""
+"Je hebt een beta versie van Off-the-Record Messaging v%s Pidgin plugin. "
+"Deze versie is alleen bedoeld voor ontwikkelaars om te testen. Stuur "
+"vertaal fouten naar paul at cypherpunks.ca."
+
+#: ../otr-plugin.c:1414
 msgid "Off-the-Record Messaging"
-msgstr "Off-the-Record Berichtgeving"
+msgstr "Off-the-Record Messaging"
 
-#: ../otr-plugin.c:954
+#: ../otr-plugin.c:1415
 msgid "Provides private and secure conversations"
-msgstr "Bescherm en versleutel gesprekken"
+msgstr "Ondersteuning voor veilige prive gesprekken"
 
-#: ../otr-plugin.c:955
+#: ../otr-plugin.c:1416
 msgid ""
 "Preserves the privacy of IM communications by providing encryption, "
 "authentication, deniability, and perfect forward secrecy."
-msgstr "Beschermt de privacy van IM communicatie door middel van "
-"het gebruik van versleuteling, authenticatie, ontken-mogelijkheid en "
-"'perfect forward secrecy'."
+msgstr ""
+"Waarborgt de privacy van IM communicatie door gebruik van encryptie, "
+"authenticatie, het kunnen ontkennen van berichten en sessie sleutels."
 
-#: ../ui.c:108
+#: ../ui.c:110
 #, c-format
 msgid "Account %s (%s) could not be found"
-msgstr "Account %s (%s) kon niet worden gevonden"
+msgstr "Account %s (%s) kon niet gevonden worden"
 
-#: ../ui.c:112
+#: ../ui.c:114
 msgid "Account not found"
 msgstr "Account niet gevonden"
diff --git a/po/nn.po b/po/nn.po
new file mode 100644
index 0000000..4eb34ed
--- /dev/null
+++ b/po/nn.po
@@ -0,0 +1,883 @@
+# Off-the-Record Messaging plugin for pidgin.
+# Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew,
+#	                       Lisa Du, Nikita Borisov
+# This file is distributed under the same license as the pidgin-otr package.
+# Ian Goldberg <otr at cypherpunks.ca>, 2012
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pidgin-otr 4.0.0.nn\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-06-08 22:00+0200\n"
+"PO-Revision-Date: 2012-06-26 22:01+0200\n"
+"Last-Translator: Yngve Spjeld Landro <l10n at landro.net>\n"
+"Language-Team: Norsk (nynorsk) <>\n"
+"Language: nn\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+
+#: ../gtk-dialog.c:332 ../gtk-dialog.c:1141 ../gtk-dialog.c:1145
+#: ../gtk-dialog.c:1547 ../gtk-dialog.c:1584 ../gtk-dialog.c:1673
+#: ../gtk-dialog.c:1748 ../gtk-dialog.c:2749
+msgid "?lang=en"
+msgstr "?lang=nn"
+
+#: ../gtk-dialog.c:480
+msgid ""
+"Your buddy is attempting to determine if he or she is really talking to you, "
+"or if it's someone pretending to be you.  Your buddy has asked a question, "
+"indicated below.  To authenticate to your buddy, enter the answer and click "
+"OK."
+msgstr ""
+"Kontakten din prøver å avgjera om han/ho verkeleg taler med deg eller om det "
+"er nokon som gjev seg ut for å vera deg. Kontakten har stilt eit spørsmål "
+"nedanfor. For å autentisera deg mot vedkomande må du skriva inn svaret og "
+"klikka OK."
+
+#: ../gtk-dialog.c:487
+msgid ""
+"To authenticate using a question, pick a question whose answer is known only "
+"to you and your buddy.  Enter this question and this answer, then wait for "
+"your buddy to enter the answer too.  If the answers don't match, then you "
+"may be talking to an imposter."
+msgstr ""
+"Du kan autentisera ved å stilla eit spørsmål som berre du og kontakten din "
+"kjenner svaret på. Skriv inn spørsmålet og svaret. Vent deretter på at "
+"kontakten svarer. Om svara ikkje samsvarer kan det vera at du taler med ein "
+"svindlar."
+
+#: ../gtk-dialog.c:505
+#, c-format
+msgid "This is the question asked by your buddy:"
+msgstr "Dette er spørsmålet kontakten din stilte:"
+
+#: ../gtk-dialog.c:508
+#, c-format
+msgid "Enter question here:"
+msgstr "Skriv spørsmålet her:"
+
+#: ../gtk-dialog.c:540 ../gtk-dialog.c:624
+msgid "This buddy is already authenticated."
+msgstr "Kontakten er allereie autentisert."
+
+#: ../gtk-dialog.c:552
+#, c-format
+msgid "Enter secret answer here (case sensitive):"
+msgstr ""
+"Skriv inn det hemmelege svaret her (skil mellom store og små bokstavar):"
+
+#: ../gtk-dialog.c:593
+msgid ""
+"To authenticate, pick a secret known only to you and your buddy.  Enter this "
+"secret, then wait for your buddy to enter it too.  If the secrets don't "
+"match, then you may be talking to an imposter."
+msgstr ""
+"Du autentiserer kontakten ved å velja ein løyndom som berre du og kontakten "
+"kjenner til. Skriv inn løyndomen, vent deretter på at kontakten skriv det "
+"same. Om dei ikkje samsvarer kan det vera at du taler med ein svindlar."
+
+#: ../gtk-dialog.c:607
+#, c-format
+msgid "Enter secret here:"
+msgstr "Skriv løyndommen her:"
+
+#: ../gtk-dialog.c:657 ../gtk-dialog.c:1408
+msgid ""
+"To verify the fingerprint, contact your buddy via some <i>other</i> "
+"authenticated channel, such as the telephone or GPG-signed email.  Each of "
+"you should tell your fingerprint to the other."
+msgstr ""
+"For å stadfesta fingeravtrykket vender du deg til kontakten din ved hjelp av "
+"ein <i>annan</i> autentisert kanal som t.d. telefonen eller ei gpg-signert e-"
+"postmelding. Begge må opplysa den andre om fingeravtrykket sitt."
+
+#: ../gtk-dialog.c:661
+msgid ""
+"If everything matches up, you should chose <b>I have</b> in the menu below."
+msgstr "Om alt samsvarer, bør du velja <b>Eg har</b> i menyen nedanfor."
+
+#: ../gtk-dialog.c:672 ../gtk-dialog.c:1397
+msgid "[none]"
+msgstr "[ingen]"
+
+#: ../gtk-dialog.c:679 ../gtk-dialog.c:1051 ../gtk-dialog.c:1404
+#: ../gtk-dialog.c:1453 ../gtk-ui.c:212 ../otr-plugin.c:127
+#: ../otr-plugin.c:300 ../ui.c:112
+msgid "Unknown"
+msgstr "Ukjend"
+
+#: ../gtk-dialog.c:680
+#, c-format
+msgid ""
+"Fingerprint for you, %s (%s):\n"
+"%s\n"
+"\n"
+"Purported fingerprint for %s:\n"
+"%s\n"
+msgstr ""
+"Fingeravtrykket ditt, %s (%s):\n"
+"%s\n"
+"\n"
+"Påstått fingeravtrykk for %s:\n"
+"%s\n"
+
+#: ../gtk-dialog.c:736
+msgid "How would you like to authenticate your buddy?"
+msgstr "Korleis vil du autentisera kontakten din?"
+
+#: ../gtk-dialog.c:745
+msgid "Question and answer"
+msgstr "Spørsmål og svar"
+
+#: ../gtk-dialog.c:748
+msgid "Shared secret"
+msgstr "Delt løyndom"
+
+#: ../gtk-dialog.c:751
+msgid "Manual fingerprint verification"
+msgstr "Manuell stadfesting av fingeravtrykk"
+
+#: ../gtk-dialog.c:802
+msgid "_Authenticate"
+msgstr "_Autentiser"
+
+#: ../gtk-dialog.c:836
+msgid ""
+"Authenticating a buddy helps ensure that the person you are talking to is "
+"who he or she claims to be."
+msgstr ""
+"Du sikrar at personen du taler med verkeleg er den han/ho seier vedkomande "
+"er ved å autentisera kontakten."
+
+#. Translators: you are asked to authenticate yourself
+#: ../gtk-dialog.c:946
+msgid "Authenticating to Buddy"
+msgstr "Autentiserer deg mot kontakten din"
+
+#. Translators: you asked your buddy to authenticate him/herself
+#: ../gtk-dialog.c:948
+msgid "Authenticating Buddy"
+msgstr "Autentiserer kontakten"
+
+#: ../gtk-dialog.c:975
+#, c-format
+msgid "Authenticating to %s"
+msgstr "Autentiserer deg mot %s"
+
+#: ../gtk-dialog.c:976
+#, c-format
+msgid "Authenticating %s"
+msgstr "Autentiserer %s"
+
+#: ../gtk-dialog.c:1009
+msgid "Waiting for buddy..."
+msgstr "Ventar på kontakten …"
+
+#: ../gtk-dialog.c:1042
+msgid "Generating private key"
+msgstr "Lagar den private nøkkelen"
+
+#: ../gtk-dialog.c:1043
+msgid "Please wait"
+msgstr "Vent …"
+
+#. Create the Please Wait... dialog
+#: ../gtk-dialog.c:1054
+#, c-format
+msgid "Generating private key for %s (%s)..."
+msgstr "Lagar den private nøkkelen for %s (%s) …"
+
+#: ../gtk-dialog.c:1099
+#, c-format
+msgid "%s Done."
+msgstr "%s utført."
+
+#: ../gtk-dialog.c:1139
+#, c-format
+msgid ""
+"%s is contacting you from an unrecognized computer.  You should <a href=\"%s"
+"%s\">authenticate</a> this buddy."
+msgstr ""
+"%s kontaktar deg frå ei ukjend datamaskin. Du bør <a href=\"%s%s"
+"\">autentisera</a> denne kontakten."
+
+#: ../gtk-dialog.c:1143
+#, c-format
+msgid ""
+"%s has not been authenticated yet.  You should <a href=\"%s%s"
+"\">authenticate</a> this buddy."
+msgstr ""
+"%s er enno ikkje vorten autentisert. Du bør <a href=\"%s%s\">autentisera</a> "
+"denne kontakten."
+
+#: ../gtk-dialog.c:1195 ../gtk-dialog.c:1969 ../gtk-dialog.c:2745
+#: ../gtk-ui.c:83
+msgid "Finished"
+msgstr "Avslutta"
+
+#: ../gtk-dialog.c:1196 ../gtk-dialog.c:1966 ../gtk-dialog.c:2742
+#: ../gtk-ui.c:82
+msgid "Private"
+msgstr "Privat"
+
+#: ../gtk-dialog.c:1197 ../gtk-dialog.c:1963 ../gtk-dialog.c:2739
+#: ../gtk-ui.c:81
+msgid "Unverified"
+msgstr "Ikkje stadfesta"
+
+#: ../gtk-dialog.c:1198 ../gtk-ui.c:80
+msgid "Not private"
+msgstr "Ikkje privat"
+
+#: ../gtk-dialog.c:1201
+msgid "OTR"
+msgstr "OTR"
+
+#. Translators: the following four messages should give alternative
+#. * sentences. The user selects the first or second message in a combo box;
+#. * the third message, a new line, a fingerprint, a new line, and
+#. * the fourth message will follow it.
+#: ../gtk-dialog.c:1351
+msgid "I have not"
+msgstr "Eg har ikkje"
+
+#. 2nd message
+#: ../gtk-dialog.c:1353
+msgid "I have"
+msgstr "Eg har"
+
+#. 3rd message
+#: ../gtk-dialog.c:1356
+msgid " verified that this is in fact the correct"
+msgstr " stadfesta at dette verkeleg er det rette"
+
+#. 4th message
+#: ../gtk-dialog.c:1366
+#, c-format
+msgid "fingerprint for %s."
+msgstr "fingeravtrykket for %s."
+
+#: ../gtk-dialog.c:1393
+#, c-format
+msgid "Verify fingerprint for %s"
+msgstr "Stadfest fingeravtrykket for %s"
+
+#: ../gtk-dialog.c:1405
+#, c-format
+msgid ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>Fingerprint for you, %s (%s):\n"
+"%s\n"
+"\n"
+"Purported fingerprint for %s:\n"
+"%s\n"
+msgstr ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>Fingeravtrykket ditt, %s (%s):\n"
+"%s\n"
+"\n"
+"Påstått fingeravtrykk for %s:\n"
+"%s\n"
+
+#: ../gtk-dialog.c:1412
+msgid ""
+"If everything matches up, you should indicate in the above dialog that you "
+"<b>have</b> verified the fingerprint."
+msgstr ""
+"Om alt samsvarer, bør du visa i vindauget ovanfor at du verkeleg <b>har</b> "
+"stadfesta fingeravtrykket."
+
+#: ../gtk-dialog.c:1418 ../gtk-ui.c:844
+msgid "Verify fingerprint"
+msgstr "Stadfest fingeravtrykket"
+
+#: ../gtk-dialog.c:1445
+#, c-format
+msgid "Authentication from %s"
+msgstr "Autentiser frå %s"
+
+#: ../gtk-dialog.c:1448
+#, c-format
+msgid "Authenticate %s"
+msgstr "Autentiser %s"
+
+#: ../gtk-dialog.c:1456
+msgid "Authenticate Buddy"
+msgstr "Autentiser kontakten"
+
+#: ../gtk-dialog.c:1487
+msgid "An error occurred during authentication."
+msgstr "Det oppstod ein feil under autentiseringa."
+
+#: ../gtk-dialog.c:1502
+msgid "Authentication successful."
+msgstr "Autentiseringa var vellykka."
+
+#: ../gtk-dialog.c:1505
+msgid ""
+"Your buddy has successfully authenticated you.  You may want to authenticate "
+"your buddy as well by asking your own question."
+msgstr ""
+"Kontakten din har autentisert deg. Du vil kanskje autentisera han/ho du òg "
+"ved å stilla ditt eige spørsmål."
+
+#: ../gtk-dialog.c:1511
+msgid "Authentication failed."
+msgstr "Autentiseringa feila."
+
+#: ../gtk-dialog.c:1541
+#, c-format
+msgid "Private conversation with %s started.%s%s"
+msgstr "Privat samtale med %s er starta.%s%s"
+
+#: ../gtk-dialog.c:1545
+#, c-format
+msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s%%s"
+msgstr "<a href=\"%s%s\">Ikkje-stadfesta</a> samtale med %%s er starta.%%s%%s"
+
+#. This last case should never happen, since we know
+#. * we're in ENCRYPTED.
+#: ../gtk-dialog.c:1553
+#, c-format
+msgid "Not private conversation with %s started.%s%s"
+msgstr "Ikkje-private samtale med %s er starta.%s%s"
+
+#: ../gtk-dialog.c:1559 ../gtk-dialog.c:1686
+msgid "  Warning: using old protocol version 1."
+msgstr "  Åtvaring: bruker gammal protokollutgåve 1."
+
+#: ../gtk-dialog.c:1561
+msgid "  Your client is logging this conversation."
+msgstr "  Klienten din loggar denne samtalen."
+
+#: ../gtk-dialog.c:1562
+msgid "  Your client is not logging this conversation."
+msgstr "  Klienten din loggar ikkje denne samtalen."
+
+#: ../gtk-dialog.c:1581
+#, c-format
+msgid ""
+"Your buddy is logged in multiple times and OTR has established <a href=\"%s%s"
+"\">multiple sessions</a>. Use the icon menu above if you wish to select the "
+"outgoing session."
+msgstr ""
+"Kontakten din har logga på fleire gonger og OTR har oppretta <a href=\"%s%s"
+"\">fleire økter</a>. Bruk ikonmenyen over om du vil velja den utgåande økta."
+
+#: ../gtk-dialog.c:1601
+#, c-format
+msgid "Private conversation with %s lost."
+msgstr "Har mist den private samtalen med %s."
+
+#: ../gtk-dialog.c:1638
+#, c-format
+msgid ""
+"%s has ended his/her private conversation with you; you should do the same."
+msgstr "%s har avslutta den private samtalen med deg.Du bør gjera det same."
+
+#: ../gtk-dialog.c:1665
+#, c-format
+msgid "Successfully refreshed the private conversation with %s.%s"
+msgstr "Vellykka oppfrisking av den private samtalen med %s.%s"
+
+#: ../gtk-dialog.c:1670
+#, c-format
+msgid ""
+"Successfully refreshed the <a href=\"%s%s\">unverified</a> conversation with "
+"%%s.%%s"
+msgstr ""
+"Vellykka oppfrisking av den <a href=\"%s%s\">ikkje-stadfesta</a> samtalen "
+"med %%s.%%s"
+
+#. This last case should never happen, since we know
+#. * we're in ENCRYPTED.
+#: ../gtk-dialog.c:1679
+#, c-format
+msgid "Successfully refreshed the not private conversation with %s.%s"
+msgstr "Vellykka oppfrisking av den ikkje-private samtalen med %s.%s"
+
+#: ../gtk-dialog.c:1712
+#, c-format
+msgid "Attempting to refresh the private conversation with %s..."
+msgstr "Prøver å friska opp den private samtalen med %s …"
+
+#: ../gtk-dialog.c:1714
+#, c-format
+msgid "Attempting to start a private conversation with %s..."
+msgstr "Prøver å starta opp ein privat samtale med %s …"
+
+#: ../gtk-dialog.c:1899 ../gtk-dialog.c:2026
+msgid "Start _private conversation"
+msgstr "Start _privat samtale"
+
+#: ../gtk-dialog.c:1900
+msgid "Refresh _private conversation"
+msgstr "Friskar opp den _private samtalen"
+
+#: ../gtk-dialog.c:1905
+msgid "Re_authenticate buddy"
+msgstr "Re-a_utentiserer kontakten"
+
+#: ../gtk-dialog.c:1906 ../gtk-dialog.c:2030
+msgid "_Authenticate buddy"
+msgstr "_Autentiserer kontakten"
+
+#: ../gtk-dialog.c:1960 ../gtk-dialog.c:2736
+msgid "Not Private"
+msgstr "Ikkje privat"
+
+#: ../gtk-dialog.c:1982
+msgid "_What's this?"
+msgstr "_Kva er dette?"
+
+#: ../gtk-dialog.c:2028
+msgid "_End private conversation"
+msgstr "Avsl_utt den private samtalen"
+
+#: ../gtk-dialog.c:2207 ../gtk-dialog.c:2255
+#, c-format
+msgid ""
+"Warning: The selected outgoing OTR session (%u) is not the most recently "
+"active one (%u). Your buddy may not receive your messages. Use the icon menu "
+"above to select a different outgoing session."
+msgstr ""
+"Åtvaring: den valde utgåande OTR-økta (%u) er ikkje den som sist var aktiv "
+"(%u). Det kan vera at kontakten din ikkje mottek meldingane dine. Bruk "
+"ikonmenyen over til å velja ei anna utgåande økt."
+
+#: ../gtk-dialog.c:2271
+msgid "Send to most secure"
+msgstr "Send til den mest sikre"
+
+#: ../gtk-dialog.c:2273
+msgid "Send to most recent"
+msgstr "Send til den aller nyaste"
+
+#: ../gtk-dialog.c:2377
+#, c-format
+msgid "Session %u"
+msgstr "Økt %u"
+
+#: ../gtk-dialog.c:2395 ../gtk-dialog.c:2506
+msgid "Select"
+msgstr "Vel"
+
+#: ../gtk-dialog.c:2410
+msgid "Selected"
+msgstr "Vald"
+
+#: ../gtk-dialog.c:2731
+#, c-format
+msgid ""
+"The privacy status of the current conversation is now: <a href=\"%s%s\">%s</"
+"a>"
+msgstr ""
+"Personvernstatusen til den gjeldande samtalen er no: <a href=\"%s%s\">%s</a>"
+
+#: ../gtk-dialog.c:2956
+msgid "OTR Messaging"
+msgstr "OTR-meldingsteneste"
+
+#: ../gtk-ui.c:103
+#, c-format
+msgid "Fingerprint: %.80s"
+msgstr "Fingeravtrykk: %.80s"
+
+#: ../gtk-ui.c:107
+#, c-format
+msgid "No key present"
+msgstr "Ingen nøkkel er til stades"
+
+#: ../gtk-ui.c:112
+#, c-format
+msgid "No account available"
+msgstr "Ingen konto er tilgjengeleg"
+
+#: ../gtk-ui.c:179
+msgid "Unused"
+msgstr "Ikkje brukt"
+
+#: ../gtk-ui.c:208
+msgid "Yes"
+msgstr "Ja"
+
+#: ../gtk-ui.c:208
+msgid "No"
+msgstr "Nei"
+
+#: ../gtk-ui.c:473
+msgid "Enable private messaging"
+msgstr "Ta i bruk privat meldingsteneste"
+
+#: ../gtk-ui.c:475
+msgid "Automatically initiate private messaging"
+msgstr "Ta automatisk i bruk privat meldingsteneste"
+
+#: ../gtk-ui.c:477
+msgid "Require private messaging"
+msgstr "Krev privat meldingsteneste"
+
+#: ../gtk-ui.c:480
+msgid "Don't log OTR conversations"
+msgstr "Logg ikkje OTR-samtalar"
+
+#: ../gtk-ui.c:524
+msgid "Show OTR button in toolbar"
+msgstr "Syn OTR-knapp på verktøylinja"
+
+#: ../gtk-ui.c:663
+msgid "My private keys"
+msgstr "Dei private nøklane mine"
+
+#: ../gtk-ui.c:672
+msgid "Key for account:"
+msgstr "Nøkkel for kontoen:"
+
+#: ../gtk-ui.c:697
+msgid "Generate"
+msgstr "Lag"
+
+#: ../gtk-ui.c:738
+msgid "Default OTR Settings"
+msgstr "Standard OTR-innstillingar"
+
+#: ../gtk-ui.c:765
+msgid "OTR UI Options"
+msgstr "OTR-grensesnittval"
+
+#: ../gtk-ui.c:788
+msgid "Screenname"
+msgstr "Kallenamn"
+
+#: ../gtk-ui.c:789
+msgid "Status"
+msgstr "Status"
+
+#: ../gtk-ui.c:790
+msgid "Verified"
+msgstr "Stadfesta"
+
+#: ../gtk-ui.c:791
+msgid "Fingerprint"
+msgstr "Fingeravtrykk"
+
+#: ../gtk-ui.c:792
+msgid "Account"
+msgstr "Konto"
+
+#: ../gtk-ui.c:828
+msgid "Start private connection"
+msgstr "Start privat tilkopling"
+
+#: ../gtk-ui.c:836
+msgid "End private connection"
+msgstr "Avslutt privat tilkoping"
+
+#: ../gtk-ui.c:852
+msgid "Forget fingerprint"
+msgstr "Gløym fingeravtrykket"
+
+#: ../gtk-ui.c:903
+msgid "Config"
+msgstr "Innstillingar"
+
+#: ../gtk-ui.c:905
+msgid "Known fingerprints"
+msgstr "Kjende fingeravtrykk"
+
+#: ../gtk-ui.c:1003 ../otr-plugin.c:964
+msgid "OTR Settings"
+msgstr "OTR-innstillingar"
+
+#. Set the title
+#: ../gtk-ui.c:1021
+#, c-format
+msgid "OTR Settings for %s"
+msgstr "OTR-innstillingar for %s"
+
+#. Make the cascaded checkboxes
+#: ../gtk-ui.c:1038
+msgid "Use default OTR settings for this buddy"
+msgstr "Bruk standard OTR-innstillingar for denne kontakten"
+
+#: ../otr-plugin.c:125
+#, c-format
+msgid "You are not currently connected to account %s (%s)."
+msgstr "Du er ikkje tilkopla kontoen %s (%s)."
+
+#: ../otr-plugin.c:129
+msgid "Not connected"
+msgstr "Ikkje tilkopla"
+
+#: ../otr-plugin.c:212 ../otr-plugin.c:254
+#, c-format
+msgid "Out of memory building filenames!\n"
+msgstr "Gjekk tom for minne under filnamnopplistinga!\n"
+
+#: ../otr-plugin.c:224 ../otr-plugin.c:260
+#, c-format
+msgid "Could not write private key file\n"
+msgstr "Klarte ikkje å skriva den private nøkkelfila\n"
+
+#: ../otr-plugin.c:298
+#, c-format
+msgid "Unknown account %s (%s)."
+msgstr "Ukjend konto %s (%s)."
+
+#: ../otr-plugin.c:302
+msgid "Unknown account"
+msgstr "Ukjend konto"
+
+#: ../otr-plugin.c:364
+msgid "Error occurred encrypting message."
+msgstr "Det oppstod ein feil under meldingskrypteringa."
+
+#: ../otr-plugin.c:368
+#, c-format
+msgid "You sent encrypted data to %s, who wasn't expecting it."
+msgstr "Du sende krypterte data til %s som ikkje venta det."
+
+#: ../otr-plugin.c:374
+msgid "You transmitted an unreadable encrypted message."
+msgstr "Du sende ei uleseleg kryptert melding."
+
+#: ../otr-plugin.c:377
+msgid "You transmitted a malformed data message."
+msgstr "Du sende ei ugyldig datamelding."
+
+#: ../otr-plugin.c:390
+msgid "[resent]"
+msgstr "[sendt om att]"
+
+#: ../otr-plugin.c:459
+#, c-format
+msgid "You attempted to send an unencrypted message to %s"
+msgstr "Du prøvde å senda ei ikkje-kryptert melding til %s"
+
+#: ../otr-plugin.c:462
+msgid "Attempting to start a private conversation..."
+msgstr "Prøver å starta ei privat samtale …"
+
+#: ../otr-plugin.c:464
+msgid "OTR Policy Violation"
+msgstr "OTR-regelbrot"
+
+#: ../otr-plugin.c:465
+msgid ""
+"Unencrypted messages to this recipient are not allowed.  Attempting to start "
+"a private conversation.\n"
+"\n"
+"Your message will be retransmitted when the private conversation starts."
+msgstr ""
+"Meldingane du sender til denne mottakaren må vera krypterte. Prøver å starta "
+"ein privat samtale.\n"
+"\n"
+"Meldinga di vil verta sendt om att når den private samtalen startar."
+
+#: ../otr-plugin.c:474
+msgid ""
+"An error occurred when encrypting your message.  The message was not sent."
+msgstr ""
+"Det oppstod ein feil under krypteringa av meldinga di. Meldinga vart ikkje "
+"sendt."
+
+#: ../otr-plugin.c:476
+msgid "Error encrypting message"
+msgstr "Meldinga vart ikkje kryptert"
+
+#: ../otr-plugin.c:477
+msgid "An error occurred when encrypting your message"
+msgstr "Det oppstod ein feil under krypteringa av meldinga"
+
+#: ../otr-plugin.c:478
+msgid "The message was not sent."
+msgstr "Meldinga vart ikkje sendt."
+
+#: ../otr-plugin.c:481
+#, c-format
+msgid "%s has already closed his/her private connection to you"
+msgstr "%s har allereie lukka den private tilkoplinga til deg"
+
+#: ../otr-plugin.c:484
+msgid ""
+"Your message was not sent.  Either end your private conversation, or restart "
+"it."
+msgstr ""
+"Meldinga di vart ikkje sendt. Avslutt den private samtalen eller start han "
+"om att."
+
+#: ../otr-plugin.c:487
+msgid "Private connection closed"
+msgstr "Den private tilkoplinga er lukka"
+
+#: ../otr-plugin.c:488
+msgid ""
+"Your message was not sent.  Either close your private connection to him, or "
+"refresh it."
+msgstr ""
+"Meldinga di vart ikkje sendt. Avslutt den private tilkoplinga eller frisk "
+"han opp att."
+
+#: ../otr-plugin.c:498
+msgid "Error setting up private conversation: Malformed message received"
+msgstr "Klarte ikkje å laga ein privat samtale: mottok ei ugyldig melding"
+
+#: ../otr-plugin.c:502
+#, c-format
+msgid "Error setting up private conversation: %s"
+msgstr "Klarte ikkje å laga ein privat samtale: %s"
+
+#: ../otr-plugin.c:509 ../otr-plugin.c:520 ../otr-plugin.c:547
+#: ../otr-plugin.c:555 ../otr-plugin.c:573
+msgid "OTR Error"
+msgstr "OTR-feil"
+
+#: ../otr-plugin.c:516
+msgid ""
+"We are receiving our own OTR messages.  You are either trying to talk to "
+"yourself, or someone is reflecting your messages back at you."
+msgstr ""
+"Vi tek i mot våre eigne OTR-meldingar. Du prøver anten å tala med deg sjølv "
+"eller så vidaresender nokon meldingane attende til deg."
+
+#: ../otr-plugin.c:520
+msgid "We are receiving our own OTR messages."
+msgstr "Vi tek i mot våre eigne OTR-meldingar."
+
+#: ../otr-plugin.c:521
+msgid ""
+"You are either trying to talk to yourself, or someone is reflecting your "
+"messages back at you."
+msgstr ""
+"Du prøver anten å tala med deg sjølv eller så vidaresender nokon meldingane "
+"attende til deg."
+
+#: ../otr-plugin.c:526
+#, c-format
+msgid "<b>The last message to %s was resent.</b>"
+msgstr "<b>Den siste meldinga til %s vart sendt om att.</b>"
+
+#: ../otr-plugin.c:530
+msgid "Message resent"
+msgstr "Meldinga vart sendt på nytt"
+
+#: ../otr-plugin.c:534
+#, c-format
+msgid ""
+"<b>The encrypted message received from %s is unreadable, as you are not "
+"currently communicating privately.</b>"
+msgstr ""
+"<b>Kan ikkje lesa den krypterte meldinga som kom frå %s sidan samtalen ikkje "
+"er privat.</b>"
+
+#: ../otr-plugin.c:539
+msgid "Unreadable message"
+msgstr "Meldinga ikkje lesast"
+
+#: ../otr-plugin.c:543
+#, c-format
+msgid "We received an unreadable encrypted message from %s."
+msgstr "Vi mottok ei uleseleg kryptert melding frå %s."
+
+#: ../otr-plugin.c:551
+#, c-format
+msgid "We received a malformed data message from %s."
+msgstr "Vi mottok ei ugyldig datamelding frå %s."
+
+#: ../otr-plugin.c:559
+#, c-format
+msgid "Heartbeat received from %s.\n"
+msgstr "Livsteikn motteke frå %s.\n"
+
+#: ../otr-plugin.c:565
+#, c-format
+msgid "Heartbeat sent to %s.\n"
+msgstr "Livsteikn sendt til %s.\n"
+
+#: ../otr-plugin.c:576
+#, c-format
+msgid ""
+"<b>The following message received from %s was <i>not</i> encrypted: [</b>"
+"%s<b>]</b>"
+msgstr ""
+"<b>Denne meldinga, som vart motteken frå %s, var <i>ikkje</i> kryptert: [</b>"
+"%s<b>]</b>"
+
+#: ../otr-plugin.c:581
+msgid "Received unencrypted message"
+msgstr "Mottok ei ikkje-kryptert melding"
+
+#: ../otr-plugin.c:587
+#, c-format
+msgid "Unrecognized OTR message received from %s.\n"
+msgstr "Ukjend OTR-melding motteken frå %s.\n"
+
+#: ../otr-plugin.c:596
+#, c-format
+msgid ""
+"%s has sent a message intended for a different session. If you are logged in "
+"multiple times, another session may have received the message."
+msgstr ""
+"%s har sendt ei melding som var meint til ei anna økt. Om du er pålogga "
+"fleire gonger, kan det vera at ei anna mottok meldinga."
+
+#: ../otr-plugin.c:602
+msgid "Received message for a different session"
+msgstr "Mottok ei melding som var meint for ei anna økt"
+
+#. 2013-01-01
+#: ../otr-plugin.c:1193 ../otr-plugin.c:1220
+#, c-format
+msgid "OTR PLUGIN v%s"
+msgstr "OTR-programtillegg v%s"
+
+#: ../otr-plugin.c:1202
+#, c-format
+msgid ""
+"This beta copy of the Off-the-Record Messaging v%s Pidgin plugin has expired "
+"as of 2013-01-01. Please look for an updated release at http://otr."
+"cypherpunks.ca/"
+msgstr ""
+"Denne betakopien av Off-the-Record-meldingsteneste v%s Pidgin-programtillegg "
+"er ikkje gyldig etter 2013-01-01. Du finn ei oppdatert utgåve hos http://otr."
+"cypherpunks.ca/"
+
+#: ../otr-plugin.c:1229
+#, c-format
+msgid ""
+"You have enabled a beta version of the Off-the-Record Messaging v%s Pidgin "
+"plugin. This version is intended for testing purposes only and is not for "
+"general purpose use."
+msgstr ""
+"Du har teke i bruk ei betautgåve av Off-the-Record-meldingsteneste v%s "
+"Pidgin-programtillegg. Utgåva er berre meint for testformål og er ikkje "
+"tenkt verta nytta til vanleg bruk."
+
+#: ../otr-plugin.c:1414
+msgid "Off-the-Record Messaging"
+msgstr "Off-the-Record-meldingsteneste"
+
+#: ../otr-plugin.c:1415
+msgid "Provides private and secure conversations"
+msgstr "Gjev private og trygge samtalar"
+
+#: ../otr-plugin.c:1416
+msgid ""
+"Preserves the privacy of IM communications by providing encryption, "
+"authentication, deniability, and perfect forward secrecy."
+msgstr ""
+"Tek vare på personvernet ditt når du nyttar lynmeldingstenester ved å tilby "
+"kryptering, autentisering, avvising og framtidssikring (PFS)."
+
+#: ../ui.c:110
+#, c-format
+msgid "Account %s (%s) could not be found"
+msgstr "Fann ikkje kontoen %s (%s)"
+
+#: ../ui.c:114
+msgid "Account not found"
+msgstr "Fann ikkje kontoen"
diff --git a/po/ru.po b/po/ru.po
index e6edbe0..f2d3468 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -56,19 +56,19 @@ msgstr "?lang=ru"
 
 #: ../gtk-dialog.c:1059
 msgid "Click here for more information about authentication in OTR."
-msgstr "Дополнительно об идентификации в OTR."
+msgstr "Дополнительно об аутентификации OTR."
 
 #: ../gtk-dialog.c:1063
 msgid "Authenticating a buddy helps ensure that the person you are talking to is who they claim to be."
-msgstr "Хотите быть уверены, что этот контакт - тот, за кого он себя выдает? Идентифицируйте его."
+msgstr "Аутентификация собеседника помогает быть уверенным в том, что ваш собеседник именно тот, за кого выдает себя."
 
 #: ../gtk-dialog.c:1113
 msgid "Authenticating Buddy"
-msgstr "Идентификация контакта"
+msgstr "Аутентификация собеседника"
 
 #: ../gtk-dialog.c:1140
 msgid "Authenticating"
-msgstr "Идентификация"
+msgstr "Аутентификация"
 
 #: ../gtk-dialog.c:1201
 msgid "Generating private key"
@@ -97,17 +97,17 @@ msgstr "Создание закрытого ключа для %s (%s)..."
 #: ../gtk-dialog.c:1258
 #, c-format
 msgid "%s Done."
-msgstr "%s Готово."
+msgstr "%s готово."
 
 #: ../gtk-dialog.c:1320
 #, c-format
 msgid "%s is contacting you from an unrecognized computer.  You should <a href=\"%s%s\">authenticate</a> this buddy."
-msgstr "%s общается с вами с неопознанного компьютера. Следует <a href=\"%s%s\">идентифицировать</a> этот контакт."
+msgstr "%s общается с вами с неопознанного компьютера. Следует <a href=\"%s%s\">аутентифицировать</a> этот контакт."
 
 #: ../gtk-dialog.c:1324
 #, c-format
 msgid "%s has not been authenticated yet.  You should <a href=\"%s%s\">authenticate</a> this buddy."
-msgstr "Идентификация %s пока не пройдена. Вам следует <a href=\"%s%s\">подтвердить личность</a> этого контакта."
+msgstr "%s еще не аутентифицирован. Вам следует <a href=\"%s%s\">подтвердить личность</a> этого контакта."
 
 #: ../gtk-dialog.c:1365
 #: ../gtk-ui.c:76
@@ -147,15 +147,15 @@ msgstr "Обновить _защищенный разговор"
 
 #: ../gtk-dialog.c:1555
 msgid "I have not"
-msgstr "Нет"
+msgstr "Я не проверил(а)"
 
 #: ../gtk-dialog.c:1556
 msgid "I have"
-msgstr "Есть"
+msgstr "Я проверил(а)"
 
 #: ../gtk-dialog.c:1558
 msgid " verified that this is in fact the correct"
-msgstr " проверить что это правильно"
+msgstr " правильность отображаемых данных"
 
 #: ../gtk-dialog.c:1567
 #, c-format
@@ -168,15 +168,15 @@ msgstr "Для проверки отпечатка свяжитесь с его
 
 #: ../gtk-dialog.c:1583
 msgid "If everything matches up, you should indicate in the above dialog that you <b>have</b> verified the fingerprint."
-msgstr "Если все совпадает, следует отметить в диалоге сверху что вы <b>проверили</b> отпечаток."
+msgstr "Если все совпадает, следует отметить в диалоге сверху, что вы <b>проверили</b> отпечаток."
 
 #: ../gtk-dialog.c:1585
 msgid "If your buddy has more than one IM account, or uses more than one computer, he may have multiple fingerprints."
-msgstr "Если ваш собеседник использует более одного аккаунта или более одного компьютера, у него может быть несколько отпечатков."
+msgstr "Если ваш собеседник использует более одного аккаунта или более одного компьютера, у него (неё) может быть несколько отпечатков."
 
 #: ../gtk-dialog.c:1587
 msgid "However, the only way an imposter could duplicate one of your buddy's fingerprints is by stealing information from her/his computer."
-msgstr "Есть только один путь, которым злоумышленник может получить дубликат отпечатков  вашего собеседника: украсть информацию с его компьютера."
+msgstr "Есть только один путь, которым злоумышленник может получить дубликат отпечатков  вашего собеседника: украсть информацию с его (её) компьютера."
 
 #: ../gtk-dialog.c:1591
 msgid "Click here for more information about fingerprints."
@@ -184,7 +184,7 @@ msgstr "Дополнительная информация об отпечатк
 
 #: ../gtk-dialog.c:1594
 msgid "A <b>fingerprint</b> is a unique identifier that you should use to authenticate your buddy."
-msgstr "<b>Отпечаток</b> - уникальный код, который нужен, чтобы идентифицировать собеседника."
+msgstr "<b>Отпечаток</b> - уникальный код, который нужен, чтобы аутентифицировать собеседника."
 
 #: ../gtk-dialog.c:1616
 #, c-format
@@ -218,7 +218,7 @@ msgstr "Проверить отпечаток"
 #: ../gtk-dialog.c:1660
 #, c-format
 msgid "Authenticate %s"
-msgstr "Идентифицировать %s"
+msgstr "Аутентифицировать %s"
 
 #: ../gtk-dialog.c:1665
 #, c-format
@@ -249,7 +249,7 @@ msgstr "Начать защищенный разговор с %s.%s"
 #: ../gtk-dialog.c:1748
 #, c-format
 msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s"
-msgstr "<a href=\"%s%s\">Непроверенный</a> разговор с  %%s started.%%s"
+msgstr "Начат <a href=\"%s%s\">непроверенный</a> разговор с %%s.%%s"
 
 #. This last case should never happen, since we know
 #. * we're in ENCRYPTED.
@@ -261,7 +261,7 @@ msgstr "Начат незащищенный разговор с %s.%s"
 #: ../gtk-dialog.c:1762
 #: ../gtk-dialog.c:1863
 msgid "  Warning: using old protocol version 1."
-msgstr "  Внимание: устаревший протокол версии 1."
+msgstr "  Внимание: используется устаревший протокол версии 1."
 
 #: ../gtk-dialog.c:1782
 #, c-format
@@ -276,29 +276,29 @@ msgstr "%s завершил(а) защищенный разговор; сдел
 #: ../gtk-dialog.c:1842
 #, c-format
 msgid "Successfully refreshed the private conversation with %s.%s"
-msgstr "Защищенный разговор с %s удачно обновлен.%s"
+msgstr "Защищенный разговор с %s успешно обновлен.%s"
 
 #: ../gtk-dialog.c:1847
 #, c-format
 msgid "Successfully refreshed the <a href=\"%s%s\">unverified</a> conversation with %%s.%%s"
-msgstr "<a href=\"%s%s\">Непроверенный</a> разговор с  %%s удачно обновлен.%%s"
+msgstr "<a href=\"%s%s\">Непроверенный</a> разговор с %%s успешно обновлен.%%s"
 
 #. This last case should never happen, since we know
 #. * we're in ENCRYPTED.
 #: ../gtk-dialog.c:1856
 #, c-format
 msgid "Successfully refreshed the not private conversation with %s.%s"
-msgstr "Незащищенный разговор с %s удачно обновлен.%s"
+msgstr "Незащищенный разговор с %s успешно обновлен.%s"
 
 #: ../gtk-dialog.c:1883
 #, c-format
 msgid "Attempting to refresh the private conversation with %s..."
-msgstr "Пытаемся обновить защищенный разговор с %s..."
+msgstr "Попытка обновить защищенный разговор с %s..."
 
 #: ../gtk-dialog.c:1885
 #, c-format
 msgid "Attempting to start a private conversation with %s..."
-msgstr "Пытаемся начать защищенный разговор с %s..."
+msgstr "Попытка начать защищенный разговор с %s..."
 
 #: ../gtk-dialog.c:2045
 msgid "OTR:"
@@ -323,7 +323,7 @@ msgstr "_Завершить защищенный разговор"
 #.
 #: ../gtk-dialog.c:2078
 msgid "_Authenticate buddy"
-msgstr "_Идентифицированный контакт"
+msgstr "_Аутентифицированный контакт"
 
 #: ../gtk-ui.c:96
 #, c-format
@@ -333,16 +333,16 @@ msgstr "Отпечаток: %.80s"
 #: ../gtk-ui.c:100
 #, c-format
 msgid "No key present"
-msgstr "Нет ключа"
+msgstr "Ключ отсутствует"
 
 #: ../gtk-ui.c:105
 #, c-format
 msgid "No account available"
-msgstr "Нет аккаунта"
+msgstr "Аккаунт недоступен"
 
 #: ../gtk-ui.c:165
 msgid "Unused"
-msgstr "Не использовано"
+msgstr "Не используется"
 
 #: ../gtk-ui.c:171
 msgid "Yes"
@@ -354,7 +354,7 @@ msgstr "Нет"
 
 #: ../gtk-ui.c:396
 msgid "Enable private messaging"
-msgstr "Включить защиту разговоров"
+msgstr "Использовать защищенные разговоры"
 
 #: ../gtk-ui.c:398
 msgid "Automatically initiate private messaging"
@@ -362,15 +362,15 @@ msgstr "Автоматически начинать защищенный раз
 
 #: ../gtk-ui.c:400
 msgid "Require private messaging"
-msgstr "Только защищенный разговор"
+msgstr "Требовать защиту разговора"
 
 #: ../gtk-ui.c:403
 msgid "Don't log OTR conversations"
-msgstr "Не записывать разговоры OTR в журнал"
+msgstr "Не записывать разговоры через OTR в журнал"
 
 #: ../gtk-ui.c:531
 msgid "My private keys"
-msgstr " Мои закрытые ключи"
+msgstr "Мои закрытые ключи"
 
 #: ../gtk-ui.c:540
 msgid "Key for account:"
@@ -386,7 +386,7 @@ msgstr "Установки OTR по умолчанию"
 
 #: ../gtk-ui.c:625
 msgid "Screenname"
-msgstr "Имя на экране"
+msgstr "Экранное имя"
 
 #: ../gtk-ui.c:626
 msgid "Status"
@@ -482,7 +482,7 @@ msgid ""
 "authentication, deniability, and perfect forward secrecy."
 msgstr ""
 "Обеспечивает конфиденциальность сообщений путем шифрования, "
-"идентификации собеседника, правдоподобного опровержения и системы perfect forward secrecy (PFS)."
+"аутентификации собеседника, правдоподобного опровержения и системы perfect forward secrecy (PFS)."
 
 #: ../ui.c:108
 #, c-format
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644
index 0000000..9acc82c
--- /dev/null
+++ b/po/zh_CN.po
@@ -0,0 +1,881 @@
+# Off-the-Record Messaging plugin for pidgin.
+# Copyright (C) 2004-2012 Ian Goldberg, Rob Smits, Chris Alexander, Willy Lew,
+#	                       Lisa Du, Nikita Borisov
+# This file is distributed under the same license as the pidgin-otr package.
+# Ian Goldberg <otr at cypherpunks.ca>, 2012
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pidgin-otr 4.0.0.zh_CN\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-06-14 09:45-0400\n"
+"PO-Revision-Date:  2012-06-17 13:45-0400\n"
+"Last-Translator: Bisheng Liu <bisheng.liu at uwaterloo.ca>\n"
+"Language-Team: Bisheng Liu <bisheng.liu at uwaterloo.ca>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-dialog.c:332 ../gtk-dialog.c:1141 ../gtk-dialog.c:1145
+#: ../gtk-dialog.c:1547 ../gtk-dialog.c:1584 ../gtk-dialog.c:1673
+#: ../gtk-dialog.c:1748 ../gtk-dialog.c:2749
+msgid "?lang=en"
+msgstr "?lang=zh_CN"
+
+#: ../gtk-dialog.c:480
+msgid ""
+"Your buddy is attempting to determine if he or she is really talking to you, "
+"or if it's someone pretending to be you.  Your buddy has asked a question, "
+"indicated below.  To authenticate to your buddy, enter the answer and click "
+"OK."
+msgstr ""
+"你的好友正在尝试判断他是否真的是与你在交谈, "
+"而不是与一个伪装成你的人. 你的好友请你回答如下问题以验证你的身份, "
+"请输入答案并点击 "
+"OK. "
+
+#: ../gtk-dialog.c:487
+msgid ""
+"To authenticate using a question, pick a question whose answer is known only "
+"to you and your buddy.  Enter this question and this answer, then wait for "
+"your buddy to enter the answer too.  If the answers don't match, then you "
+"may be talking to an imposter."
+msgstr ""
+"若采用提问方式来验证好友身份, 请选择一个只有你和好友才知道答案的问题. "
+"先输入这个问题和答案, 然后等待你的好友回答这个问题. "
+"如果你们的答案不一致, "
+"那么你可能正在与一个伪装成你好友的人交谈."
+
+#: ../gtk-dialog.c:505
+#, c-format
+msgid "This is the question asked by your buddy:"
+msgstr "这是你的好友所提出的问题:"
+
+#: ../gtk-dialog.c:508
+#, c-format
+msgid "Enter question here:"
+msgstr "在此处输入问题:"
+
+#: ../gtk-dialog.c:540 ../gtk-dialog.c:624
+msgid "This buddy is already authenticated."
+msgstr "该好友已通过认证."
+
+#: ../gtk-dialog.c:552
+#, c-format
+msgid "Enter secret answer here (case sensitive):"
+msgstr "在此处输入问题的答案(区分大小写):"
+
+#: ../gtk-dialog.c:593
+msgid ""
+"To authenticate, pick a secret known only to you and your buddy.  Enter this "
+"secret, then wait for your buddy to enter it too.  If the secrets don't "
+"match, then you may be talking to an imposter."
+msgstr ""
+"为验证好友身份, 请选择一个只有你与好友知道的秘密. "
+"先输入这个秘密, 然后等待你的好友也输入该秘密. 如果你们的输入不一致, "
+"那么你可能正在与一个伪装成你好友的人交谈."
+
+#: ../gtk-dialog.c:607
+#, c-format
+msgid "Enter secret here:"
+msgstr "在此处输入秘密:"
+
+#: ../gtk-dialog.c:657 ../gtk-dialog.c:1408
+msgid ""
+"To verify the fingerprint, contact your buddy via some <i>other</i> "
+"authenticated channel, such as the telephone or GPG-signed email.  Each of "
+"you should tell your fingerprint to the other."
+msgstr ""
+"为验证身份指纹, 请通过 <i>其他</i> "
+"可靠渠道联系你的好友, 例如通过电话或者GPG签名的email. "
+"你们应该把各自的身份指纹告诉对方. "
+
+#: ../gtk-dialog.c:661
+msgid ""
+"If everything matches up, you should chose <b>I have</b> in the menu below."
+msgstr ""
+"如果一切都匹配, 你应该在以下菜单中选择 <b>我已经</b>. "
+
+#: ../gtk-dialog.c:672 ../gtk-dialog.c:1397
+msgid "[none]"
+msgstr "[无]"
+
+#: ../gtk-dialog.c:679 ../gtk-dialog.c:1051 ../gtk-dialog.c:1404
+#: ../gtk-dialog.c:1453 ../gtk-ui.c:212 ../otr-plugin.c:127
+#: ../otr-plugin.c:300 ../ui.c:112
+msgid "Unknown"
+msgstr "未知"
+
+#: ../gtk-dialog.c:680
+#, c-format
+msgid ""
+"Fingerprint for you, %s (%s):\n"
+"%s\n"
+"\n"
+"Purported fingerprint for %s:\n"
+"%s\n"
+msgstr ""
+"属于你的身份指纹, %s (%s):\n"
+"%s\n"
+"\n"
+"所声称的属于 %s 的身份指纹:\n"
+"%s\n"
+
+#: ../gtk-dialog.c:736
+msgid "How would you like to authenticate your buddy?"
+msgstr "你选择如何来验证好友的身份?"
+
+#: ../gtk-dialog.c:745
+msgid "Question and answer"
+msgstr "提问和回答"
+
+#: ../gtk-dialog.c:748
+msgid "Shared secret"
+msgstr "共享的秘密"
+
+#: ../gtk-dialog.c:751
+msgid "Manual fingerprint verification"
+msgstr "手动的身份指纹认证"
+
+#: ../gtk-dialog.c:802
+msgid "_Authenticate"
+msgstr "_认证"
+
+#: ../gtk-dialog.c:836
+msgid ""
+"Authenticating a buddy helps ensure that the person you are talking to is "
+"who he or she claims to be."
+msgstr ""
+"认证好友身份有助于确保你所正在交谈的对象"
+"是他所声称的那个人."
+
+#. Translators: you are asked to authenticate yourself
+#: ../gtk-dialog.c:946
+msgid "Authenticating to Buddy"
+msgstr "正在向好友认证"
+
+#. Translators: you asked your buddy to authenticate him/herself
+#: ../gtk-dialog.c:948
+msgid "Authenticating Buddy"
+msgstr "正在认证好友"
+
+#: ../gtk-dialog.c:975
+#, c-format
+msgid "Authenticating to %s"
+msgstr "正在向 %s 认证"
+
+#: ../gtk-dialog.c:976
+#, c-format
+msgid "Authenticating %s"
+msgstr "正在认证 %s"
+
+#: ../gtk-dialog.c:1009
+msgid "Waiting for buddy..."
+msgstr "正在等待好友回复..."
+
+#: ../gtk-dialog.c:1042
+msgid "Generating private key"
+msgstr "正在生成密钥"
+
+#: ../gtk-dialog.c:1043
+msgid "Please wait"
+msgstr "请等待"
+
+#. Create the Please Wait... dialog
+#: ../gtk-dialog.c:1054
+#, c-format
+msgid "Generating private key for %s (%s)..."
+msgstr "正在为 %s (%s) 生成密钥..."
+
+#: ../gtk-dialog.c:1099
+#, c-format
+msgid "%s Done."
+msgstr "%s 完成."
+
+#: ../gtk-dialog.c:1139
+#, c-format
+msgid ""
+"%s is contacting you from an unrecognized computer.  You should <a href=\"%s%"
+"s\">authenticate</a> this buddy."
+msgstr ""
+"%s 正在使用一台无法识别的计算机与你联系. 你应该d <a href=\"%s%"
+"s\">认证</a> 该好友的身份."
+
+#: ../gtk-dialog.c:1143
+#, c-format
+msgid ""
+"%s has not been authenticated yet.  You should <a href=\"%s%s"
+"\">authenticate</a> this buddy."
+msgstr ""
+"%s 的身份还没有经过认证. 你应该 <a href=\"%s%s"
+"\">认证</a> 该好友的身份. "
+
+#: ../gtk-dialog.c:1195 ../gtk-dialog.c:1969 ../gtk-dialog.c:2745
+#: ../gtk-ui.c:83
+msgid "Finished"
+msgstr "已完成"
+
+#: ../gtk-dialog.c:1196 ../gtk-dialog.c:1966 ../gtk-dialog.c:2742
+#: ../gtk-ui.c:82
+msgid "Private"
+msgstr "保密的"
+
+#: ../gtk-dialog.c:1197 ../gtk-dialog.c:1963 ../gtk-dialog.c:2739
+#: ../gtk-ui.c:81
+msgid "Unverified"
+msgstr "未认证的"
+
+#: ../gtk-dialog.c:1198 ../gtk-ui.c:80
+msgid "Not private"
+msgstr "不保密的"
+
+#: ../gtk-dialog.c:1201
+msgid "OTR"
+msgstr "OTR"
+
+#. Translators: the following four messages should give alternative
+#. * sentences. The user selects the first or second message in a combo box;
+#. * the third message, a new line, a fingerprint, a new line, and
+#. * the fourth message will follow it.
+#: ../gtk-dialog.c:1351
+msgid "I have not"
+msgstr "我已经"
+
+#. 2nd message
+#: ../gtk-dialog.c:1353
+msgid "I have"
+msgstr "我还没有"
+
+#. 3rd message
+#: ../gtk-dialog.c:1356
+msgid " verified that this is in fact the correct"
+msgstr "确认这是正确的"
+
+#. 4th message
+#: ../gtk-dialog.c:1366
+#, c-format
+msgid "fingerprint for %s."
+msgstr "属于 %s 的身份指纹."
+
+#: ../gtk-dialog.c:1393
+#, c-format
+msgid "Verify fingerprint for %s"
+msgstr "认证属于 %s 的身份指纹"
+
+#: ../gtk-dialog.c:1405
+#, c-format
+msgid ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>Fingerprint for you, %s (%s):\n"
+"%s\n"
+"\n"
+"Purported fingerprint for %s:\n"
+"%s\n"
+msgstr ""
+"<small><i>%s %s\n"
+"\n"
+"</i></small>属于你的身份指纹, %s (%s):\n"
+"%s\n"
+"\n"
+"所声称的属于 %s 的身份指纹: \n"
+"%s\n"
+
+#: ../gtk-dialog.c:1412
+msgid ""
+"If everything matches up, you should indicate in the above dialog that you "
+"<b>have</b> verified the fingerprint."
+msgstr ""
+"如果一切都匹配, 你应该在以上对话框中表明你 "
+"<b>已经</b> 认证了该身份指纹."
+
+#: ../gtk-dialog.c:1418 ../gtk-ui.c:844
+msgid "Verify fingerprint"
+msgstr "认证身份指纹"
+
+#: ../gtk-dialog.c:1445
+#, c-format
+msgid "Authentication from %s"
+msgstr "来自 %s 的认证"
+
+#: ../gtk-dialog.c:1448
+#, c-format
+msgid "Authenticate %s"
+msgstr "认证 %s"
+
+#: ../gtk-dialog.c:1456
+msgid "Authenticate Buddy"
+msgstr "认证好友"
+
+#: ../gtk-dialog.c:1487
+msgid "An error occurred during authentication."
+msgstr "在认证过程中发生了一个错误."
+
+#: ../gtk-dialog.c:1502
+msgid "Authentication successful."
+msgstr "认证成功."
+
+#: ../gtk-dialog.c:1505
+msgid ""
+"Your buddy has successfully authenticated you.  You may want to authenticate "
+"your buddy as well by asking your own question."
+msgstr ""
+"你的好友已经成功地认证了你的身份. 你可以类似地提出一个你自己的问题"
+"来认证该好友的身份."
+
+#: ../gtk-dialog.c:1511
+msgid "Authentication failed."
+msgstr "认证失败."
+
+#: ../gtk-dialog.c:1541
+#, c-format
+msgid "Private conversation with %s started.%s%s"
+msgstr "与 %s 的私密对话开始.%s%s"
+
+#: ../gtk-dialog.c:1545
+#, c-format
+msgid "<a href=\"%s%s\">Unverified</a> conversation with %%s started.%%s%%s"
+msgstr "<a href=\"%s%s\">未认证的</a> 与 %%s 的对话开始.%%s%%s"
+
+#. This last case should never happen, since we know
+#. * we're in ENCRYPTED.
+#: ../gtk-dialog.c:1553
+#, c-format
+msgid "Not private conversation with %s started.%s%s"
+msgstr "不保密的与 %s 的对话开始.%s%s"
+
+#: ../gtk-dialog.c:1559 ../gtk-dialog.c:1686
+msgid "  Warning: using old protocol version 1."
+msgstr "  警告: 正在使用旧的协议版本 1."
+
+#: ../gtk-dialog.c:1561
+msgid "  Your client is logging this conversation."
+msgstr "  你的客户端正在记录这段对话."
+
+#: ../gtk-dialog.c:1562
+msgid "  Your client is not logging this conversation."
+msgstr "  你的客户端没有在记录这段对话."
+
+#: ../gtk-dialog.c:1581
+#, c-format
+msgid ""
+"Your buddy is logged in multiple times and OTR has established <a href=\"%s%s"
+"\">multiple sessions</a>. Use the icon menu above if you wish to select the "
+"outgoing session."
+msgstr ""
+"你的好友登录了多次, OTR已经建立了 <a href=\"%s%s"
+"\">多个会话</a>. 如果你想选择其中一个会话, 请使用以上的图标菜单."
+
+#: ../gtk-dialog.c:1601
+#, c-format
+msgid "Private conversation with %s lost."
+msgstr "与 %s 的私密对话丢失."
+
+#: ../gtk-dialog.c:1638
+#, c-format
+msgid ""
+"%s has ended his/her private conversation with you; you should do the same."
+msgstr ""
+"%s 已经结束了与你的私密对话; 你也应该采取同样操作."
+
+#: ../gtk-dialog.c:1665
+#, c-format
+msgid "Successfully refreshed the private conversation with %s.%s"
+msgstr "成功地刷新了与 %s 的私密对话.%s"
+
+#: ../gtk-dialog.c:1670
+#, c-format
+msgid ""
+"Successfully refreshed the <a href=\"%s%s\">unverified</a> conversation with "
+"%%s.%%s"
+msgstr ""
+"成功地刷新了 <a href=\"%s%s\">未认证的</a> 对话与"
+"%%s.%%s"
+
+#. This last case should never happen, since we know
+#. * we're in ENCRYPTED.
+#: ../gtk-dialog.c:1679
+#, c-format
+msgid "Successfully refreshed the not private conversation with %s.%s"
+msgstr "成功地刷新了与 %s 的不私密对话.%s"
+
+#: ../gtk-dialog.c:1712
+#, c-format
+msgid "Attempting to refresh the private conversation with %s..."
+msgstr "正在尝试刷新与 %s 的私密对话..."
+
+#: ../gtk-dialog.c:1714
+#, c-format
+msgid "Attempting to start a private conversation with %s..."
+msgstr "正在尝试启动与 %s 的私密对话..."
+
+#: ../gtk-dialog.c:1899 ../gtk-dialog.c:2026
+msgid "Start _private conversation"
+msgstr "启动 _私密 对话"
+
+#: ../gtk-dialog.c:1900
+msgid "Refresh _private conversation"
+msgstr "刷新 _私密 对话"
+
+#: ../gtk-dialog.c:1905
+msgid "Re_authenticate buddy"
+msgstr "重_认证 好友身份"
+
+#: ../gtk-dialog.c:1906 ../gtk-dialog.c:2030
+msgid "_Authenticate buddy"
+msgstr "_认证 好友身份"
+
+#: ../gtk-dialog.c:1960 ../gtk-dialog.c:2736
+msgid "Not Private"
+msgstr "不保密的"
+
+#: ../gtk-dialog.c:1982
+msgid "_What's this?"
+msgstr "_这是什么?"
+
+#: ../gtk-dialog.c:2028
+msgid "_End private conversation"
+msgstr "_结束私密对话"
+
+#: ../gtk-dialog.c:2207 ../gtk-dialog.c:2255
+#, c-format
+msgid ""
+"Warning: The selected outgoing OTR session (%u) is not the most recently "
+"active one (%u). Your buddy may not receive your messages. Use the icon menu "
+"above to select a different outgoing session."
+msgstr ""
+"警告: 所选择的OTR会话 (%u) 不是最近"
+"活跃的会话 (%u). 你的好友可能无法接受到你的消息. 请使用以上的图标菜单"
+"来选择一个不同的会话. "
+
+#: ../gtk-dialog.c:2271
+msgid "Send to most secure"
+msgstr "发送给最安全的"
+
+#: ../gtk-dialog.c:2273
+msgid "Send to most recent"
+msgstr "发送给最近的"
+
+#: ../gtk-dialog.c:2377
+#, c-format
+msgid "Session %u"
+msgstr "会话 %u"
+
+#: ../gtk-dialog.c:2395 ../gtk-dialog.c:2506
+msgid "Select"
+msgstr "选择"
+
+#: ../gtk-dialog.c:2410
+msgid "Selected"
+msgstr "已选择的"
+
+#: ../gtk-dialog.c:2731
+#, c-format
+msgid ""
+"The privacy status of the current conversation is now: <a href=\"%s%s\">%s</"
+"a>"
+msgstr ""
+"当前会话的隐私状态是 <a href=\"%s%s\">%s</"
+"a>"
+
+#: ../gtk-dialog.c:2956
+msgid "OTR Messaging"
+msgstr "OTR消息中"
+
+#: ../gtk-ui.c:103
+#, c-format
+msgid "Fingerprint: %.80s"
+msgstr "身份指纹: %.80s"
+
+#: ../gtk-ui.c:107
+#, c-format
+msgid "No key present"
+msgstr "当前无密钥"
+
+#: ../gtk-ui.c:112
+#, c-format
+msgid "No account available"
+msgstr "无可用帐号"
+
+#: ../gtk-ui.c:179
+msgid "Unused"
+msgstr "未使用"
+
+#: ../gtk-ui.c:208
+msgid "Yes"
+msgstr "是"
+
+#: ../gtk-ui.c:208
+msgid "No"
+msgstr "否"
+
+#: ../gtk-ui.c:473
+msgid "Enable private messaging"
+msgstr "启动私密消息"
+
+#: ../gtk-ui.c:475
+msgid "Automatically initiate private messaging"
+msgstr "自动启用私密消息"
+
+#: ../gtk-ui.c:477
+msgid "Require private messaging"
+msgstr "要求私密消息"
+
+#: ../gtk-ui.c:480
+msgid "Don't log OTR conversations"
+msgstr "不记录OTR交谈"
+
+#: ../gtk-ui.c:524
+msgid "Show OTR button in toolbar"
+msgstr "在工具条显示OTR按钮"
+
+#: ../gtk-ui.c:663
+msgid "My private keys"
+msgstr "我的私钥"
+
+#: ../gtk-ui.c:672
+msgid "Key for account:"
+msgstr "私钥属于帐号:"
+
+#: ../gtk-ui.c:697
+msgid "Generate"
+msgstr "生成"
+
+#: ../gtk-ui.c:738
+msgid "Default OTR Settings"
+msgstr "默认OTR设置"
+
+#: ../gtk-ui.c:765
+msgid "OTR UI Options"
+msgstr "OTR界面选项"
+
+#: ../gtk-ui.c:788
+msgid "Screenname"
+msgstr "昵称"
+
+#: ../gtk-ui.c:789
+msgid "Status"
+msgstr "状态"
+
+#: ../gtk-ui.c:790
+msgid "Verified"
+msgstr "已认证"
+
+#: ../gtk-ui.c:791
+msgid "Fingerprint"
+msgstr "身份指纹"
+
+#: ../gtk-ui.c:792
+msgid "Account"
+msgstr "帐号"
+
+#: ../gtk-ui.c:828
+msgid "Start private connection"
+msgstr "启动私密连接"
+
+#: ../gtk-ui.c:836
+msgid "End private connection"
+msgstr "结束私密连接"
+
+#: ../gtk-ui.c:852
+msgid "Forget fingerprint"
+msgstr "忘记身份指纹"
+
+#: ../gtk-ui.c:903
+msgid "Config"
+msgstr "配置"
+
+#: ../gtk-ui.c:905
+msgid "Known fingerprints"
+msgstr "已知的身份指纹"
+
+#: ../gtk-ui.c:1003 ../otr-plugin.c:964
+msgid "OTR Settings"
+msgstr "OTR设置"
+
+#. Set the title
+#: ../gtk-ui.c:1021
+#, c-format
+msgid "OTR Settings for %s"
+msgstr "属于 %s 的OTR设置"
+
+#. Make the cascaded checkboxes
+#: ../gtk-ui.c:1038
+msgid "Use default OTR settings for this buddy"
+msgstr "对该好友采用默认的OTR设置"
+
+#: ../otr-plugin.c:125
+#, c-format
+msgid "You are not currently connected to account %s (%s)."
+msgstr "当前你没有连接到帐号 %s (%s)."
+
+#: ../otr-plugin.c:129
+msgid "Not connected"
+msgstr "未连接"
+
+#: ../otr-plugin.c:212 ../otr-plugin.c:254
+#, c-format
+msgid "Out of memory building filenames!\n"
+msgstr "创建文件名内存溢出!\n"
+
+#: ../otr-plugin.c:224 ../otr-plugin.c:260
+#, c-format
+msgid "Could not write private key file\n"
+msgstr "无法写密钥文件\n"
+
+#: ../otr-plugin.c:298
+#, c-format
+msgid "Unknown account %s (%s)."
+msgstr "未知帐号 %s (%s)."
+
+#: ../otr-plugin.c:302
+msgid "Unknown account"
+msgstr "未知帐号"
+
+#: ../otr-plugin.c:364
+msgid "Error occurred encrypting message."
+msgstr "在加密消息时出错."
+
+#: ../otr-plugin.c:368
+#, c-format
+msgid "You sent encrypted data to %s, who wasn't expecting it."
+msgstr "你向没有准备的 %s 发送了加密的消息."
+
+#: ../otr-plugin.c:374
+msgid "You transmitted an unreadable encrypted message."
+msgstr "你发送了一条不可读的加密消息."
+
+#: ../otr-plugin.c:377
+msgid "You transmitted a malformed data message."
+msgstr "你发送了一条异常的数据消息."
+
+#: ../otr-plugin.c:390
+msgid "[resent]"
+msgstr "[重新发送]"
+
+#: ../otr-plugin.c:459
+#, c-format
+msgid "You attempted to send an unencrypted message to %s"
+msgstr "你尝试向 %s 发送一条未加密的消息"
+
+#: ../otr-plugin.c:462
+msgid "Attempting to start a private conversation..."
+msgstr "尝试启动一个私密的对话..."
+
+#: ../otr-plugin.c:464
+msgid "OTR Policy Violation"
+msgstr "OTR策略侵犯"
+
+#: ../otr-plugin.c:465
+msgid ""
+"Unencrypted messages to this recipient are not allowed.  Attempting to start "
+"a private conversation.\n"
+"\n"
+"Your message will be retransmitted when the private conversation starts."
+msgstr ""
+"不允许向对方发送未加密的消息. 正尝试启动"
+"一个私密的对话.\n"
+"\n"
+"当私密对话启动后, 你的消息将会被重新发送."
+
+#: ../otr-plugin.c:474
+msgid ""
+"An error occurred when encrypting your message.  The message was not sent."
+msgstr "在消息加密过程中出错. 该消息未被发送."
+
+#: ../otr-plugin.c:476
+msgid "Error encrypting message"
+msgstr "在加密消息时出错"
+
+#: ../otr-plugin.c:477
+msgid "An error occurred when encrypting your message"
+msgstr "在加密你的消息时出错"
+
+#: ../otr-plugin.c:478
+msgid "The message was not sent."
+msgstr "该消息未被发送."
+
+#: ../otr-plugin.c:481
+#, c-format
+msgid "%s has already closed his/her private connection to you"
+msgstr "%s 已经关闭了与你的私密连接"
+
+#: ../otr-plugin.c:484
+msgid ""
+"Your message was not sent.  Either end your private conversation, or restart "
+"it."
+msgstr ""
+"你的消息没有被发送. 请结束你的当前私密对话,或重启"
+"该对话."
+
+#: ../otr-plugin.c:487
+msgid "Private connection closed"
+msgstr "私密连接关闭"
+
+#: ../otr-plugin.c:488
+msgid ""
+"Your message was not sent.  Either close your private connection to him, or "
+"refresh it."
+msgstr ""
+"你的消息没有被发送. 请关闭你与对方的私密连接,或"
+"刷新该连接."
+
+#: ../otr-plugin.c:498
+msgid "Error setting up private conversation: Malformed message received"
+msgstr "建立私密对话出错: 收到异常消息"
+
+#: ../otr-plugin.c:502
+#, c-format
+msgid "Error setting up private conversation: %s"
+msgstr "建立私密对话出错: %s"
+
+#: ../otr-plugin.c:509 ../otr-plugin.c:520 ../otr-plugin.c:547
+#: ../otr-plugin.c:555 ../otr-plugin.c:573
+msgid "OTR Error"
+msgstr "OTR出错"
+
+#: ../otr-plugin.c:516
+msgid ""
+"We are receiving our own OTR messages.  You are either trying to talk to "
+"yourself, or someone is reflecting your messages back at you."
+msgstr ""
+"收到了自己的OTR消息. 或者你正在与"
+"自己交谈, 或者有人正在把你的消息返送给你."
+
+#: ../otr-plugin.c:520
+msgid "We are receiving our own OTR messages."
+msgstr "正在接受自己的OTR消息"
+
+#: ../otr-plugin.c:521
+msgid ""
+"You are either trying to talk to yourself, or someone is reflecting your "
+"messages back at you."
+msgstr ""
+"或者你正在与自己交谈, 或者有人正在把你的消息"
+"返送给你."
+
+#: ../otr-plugin.c:526
+#, c-format
+msgid "<b>The last message to %s was resent.</b>"
+msgstr "<b>给 %s 的最后一条消息被重新发送.</b>"
+
+#: ../otr-plugin.c:530
+msgid "Message resent"
+msgstr "消息被重新发送"
+
+#: ../otr-plugin.c:534
+#, c-format
+msgid ""
+"<b>The encrypted message received from %s is unreadable, as you are not "
+"currently communicating privately.</b>"
+msgstr ""
+"<b>来自 %s 的加密消息不可读, 因为你们"
+"当前没有在私密地交流.</b>"
+
+#: ../otr-plugin.c:539
+msgid "Unreadable message"
+msgstr "不可读的消息"
+
+#: ../otr-plugin.c:543
+#, c-format
+msgid "We received an unreadable encrypted message from %s."
+msgstr "收到了一条来自 %s 的不可读的加密的消息."
+
+#: ../otr-plugin.c:551
+#, c-format
+msgid "We received a malformed data message from %s."
+msgstr "收到了一条来自 %s 的异常的数据消息."
+
+#: ../otr-plugin.c:559
+#, c-format
+msgid "Heartbeat received from %s.\n"
+msgstr "收到了来自 %s 的心跳消息.\n"
+
+#: ../otr-plugin.c:565
+#, c-format
+msgid "Heartbeat sent to %s.\n"
+msgstr "心跳消息已发送给 %s.\n"
+
+#: ../otr-plugin.c:576
+#, c-format
+msgid ""
+"<b>The following message received from %s was <i>not</i> encrypted: [</b>%"
+"s<b>]</b>"
+msgstr ""
+"<b>以下来自 %s 的消息 <i>没有</i> 被加密: [</b>%"
+"s<b>]</b>"
+
+#: ../otr-plugin.c:581
+msgid "Received unencrypted message"
+msgstr "收到未加密的消息"
+
+#: ../otr-plugin.c:587
+#, c-format
+msgid "Unrecognized OTR message received from %s.\n"
+msgstr "收到来自 %s 的无法识别的OTR消息.\n"
+
+#: ../otr-plugin.c:596
+#, c-format
+msgid ""
+"%s has sent a message intended for a different session. If you are logged in "
+"multiple times, another session may have received the message."
+msgstr ""
+"%s 已经向另一个不同的会话发送了一条消息. 如果你登录了"
+"多次, 另一个会话可能接收到了该消息."
+
+#: ../otr-plugin.c:602
+msgid "Received message for a different session"
+msgstr "收到了另一会话的消息"
+
+#. 2013-01-01
+#: ../otr-plugin.c:1193 ../otr-plugin.c:1220
+#, c-format
+msgid "OTR PLUGIN v%s"
+msgstr "OTR 插件 v%s"
+
+#: ../otr-plugin.c:1202
+#, c-format
+msgid ""
+"This beta copy of the Off-the-Record Messaging v%s Pidgin plugin has expired "
+"as of 2013-01-01. Please look for an updated release at http://otr."
+"cypherpunks.ca/"
+msgstr ""
+"这个 Off-the-Record Messaging v%s Pidgin 插件的测试版本已于"
+"2013-01-01过期. 请在 http://otr."
+"cypherpunks.ca/ 找到更新版本"
+
+#: ../otr-plugin.c:1229
+#, c-format
+msgid ""
+"You have enabled a beta version of the Off-the-Record Messaging v%s Pidgin "
+"plugin. This version is intended for testing purposes only and is not for "
+"general purpose use."
+msgstr ""
+"你正在使用一个 Off-the-Record Messaging v%s Pidgin "
+"插件的测试版本. 该版本只用于测试目的, 不适用于"
+"一般用途使用."
+
+#: ../otr-plugin.c:1414
+msgid "Off-the-Record Messaging"
+msgstr "Off-the-Record Messaging"
+
+#: ../otr-plugin.c:1415
+msgid "Provides private and secure conversations"
+msgstr "提供私密安全的对话"
+
+#: ../otr-plugin.c:1416
+msgid ""
+"Preserves the privacy of IM communications by providing encryption, "
+"authentication, deniability, and perfect forward secrecy."
+msgstr ""
+"通过加密来保护即时通信的隐私, "
+"认证, 可抵赖性, 和完美的正向安全."
+
+#: ../ui.c:110
+#, c-format
+msgid "Account %s (%s) could not be found"
+msgstr "无法找到帐号 %s (%s)"
+
+#: ../ui.c:114
+msgid "Account not found"
+msgstr "无法找到帐号"
diff --git a/tooltipmenu.c b/tooltipmenu.c
index fb5f901..75b5e6f 100644
--- a/tooltipmenu.c
+++ b/tooltipmenu.c
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
- *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+ *                           Chris Alexander, Willy Lew,
+ *                           Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 /* This file is based on a copy of gtkkmenutray.c  */
@@ -52,8 +53,8 @@
  * Enums
  *****************************************************************************/
 enum {
-        PROP_ZERO = 0,
-        PROP_BOX
+	PROP_ZERO = 0,
+	PROP_BOX
 };
 
 /******************************************************************************
@@ -87,69 +88,69 @@ tooltip_menu_deselect(GtkItem *item) {
  *****************************************************************************/
 static void
 tooltip_menu_get_property(GObject *obj, guint param_id, GValue *value,
-                                                                GParamSpec *pspec)
+								GParamSpec *pspec)
 {
-        TooltipMenu *tooltip_menu = TOOLTIP_MENU(obj);
-
-        switch(param_id) {
-                case PROP_BOX:
-                        g_value_set_object(value, tooltip_menu_get_box(tooltip_menu));
-                        break;
-                default:
-                        G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
-                        break;
-        }
+	TooltipMenu *tooltip_menu = TOOLTIP_MENU(obj);
+
+	switch(param_id) {
+		case PROP_BOX:
+			g_value_set_object(value, tooltip_menu_get_box(tooltip_menu));
+			break;
+		default:
+			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
+			break;
+	}
 }
 
 static void
 tooltip_menu_finalize(GObject *obj) {
 #if 0
-        /* This _might_ be leaking, but I have a sneaking suspicion that the widget is
-         * getting destroyed in GtkContainer's finalize function.  But if were are
-         * leaking here, be sure to figure out why this causes a crash.
-         *      -- Gary
-         */
-        TooltipMenu *tray = TOOLTIP_MENU(obj);
-
-        if(GTK_IS_WIDGET(tray->tray))
-                gtk_widget_destroy(GTK_WIDGET(tray->tray));
+	/* This _might_ be leaking, but I have a sneaking suspicion that the widget is
+	 * getting destroyed in GtkContainer's finalize function.  But if were are
+	 * leaking here, be sure to figure out why this causes a crash.
+	 *      -- Gary
+	 */
+	TooltipMenu *tray = TOOLTIP_MENU(obj);
+
+	if(GTK_IS_WIDGET(tray->tray))
+		gtk_widget_destroy(GTK_WIDGET(tray->tray));
 #endif
 
-        G_OBJECT_CLASS(parent_class)->finalize(obj);
+	G_OBJECT_CLASS(parent_class)->finalize(obj);
 }
 
 static void
 tooltip_menu_class_init(TooltipMenuClass *klass) {
-        GObjectClass *object_class = G_OBJECT_CLASS(klass);
-        GParamSpec *pspec;
+	GObjectClass *object_class = G_OBJECT_CLASS(klass);
+	GParamSpec *pspec;
 
-        parent_class = g_type_class_peek_parent(klass);
+	parent_class = g_type_class_peek_parent(klass);
 
-        object_class->finalize = tooltip_menu_finalize;
-        object_class->get_property = tooltip_menu_get_property;
+	object_class->finalize = tooltip_menu_finalize;
+	object_class->get_property = tooltip_menu_get_property;
 
-        pspec = g_param_spec_object("box", "The box",
+	pspec = g_param_spec_object("box", "The box",
 		"The box",
 		GTK_TYPE_BOX,
 		G_PARAM_READABLE);
-        g_object_class_install_property(object_class, PROP_BOX, pspec);
+	g_object_class_install_property(object_class, PROP_BOX, pspec);
 }
 
 static void
 tooltip_menu_init(TooltipMenu *tooltip_menu) {
-        GtkWidget *widget = GTK_WIDGET(tooltip_menu);
-        gtk_menu_item_set_right_justified(GTK_MENU_ITEM(tooltip_menu), TRUE);
+	GtkWidget *widget = GTK_WIDGET(tooltip_menu);
+	gtk_menu_item_set_right_justified(GTK_MENU_ITEM(tooltip_menu), TRUE);
 
-        if(!GTK_IS_WIDGET(tooltip_menu->tray))
-                tooltip_menu->tray = gtk_hbox_new(FALSE, 0);
+	if(!GTK_IS_WIDGET(tooltip_menu->tray))
+		tooltip_menu->tray = gtk_hbox_new(FALSE, 0);
 
-        tooltip_menu->tooltips = gtk_tooltips_new();
+	tooltip_menu->tooltips = gtk_tooltips_new();
 
-        gtk_widget_set_size_request(widget, -1, -1);
+	gtk_widget_set_size_request(widget, -1, -1);
 
-        gtk_container_add(GTK_CONTAINER(tooltip_menu), tooltip_menu->tray);
+	gtk_container_add(GTK_CONTAINER(tooltip_menu), tooltip_menu->tray);
 
-        gtk_widget_show(tooltip_menu->tray);
+	gtk_widget_show(tooltip_menu->tray);
 }
 
 /******************************************************************************
@@ -157,96 +158,96 @@ tooltip_menu_init(TooltipMenu *tooltip_menu) {
  *****************************************************************************/
 GType
 tooltip_menu_get_gtype(void) {
-        static GType type = 0;
-
-        if(type == 0) {
-                static const GTypeInfo info = {
-                        sizeof(TooltipMenuClass),
-                        NULL,
-                        NULL,
-                        (GClassInitFunc)tooltip_menu_class_init,
-                        NULL,
-                        NULL,
-                        sizeof(TooltipMenu),
-                        0,
-                        (GInstanceInitFunc)tooltip_menu_init,
-                        NULL
-                };
-
-                type = g_type_register_static(GTK_TYPE_MENU_ITEM,
-                                                                          "TooltipMenu",
-                                                                          &info, 0);
-        }
-
-        return type;
+	static GType type = 0;
+
+	if(type == 0) {
+		static const GTypeInfo info = {
+			sizeof(TooltipMenuClass),
+			NULL,
+			NULL,
+			(GClassInitFunc)tooltip_menu_class_init,
+			NULL,
+			NULL,
+			sizeof(TooltipMenu),
+			0,
+			(GInstanceInitFunc)tooltip_menu_init,
+			NULL
+		};
+
+		type = g_type_register_static(GTK_TYPE_MENU_ITEM,
+									  "TooltipMenu",
+									  &info, 0);
+	}
+
+	return type;
 }
 
 GtkWidget *
 tooltip_menu_new() {
-        return g_object_new(TYPE_TOOLTIP_MENU, NULL);
+	return g_object_new(TYPE_TOOLTIP_MENU, NULL);
 }
 
 GtkWidget *
 tooltip_menu_get_box(TooltipMenu *tooltip_menu) {
-        g_return_val_if_fail(IS_TOOLTIP_MENU(tooltip_menu), NULL);
-        return tooltip_menu->tray;
+	g_return_val_if_fail(IS_TOOLTIP_MENU(tooltip_menu), NULL);
+	return tooltip_menu->tray;
 }
 
 static void
 tooltip_menu_add(TooltipMenu *tooltip_menu, GtkWidget *widget,
-                                           const char *tooltip, gboolean prepend)
+					   const char *tooltip, gboolean prepend)
 {
-        g_return_if_fail(IS_TOOLTIP_MENU(tooltip_menu));
-        g_return_if_fail(GTK_IS_WIDGET(widget));
+	g_return_if_fail(IS_TOOLTIP_MENU(tooltip_menu));
+	g_return_if_fail(GTK_IS_WIDGET(widget));
 
-        if (GTK_WIDGET_NO_WINDOW(widget))
-        {
-                GtkWidget *event;
+	if (GTK_WIDGET_NO_WINDOW(widget))
+	{
+		GtkWidget *event;
 
-                event = gtk_event_box_new();
-                gtk_container_add(GTK_CONTAINER(event), widget);
-                gtk_widget_show(event);
-                widget = event;
-        }
+		event = gtk_event_box_new();
+		gtk_container_add(GTK_CONTAINER(event), widget);
+		gtk_widget_show(event);
+		widget = event;
+	}
 
-        tooltip_menu_set_tooltip(tooltip_menu, widget, tooltip);
+	tooltip_menu_set_tooltip(tooltip_menu, widget, tooltip);
 
-        if (prepend)
-                gtk_box_pack_start(GTK_BOX(tooltip_menu->tray), widget, FALSE, FALSE, 0);
-        else
-                gtk_box_pack_end(GTK_BOX(tooltip_menu->tray), widget, FALSE, FALSE, 0);
+	if (prepend)
+		gtk_box_pack_start(GTK_BOX(tooltip_menu->tray), widget, FALSE, FALSE, 0);
+	else
+		gtk_box_pack_end(GTK_BOX(tooltip_menu->tray), widget, FALSE, FALSE, 0);
 }
 
 void
 tooltip_menu_append(TooltipMenu *tooltip_menu, GtkWidget *widget, const char *tooltip)
 {
-        tooltip_menu_add(tooltip_menu, widget, tooltip, FALSE);
+	tooltip_menu_add(tooltip_menu, widget, tooltip, FALSE);
 }
 
 void
 tooltip_menu_prepend(TooltipMenu *tooltip_menu, GtkWidget *widget, const char *tooltip)
 {
-        tooltip_menu_add(tooltip_menu, widget, tooltip, TRUE);
+	tooltip_menu_add(tooltip_menu, widget, tooltip, TRUE);
 }
 
 void
 tooltip_menu_set_tooltip(TooltipMenu *tooltip_menu, GtkWidget *widget, const char *tooltip)
 {
-        if (!tooltip_menu->tooltips)
-                return;
-
-        /* Should we check whether widget is a child of tooltip_menu? */
-
-        /*
-         * If the widget does not have it's own window, then it
-         * must have automatically been added to an event box
-         * when it was added to the menu tray.  If this is the
-         * case, we want to set the tooltip on the widget's parent,
-         * not on the widget itself.
-         */
-        if (GTK_WIDGET_NO_WINDOW(widget))
-                widget = widget->parent;
-
-        gtk_tooltips_set_tip(tooltip_menu->tooltips, widget, tooltip, NULL);
+	if (!tooltip_menu->tooltips)
+		return;
+
+	/* Should we check whether widget is a child of tooltip_menu? */
+
+	/*
+	 * If the widget does not have it's own window, then it
+	 * must have automatically been added to an event box
+	 * when it was added to the menu tray.  If this is the
+	 * case, we want to set the tooltip on the widget's parent,
+	 * not on the widget itself.
+	 */
+	if (GTK_WIDGET_NO_WINDOW(widget))
+		widget = widget->parent;
+
+	gtk_tooltips_set_tip(tooltip_menu->tooltips, widget, tooltip, NULL);
 }
 
diff --git a/tooltipmenu.h b/tooltipmenu.h
index 28beec1..1d21774 100644
--- a/tooltipmenu.h
+++ b/tooltipmenu.h
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
- *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+ *                           Chris Alexander, Willy Lew,
+ *                           Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 /* This file is based on a copy of gtkkmenutray.h  */
@@ -56,13 +57,13 @@ typedef struct _TooltipMenu                          TooltipMenu;
 typedef struct _TooltipMenuClass             TooltipMenuClass;
 
 struct _TooltipMenu {
-        GtkMenuItem gparent;                                    /**< The parent instance */
-        GtkWidget *tray;                                                /**< The tray */
-        GtkTooltips *tooltips;                                  /**< Tooltips */
+	GtkMenuItem gparent;                                    /**< The parent instance */
+	GtkWidget *tray;                                                /**< The tray */
+	GtkTooltips *tooltips;                                  /**< Tooltips */
 };
 
 struct _TooltipMenuClass {
-        GtkMenuItemClass gparent;                               /**< The parent class */
+	GtkMenuItemClass gparent;                               /**< The parent class */
 };
 
 G_BEGIN_DECLS
diff --git a/ui.c b/ui.c
index 5ee5a58..d47ab1e 100644
--- a/ui.c
+++ b/ui.c
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
- *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+ *                           Chris Alexander, Willy Lew,
+ *                           Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 /* config.h */
@@ -98,52 +99,59 @@ void otrg_ui_connect_connection(ConnContext *context)
     /* Send an OTR Query to the other side. */
     PurpleAccount *account;
     char *msg;
-	
+
     /* Don't do this if we're already ENCRYPTED */
     if (context == NULL || context->msgstate == OTRL_MSGSTATE_ENCRYPTED)
 	return;
-	
+
     account = purple_accounts_find(context->accountname, context->protocol);
     if (!account) {
 	PurplePlugin *p = purple_find_prpl(context->protocol);
 	msg = g_strdup_printf(_("Account %s (%s) could not be found"),
-		  context->accountname,
-		  (p && p->info->name) ? p->info->name : _("Unknown"));
+		context->accountname,
+		(p && p->info->name) ? p->info->name : _("Unknown"));
 	otrg_dialog_notify_error(context->accountname, context->protocol,
 		context->username, _("Account not found"), msg, NULL);
 	g_free(msg);
 	return;
     }
-    otrg_plugin_send_default_query(context, account);	
+    otrg_plugin_send_default_query(context, account);
 }
 
 /* Drop a context to PLAINTEXT state */
 void otrg_ui_disconnect_connection(ConnContext *context)
 {
-    /* Don't do anything with PLAINTEXT fingerprints */
-    if (context == NULL || context->msgstate == OTRL_MSGSTATE_PLAINTEXT)
+
+    if (context == NULL)
 	return;
-		
+
     otrg_plugin_disconnect(context);
-    otrg_dialog_disconnected(context);	
+    otrg_dialog_disconnected(context);
 }
 
 /* Forget a fingerprint */
 void otrg_ui_forget_fingerprint(Fingerprint *fingerprint)
 {
     ConnContext *context;
-	
+    ConnContext *context_iter;
+
     if (fingerprint == NULL) return;
 
     /* Don't do anything with the active fingerprint if we're in the
      * ENCRYPTED state. */
     context = fingerprint->context;
-    if (context->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
-	    context->active_fingerprint == fingerprint) return;
-	
+
+    for (context_iter = context->m_context;
+	    context_iter && context_iter->m_context == context->m_context;
+	    context_iter = context_iter->next) {
+
+	if (context_iter->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
+		context_iter->active_fingerprint == fingerprint) return;
+    }
+
     otrl_context_forget_fingerprint(fingerprint, 1);
     otrg_plugin_write_fingerprints();
-	
+
     otrg_ui_update_keylist();
 }
 
@@ -163,7 +171,7 @@ void otrg_ui_get_prefs(OtrgUiPrefs *prefsp, PurpleAccount *account,
     const char *proto = purple_account_get_protocol_id(account);
     if (!otrg_plugin_proto_supports_otr(proto)) {
 	prefsp->policy = OTRL_POLICY_NEVER;
-	prefsp->avoid_logging_otr = FALSE;
+	prefsp->avoid_logging_otr = TRUE;
 	prefsp->show_otr_button = FALSE;
 	return;
     }
@@ -174,6 +182,6 @@ void otrg_ui_get_prefs(OtrgUiPrefs *prefsp, PurpleAccount *account,
     }
     /* If we've got no other way to get the prefs, use sensible defaults */
     prefsp->policy = OTRL_POLICY_DEFAULT;
-    prefsp->avoid_logging_otr = FALSE;
+    prefsp->avoid_logging_otr = TRUE;
     prefsp->show_otr_button = FALSE;
 }
diff --git a/ui.h b/ui.h
index 328a6ac..26ec09a 100644
--- a/ui.h
+++ b/ui.h
@@ -1,7 +1,8 @@
 /*
  *  Off-the-Record Messaging plugin for pidgin
- *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
- *                           Chris Alexander, Nikita Borisov
+ *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
+ *                           Chris Alexander, Willy Lew,
+ *                           Nikita Borisov
  *                           <otr at cypherpunks.ca>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
  *
  *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef __OTRG_UI_H__

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-otr/packages/irssi-plugin-otr.git



More information about the Pkg-otr-team mailing list