diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-05-10 20:17:40 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-05-10 20:17:40 -0300 |
commit | c6aff602f65dfa4e5a1bc1a8c6841cdda829a0ce (patch) | |
tree | 26dbe2fedea2a994591200a06fd7bf533e5b1f0f /src/util | |
parent | 4749a682d55469b3df994ab76b29e62cf570b78c (diff) |
rename strings( to language.$(
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/strings.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/util/strings.js b/src/util/strings.js index c596bd89..835e4055 100644 --- a/src/util/strings.js +++ b/src/util/strings.js @@ -22,8 +22,8 @@ import { bindOpts } from './sugar.js'; // look like a dictionary each value of which is itself a util dictionary, // each value of which is a function in the format (value, opts) => (...). // Each of those util dictionaries will 8e attached to the final returned -// strings() function, containing functions which automatically have that -// same strings() function provided as part of its opts argument (alongside +// language.$() function, containing functions which automatically have that +// same language.$() function provided as part of its opts argument (alongside // any additional arguments passed). // // Basically, it's so that instead of doing: @@ -193,7 +193,7 @@ export function genStrings(stringsJSON, { return strings; } -const countHelper = (stringKey, argName = stringKey) => (value, {strings, unit = false}) => strings( +const countHelper = (stringKey, argName = stringKey) => (value, {strings, unit = false}) => language.$( (unit ? `count.${stringKey}.withUnit.` + strings.intl.plural.cardinal.select(value) : `count.${stringKey}`), @@ -222,10 +222,10 @@ export const count = { : value); const words = (value > 1000 - ? strings('count.words.thousand', {words: num}) - : strings('count.words', {words: num})); + ? language.$('count.words.thousand', {words: num}) + : language.$('count.words', {words: num})); - return strings('count.words.withUnit.' + strings.intl.plural.cardinal.select(value), {words}); + return language.$('count.words.withUnit.' + strings.intl.plural.cardinal.select(value), {words}); }, albums: countHelper('albums'), |