Skip to content

Commit 1136df7

Browse files
Merge branch 'main' into settings-UI
2 parents a622958 + 6e49e5c commit 1136df7

27 files changed

+177
-57
lines changed

assets/l10n/app_en.arb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,9 +806,15 @@
806806
"@loginErrorMissingUsername": {
807807
"description": "Error message when an empty username was provided."
808808
},
809-
"topicValidationErrorTooLong": "Topic length shouldn't be greater than 60 characters.",
809+
"topicValidationErrorTooLong": "Topic length shouldn't be greater than {maxLength, plural, =1{1 character} other{{maxLength} characters}}.",
810810
"@topicValidationErrorTooLong": {
811-
"description": "Topic validation error when topic is too long."
811+
"description": "Topic validation error when topic is too long.",
812+
"placeholders": {
813+
"maxLength": {
814+
"type": "int",
815+
"example": "60"
816+
}
817+
}
812818
},
813819
"topicValidationErrorMandatoryButEmpty": "Topics are required in this organization.",
814820
"@topicValidationErrorMandatoryButEmpty": {

lib/api/model/initial_snapshot.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class InitialSnapshot {
2424

2525
final List<CustomProfileField> customProfileFields;
2626

27+
final int maxTopicLength;
28+
2729
final int serverPresencePingIntervalSeconds;
2830
final int serverPresenceOfflineThresholdSeconds;
2931

@@ -158,6 +160,7 @@ class InitialSnapshot {
158160
required this.zulipMergeBase,
159161
required this.alertWords,
160162
required this.customProfileFields,
163+
required this.maxTopicLength,
161164
required this.serverPresencePingIntervalSeconds,
162165
required this.serverPresenceOfflineThresholdSeconds,
163166
required this.serverTypingStartedExpiryPeriodMilliseconds,

lib/api/model/initial_snapshot.g.dart

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api/route/messages.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ class GetMessagesResult {
121121
Map<String, dynamic> toJson() => _$GetMessagesResultToJson(this);
122122
}
123123

124-
// https://zulip.com/api/send-message#parameter-topic
125-
const int kMaxTopicLengthCodePoints = 60;
126-
127124
// https://zulip.com/api/send-message#parameter-content
128125
const int kMaxMessageLengthCodePoints = 10000;
129126

lib/generated/l10n/zulip_localizations.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,8 +1242,8 @@ abstract class ZulipLocalizations {
12421242
/// Topic validation error when topic is too long.
12431243
///
12441244
/// In en, this message translates to:
1245-
/// **'Topic length shouldn\'t be greater than 60 characters.'**
1246-
String get topicValidationErrorTooLong;
1245+
/// **'Topic length shouldn\'t be greater than {maxLength, plural, =1{1 character} other{{maxLength} characters}}.'**
1246+
String topicValidationErrorTooLong(int maxLength);
12471247

12481248
/// Topic validation error when topic is required but was empty.
12491249
///

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,8 +661,15 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
661661
String get loginErrorMissingUsername => 'Please enter your username.';
662662

663663
@override
664-
String get topicValidationErrorTooLong =>
665-
'Topic length shouldn\'t be greater than 60 characters.';
664+
String topicValidationErrorTooLong(int maxLength) {
665+
String _temp0 = intl.Intl.pluralLogic(
666+
maxLength,
667+
locale: localeName,
668+
other: '$maxLength characters',
669+
one: '1 character',
670+
);
671+
return 'Topic length shouldn\'t be greater than $_temp0.';
672+
}
666673

667674
@override
668675
String get topicValidationErrorMandatoryButEmpty =>

lib/generated/l10n/zulip_localizations_de.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,8 +680,9 @@ class ZulipLocalizationsDe extends ZulipLocalizations {
680680
String get loginErrorMissingUsername => 'Bitte gib deinen Benutzernamen ein.';
681681

682682
@override
683-
String get topicValidationErrorTooLong =>
684-
'Länge des Themas sollte 60 Zeichen nicht überschreiten.';
683+
String topicValidationErrorTooLong(int maxLength) {
684+
return 'Länge des Themas sollte 60 Zeichen nicht überschreiten.';
685+
}
685686

686687
@override
687688
String get topicValidationErrorMandatoryButEmpty =>

lib/generated/l10n/zulip_localizations_el.dart

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,8 +661,15 @@ class ZulipLocalizationsEl extends ZulipLocalizations {
661661
String get loginErrorMissingUsername => 'Please enter your username.';
662662

663663
@override
664-
String get topicValidationErrorTooLong =>
665-
'Topic length shouldn\'t be greater than 60 characters.';
664+
String topicValidationErrorTooLong(int maxLength) {
665+
String _temp0 = intl.Intl.pluralLogic(
666+
maxLength,
667+
locale: localeName,
668+
other: '$maxLength characters',
669+
one: '1 character',
670+
);
671+
return 'Topic length shouldn\'t be greater than $_temp0.';
672+
}
666673

667674
@override
668675
String get topicValidationErrorMandatoryButEmpty =>

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,8 +661,15 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
661661
String get loginErrorMissingUsername => 'Please enter your username.';
662662

663663
@override
664-
String get topicValidationErrorTooLong =>
665-
'Topic length shouldn\'t be greater than 60 characters.';
664+
String topicValidationErrorTooLong(int maxLength) {
665+
String _temp0 = intl.Intl.pluralLogic(
666+
maxLength,
667+
locale: localeName,
668+
other: '$maxLength characters',
669+
one: '1 character',
670+
);
671+
return 'Topic length shouldn\'t be greater than $_temp0.';
672+
}
666673

667674
@override
668675
String get topicValidationErrorMandatoryButEmpty =>

lib/generated/l10n/zulip_localizations_es.dart

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,8 +661,15 @@ class ZulipLocalizationsEs extends ZulipLocalizations {
661661
String get loginErrorMissingUsername => 'Please enter your username.';
662662

663663
@override
664-
String get topicValidationErrorTooLong =>
665-
'Topic length shouldn\'t be greater than 60 characters.';
664+
String topicValidationErrorTooLong(int maxLength) {
665+
String _temp0 = intl.Intl.pluralLogic(
666+
maxLength,
667+
locale: localeName,
668+
other: '$maxLength characters',
669+
one: '1 character',
670+
);
671+
return 'Topic length shouldn\'t be greater than $_temp0.';
672+
}
666673

667674
@override
668675
String get topicValidationErrorMandatoryButEmpty =>

0 commit comments

Comments
 (0)