Skip to content

Commit

Permalink
Update Russian translations
Browse files Browse the repository at this point in the history
  • Loading branch information
metalmon committed Dec 23, 2024
1 parent 3e556c1 commit 4b7810f
Show file tree
Hide file tree
Showing 6 changed files with 228 additions and 179 deletions.
10 changes: 5 additions & 5 deletions crm/api/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def get_sidebar_fields(doctype, name):

def get_field_obj(field):
obj = {
"label": field.label,
"label": _(field.label),
"type": get_type(field),
"name": field.fieldname,
"hidden": field.hidden,
Expand All @@ -619,17 +619,17 @@ def get_field_obj(field):
"all_properties": field,
}

obj["placeholder"] = field.get("placeholder") or "Add " + field.label + "..."
obj["placeholder"] = field.get("placeholder") or _("Add") + " " + _(field.label) + "..."

if field.fieldtype == "Link":
obj["placeholder"] = field.get("placeholder") or "Select " + field.label + "..."
obj["placeholder"] = field.get("placeholder") or _("Select") + " " + _(field.label) + "..."
obj["doctype"] = field.options
elif field.fieldtype == "Select" and field.options:
obj["placeholder"] = field.get("placeholder") or "Select " + field.label + "..."
obj["placeholder"] = field.get("placeholder") or _("Select") + " " + _(field.label) + "..."
obj["options"] = [{"label": option, "value": option} for option in field.options.split("\n")]

if field.read_only:
obj["tooltip"] = "This field is read only and cannot be edited."
obj["tooltip"] = _("This field is read only and cannot be edited.")

return obj

Expand Down
6 changes: 3 additions & 3 deletions crm/integrations/twilio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def generate_access_token():
return {
"ok": False,
"error": "caller_phone_identity_missing",
"detail": "Phone number is not mapped to the caller"
"detail": _("Phone number is not mapped to the caller")
}

token=twilio.generate_voice_access_token(identity=frappe.session.user)
Expand Down Expand Up @@ -68,7 +68,7 @@ def twilio_incoming_call_handler(**kwargs):
def create_call_log(call_details: TwilioCallDetails):
call_log = frappe.get_doc({**call_details.to_dict(),
'doctype': 'CRM Call Log',
'medium': 'Twilio'
'medium': _('Twilio')
})
call_log.reference_docname, call_log.reference_doctype = get_lead_or_deal_from_number(call_log)
call_log.flags.ignore_permissions = True
Expand Down Expand Up @@ -148,7 +148,7 @@ def add_note_to_call_log(call_sid, note):
if not twilio: return

call_details = twilio.get_call_info(call_sid)
sid = call_sid if call_details.direction == 'inbound' else call_details.parent_call_sid
sid = call_sid if call_details.direction == _('inbound') else call_details.parent_call_sid

frappe.db.set_value("CRM Call Log", sid, "note", note)
frappe.db.commit()
Expand Down
8 changes: 4 additions & 4 deletions crm/integrations/twilio/twilio_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ def get_the_call_attender(owners, caller=None):
current_loggedin_users = [user]

for name, details in owners.items():
if ((details['call_receiving_device'] == 'Phone' and details['mobile_no']) or
(details['call_receiving_device'] == 'Computer' and name in current_loggedin_users)):
if ((details['call_receiving_device'] == _('Phone') and details['mobile_no']) or
(details['call_receiving_device'] == _('Computer') and name in current_loggedin_users)):
return details


Expand All @@ -222,8 +222,8 @@ def __init__(self, call_info, call_from = None, call_to = None):

def get_direction(self):
if self.call_info.get('Caller').lower().startswith('client'):
return 'Outgoing'
return 'Incoming'
return _('Outgoing')
return _('Incoming')

def get_from_number(self):
return self._call_from or self.call_info.get('From')
Expand Down
Loading

0 comments on commit 4b7810f

Please sign in to comment.