fix: add context for row number label

Note: I had to remove the `else` branch because `txt` is (and has always been) undefined there.
This commit is contained in:
barredterra 2024-02-23 17:09:46 +01:00
parent 0e12cf4281
commit 0334ae32b6

View file

@ -247,8 +247,9 @@ export default class GridRow {
// index (1, 2, 3 etc)
if (!this.row_index && !this.show_search) {
// REDESIGN-TODO: Make translation contextual, this No is Number
var txt = this.doc ? this.doc.idx : __("No.");
const txt = this.doc
? this.doc.idx
: __("No.", null, "Title of the 'row number' column");
this.row_check = $(
`<div class="row-check sortable-handle col">
@ -303,8 +304,6 @@ export default class GridRow {
}, 500)
);
frappe.utils.only_allow_num_decimal(this.row_index.find("input"));
} else {
this.row_index.find("span").html(txt);
}
this.setup_columns();