The translate does not work in list view


in the right side is the designation doctype its data does not translate in the view list
this is the example of translate doc in the left side

but when open the doc the translate is worked

how to display the translate in the list view??

Enable this on doctype

image

2 Likes

i was checked

any one solve this issue?

you edit in the core ?
are you sure from this
i suggest the solve is to edit the core code in frappe repo itself

no need to edit the core its working fine for me

which document u r using?

designation
in HR

Well, I was just testing locally because I’m running into the same issue with doctypes created by Frappe / ERPNext, like Report and Country.

Some of them are standard and don’t let you check the ā€˜translate link fields’ option. I tried using the Property Setter (via custom app), but that didn’t work either. And even for the non-standard doctypes, checking the box didn’t solve the problem. :smiling_face_with_tear:

So, I tried to figure it out if the issue was in the code, and what I did solved my problem, but I’m not willing to change the core in a fork or suggesting code changes to frappe repo without being sure of what I’m doing. Like I said, I’m not proficient in JS or a front-end developer. Maybe there is some other way around, just trying to figure out and maybe get some help :sweat_smile:

as far as i know you can use jinja templeting for translations like if its static text use {{(ā€œyour text hereā€)}} and if dynamic use {{(your text here)}}

Nice, thanks! I haven’t tried Jinja yet, but I’m reading through the docs and will give it a shot. I’ll come back with feedback once I’ve tried it out. :smiley:

In the end, I didn’t use Jinja. The following client script did the job:

frappe.listview_settings["Report"] = {
    formatters: {
        "name": function(value, doc) {
            return __(value);
        }
    }
};
1 Like

it solved by this code in client script as mention above
with edit the doctype name just

1 Like