From 77cd0f33106d36b0da4b3b2e4ad0b8b9160a866c Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Sat, 9 Mar 2013 17:49:22 +0100
Subject: [PATCH] GPG -> OpenPGP. Fixes #7312

---
 src/chat_control.py                           | 29 ++++++++++---------
 src/command_system/implementation/standard.py |  2 +-
 src/dialogs.py                                | 18 ++++++------
 src/features_window.py                        |  4 +--
 src/gui_interface.py                          | 23 ++++++++-------
 src/roster_window.py                          |  2 +-
 6 files changed, 40 insertions(+), 38 deletions(-)

diff --git a/src/chat_control.py b/src/chat_control.py
index 2b17c76c14..d710c7101a 100644
--- a/src/chat_control.py
+++ b/src/chat_control.py
@@ -1644,7 +1644,7 @@ class ChatControl(ChatControlBase):
         gajim.connections[self.account].USE_GPG:
             self.gpg_is_active = True
             gajim.encrypted_chats[self.account].append(contact.jid)
-            msg = _('GPG encryption enabled')
+            msg = _('OpenPGP encryption enabled')
             ChatControlBase.print_conversation_line(self, msg, 'status', '',
                 None)
 
@@ -1652,8 +1652,9 @@ class ChatControl(ChatControlBase):
                 self.session.loggable = gajim.config.get_per('accounts',
                     self.account, 'log_encrypted_sessions')
             # GPG is always authenticated as we use GPG's WoT
-            self._show_lock_image(self.gpg_is_active, 'GPG', self.gpg_is_active,
-                self.session and self.session.is_loggable(), True)
+            self._show_lock_image(self.gpg_is_active, 'OpenPGP',
+                self.gpg_is_active, self.session and self.session.is_loggable()
+                True)
 
         self.update_ui()
         # restore previous conversation
@@ -2186,9 +2187,9 @@ class ChatControl(ChatControlBase):
 
     def _toggle_gpg(self):
         if not self.gpg_is_active and not self.contact.keyID:
-            dialogs.ErrorDialog(_('No GPG key assigned'),
-                    _('No GPG key is assigned to this contact. So you cannot '
-                            'encrypt messages with GPG.'))
+            dialogs.ErrorDialog(_('No OpenPGP key assigned'),
+                _('No OpenPGP key is assigned to this contact. So you cannot '
+                'encrypt messages with OpenPGP.'))
             return
         ec = gajim.encrypted_chats[self.account]
         if self.gpg_is_active:
@@ -2196,9 +2197,9 @@ class ChatControl(ChatControlBase):
             ec.remove(self.contact.jid)
             self.gpg_is_active = False
             loggable = False
-            msg = _('GPG encryption disabled')
-            ChatControlBase.print_conversation_line(self, msg,
-                    'status', '', None)
+            msg = _('OpenPGP encryption disabled')
+            ChatControlBase.print_conversation_line(self, msg, 'status', '',
+                None)
             if self.session:
                 self.session.loggable = True
 
@@ -2206,12 +2207,12 @@ class ChatControl(ChatControlBase):
             # Enable encryption
             ec.append(self.contact.jid)
             self.gpg_is_active = True
-            msg = _('GPG encryption enabled')
-            ChatControlBase.print_conversation_line(self, msg,
-                    'status', '', None)
+            msg = _('OpenPGP encryption enabled')
+            ChatControlBase.print_conversation_line(self, msg, 'status', '',
+                None)
 
             loggable = gajim.config.get_per('accounts', self.account,
-                    'log_encrypted_sessions')
+                'log_encrypted_sessions')
 
             if self.session:
                 self.session.loggable = loggable
@@ -2232,7 +2233,7 @@ class ChatControl(ChatControlBase):
         gajim.config.set_per('contacts', self.contact.jid,
                 'gpg_enabled', self.gpg_is_active)
 
