Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
6ccdb884 by wurstsalat at 2025-03-10T18:38:26+01:00
imprv: Moderation: Improve moderation text

- - - - -


1 changed file:

- gajim/common/util/user_strings.py


Changes:

=====================================
gajim/common/util/user_strings.py
=====================================
@@ -47,13 +47,16 @@ def get_subscription_request_msg(account: str | None = 
None) -> str:
 
 
 def get_moderation_text(by: str | JID | None, reason: str | None) -> str:
-    by_text = ''
+    text = _('This message has been moderated')
+
     if by is not None:
-        by_text = _(' by %s') % by
-    text = _('This message has been moderated%s.') % by_text
-    if reason is not None:
-        text += ' ' + _('Reason: %s') % reason
-    return text
+        text = _('This message has been moderated by %s') % by
+
+    if reason is None:
+        return text
+
+    reason_text = _('(reason: %s)') % reason
+    return f'{text} {reason_text}'
 
 
 def get_uf_sub(sub: str) -> str:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/6ccdb88491bb11cc17e01e95419116c99ff08704

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/6ccdb88491bb11cc17e01e95419116c99ff08704
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to