Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Shkenev
gajim
Commits
949c1053
Commit
949c1053
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
if we are english dont duplicate gpg strings
parent
7877b5c2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/connection.py
+5
-2
5 additions, 2 deletions
src/common/connection.py
src/tabbed_chat_window.py
+11
-6
11 additions, 6 deletions
src/tabbed_chat_window.py
with
16 additions
and
8 deletions
src/common/connection.py
+
5
−
2
View file @
949c1053
...
...
@@ -853,8 +853,11 @@ def send_message(self, jid, msg, keyID, type = 'chat', subject=''):
#encrypt
msgenc
=
self
.
gpg
.
encrypt
(
msg
,
[
keyID
])
if
msgenc
:
msgtxt
=
_
(
'
[This message is encrypted]
'
)
+
\
'
[This message is encrypted]
'
# once translated and once english
msgtxt
=
'
[This message is encrypted]
'
lang
=
os
.
getenv
(
'
LANG
'
)
if
lang
is
not
None
or
lang
!=
'
en
'
:
# we're not english
msgtxt
=
_
(
'
[This message is encrypted]
'
)
+
\
'
([This message is encrypted])
'
# one in locale and one en
if
type
==
'
chat
'
:
msg_iq
=
common
.
xmpp
.
Message
(
to
=
jid
,
body
=
msgtxt
,
typ
=
type
)
else
:
...
...
This diff is collapsed.
Click to expand it.
src/tabbed_chat_window.py
+
11
−
6
View file @
949c1053
...
...
@@ -387,15 +387,20 @@ def print_conversation(self, text, jid, contact = '', tim = None,
else
:
ec
=
gajim
.
encrypted_chats
[
self
.
account
]
if
encrypted
and
jid
not
in
ec
:
msg_in_two_langs
=
_
(
'
Encryption enabled
'
)
\
+
'
- Encryption enabled
'
chat
.
Chat
.
print_conversation_line
(
self
,
msg_in_two_langs
,
jid
,
msg
=
'
Encryption enabled
lang = os.getenv(
'
LANG
'
)
if lang is not None or lang !=
'
en
'
: # we
'
re
not
english
msg
=
_
(
'
Encryption enabled
'
)
\
+
'
(Encryption enabled)
'
# one in locale and one in en
chat
.
Chat
.
print_conversation_line
(
self
,
msg
,
jid
,
'
status
'
,
''
,
tim
)
ec
.
append
(
jid
)
if
not
encrypted
and
jid
in
ec
:
msg_in_two_langs
=
_
(
'
Encryption disabled
'
)
\
+
'
- Encryption disabled
'
chat
.
Chat
.
print_conversation_line
(
self
,
msg_in_two_langs
,
jid
,
msg
=
'
Encryption disabled
'
lang
=
os
.
getenv
(
'
LANG
'
)
if
lang
is
not
None
or
lang
!=
'
en
'
:
# we're not english
msg
=
_
(
'
Encryption disabled
'
)
+
'
(Encryption disabled)
'
chat
.
Chat
.
print_conversation_line
(
self
,
msg
,
jid
,
'
status
'
,
''
,
tim
)
ec
.
remove
(
jid
)
self
.
xmls
[
jid
].
get_widget
(
'
gpg_togglebutton
'
).
set_active
(
encrypted
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment