make back strings translatable

This commit is contained in:
Yann Leboulanger 2008-08-04 08:07:07 +00:00
parent 186c5d4bce
commit 2b896152a2
2 changed files with 5 additions and 2 deletions

View File

@ -1084,7 +1084,8 @@ class Connection(ConnectionHandlers):
lang = os.getenv('LANG') lang = os.getenv('LANG')
if lang is not None and lang != 'en': # we're not english if lang is not None and lang != 'en': # we're not english
# one in locale and one en # one in locale and one en
msgtxt = _(msgtxt) + ' (' + msgtxt + ')' msgtxt = _('[This message is *encrypted* (See :XEP:`27`]') + \
' (' + msgtxt + ')'
else: else:
# Encryption failed, do not send message # Encryption failed, do not send message
tim = localtime() tim = localtime()

View File

@ -254,7 +254,9 @@ class EncryptedStanzaSession(StanzaSession):
'If you see this message, something went wrong.]' 'If you see this message, something went wrong.]'
lang = os.getenv('LANG') lang = os.getenv('LANG')
if lang is not None and lang != 'en': # we're not english if lang is not None and lang != 'en': # we're not english
msgtxt = _(msgtxt) + ' (' + msgtxt + ')' msgtxt = _('[This message is part of an encrypted session. '
'If you see this message, something went wrong.]') + ' (' + \
msgtxt + ')'
stanza.setBody(msgtxt) stanza.setBody(msgtxt)
return stanza return stanza