feat: enable further translations
This commit is contained in:
parent
112f113598
commit
5604b090c0
5 changed files with 7 additions and 5 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<div class="btn-group">
|
||||
<button class="btn btn-default btn-sm btn-order"
|
||||
data-value="{{ sort_order }}"
|
||||
title="{{ sort_order==="desc" ? "descending" : "ascending" }}">
|
||||
title="{{ sort_order==="desc" ? __("descending") : __("ascending") }}">
|
||||
<span class="sort-order">
|
||||
<svg class="icon icon-sm">
|
||||
<use href="#icon-{{ sort_order==="desc" ? "sort-descending" : "sort-ascending" }}"></use>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ frappe.ui.SortSelector = class SortSelector {
|
|||
this.wrapper.find('.btn-order').on('click', function() {
|
||||
let btn = $(this);
|
||||
const order = $(this).attr('data-value') === 'desc' ? 'asc' : 'desc';
|
||||
const title = $(this).attr('data-value' )=== 'desc' ? 'ascending' : 'descending';
|
||||
const title = $(this).attr('data-value' )=== 'desc' ? __('ascending') : __('descending');
|
||||
|
||||
btn.attr('data-value', order);
|
||||
btn.attr('title', title);
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ frappe.ui.toolbar.Toolbar = class {
|
|||
$("<a>", {
|
||||
href: url,
|
||||
class: "dropdown-item",
|
||||
text: link.label,
|
||||
text: __(link.label),
|
||||
target: "_blank"
|
||||
}).appendTo($help_links);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ frappe.dashboard_utils = {
|
|||
<a data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<button class="btn btn-secondary btn-xs">
|
||||
${icon_html}
|
||||
<span class="filter-label">${filter.label}</span>
|
||||
<span class="filter-label">${__(filter.label)}</span>
|
||||
${frappe.utils.icon('select', 'xs')}
|
||||
</button>
|
||||
</a>`;
|
||||
|
|
@ -24,10 +24,12 @@ frappe.dashboard_utils = {
|
|||
|
||||
if (filter.fieldnames) {
|
||||
options_html = filter.options.map((option, i) =>
|
||||
// TODO: Make option translatable - be careful, since the text of the a tag is later used to perform some action
|
||||
`<li>
|
||||
<a class="dropdown-item" data-fieldname="${filter.fieldnames[i]}">${option}</a>
|
||||
</li>`).join('');
|
||||
} else {
|
||||
// TODO: Make option translatable - be careful, since the text of the a tag is later used to perform some action
|
||||
options_html = filter.options.map( option => `<li><a class="dropdown-item">${option}</a></li>`).join('');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
<div class="add-card">
|
||||
<div class="ellipsis">
|
||||
+ {{ __("Add " + doctype) }}
|
||||
+ {{ __("Add {0}", [__(doctype)]) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="kanban-card new-card-area">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue