Drupal 8's core comments module has a library "node-new-comments-link" with a file "node-new-comments-link.js".
This contains Drupal.behaviors.nodeNewCommentsLink = { ... }
which calls another function in the library which in turn calls another function in the library function render(results) { ... }
.
This render function controls the text used to show how many new comments a node has:
.text(Drupal.formatPlural(results[nodeID].new_comment_count, '1 new comment', '@count new comments'))
I want to use different text. (I want it just to say 'New' rather than 'x new comments').
I can replace the whole js file or the whole library and that works fine, but it's very heavy handed. It requires me to copy paste lots of complex code I don't need to understand.
Is there a way to override just this one render function?