merge merge branch into merge-analytics branch

This commit is contained in:
ggurdin 2024-09-11 10:50:25 -04:00
commit fbd8d63c46
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
10 changed files with 91 additions and 21 deletions

View file

@ -3903,7 +3903,7 @@
"define": "Define",
"listen": "Listen",
"addConversationBot": "Enable Conversation Bot",
"addConversationBotDesc": "Add a bot to this group chat",
"addConversationBotDesc": "Add a bot to this chat",
"convoBotSettingsTitle": "Conversation Bot Settings",
"convoBotSettingsDescription": "Edit conversation topic and difficulty",
"enterAConversationTopic": "Enter a conversation topic",
@ -4059,14 +4059,38 @@
"tooltipInstructionsMobileBody": "Press and hold items to view tooltips.",
"tooltipInstructionsBrowserBody": "Hover over items to view tooltips.",
"addSpaceToSpaceDescription": "Select a space to add as a parent",
"roomCapacity": "Room Capacity",
"roomCapacity": "{roomType} Capacity",
"@roomCapacity": {
"type": "text",
"placeholders": {
"roomType": {}
}
},
"roomFull": "This room is already at capacity.",
"topicNotSet": "The topic has not been set.",
"capacityNotSet": "This room has no capacity limit.",
"roomCapacityHasBeenChanged": "Room capacity changed",
"roomCapacityHasBeenChanged": "{roomType} capacity changed",
"@roomCapacityHasBeenChanged": {
"type": "text",
"placeholders": {
"roomType": {}
}
},
"roomExceedsCapacity": "Room exceeds capacity. Consider removing students from the room, or raising the capacity.",
"capacitySetTooLow": "Room capacity cannot be set below the current number of non-admins.",
"roomCapacityExplanation": "Room capacity limits the number of non-admins allowed in a room.",
"capacitySetTooLow": "{roomType} capacity cannot be set below the current number of non-admins.",
"@capacitySetTooLow": {
"type": "text",
"placeholders": {
"roomType": {}
}
},
"roomCapacityExplanation": "{roomType} capacity limits the number of non-admins allowed in a room.",
"@roomCapacityExplanation": {
"type": "text",
"placeholders": {
"roomType": {}
}
},
"enterNumber": "Please enter a whole number value.",
"buildTranslation": "Build your translation from the choices above",
"noDatabaseEncryption": "Database encryption is not supported on this platform",
@ -4201,5 +4225,8 @@
"whatIsAHomeserver": "What is a homeserver?",
"homeserverDescription": "All your data is stored on the homeserver, just like an email provider. You can choose which homeserver you want to use, while you can still communicate with everyone. Learn more at at https://matrix.org.",
"doesNotSeemToBeAValidHomeserver": "Doesn't seem to be a compatible homeserver. Wrong URL?",
"grammar": "Grammar"
"grammar": "Grammar",
"contactHasBeenInvitedToTheChat": "Contact has been invited to the chat",
"inviteChat": "📨 Invite chat",
"chatName": "Chat name"
}

View file

