Skip to content

Commit c0bee7c

Browse files
authored
Query widget number-verb number agreement (#1683)
* Query widget number-verb agreement * Missing this, whoops
1 parent 69b49c1 commit c0bee7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Resources/queries/widget.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,17 +158,17 @@
158158
connections.add(statement.connection);
159159
}
160160

161-
const $text = $('<span />').text(`${data.nb_statements} statements were executed`);
161+
const $text = $('<span />').text(`${data.nb_statements} ${data.nb_statements == 1 ? 'statement was' : 'statements were'} executed`);
162162
if (data.nb_excluded_statements) {
163-
$text.append(`, ${data.nb_excluded_statements} have been excluded`);
163+
$text.append(`, ${data.nb_excluded_statements} ${data.nb_excluded_statements == 1 ? 'has' : 'have'} been excluded`);
164164
}
165165
if (data.nb_failed_statements > 0 || this.duplicateQueries.size > 0) {
166166
const details = [];
167167
if (data.nb_failed_statements) {
168168
details.push(`${data.nb_failed_statements} failed`);
169169
}
170170
if (this.duplicateQueries.size > 0) {
171-
details.push(`${this.duplicateQueries.size} duplicates`);
171+
details.push(`${this.duplicateQueries.size} ${this.duplicateQueries.size == 1 ? 'duplicate' : 'duplicates'}`);
172172
}
173173
$text.append(` (${details.join(', ')})`);
174174
}

0 commit comments

Comments
 (0)