diff --git a/src/components/views/rooms/RoomSublist.tsx b/src/components/views/rooms/RoomSublist.tsx index f6d0d1c22e..e7fa4477df 100644 --- a/src/components/views/rooms/RoomSublist.tsx +++ b/src/components/views/rooms/RoomSublist.tsx @@ -738,14 +738,20 @@ export default class RoomSublist extends React.Component { const nonPaddedHeight = this.state.height - RESIZE_HANDLE_HEIGHT - SHOW_N_BUTTON_HEIGHT; const amountFullyShown = Math.floor(nonPaddedHeight / this.layout.tileHeight); const numMissing = this.numTiles - amountFullyShown; + const label = _t("Show %(count)s more", {count: numMissing}); let showMoreText = ( - {_t("Show %(count)s more", {count: numMissing})} + {label} ); if (this.props.isMinimized) showMoreText = null; showNButton = ( - + {/* set by CSS masking */} @@ -754,14 +760,20 @@ export default class RoomSublist extends React.Component { ); } else if (this.numTiles > this.layout.defaultVisibleTiles) { // we have all tiles visible - add a button to show less + const label = _t("Show less"); let showLessText = ( - {_t("Show less")} + {label} ); if (this.props.isMinimized) showLessText = null; showNButton = ( - + {/* set by CSS masking */}