@ -139,8 +139,11 @@ class ChatListController extends State<ChatList>
final inviteAction = await showModalActionSheet<InviteActions>(
context: context,
message: room.isDirectChat
// #Pangea
? L10n.of(context)!.invitePrivateChat
: L10n.of(context)!.inviteGroupChat,
// : L10n.of(context)!.inviteGroupChat,
: L10n.of(context)!.inviteChat,
// Pangea#
title: room.getLocalizedDisplayname(MatrixLocals(L10n.of(context)!)),
actions: [
SheetAction(

View file

@ -328,7 +328,10 @@ class ChatListItem extends StatelessWidget {
room.membership == Membership.invite
? isDirectChat
? L10n.of(context)!.invitePrivateChat
: L10n.of(context)!.inviteGroupChat
// #Pangea
// : L10n.of(context)!.inviteGroupChat
: L10n.of(context)!.inviteChat
// Pangea#
: snapshot.data ??
L10n.of(context)!.emptyChat,
softWrap: false,

View file

@ -319,7 +319,10 @@ class _SpaceViewState extends State<SpaceView> {
),
AlertDialogAction(
key: AddRoomType.chat,
label: L10n.of(context)!.createGroup,
// #Pangea
// label: L10n.of(context)!.createGroup,
label: L10n.of(context)!.createChat,
// Pangea#
),
],
);
@ -329,12 +332,18 @@ class _SpaceViewState extends State<SpaceView> {
context: context,
title: roomType == AddRoomType.subspace
? L10n.of(context)!.createNewSpace
: L10n.of(context)!.createGroup,
// #Pangea
// : L10n.of(context)!.createGroup,
: L10n.of(context)!.createChat,
// Pangea#
textFields: [
DialogTextField(
hintText: roomType == AddRoomType.subspace
? L10n.of(context)!.spaceName
: L10n.of(context)!.groupName,
// #Pangea
// : L10n.of(context)!.groupName,
: L10n.of(context)!.chatName,
// Pangea#
minLines: 1,
maxLines: 1,
maxLength: 64,

View file

@ -182,7 +182,10 @@ class InvitationSelectionController extends State<InvitationSelection> {
if (success.error == null) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(L10n.of(context)!.contactHasBeenInvitedToTheGroup),
// #Pangea
// content: Text(L10n.of(context)!.contactHasBeenInvitedToTheGroup),
content: Text(L10n.of(context)!.contactHasBeenInvitedToTheChat),
// Pangea#
),
);
}

View file

@ -27,7 +27,10 @@ class NewGroupView extends StatelessWidget {
onPressed: controller.loading ? null : Navigator.of(context).pop,
),
),
title: Text(L10n.of(context)!.createGroup),
// #Pangea
// title: Text(L10n.of(context)!.createGroup),
title: Text(L10n.of(context)!.createChat),
// Pangea#
),
// #Pangea
floatingActionButton: FloatingActionButton.extended(
@ -74,7 +77,10 @@ class NewGroupView extends StatelessWidget {
readOnly: controller.loading,
decoration: InputDecoration(
prefixIcon: const Icon(Icons.people_outlined),
labelText: L10n.of(context)!.groupName,
// #Pangea
// labelText: L10n.of(context)!.groupName,
labelText: L10n.of(context)!.chatName,
// Pangea#
),
),
),

View file

@ -140,7 +140,10 @@ class NewPrivateChatView extends StatelessWidget {
foregroundColor: theme.colorScheme.onTertiaryContainer,
child: const Icon(Icons.group_add_outlined),
),
title: Text(L10n.of(context)!.createGroup),
// #Pangea
// title: Text(L10n.of(context)!.createGroup),
title: Text(L10n.of(context)!.createChat),
// Pangea#
onTap: () => context.go('/rooms/newgroup'),
),
if (PlatformInfos.isMobile)

View file

@ -72,6 +72,7 @@ class NewSpaceView extends StatelessWidget {
// #Pangea
RoomCapacityButton(
key: controller.addCapacityKey,
spaceMode: true,
),
AddToSpaceToggles(
key: controller.addToSpaceKey,

View file

@ -53,7 +53,10 @@ class ClassInvitationSelectionController
if (success.error == null) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(L10n.of(context)!.contactHasBeenInvitedToTheGroup),
// #Pangea
// content: Text(L10n.of(context)!.contactHasBeenInvitedToTheGroup),
content: Text(L10n.of(context)!.contactHasBeenInvitedToTheChat),
// Pangea#
),
);
}

View file

@ -9,10 +9,13 @@ import 'package:matrix/matrix.dart';
class RoomCapacityButton extends StatefulWidget {
final Room? room;
final ChatDetailsController? controller;
final bool spaceMode;
const RoomCapacityButton({
super.key,
this.room,
this.controller,
this.spaceMode = false,
});
@override
@ -66,6 +69,15 @@ class RoomCapacityButtonState extends State<RoomCapacityButton> {
}
}
String get roomType {
final String chat = L10n.of(context)!.chat;
final String space = L10n.of(context)!.space;
if (widget.room != null) {
return widget.room!.isSpace ? space : chat;
}
return widget.spaceMode ? space : chat;
}
@override
Widget build(BuildContext context) {
final iconColor = Theme.of(context).textTheme.bodyLarge!.color;
@ -86,7 +98,7 @@ class RoomCapacityButtonState extends State<RoomCapacityButton> {
: '$capacity',
),
title: Text(
L10n.of(context)!.roomCapacity,
L10n.of(context)!.roomCapacity(roomType),
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
fontWeight: FontWeight.bold,
@ -104,8 +116,8 @@ class RoomCapacityButtonState extends State<RoomCapacityButton> {
Future<void> setRoomCapacity() async {
final input = await showTextInputDialog(
context: context,
title: L10n.of(context)!.roomCapacity,
message: L10n.of(context)!.roomCapacityExplanation,
title: L10n.of(context)!.roomCapacity(roomType),
message: L10n.of(context)!.roomCapacityExplanation(roomType),
okLabel: L10n.of(context)!.ok,
cancelLabel: L10n.of(context)!.cancel,
textFields: [
@ -121,7 +133,7 @@ class RoomCapacityButtonState extends State<RoomCapacityButton> {
return L10n.of(context)!.enterNumber;
}
if (nonAdmins != null && int.parse(value) < int.parse(nonAdmins!)) {
return L10n.of(context)!.capacitySetTooLow;
return L10n.of(context)!.capacitySetTooLow(roomType);
}
return null;
},
@ -147,7 +159,7 @@ class RoomCapacityButtonState extends State<RoomCapacityButton> {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
L10n.of(context)!.roomCapacityHasBeenChanged,
L10n.of(context)!.roomCapacityHasBeenChanged(roomType),
),
),
);