fix: translate desktop icons correctly

This commit is contained in:
sokumon 2025-12-30 01:42:29 +05:30
parent 709169a538
commit f08fcd6468
2 changed files with 2 additions and 3 deletions

View file

@ -515,7 +515,6 @@ class DesktopIconGrid {
class DesktopIcon {
constructor(icon, in_folder) {
this.icon_data = icon;
this.icon_data.label = __(this.icon_data.label);
this.icon_title = this.icon_data.label;
this.icon_subtitle = "";
this.icon_type = this.icon_data.icon_type;
@ -666,7 +665,7 @@ class DesktopModal {
}
make_modal(icon_title) {
if ($(".desktop-modal").length == 0) {
this.modal = new frappe.get_modal(icon_title, "");
this.modal = new frappe.get_modal(__(icon_title), "");
this.modal.find(".modal-header").addClass("desktop-modal-heading");
this.modal.addClass("desktop-modal");
this.modal.find(".modal-dialog").attr("id", "desktop-modal");

View file

@ -18,7 +18,7 @@
{% } %}
{% if (!in_folder) { %}
<div class="icon-caption">
<div class="icon-title">{{ icon.label }}</div>
<div class="icon-title">{{ __(icon.label) }}</div>
<div class="icon-subtitle"></div>
</div>
{% } %}