fix: viewers formatting

This commit is contained in:
2025-05-28 13:24:52 +01:00
parent 0295d49077
commit b854962b07
3 changed files with 4 additions and 7 deletions

View File

@ -6,7 +6,7 @@
/// Locales: 28 /// Locales: 28
/// Strings: 1991 (71 per locale) /// Strings: 1991 (71 per locale)
/// ///
/// Built on 2025-05-26 at 15:39 UTC /// Built on 2025-05-28 at 12:24 UTC
// coverage:ignore-file // coverage:ignore-file
// ignore_for_file: type=lint, unused_import // ignore_for_file: type=lint, unused_import

View File

@ -55,7 +55,7 @@ class Translations implements BaseTranslations<AppLocale, Translations> {
/// Number of viewers of the stream /// Number of viewers of the stream
String viewers({required num n}) => (_root.$meta.cardinalResolver ?? PluralResolvers.cardinal('en'))(n, String viewers({required num n}) => (_root.$meta.cardinalResolver ?? PluralResolvers.cardinal('en'))(n,
one: '1 viewer', one: '1 viewer',
other: '${n} viewers', other: '${NumberFormat.decimalPattern('en').format(n)} viewers',
); );
late final TranslationsStreamEn stream = TranslationsStreamEn.internal(_root); late final TranslationsStreamEn stream = TranslationsStreamEn.internal(_root);
@ -382,7 +382,7 @@ extension on Translations {
case 'anon': return 'Anon'; case 'anon': return 'Anon';
case 'viewers': return ({required num n}) => (_root.$meta.cardinalResolver ?? PluralResolvers.cardinal('en'))(n, case 'viewers': return ({required num n}) => (_root.$meta.cardinalResolver ?? PluralResolvers.cardinal('en'))(n,
one: '1 viewer', one: '1 viewer',
other: '${n} viewers', other: '${NumberFormat.decimalPattern('en').format(n)} viewers',
); );
case 'stream.status.live': return 'LIVE'; case 'stream.status.live': return 'LIVE';
case 'stream.status.ended': return 'ENDED'; case 'stream.status.ended': return 'ENDED';

View File

@ -10,12 +10,9 @@ no_user_found: No user found
anon: Anon anon: Anon
viewers: viewers:
one: 1 viewer one: 1 viewer
other: $n viewers other: "${n:decimalPattern} viewers"
"@viewers": "@viewers":
description: Number of viewers of the stream description: Number of viewers of the stream
placeholders:
n:
type: int
"@anon": "@anon":
description: An anonymous user description: An anonymous user
stream: stream: