diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-05-10 20:32:26 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-05-10 20:32:26 -0300 |
commit | 2caa1edb5984a17b41a2144e8e59583798bd53e9 (patch) | |
tree | f6df6f849bb7386466431b915165c5041cdcd685 /src/data | |
parent | 847b1262bf608cadd59c8d19a564badbd525a6a7 (diff) |
language list functions
Diffstat (limited to 'src/data')
-rw-r--r-- | src/data/things.js | 18 |
1 files changed, 18 insertions, 0 deletions
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'), |