frm.add_custom_button(__(“Load Attachments”), function(foo)
why this underscore are there?
what’s @frappe.call?
it’s my first time that i work with framework, m sorry
I watch this, but i don’t understand very well… I’ll watch again
1 Like
That is a function to return the translated version of the input.
Say the user is a spanish, so whatever you give parameter, like “Hello”, it will fetch from the translation .csv files (located in each app under app_name/translations/, check in erpnext app for a start).
It is _('Hello')
in python, and __('Hello')
in javascript.
You will have to import in python though. ( from frappe import _
)
Hope it helps
1 Like