From 268a67c996d4e25819dabf0d8d1faf35ee3d19df Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 23 May 2026 16:10:07 -0300 Subject: language: drop unitOnly --- src/data/things/Language.js | 10 +--- src/strings-default.yaml | 128 -------------------------------------------- 2 files changed, 2 insertions(+), 136 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); }; diff --git a/src/strings-default.yaml b/src/strings-default.yaml index 96379441..f84cff21 100644 --- a/src/strings-default.yaml +++ b/src/strings-default.yaml @@ -48,14 +48,6 @@ count: many: "" other: "{ALBUMS} albums" - unitOnly: - zero: "" - one: "album" - two: "" - few: "" - many: "" - other: "albums" - artTags: _: "{TAGS}" @@ -67,14 +59,6 @@ count: many: "" other: "{TAGS} tags" - unitOnly: - zero: "" - one: "tag" - two: "" - few: "" - many: "" - other: "tags" - artworks: _: "{ARTWORKS}" @@ -86,14 +70,6 @@ count: many: "" other: "{ARTWORKS} artworks" - unitOnly: - zero: "" - one: "artwork" - two: "" - few: "" - many: "" - other: "artworks" - commentaryEntries: _: "{ENTRIES}" @@ -105,14 +81,6 @@ count: many: "" other: "{ENTRIES} entries" - unitOnly: - zero: "" - one: "entry" - two: "" - few: "" - many: "" - other: "entries" - contributions: _: "{CONTRIBUTIONS}" @@ -124,14 +92,6 @@ count: many: "" other: "{CONTRIBUTIONS} contributions" - unitOnly: - zero: "" - one: "contribution" - two: "" - few: "" - many: "" - other: "contributions" - files: _: "{FILES}" @@ -143,14 +103,6 @@ count: many: "" other: "{FILES} files" - unitOnly: - zero: "" - one: "file" - two: "" - few: "" - many: "" - other: "files" - flashes: _: "{FLASHES}" @@ -162,14 +114,6 @@ count: many: "" other: "{FLASHES} flashes" - unitOnly: - zero: "" - one: "flash" - two: "" - few: "" - many: "" - other: "flashes" - tracks: _: "{TRACKS}" @@ -181,14 +125,6 @@ count: many: "" other: "{TRACKS} tracks" - unitOnly: - zero: "" - one: "track" - two: "" - few: "" - many: "" - other: "tracks" - # Count more abstract stuff days: @@ -202,14 +138,6 @@ count: many: "" other: "{DAYS} days" - unitOnly: - zero: "" - one: "day" - two: "" - few: "" - many: "" - other: "days" - months: _: "{MONTHS}" @@ -221,14 +149,6 @@ count: many: "" other: "{MONTHS} months" - unitOnly: - zero: "" - one: "month" - two: "" - few: "" - many: "" - other: "months" - timesFeatured: _: "{TIMES_FEATURED}" @@ -240,14 +160,6 @@ count: many: "" other: "featured {TIMES_FEATURED} times" - unitOnly: - zero: "" - one: "time featured" - two: "" - few: "" - many: "" - other: "times featured" - timesReferenced: _: "{TIMES_REFERENCED}" @@ -259,14 +171,6 @@ count: many: "" other: "{TIMES_REFERENCED} times referenced" - unitOnly: - zero: "" - one: "time referenced" - two: "" - few: "" - many: "" - other: "times referenced" - timesUsed: _: "{TIMES_USED}" @@ -278,14 +182,6 @@ count: many: "" other: "used {TIMES_USED} times" - unitOnly: - zero: "" - one: "time used" - two: "" - few: "" - many: "" - other: "times used" - weeks: _: "{WEEKS}" @@ -297,14 +193,6 @@ count: many: "" other: "{WEEKS} weeks" - unitOnly: - zero: "" - one: "week" - two: "" - few: "" - many: "" - other: "weeks" - words: _: "{WORDS}" thousand: "{WORDS}k" @@ -317,14 +205,6 @@ count: many: "" other: "{WORDS} words" - unitOnly: - zero: "" - one: "word" - two: "" - few: "" - many: "" - other: "words" - years: _: "{YEARS}" @@ -336,14 +216,6 @@ count: many: "" other: "{YEARS} years" - unitOnly: - zero: "" - one: "year" - two: "" - few: "" - many: "" - other: "years" - # Numerical things that aren't exactly counting, per se duration: -- cgit 1.3.0-6-gf8a5