-        self._show_lock_image(self.gpg_is_active, 'GPG',
+        self._show_lock_image(self.gpg_is_active, 'OpenPGP',
                 self.gpg_is_active, loggable, True)
 
     def _show_lock_image(self, visible, enc_type='', enc_enabled=False,
diff --git a/src/command_system/implementation/standard.py b/src/command_system/implementation/standard.py
index 7bdf960966..f6ba1585e8 100644
--- a/src/command_system/implementation/standard.py
+++ b/src/command_system/implementation/standard.py
@@ -186,7 +186,7 @@ class StandardCommonChatCommands(CommandContainer):
         self.conv_textview.clear()
 
     @command
-    @doc(_("Toggle the GPG encryption"))
+    @doc(_("Toggle the OpenPGP encryption"))
     def gpg(self):
         self._toggle_gpg()
 
diff --git a/src/dialogs.py b/src/dialogs.py
index 48d32af3bf..b6261a87b3 100644
--- a/src/dialogs.py
+++ b/src/dialogs.py
@@ -5087,26 +5087,26 @@ class GPGInfoWindow:
         if keyID.endswith('MISMATCH'):
             verification_status = _('''Contact's identity NOT verified''')
             info = _('The contact\'s key (%s) <b>does not match</b> the key '
-                             'assigned in Gajim.') % keyID[:8]
+                'assigned in Gajim.') % keyID[:8]
             image = 'gajim-security_low'
         elif not keyID:
             # No key assigned nor a key is used by remote contact
-            verification_status = _('No GPG key assigned')
-            info = _('No GPG key is assigned to this contact. So you cannot '
-                             'encrypt messages.')
+            verification_status = _('No OpenPGP key assigned')
+            info = _('No OpenPGP key is assigned to this contact. So you cannot'
+                ' encrypt messages.')
             image = 'gajim-security_low'
         else:
             error = gajim.connections[account].gpg.encrypt('test', [keyID])[1]
             if error:
                 verification_status = _('''Contact's identity NOT verified''')
-                info = _('GPG key is assigned to this contact, but <b>you do not '
-                    'trust his key</b>, so message <b>cannot</b> be encrypted. Use '
-                    'your GPG client to trust this key.')
+                info = _('OpenPGP key is assigned to this contact, but <b>you '
+                    'do not trust his key</b>, so message <b>cannot</b> be '
+                    'encrypted. Use your OpenPGP client to trust this key.')
                 image = 'gajim-security_low'
             else:
                 verification_status = _('''Contact's identity verified''')
-                info = _('GPG Key is assigned to this contact, and you trust his '
-                    'key, so messages will be encrypted.')
+                info = _('OpenPGP Key is assigned to this contact, and you '
+                    'trust his key, so messages will be encrypted.')
                 image = 'gajim-security_high'
 
         status_label.set_markup('<b><span size="x-large">%s</span></b>' % \
diff --git a/src/features_window.py b/src/features_window.py
index 0894cca610..7ad21057bd 100644
--- a/src/features_window.py
+++ b/src/features_window.py
@@ -59,8 +59,8 @@ class FeaturesWindow:
                 _('A script to control Gajim via commandline.'),
                 _('Requires python-dbus.'),
                 _('Feature not available under Windows.')),
-            _('OpenGPG message encryption'): (self.gpg_available,
-                _('Encrypting chat messages with gpg keys.'),
+            _('OpenPGP message encryption'): (self.gpg_available,
+                _('Encrypting chat messages with OpenPGP keys.'),
                 _('Requires gpg and python-gnupg (http://code.google.com/p/python-gnupg/).'),
                 _('Requires gpg.exe in PATH.')),
             _('Network-manager'): (self.network_manager_available,
diff --git a/src/gui_interface.py b/src/gui_interface.py
index b16c178e8d..2d0ffa4b88 100644
--- a/src/gui_interface.py
+++ b/src/gui_interface.py
@@ -654,8 +654,9 @@ class Interface:
     def handle_event_bad_gpg_passphrase(self, obj):
         #('BAD_PASSPHRASE', account, ())
         if obj.use_gpg_agent:
-            sectext = _('You configured Gajim to use GPG agent, but there is no'
-                ' GPG agent running or it returned a wrong passphrase.\n')
+            sectext = _('You configured Gajim to use OpenPGP agent, but there '
+                'is no OpenPGP agent running or it returned a wrong passphrase.'
+                '\n')
             sectext += _('You are currently connected without your OpenPGP '
                 'key.')
             dialogs.WarningDialog(_('Your passphrase is incorrect'), sectext)
@@ -663,7 +664,7 @@ class Interface:
             path = gtkgui_helpers.get_icon_path('gajim-warning', 48)
             account = obj.conn.name
             notify.popup('warning', account, account, 'warning', path,
-                _('OpenGPG Passphrase Incorrect'),
+                _('OpenPGP Passphrase Incorrect'),
                 _('You are currently connected without your OpenPGP key.'))
         self.forget_gpg_passphrase(obj.keyID)
 
@@ -699,9 +700,9 @@ class Interface:
         def on_no():
             obj.callback(False)
 
-        dialogs.YesNoDialog(_('GPG key not trusted'), _('The GPG key used to '
-            'encrypt this chat is not trusted. Do you really want to encrypt '
-            'this message?'), checktext=_('_Do not ask me again'),
+        dialogs.YesNoDialog(_('OpenPGP key not trusted'), _('The OpenPGP key '
+            'used to encrypt this chat is not trusted. Do you really want to '
+            'encrypt this message?'), checktext=_('_Do not ask me again'),
             on_response_yes=on_yes, on_response_no=on_no)
 
     def handle_event_password_required(self, obj):
@@ -3006,7 +3007,7 @@ class PassphraseRequest:
 
     def create_dialog(self, account):
         title = _('Passphrase Required')
-        second = _('Enter GPG key passphrase for key %(keyid)s (account '
+        second = _('Enter OpenPGP key passphrase for key %(keyid)s (account '
             '%(account)s).') % {'keyid': self.keyid, 'account': account}
 
         def _cancel():
@@ -3020,9 +3021,9 @@ class PassphraseRequest:
                 self.complete(passphrase)
                 return
             elif result == 'expired':
-                dialogs.ErrorDialog(_('GPG key expired'),
-                    _('Your GPG key has expired, you will be connected to %s '
-                    'without OpenPGP.') % account)
+                dialogs.ErrorDialog(_('OpenPGP key expired'),
+                    _('Your OpenPGP key has expired, you will be connected to '
+                    '%s without OpenPGP.') % account)
                 # Don't try to connect with GPG
                 gajim.connections[account].continue_connect_info[2] = False
                 self.complete(None)
@@ -3031,7 +3032,7 @@ class PassphraseRequest:
             if count < 3:
                 # ask again
                 dialogs.PassphraseDialog(_('Wrong Passphrase'),
-                    _('Please retype your GPG passphrase or press Cancel.'),
+                    _('Please retype your OpenPGP passphrase or press Cancel.'),
                     ok_handler=(_ok, count + 1), cancel_handler=_cancel)
             else:
                 # user failed 3 times, continue without GPG
diff --git a/src/roster_window.py b/src/roster_window.py
index fb0170a153..aedcbef55b 100644
--- a/src/roster_window.py
+++ b/src/roster_window.py
@@ -2117,7 +2117,7 @@ class RosterWindow:
 
                 keyid = gajim.config.get_per('accounts', account, 'keyid')
                 if keyid and not gajim.connections[account].gpg:
-                    dialogs.WarningDialog(_('GPG is not usable'),
+                    dialogs.WarningDialog(_('OpenPGP is not usable'),
                         _('You will be connected to %s without OpenPGP.') % \
                         account)
 
-- 
GitLab