From 5df34712b6c7b2b82dc0fc956298d9c2f1893a89 Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Wed, 13 Jan 2021 21:56:34 -0700 Subject: [PATCH] Plurals --- js/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 8afc053..723af25 100644 --- a/js/main.js +++ b/js/main.js @@ -2343,7 +2343,10 @@ class Splash extends PrimaryView { } else { progress.querySelector('.-time').textContent = util.format_duration(packinfo.total_abstime / TICS_PER_SECOND, 2); - let levels = `cleared ${packinfo.cleared_levels} of ${packinfo.total_levels} levels, ${packinfo.aidless_levels}★ without aid`; + let levels = ( + `cleared ${packinfo.cleared_levels} of ${packinfo.total_levels} ` + + `level${packinfo.total_levels === 1 ? "" : "s"}, ` + + `${packinfo.aidless_levels}★ without aid`); level_el.textContent = levels; level_el.style.setProperty('--cleared', packinfo.cleared_levels / packinfo.total_levels); level_el.style.setProperty('--aidless', packinfo.aidless_levels / packinfo.total_levels);