« get me outta code hell

language: drop unitOnly - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/Language.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-05-23 16:10:07 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-05-23 16:10:07 -0300
commit268a67c996d4e25819dabf0d8d1faf35ee3d19df (patch)
tree979fbfbb84f4059ec6425555079e6e5d30803a19 /src/data/things/Language.js
parent54ec1918e3c9608c97cd3453f63aa82175550fd0 (diff)
language: drop unitOnly
Diffstat (limited to 'src/data/things/Language.js')
-rw-r--r--src/data/things/Language.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/data/things/Language.js b/src/data/things/Language.js
index 5265d851..dc8c0368 100644
--- a/src/data/things/Language.js
+++ b/src/data/things/Language.js
@@ -955,7 +955,6 @@ export class Language extends Thing {
 const countHelper = (stringKey, optionName = stringKey) =>
   function(value, {
     unit = false,
-    unitOnly = false,
     blankIfZero = false,
   } = {}) {
     // Null or undefined value is blank content.
@@ -969,16 +968,11 @@ const countHelper = (stringKey, optionName = stringKey) =>
     }
 
     const string =
-      (unitOnly
-        ? `count.${stringKey}.unitOnly.` + this.getUnitForm(value)
-     : unit
+      (unit
         ? `count.${stringKey}.withUnit.` + this.getUnitForm(value)
         : `count.${stringKey}`);
 
-    const options =
-      (unitOnly
-        ? {}
-        : {[optionName]: this.formatNumber(value)});
+    const options = {[optionName]: this.formatNumber(value)};
 
     return this.formatString(string, options);
   };