From 2caa1edb5984a17b41a2144e8e59583798bd53e9 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 10 May 2022 20:32:26 -0300 Subject: language list functions --- src/data/things.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src') diff --git a/src/data/things.js b/src/data/things.js index 34946c0f..4141ec66 100644 --- a/src/data/things.js +++ b/src/data/things.js @@ -1543,6 +1543,24 @@ Object.assign(Language.prototype, { return this.$('count.words.withUnit.' + this.getUnitForm(value), {words}); }, + // Conjunction list: A, B, and C + formatConjunctionList(array) { + this.assertIntlAvailable('intl_listConjunction'); + return this.intl_listConjunction.format(array); + }, + + // Disjunction lists: A, B, or C + formatDisjunctionList(array) { + this.assertIntlAvailable('intl_listDisjunction'); + return this.intl_listDisjunction.format(array); + }, + + // Unit lists: A, B, C + formatUnitList(array) { + this.assertIntlAvailable('intl_listUnit'); + return this.intl_listUnit.format(array); + }, + // TODO: These are hard-coded. Is there a better way? countAlbums: countHelper('albums'), countCommentaryEntries: countHelper('commentaryEntries', 'entries'), -- cgit 1.3.0-6-gf8a5