[exam] add progress

This commit is contained in:
xiaomlove
2021-04-29 02:52:22 +08:00
parent 1c31f4b22d
commit a1972ea288
4 changed files with 118 additions and 41 deletions
+1 -1
View File
@@ -2012,7 +2012,7 @@ function mkprettytime($s) {
}
if ($t["day"])
return $t["day"] . ($lang_functions['text_day'] ?? 'days') . sprintf("%02d:%02d:%02d", $t["hour"], $t["min"], $t["sec"]);
return $t["day"] . ($lang_functions['text_day'] ?? 'day(s)') . sprintf("%02d:%02d:%02d", $t["hour"], $t["min"], $t["sec"]);
if ($t["hour"])
return sprintf("%d:%02d:%02d", $t["hour"], $t["min"], $t["sec"]);
// if ($t["min"])
+2 -2
View File
@@ -534,10 +534,10 @@ function format_datetime($datetime, $format = 'Y-m-d H:i:s')
return $datetime;
}
function nexus_trans($key)
function nexus_trans($key, $replace = [], $locale = null)
{
if (!IN_NEXUS) {
return trans($key);
return trans($key, $replace, $locale);
}
static $translations;
if (is_null($translations)) {