Monthly Salary Register

When user language is EN and if i try to access Monthly Salary Register… The report is shown for the months processed.
But if i change the user language to PT … and try again the Monthly Salary Register i get the below error message …

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 890, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/query_report.py”, line 93, in run
res = frappe.get_attr(method_name)(frappe._dict(filters))
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/hr/report/monthly_salary_register/monthly_salary_register.py”, line 13, in execute
columns, earning_types, ded_types = get_columns(salary_slips)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/hr/report/monthly_salary_register/monthly_salary_register.py”, line 51, in get_columns
salary_components[component.type].append(component.salary_component)
KeyError: u’Earning’

My temp solution was to add on the top of monthly_salary_register.py

-- coding: utf-8 --

And removed the “_” from all the translations of Earning and Deduction.
Do we need to translate when doing search or in queries?

@KanchanChauhan can you please check?

It was happening because Salary Components were not getting translated, fixed the issue will be released soon.

Thanks.