diff --git a/frappe/desk/form/load.py b/frappe/desk/form/load.py
index fcc4859e42..a9c58cff9b 100644
--- a/frappe/desk/form/load.py
+++ b/frappe/desk/form/load.py
@@ -9,7 +9,6 @@ import frappe.defaults
import frappe.desk.form.meta
from frappe.permissions import get_doc_permissions
from frappe import _
-from frappe.core.doctype.communication.feed import get_feed_match_conditions
@frappe.whitelist()
def getdoc(doctype, name, user=None):
@@ -117,7 +116,6 @@ def get_communications(doctype, name, start=0, limit=20):
def _get_communications(doctype, name, start=0, limit=20):
- match_conditions = get_feed_match_conditions()
communications = frappe.db.sql("""select name, communication_type,
communication_medium, comment_type,
content, sender, sender_full_name, creation, subject, delivery_status, _liked_by,
@@ -130,12 +128,13 @@ def _get_communications(doctype, name, start=0, limit=20):
communication_type in ("Communication", "Comment")
and (
(reference_doctype=%(doctype)s and reference_name=%(name)s)
- or (timeline_doctype=%(doctype)s and timeline_name=%(name)s)
+ or (timeline_doctype=%(doctype)s
+ and timeline_name=%(name)s
+ and communication_type="Comment"
+ and comment_type in ("Created", "Updated", "Submitted", "Cancelled", "Deleted"))
)
and (comment_type is null or comment_type != 'Update')
- {match_conditions}
- order by creation desc limit %(start)s, %(limit)s"""
- .format(match_conditions=("and " + match_conditions) if match_conditions else ""),
+ order by creation desc limit %(start)s, %(limit)s""",
{ "doctype": doctype, "name": name, "start": frappe.utils.cint(start), "limit": limit },
as_dict=True)
diff --git a/frappe/model/document.py b/frappe/model/document.py
index a61d6a065e..6183913a4e 100644
--- a/frappe/model/document.py
+++ b/frappe/model/document.py
@@ -805,7 +805,7 @@ class Document(BaseDocument):
"comment_type": comment_type,
"reference_doctype": self.doctype,
"reference_name": self.name,
- "content": text or _(comment_type),
+ "content": text or comment_type,
"link_doctype": link_doctype,
"link_name": link_name
}).insert(ignore_permissions=True)
diff --git a/frappe/public/js/frappe/form/footer/timeline_item.html b/frappe/public/js/frappe/form/footer/timeline_item.html
index f85dd108da..adc0c988b1 100644
--- a/frappe/public/js/frappe/form/footer/timeline_item.html
+++ b/frappe/public/js/frappe/form/footer/timeline_item.html
@@ -87,7 +87,7 @@
{% if(data.link_doctype && data.link_name) { %}
{% } %}
- {%= data.content %}
+ {%= __(data.content) %}
{% if(data.link_doctype && data.link_name) { %}
{% } %}
@@ -108,7 +108,7 @@
{% } else { %}
{%= data.fullname %}
- {%= data.content %}
+ {%= __(data.content) %}
{% if (data.timeline_doctype===data.frm.doc.doctype && data.timeline_name===data.frm.doc.name) { %}
–