Skip to content

Commit b59f8fb

Browse files
committed
feat(localization): add new poll interactor strings
1 parent 8e2a19d commit b59f8fb

13 files changed

+806
-15
lines changed

packages/stream_chat_localizations/example/lib/add_new_lang.dart

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,14 +553,76 @@ class NnStreamChatLocalizations extends GlobalStreamChatLocalizations {
553553
@override
554554
String get anonymousPollLabel => 'Anonymous poll';
555555

556+
@override
557+
String get pollOptionsLabel => 'Poll Options';
558+
556559
@override
557560
String get suggestAnOptionLabel => 'Suggest an option';
558561

562+
@override
563+
String get enterANewOptionLabel => 'Enter a new option';
564+
559565
@override
560566
String get addACommentLabel => 'Add a comment';
561567

568+
@override
569+
String get pollCommentsLabel => 'Poll Comments';
570+
571+
@override
572+
String get updateYourCommentLabel => 'Update your comment';
573+
574+
@override
575+
String get enterYourCommentLabel => 'Enter your comment';
576+
562577
@override
563578
String get createLabel => 'Create';
579+
580+
@override
581+
String pollVotingModeLabel(PollVotingMode votingMode) {
582+
return votingMode.when(
583+
disabled: () => 'Vote ended',
584+
unique: () => 'Select one',
585+
limited: (count) => 'Select up to $count',
586+
all: () => 'Select one or more',
587+
);
588+
}
589+
590+
@override
591+
String seeAllOptionsLabel({int? count}) {
592+
if (count == null) return 'See all options';
593+
return 'See all $count options';
594+
}
595+
596+
@override
597+
String get viewCommentsLabel => 'View Comments';
598+
599+
@override
600+
String get viewResultsLabel => 'View Results';
601+
602+
@override
603+
String get endVoteLabel => 'End Vote';
604+
605+
@override
606+
String get pollResultsLabel => 'Poll Results';
607+
608+
@override
609+
String showAllVotesLabel({int? count}) {
610+
if (count == null) return 'Show all votes';
611+
return 'Show all $count votes';
612+
}
613+
614+
@override
615+
String voteCountLabel({int? count}) => switch (count) {
616+
null || < 1 => '0 votes',
617+
1 => '1 vote',
618+
_ => '$count votes',
619+
};
620+
621+
@override
622+
String get noPollVotesLabel => 'There are no poll votes currently';
623+
624+
@override
625+
String get loadingPollVotesError => 'Error loading poll votes';
564626
}
565627

566628
void main() async {

packages/stream_chat_localizations/lib/src/stream_chat_localizations_ca.dart

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,14 +532,76 @@ class StreamChatLocalizationsCa extends GlobalStreamChatLocalizations {
532532
}
533533

534534
@override
535-
String get anonymousPollLabel => 'Enquesta anònima';
535+
String get anonymousPollLabel => 'Votació anònima';
536+
537+
@override
538+
String get pollOptionsLabel => 'Opcions de votació';
536539

537540
@override
538541
String get suggestAnOptionLabel => 'Suggerir una opció';
539542

540543
@override
541-
String get addACommentLabel => 'Afegeix un comentari';
544+
String get enterANewOptionLabel => 'Introduïu una nova opció';
545+
546+
@override
547+
String get addACommentLabel => 'Afegir un comentari';
548+
549+
@override
550+
String get pollCommentsLabel => 'Comentaris de la votació';
551+
552+
@override
553+
String get updateYourCommentLabel => 'Actualitzar el vostre comentari';
554+
555+
@override
556+
String get enterYourCommentLabel => 'Introduïu el vostre comentari';
542557

543558
@override
544559
String get createLabel => 'Crear';
560+
561+
@override
562+
String pollVotingModeLabel(PollVotingMode votingMode) {
563+
return votingMode.when(
564+
disabled: () => 'Votació finalitzada',
565+
unique: () => 'Seleccionar un',
566+
limited: (count) => 'Seleccionar fins a $count',
567+
all: () => 'Seleccionar un o més',
568+
);
569+
}
570+
571+
@override
572+
String seeAllOptionsLabel({int? count}) {
573+
if (count == null) return 'Veure totes les opcions';
574+
return 'Veure totes les $count opcions';
575+
}
576+
577+
@override
578+
String get viewCommentsLabel => 'Veure comentaris';
579+
580+
@override
581+
String get viewResultsLabel => 'Veure resultats';
582+
583+
@override
584+
String get endVoteLabel => 'Finalitzar votació';
585+
586+
@override
587+
String get pollResultsLabel => 'Resultats de la votació';
588+
589+
@override
590+
String showAllVotesLabel({int? count}) {
591+
if (count == null) return 'Mostrar tots els vots';
592+
return 'Mostrar tots els $count vots';
593+
}
594+
595+
@override
596+
String voteCountLabel({int? count}) => switch (count) {
597+
null || < 1 => '0 vots',
598+
1 => '1 vot',
599+
_ => '$count vots',
600+
};
601+
602+
@override
603+
String get noPollVotesLabel => 'No hi ha vots en aquest moment';
604+
605+
@override
606+
String get loadingPollVotesError => 'Error en carregar els vots';
545607
}

packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,12 +528,74 @@ class StreamChatLocalizationsDe extends GlobalStreamChatLocalizations {
528528
@override
529529
String get anonymousPollLabel => 'Anonyme Umfrage';
530530

531+
@override
532+
String get pollOptionsLabel => 'Umfrage-Optionen';
533+
531534
@override
532535
String get suggestAnOptionLabel => 'Option vorschlagen';
533536

537+
@override
538+
String get enterANewOptionLabel => 'Neue Option eingeben';
539+
534540
@override
535541
String get addACommentLabel => 'Kommentar hinzufügen';
536542

537543
@override
538-
String get createLabel => 'Schaffen';
544+
String get pollCommentsLabel => 'Umfrage-Kommentare';
545+
546+
@override
547+
String get updateYourCommentLabel => 'Kommentar aktualisieren';
548+
549+
@override
550+
String get enterYourCommentLabel => 'Kommentar eingeben';
551+
552+
@override
553+
String get createLabel => 'Erstellen';
554+
555+
@override
556+
String pollVotingModeLabel(PollVotingMode votingMode) {
557+
return votingMode.when(
558+
disabled: () => 'Abstimmung beendet',
559+
unique: () => 'Eine auswählen',
560+
limited: (count) => 'Bis zu $count auswählen',
561+
all: () => 'Eine oder mehrere auswählen',
562+
);
563+
}
564+
565+
@override
566+
String seeAllOptionsLabel({int? count}) {
567+
if (count == null) return 'Alle Optionen anzeigen';
568+
return 'Alle $count Optionen anzeigen';
569+
}
570+
571+
@override
572+
String get viewCommentsLabel => 'Kommentare anzeigen';
573+
574+
@override
575+
String get viewResultsLabel => 'Ergebnisse anzeigen';
576+
577+
@override
578+
String get endVoteLabel => 'Abstimmung beenden';
579+
580+
@override
581+
String get pollResultsLabel => 'Umfrage-Ergebnisse';
582+
583+
@override
584+
String showAllVotesLabel({int? count}) {
585+
if (count == null) return 'Alle Stimmen anzeigen';
586+
return 'Alle $count Stimmen anzeigen';
587+
}
588+
589+
@override
590+
String voteCountLabel({int? count}) => switch (count) {
591+
null || < 1 => '0 Stimmen',
592+
1 => '1 Stimme',
593+
_ => '$count Stimmen',
594+
};
595+
596+
@override
597+
String get noPollVotesLabel => 'Derzeit keine Umfrage-Stimmen';
598+
599+
@override
600+
String get loadingPollVotesError => 'Fehler beim Laden der Umfrage-Stimmen';
539601
}

packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,12 +530,74 @@ class StreamChatLocalizationsEn extends GlobalStreamChatLocalizations {
530530
@override
531531
String get anonymousPollLabel => 'Anonymous poll';
532532

533+
@override
534+
String get pollOptionsLabel => 'Poll Options';
535+
533536
@override
534537
String get suggestAnOptionLabel => 'Suggest an option';
535538

539+
@override
540+
String get enterANewOptionLabel => 'Enter a new option';
541+
536542
@override
537543
String get addACommentLabel => 'Add a comment';
538544

545+
@override
546+
String get pollCommentsLabel => 'Poll Comments';
547+
548+
@override
549+
String get updateYourCommentLabel => 'Update your comment';
550+
551+
@override
552+
String get enterYourCommentLabel => 'Enter your comment';
553+
539554
@override
540555
String get createLabel => 'Create';
556+
557+
@override
558+
String pollVotingModeLabel(PollVotingMode votingMode) {
559+
return votingMode.when(
560+
disabled: () => 'Vote ended',
561+
unique: () => 'Select one',
562+
limited: (count) => 'Select up to $count',
563+
all: () => 'Select one or more',
564+
);
565+
}
566+
567+
@override
568+
String seeAllOptionsLabel({int? count}) {
569+
if (count == null) return 'See all options';
570+
return 'See all $count options';
571+
}
572+
573+
@override
574+
String get viewCommentsLabel => 'View Comments';
575+
576+
@override
577+
String get viewResultsLabel => 'View Results';
578+
579+
@override
580+
String get endVoteLabel => 'End Vote';
581+
582+
@override
583+
String get pollResultsLabel => 'Poll Results';
584+
585+
@override
586+
String showAllVotesLabel({int? count}) {
587+
if (count == null) return 'Show all votes';
588+
return 'Show all $count votes';
589+
}
590+
591+
@override
592+
String voteCountLabel({int? count}) => switch (count) {
593+
null || < 1 => '0 votes',
594+
1 => '1 vote',
595+
_ => '$count votes',
596+
};
597+
598+
@override
599+
String get noPollVotesLabel => 'There are no poll votes currently';
600+
601+
@override
602+
String get loadingPollVotesError => 'Error loading poll votes';
541603
}

packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,14 +533,77 @@ No es posible añadir más de $limit archivos adjuntos
533533
}
534534

535535
@override
536-
String get anonymousPollLabel => 'Sondeo anónimo';
536+
String get anonymousPollLabel => 'Encuesta anónima';
537+
538+
@override
539+
String get pollOptionsLabel => 'Opciones de la encuesta';
537540

538541
@override
539542
String get suggestAnOptionLabel => 'Sugerir una opción';
540543

541544
@override
542-
String get addACommentLabel => 'Añadir un comentario';
545+
String get enterANewOptionLabel => 'Ingresar una nueva opción';
546+
547+
@override
548+
String get addACommentLabel => 'Agregar un comentario';
549+
550+
@override
551+
String get pollCommentsLabel => 'Comentarios de la encuesta';
552+
553+
@override
554+
String get updateYourCommentLabel => 'Actualizar tu comentario';
555+
556+
@override
557+
String get enterYourCommentLabel => 'Ingresar tu comentario';
543558

544559
@override
545560
String get createLabel => 'Crear';
561+
562+
@override
563+
String pollVotingModeLabel(PollVotingMode votingMode) {
564+
return votingMode.when(
565+
disabled: () => 'Votación finalizada',
566+
unique: () => 'Seleccionar uno',
567+
limited: (count) => 'Seleccionar hasta $count',
568+
all: () => 'Seleccionar uno o más',
569+
);
570+
}
571+
572+
@override
573+
String seeAllOptionsLabel({int? count}) {
574+
if (count == null) return 'Ver todas las opciones';
575+
return 'Ver todas las $count opciones';
576+
}
577+
578+
@override
579+
String get viewCommentsLabel => 'Ver comentarios';
580+
581+
@override
582+
String get viewResultsLabel => 'Ver resultados';
583+
584+
@override
585+
String get endVoteLabel => 'Finalizar votación';
586+
587+
@override
588+
String get pollResultsLabel => 'Resultados de la encuesta';
589+
590+
@override
591+
String showAllVotesLabel({int? count}) {
592+
if (count == null) return 'Mostrar todos los votos';
593+
return 'Mostrar todos los $count votos';
594+
}
595+
596+
@override
597+
String voteCountLabel({int? count}) => switch (count) {
598+
null || < 1 => '0 votos',
599+
1 => '1 voto',
600+
_ => '$count votos',
601+
};
602+
603+
@override
604+
String get noPollVotesLabel => 'No hay votos en la encuesta actualmente';
605+
606+
@override
607+
String get loadingPollVotesError =>
608+
'Error al cargar los votos de la encuesta';
546609
}

0 commit comments

Comments
 (0)