fix: server-render unread drawer static strings
window.require is undefined in the NodeBB 4 webpack client build, so the translateText helper never ran and unread drawer strings rendered as raw [[unread:title]] / [[unread:no-unread-topics]]. Move the static strings into the benchpress template (translated at render time) and have client.js only manage the topic <li> rows.
This commit is contained in:
@@ -3,5 +3,7 @@
|
||||
<span component="unread/count" class="badge rounded-1 bg-primary {{{ if !unreadCount.topic }}}hidden{{{ end }}}">{unreadCount.topic}</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu wg-topbar__dropdown unread-dropdown p-1 shadow" role="menu" data-wg-unread-menu>
|
||||
<li class="dropdown-item disabled"><i class="fa fa-fw fa-spinner fa-spin" aria-hidden="true"></i> [[unread:title]]</li>
|
||||
<li data-wg-unread-loading class="dropdown-item disabled"><i class="fa fa-fw fa-spinner fa-spin" aria-hidden="true"></i> [[unread:title]]</li>
|
||||
<li data-wg-unread-empty class="hidden"><span class="dropdown-item disabled">[[unread:no-unread-topics]]</span></li>
|
||||
<li data-wg-unread-footer><hr class="dropdown-divider"><a class="dropdown-item wg-unread-item--all" href="{relative_path}/unread">[[unread:title]]</a></li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user