Mercurial > libervia-web
changeset 523:5add182e7dd5
browser_side (plugin OTR): rename menus and replace 'buddy' with 'correspondent'
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 03 Sep 2014 11:04:29 +0200 |
parents | 0de69fec24e9 |
children | d41e850b31b9 |
files | src/browser/sat_browser/otrjs_wrapper.py src/browser/sat_browser/plugin_sec_otr.py |
diffstat | 2 files changed, 18 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/browser/sat_browser/otrjs_wrapper.py Tue Sep 02 21:28:42 2014 +0200 +++ b/src/browser/sat_browser/otrjs_wrapper.py Wed Sep 03 11:04:29 2014 +0200 @@ -155,7 +155,7 @@ def smpAuthAbort(self, act=None): # XXX: dirty hack to let the triggered method know who aborted the # authentication. We need it to display the proper feedback and, - # if the buddy aborted, set the conversation 'unverified'. + # if the correspondent aborted, set the conversation 'unverified'. self.otr.sm.init() JS("""self.otr.sm.sendMsg(OTR.HLP.packTLV(6, ''))""") self.smpAuthCb('abort', '', act)
--- a/src/browser/sat_browser/plugin_sec_otr.py Tue Sep 02 21:28:42 2014 +0200 +++ b/src/browser/sat_browser/plugin_sec_otr.py Wed Sep 03 11:04:29 2014 +0200 @@ -35,12 +35,12 @@ NS_OTR = "otr_plugin" PRIVATE_KEY = "PRIVATE KEY" -MAIN_MENU = D_('OTR') +MAIN_MENU = D_('OTR encryption') DIALOG_EOL = "<br />" -AUTH_INFO_TXT = D_("Authenticating a buddy helps ensure that the person you are talking to is who he or she claims to be.{eol}{eol}").format(eol=DIALOG_EOL) -AUTH_FINGERPRINT_TXT = D_("<i>To verify the fingerprint, contact your buddy via some other authenticated channel (i.e. not in this chat), such as the telephone or GPG-signed email. Each of you should tell your fingerprint to the other.</i>{eol}{eol}").format(eol=DIALOG_EOL) -AUTH_QUEST_DEF = D_("<i>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.</i>{eol}{eol}").format(eol=DIALOG_EOL) -AUTH_QUEST_ASK = D_("<i>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.</i>{eol}{eol}").format(eol=DIALOG_EOL) +AUTH_INFO_TXT = D_("Authenticating a correspondent helps ensure that the person you are talking to is who he or she claims to be.{eol}{eol}").format(eol=DIALOG_EOL) +AUTH_FINGERPRINT_TXT = D_("<i>To verify the fingerprint, contact your correspondent via some other authenticated channel (i.e. not in this chat), such as the telephone or GPG-signed email. Each of you should tell your fingerprint to the other.</i>{eol}{eol}").format(eol=DIALOG_EOL) +AUTH_QUEST_DEF = D_("<i>To authenticate using a question, pick a question whose answer is known only to you and your correspondent. Enter this question and this answer, then wait for your correspondent to enter the answer too. If the answers don't match, then you may be talking to an imposter.</i>{eol}{eol}").format(eol=DIALOG_EOL) +AUTH_QUEST_ASK = D_("<i>Your correspondent is attempting to determine if he or she is really talking to you, or if it's someone pretending to be you. Your correspondent has asked a question, indicated below. To authenticate to your correspondent, enter the answer and click OK.</i>{eol}{eol}").format(eol=DIALOG_EOL) AUTH_SECRET_TXT = D_("{eol}{eol}Enter secret answer here: (case sensitive){eol}").format(eol=DIALOG_EOL) @@ -60,7 +60,7 @@ @param host (satWebFrontend) @param account (Account) - @param other_jid (JID): JID of the person your chat buddy + @param other_jid (JID): JID of the person your chat correspondent """ super(Context, self).__init__(account, other_jid) self.host = host @@ -140,7 +140,7 @@ if act == "asked": msg = _("Authentication successful.") else: - msg = _("Your buddy has successfully authenticated you. You may want to authenticate your buddy as well by asking your own question.") + msg = _("Your correspondent has successfully authenticated you. You may want to authenticate your correspondent as well by asking your own question.") else: msg = _("Authentication failed.") dialog.InfoDialog(title, msg).show() @@ -192,10 +192,10 @@ elif type_ == 'abort': act = 'asked' # smpAuthAbort triggers this method with act='answered' when needed - # FIXME upstream: if buddy uses Pidgin and use fingerprint to authenticate us, - # we will reach this code... that's wrong, this method is for SMP! There's - # probably a bug to fix in otr.js. Do it together with the issue that make - # us need the dirty self.smpAuthAbort. + # FIXME upstream: if the correspondent uses Pidgin and authenticate us via + # fingerprints, we will reach this code... that's wrong, this method is for SMP! + # There's probably a bug to fix in otr.js. Do it together with the issue that + # make us need the dirty self.smpAuthAbort. else: log.error("FIXME: unmanaged ambiguous 'act' value in Context.smpAuthCb!") title = (_("Authentication of {jid}") if act == "asked" else _("Authentication to {jid}")).format(jid=self.peer.full()) @@ -213,7 +213,7 @@ self.smpAuthAbort('answered') return self.smpAuthSecret(answer) - text = AUTH_INFO_TXT + AUTH_QUEST_ASK + _("This is the question asked by your buddy:{eol}{question}").format(eol=DIALOG_EOL, question=data) + text = AUTH_INFO_TXT + AUTH_QUEST_ASK + _("This is the question asked by your correspondent:{eol}{question}").format(eol=DIALOG_EOL, question=data) dialog.PromptDialog(cb, text + AUTH_SECRET_TXT, title=title).show() elif type_ == 'trust': self.setCurrentTrust('smp' if data else '', act) @@ -283,10 +283,10 @@ def extraMenus(self): # FIXME: handle help strings too - return [(self._startRefresh, C.MENU_SINGLE, (MAIN_MENU, "Start/Refresh"), (MAIN_MENU, D_("Start/Refresh"))), - (self._endSession, C.MENU_SINGLE, (MAIN_MENU, "End session"), (MAIN_MENU, D_("End session"))), - (self._authenticate, C.MENU_SINGLE, (MAIN_MENU, "Authenticate buddy"), (MAIN_MENU, D_("Authenticate buddy"))), - (self._dropPrivkey, C.MENU_SINGLE, (MAIN_MENU, "Drop private key"), (MAIN_MENU, D_("Drop private key")))] + return [(self._startRefresh, C.MENU_SINGLE, (MAIN_MENU, "Start / refresh"), (MAIN_MENU, D_("Start / refresh"))), + (self._endSession, C.MENU_SINGLE, (MAIN_MENU, "Stop encryption"), (MAIN_MENU, D_("Stop encryption"))), + (self._authenticate, C.MENU_SINGLE, (MAIN_MENU, "Authenticate correspondent"), (MAIN_MENU, D_("Authenticate correspondent"))), + (self._dropPrivkey, C.MENU_SINGLE, (MAIN_MENU, "Drop your private key"), (MAIN_MENU, D_("Drop your private key")))] def profileConnected(self): self.host.bridge.call('skipOTR', None) @@ -382,7 +382,7 @@ elif otr_version == otr.context.OTR_VERSION_3: otrctx.smpAuthCb('question', None, 'asked') else: - dialog.InfoDialog(_("No running session"), _("You must start a private conversation before authenticating your buddy.")).show() + dialog.InfoDialog(_("No running session"), _("You must start a private conversation before authenticating your correspondent.")).show() try: to_jid = menu_data['jid']