From dcf84144af87c17bf221bf350830919cad309183 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 15 Nov 2018 12:27:10 +0100 Subject: Shortening multiple table numbers --- tdd/tdd-bootstrap.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tdd/tdd-bootstrap.php') diff --git a/tdd/tdd-bootstrap.php b/tdd/tdd-bootstrap.php index 04bbb0b..7259958 100644 --- a/tdd/tdd-bootstrap.php +++ b/tdd/tdd-bootstrap.php @@ -146,7 +146,12 @@ class Protocol { sort($tables); // compile header with tables numbers $insert = '

'; - $insert .= static::__("Stół") . ' ' . implode(', ', $tables) . ' – '; + if (count($tables) <= 5) { + $insert .= static::__("Stół") . ' ' . implode(', ', $tables); + } else { + $insert .= count($tables) . ' ' . static::__("stołów"); + } + $insert .= ' – '; $insert .= static::__("Rozdanie") . ' ' . $deal->deal_num . '

'; // if the board has been played on all tables if ($this->areBoardsPlayed($groupedBoard)) { -- cgit v1.2.3