Add localizations
This commit is contained in:
parent
1f230c0a63
commit
a776ac1513
|
@ -1,6 +1,7 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
import 'package:fluffychat/views/chat_details.dart';
|
import 'package:fluffychat/views/chat_details.dart';
|
||||||
import 'package:fluffychat/views/chat_list.dart';
|
import 'package:fluffychat/views/chat_list.dart';
|
||||||
|
@ -39,25 +40,25 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
||||||
);
|
);
|
||||||
List<PopupMenuEntry<String>> items = <PopupMenuEntry<String>>[
|
List<PopupMenuEntry<String>> items = <PopupMenuEntry<String>>[
|
||||||
widget.room.pushRuleState == PushRuleState.notify
|
widget.room.pushRuleState == PushRuleState.notify
|
||||||
? const PopupMenuItem<String>(
|
? PopupMenuItem<String>(
|
||||||
value: "mute",
|
value: "mute",
|
||||||
child: Text('Mute chat'),
|
child: Text(I18n.of(context).muteChat),
|
||||||
)
|
)
|
||||||
: const PopupMenuItem<String>(
|
: PopupMenuItem<String>(
|
||||||
value: "unmute",
|
value: "unmute",
|
||||||
child: Text('Unmute chat'),
|
child: Text(I18n.of(context).unmuteChat),
|
||||||
),
|
),
|
||||||
const PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
value: "leave",
|
value: "leave",
|
||||||
child: Text('Leave'),
|
child: Text(I18n.of(context).leave),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
if (widget.displayChatDetails) {
|
if (widget.displayChatDetails) {
|
||||||
items.insert(
|
items.insert(
|
||||||
0,
|
0,
|
||||||
const PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
value: "details",
|
value: "details",
|
||||||
child: Text('Chat details'),
|
child: Text(I18n.of(context).chatDetails),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../matrix.dart';
|
import '../matrix.dart';
|
||||||
|
@ -15,7 +16,7 @@ class RedactMessageDialog extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text("Message will be removed for all participants"),
|
title: Text(I18n.of(context).messageWillBeRemovedWarning),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
FlatButton(
|
FlatButton(
|
||||||
child: Text("Close".toUpperCase(),
|
child: Text("Close".toUpperCase(),
|
||||||
|
@ -24,7 +25,7 @@ class RedactMessageDialog extends StatelessWidget {
|
||||||
),
|
),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
child: Text(
|
child: Text(
|
||||||
"Remove".toUpperCase(),
|
I18n.of(context).remove.toUpperCase(),
|
||||||
style: TextStyle(color: Colors.red),
|
style: TextStyle(color: Colors.red),
|
||||||
),
|
),
|
||||||
onPressed: () => removeAction(context),
|
onPressed: () => removeAction(context),
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/event_extension.dart';
|
import 'package:fluffychat/utils/event_extension.dart';
|
||||||
import 'package:fluffychat/utils/date_time_extension.dart';
|
import 'package:fluffychat/utils/date_time_extension.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
|
@ -27,7 +28,8 @@ class ChatListItem extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (room.membership == Membership.ban) {
|
if (room.membership == Membership.ban) {
|
||||||
Toast.show("You have been banned from this chat", context, duration: 5);
|
Toast.show(I18n.of(context).youHaveBeenBannedFromThisChat, context,
|
||||||
|
duration: 5);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,16 +37,16 @@ class ChatListItem extends StatelessWidget {
|
||||||
await showDialog(
|
await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) => AlertDialog(
|
builder: (BuildContext context) => AlertDialog(
|
||||||
title: Text("Archived Room"),
|
title: Text(I18n.of(context).archivedRoom),
|
||||||
content: Text("This room has been archived."),
|
content: Text(I18n.of(context).thisRoomHasBeenArchived),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
FlatButton(
|
FlatButton(
|
||||||
child: Text("Close".toUpperCase(),
|
child: Text(I18n.of(context).close.toUpperCase(),
|
||||||
style: TextStyle(color: Colors.blueGrey)),
|
style: TextStyle(color: Colors.blueGrey)),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
child: Text("Forget".toUpperCase(),
|
child: Text(I18n.of(context).delete.toUpperCase(),
|
||||||
style: TextStyle(color: Colors.red)),
|
style: TextStyle(color: Colors.red)),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await Matrix.of(context)
|
await Matrix.of(context)
|
||||||
|
@ -54,7 +56,7 @@ class ChatListItem extends StatelessWidget {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
child: Text("Rejoin".toUpperCase(),
|
child: Text(I18n.of(context).rejoin.toUpperCase(),
|
||||||
style: TextStyle(color: Colors.blue)),
|
style: TextStyle(color: Colors.blue)),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await Matrix.of(context)
|
await Matrix.of(context)
|
||||||
|
@ -112,7 +114,7 @@ class ChatListItem extends StatelessWidget {
|
||||||
Expanded(
|
Expanded(
|
||||||
child: room.membership == Membership.invite
|
child: room.membership == Membership.invite
|
||||||
? Text(
|
? Text(
|
||||||
"You are invited to this chat",
|
I18n.of(context).youAreInvitedToThisChat,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
),
|
),
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:bubble/bubble.dart';
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
import 'package:fluffychat/components/dialogs/redact_message_dialog.dart';
|
import 'package:fluffychat/components/dialogs/redact_message_dialog.dart';
|
||||||
import 'package:fluffychat/components/message_content.dart';
|
import 'package:fluffychat/components/message_content.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
import 'package:fluffychat/utils/date_time_extension.dart';
|
import 'package:fluffychat/utils/date_time_extension.dart';
|
||||||
import 'package:fluffychat/utils/string_color.dart';
|
import 'package:fluffychat/utils/string_color.dart';
|
||||||
|
@ -48,9 +49,9 @@ class Message extends StatelessWidget {
|
||||||
List<PopupMenuEntry<String>> popupMenuList = [];
|
List<PopupMenuEntry<String>> popupMenuList = [];
|
||||||
if (event.canRedact && !event.redacted && event.status > 1) {
|
if (event.canRedact && !event.redacted && event.status > 1) {
|
||||||
popupMenuList.add(
|
popupMenuList.add(
|
||||||
const PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
value: "remove",
|
value: "remove",
|
||||||
child: Text('Remove message'),
|
child: Text(I18n.of(context).removeMessage),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -75,24 +76,24 @@ class Message extends StatelessWidget {
|
||||||
|
|
||||||
if (!event.redacted) {
|
if (!event.redacted) {
|
||||||
popupMenuList.add(
|
popupMenuList.add(
|
||||||
const PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
value: "forward",
|
value: "forward",
|
||||||
child: Text('Forward'),
|
child: Text(I18n.of(context).forward),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ownMessage && event.status == -1) {
|
if (ownMessage && event.status == -1) {
|
||||||
popupMenuList.add(
|
popupMenuList.add(
|
||||||
const PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
value: "resend",
|
value: "resend",
|
||||||
child: Text('Send again'),
|
child: Text(I18n.of(context).tryToSendAgain),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
popupMenuList.add(
|
popupMenuList.add(
|
||||||
const PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
value: "delete",
|
value: "delete",
|
||||||
child: Text('Delete message'),
|
child: Text(I18n.of(context).deleteMessage),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -100,7 +101,7 @@ class Message extends StatelessWidget {
|
||||||
List<Widget> rowChildren = [
|
List<Widget> rowChildren = [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: PopupMenuButton(
|
child: PopupMenuButton(
|
||||||
tooltip: "Tap to show menu",
|
tooltip: I18n.of(context).tapToShowMenu,
|
||||||
onSelected: (String choice) async {
|
onSelected: (String choice) async {
|
||||||
switch (choice) {
|
switch (choice) {
|
||||||
case "remove":
|
case "remove":
|
||||||
|
@ -141,7 +142,9 @@ class Message extends StatelessWidget {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
ownMessage ? "You" : event.sender.calcDisplayname(),
|
ownMessage
|
||||||
|
? I18n.of(context).you
|
||||||
|
: event.sender.calcDisplayname(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: ownMessage
|
color: ownMessage
|
||||||
? textColor
|
? textColor
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
import 'package:fluffychat/views/chat.dart';
|
import 'package:fluffychat/views/chat.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -43,45 +44,50 @@ class ParticipantListItem extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
const Map<Membership, String> membershipBatch = {
|
Map<Membership, String> membershipBatch = {
|
||||||
Membership.join: "",
|
Membership.join: "",
|
||||||
Membership.ban: "Banned",
|
Membership.ban: I18n.of(context).banned,
|
||||||
Membership.invite: "Invited",
|
Membership.invite: I18n.of(context).invited,
|
||||||
Membership.leave: "Left",
|
Membership.leave: I18n.of(context).leftTheChat,
|
||||||
};
|
};
|
||||||
final String permissionBatch = user.powerLevel == 100
|
final String permissionBatch = user.powerLevel == 100
|
||||||
? "Admin"
|
? I18n.of(context).admin
|
||||||
: user.powerLevel >= 50 ? "Moderator" : "";
|
: user.powerLevel >= 50 ? I18n.of(context).moderator : "";
|
||||||
List<PopupMenuEntry<String>> items = <PopupMenuEntry<String>>[];
|
List<PopupMenuEntry<String>> items = <PopupMenuEntry<String>>[];
|
||||||
if (user.canChangePowerLevel &&
|
if (user.canChangePowerLevel &&
|
||||||
user.room.ownPowerLevel == 100 &&
|
user.room.ownPowerLevel == 100 &&
|
||||||
user.powerLevel != 100) {
|
user.powerLevel != 100) {
|
||||||
items.add(
|
items.add(
|
||||||
PopupMenuItem(child: Text("Make an admin"), value: "admin"),
|
PopupMenuItem(
|
||||||
|
child: Text(I18n.of(context).makeAnAdmin), value: "admin"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (user.canChangePowerLevel && user.powerLevel != 0) {
|
if (user.canChangePowerLevel && user.powerLevel != 0) {
|
||||||
items.add(
|
items.add(
|
||||||
PopupMenuItem(child: Text("Revoke all permissions"), value: "user"),
|
PopupMenuItem(
|
||||||
|
child: Text(I18n.of(context).revokeAllPermissions), value: "user"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (user.canKick) {
|
if (user.canKick) {
|
||||||
items.add(
|
items.add(
|
||||||
PopupMenuItem(child: Text("Kick from group"), value: "kick"),
|
PopupMenuItem(
|
||||||
|
child: Text(I18n.of(context).kickFromChat), value: "kick"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (user.canBan && user.membership != Membership.ban) {
|
if (user.canBan && user.membership != Membership.ban) {
|
||||||
items.add(
|
items.add(
|
||||||
PopupMenuItem(child: Text("Ban from group"), value: "ban"),
|
PopupMenuItem(child: Text(I18n.of(context).banFromChat), value: "ban"),
|
||||||
);
|
);
|
||||||
} else if (user.canBan && user.membership == Membership.ban) {
|
} else if (user.canBan && user.membership == Membership.ban) {
|
||||||
items.add(
|
items.add(
|
||||||
PopupMenuItem(child: Text("Remove exile"), value: "unban"),
|
PopupMenuItem(
|
||||||
|
child: Text(I18n.of(context).removeExile), value: "unban"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (user.id != Matrix.of(context).client.userID) {
|
if (user.id != Matrix.of(context).client.userID) {
|
||||||
items.add(
|
items.add(
|
||||||
PopupMenuItem(child: Text("Send a message"), value: "message"),
|
PopupMenuItem(
|
||||||
|
child: Text(I18n.of(context).sendAMessage), value: "message"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return PopupMenuButton(
|
return PopupMenuButton(
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
import 'package:fluffychat/utils/event_extension.dart';
|
import 'package:fluffychat/utils/event_extension.dart';
|
||||||
import 'package:fluffychat/utils/room_extension.dart';
|
import 'package:fluffychat/utils/room_extension.dart';
|
||||||
|
@ -131,7 +132,7 @@ class MatrixState extends State<Matrix> {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
CircularProgressIndicator(),
|
CircularProgressIndicator(),
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
Text("Loading... Please wait"),
|
Text(I18n.of(context).loadingPleaseWait),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -167,9 +168,9 @@ class MatrixState extends State<Matrix> {
|
||||||
final String token = await _firebaseMessaging.getToken();
|
final String token = await _firebaseMessaging.getToken();
|
||||||
if (token?.isEmpty ?? true) {
|
if (token?.isEmpty ?? true) {
|
||||||
return Toast.show(
|
return Toast.show(
|
||||||
"Push notifications disabled.",
|
I18n.of(context).noGoogleServicesWarning,
|
||||||
context,
|
context,
|
||||||
duration: Toast.LENGTH_LONG,
|
duration: 10,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
await client.setPushers(
|
await client.setPushers(
|
||||||
|
@ -261,8 +262,9 @@ class MatrixState extends State<Matrix> {
|
||||||
|
|
||||||
// Calculate title
|
// Calculate title
|
||||||
final String title = unread > 1
|
final String title = unread > 1
|
||||||
? "$unreadEvents unread messages in $unread chats"
|
? I18n.of(context).unreadMessagesInChats(
|
||||||
: "$unreadEvents unread messages";
|
unreadEvents.toString(), unread.toString())
|
||||||
|
: I18n.of(context).unreadMessages(unreadEvents.toString());
|
||||||
|
|
||||||
// Calculate the body
|
// Calculate the body
|
||||||
final String body = event.getLocalizedBody(context,
|
final String body = event.getLocalizedBody(context,
|
||||||
|
@ -300,7 +302,7 @@ class MatrixState extends State<Matrix> {
|
||||||
),
|
),
|
||||||
importance: Importance.Max,
|
importance: Importance.Max,
|
||||||
priority: Priority.High,
|
priority: Priority.High,
|
||||||
ticker: 'New message in FluffyChat');
|
ticker: I18n.of(context).newMessageInFluffyChat);
|
||||||
var iOSPlatformChannelSpecifics = IOSNotificationDetails();
|
var iOSPlatformChannelSpecifics = IOSNotificationDetails();
|
||||||
var platformChannelSpecifics = NotificationDetails(
|
var platformChannelSpecifics = NotificationDetails(
|
||||||
androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
|
androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:bubble/bubble.dart';
|
import 'package:bubble/bubble.dart';
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
import 'package:fluffychat/utils/event_extension.dart';
|
import 'package:fluffychat/utils/event_extension.dart';
|
||||||
import 'package:fluffychat/views/content_web_view.dart';
|
import 'package:fluffychat/views/content_web_view.dart';
|
||||||
|
@ -63,7 +64,7 @@ class MessageContent extends StatelessWidget {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Icon(Icons.play_arrow, color: Colors.white),
|
Icon(Icons.play_arrow, color: Colors.white),
|
||||||
Text(
|
Text(
|
||||||
"Play ${event.body}",
|
I18n.of(context).play(event.body),
|
||||||
overflow: TextOverflow.fade,
|
overflow: TextOverflow.fade,
|
||||||
softWrap: false,
|
softWrap: false,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
|
@ -88,7 +89,7 @@ class MessageContent extends StatelessWidget {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Icon(Icons.play_arrow, color: Colors.white),
|
Icon(Icons.play_arrow, color: Colors.white),
|
||||||
Text(
|
Text(
|
||||||
"Play ${event.body}",
|
I18n.of(context).play(event.body),
|
||||||
overflow: TextOverflow.fade,
|
overflow: TextOverflow.fade,
|
||||||
softWrap: false,
|
softWrap: false,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
|
@ -110,7 +111,7 @@ class MessageContent extends StatelessWidget {
|
||||||
child: RaisedButton(
|
child: RaisedButton(
|
||||||
color: Colors.blueGrey,
|
color: Colors.blueGrey,
|
||||||
child: Text(
|
child: Text(
|
||||||
"Download ${event.body}",
|
I18n.of(context).download(event.body),
|
||||||
overflow: TextOverflow.fade,
|
overflow: TextOverflow.fade,
|
||||||
softWrap: false,
|
softWrap: false,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
|
@ -144,7 +145,8 @@ class MessageContent extends StatelessWidget {
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
return Text(
|
return Text(
|
||||||
"${event.sender.calcDisplayname()} sent a ${event.typeKey} event",
|
I18n.of(context).userSentUnknownEvent(
|
||||||
|
event.sender.calcDisplayname(), event.typeKey),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: textColor,
|
color: textColor,
|
||||||
decoration: event.redacted ? TextDecoration.lineThrough : null,
|
decoration: event.redacted ? TextDecoration.lineThrough : null,
|
||||||
|
|
|
@ -2,14 +2,35 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'messages_all.dart';
|
import 'messages_all.dart';
|
||||||
|
|
||||||
|
class AppLocalizationsDelegate extends LocalizationsDelegate<I18n> {
|
||||||
|
const AppLocalizationsDelegate();
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool isSupported(Locale locale) {
|
||||||
|
return ['en', 'de'].contains(locale.languageCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<I18n> load(Locale locale) {
|
||||||
|
return I18n.load(locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool shouldReload(LocalizationsDelegate<I18n> old) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class I18n {
|
class I18n {
|
||||||
I18n(this.localeName);
|
I18n(this.localeName);
|
||||||
|
|
||||||
static Future<I18n> load(Locale locale) {
|
static Future<I18n> load(Locale locale) {
|
||||||
final String name =
|
final String name =
|
||||||
locale.countryCode.isEmpty ? locale.languageCode : locale.toString();
|
locale.countryCode == null ? locale.languageCode : locale.toString();
|
||||||
final String localeName = Intl.canonicalizedLocale(name);
|
final String localeName = Intl.canonicalizedLocale(name);
|
||||||
return initializeMessages(localeName).then((_) {
|
|
||||||
|
return initializeMessages(localeName).then((bool _) {
|
||||||
|
Intl.defaultLocale = localeName;
|
||||||
return I18n(localeName);
|
return I18n(localeName);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -22,30 +43,518 @@ class I18n {
|
||||||
|
|
||||||
/* <=============> Translations <=============> */
|
/* <=============> Translations <=============> */
|
||||||
|
|
||||||
|
String get about => Intl.message("About");
|
||||||
|
|
||||||
|
String acceptedTheInvitation(String username) => Intl.message(
|
||||||
|
"$username accepted the invitation",
|
||||||
|
name: "acceptedTheInvitation",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String activatedEndToEndEncryption(String username) => Intl.message(
|
||||||
|
"$username activated end to end encryption",
|
||||||
|
name: "activatedEndToEndEncryption",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get addGroupDescription => Intl.message("Add a group description");
|
||||||
|
|
||||||
|
String get admin => Intl.message("Admin");
|
||||||
|
|
||||||
|
String get alias => Intl.message("alias");
|
||||||
|
|
||||||
|
String get alreadyHaveAnAccount => Intl.message("Already have an account?");
|
||||||
|
|
||||||
|
String get anyoneCanJoin => Intl.message("Anyone can join");
|
||||||
|
|
||||||
|
String get archive => Intl.message("Archive");
|
||||||
|
|
||||||
|
String get archivedRoom => Intl.message("Archived Room");
|
||||||
|
|
||||||
|
String get areGuestsAllowedToJoin =>
|
||||||
|
Intl.message("Are guest users allowed to join");
|
||||||
|
|
||||||
|
String get authentication => Intl.message("Authentication");
|
||||||
|
|
||||||
|
String get avatarHasBeenChanged => Intl.message("Avatar has been changed");
|
||||||
|
|
||||||
|
String get banFromChat => Intl.message("Ban from chat");
|
||||||
|
|
||||||
|
String get banned => Intl.message("Banned");
|
||||||
|
|
||||||
|
String bannedUser(String username, String targetName) => Intl.message(
|
||||||
|
"$username banned $targetName",
|
||||||
|
name: "bannedUser",
|
||||||
|
args: [username, targetName],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheChatAvatar(String username) => Intl.message(
|
||||||
|
"$username changed the chat avatar",
|
||||||
|
name: "changedTheChatAvatar",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheChatNameTo(String username, String chatname) => Intl.message(
|
||||||
|
"$username changed the chat name to: '$chatname'",
|
||||||
|
name: "changedTheChatNameTo",
|
||||||
|
args: [username, chatname],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheChatDescriptionTo(String username, String description) =>
|
||||||
|
Intl.message(
|
||||||
|
"$username changed the chat description to: '$description'",
|
||||||
|
name: "changedTheChatDescriptionTo",
|
||||||
|
args: [username, description],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheChatPermissions(String username) => Intl.message(
|
||||||
|
"$username changed the chat permissions",
|
||||||
|
name: "changedTheChatPermissions",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheDisplaynameTo(String username, String displayname) =>
|
||||||
|
Intl.message(
|
||||||
|
"$username changed the displayname to: $displayname",
|
||||||
|
name: "changedTheDisplaynameTo",
|
||||||
|
args: [username, displayname],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheGuestAccessRules(String username) => Intl.message(
|
||||||
|
"$username changed the guest access rules",
|
||||||
|
name: "changedTheGuestAccessRules",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheGuestAccessRulesTo(String username, String rules) =>
|
||||||
|
Intl.message(
|
||||||
|
"$username changed the guest access rules to: $rules",
|
||||||
|
name: "changedTheGuestAccessRulesTo",
|
||||||
|
args: [username, rules],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheHistoryVisibility(String username) => Intl.message(
|
||||||
|
"$username changed the history visibility",
|
||||||
|
name: "changedTheHistoryVisibility",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheHistoryVisibilityTo(String username, String rules) =>
|
||||||
|
Intl.message(
|
||||||
|
"$username changed the history visibility to: $rules",
|
||||||
|
name: "changedTheHistoryVisibilityTo",
|
||||||
|
args: [username, rules],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheJoinRules(String username) => Intl.message(
|
||||||
|
"$username changed the join rules",
|
||||||
|
name: "changedTheJoinRules",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheJoinRulesTo(String username, String joinRules) =>
|
||||||
|
Intl.message(
|
||||||
|
"$username changed the join rules to: $joinRules",
|
||||||
|
name: "changedTheJoinRulesTo",
|
||||||
|
args: [username, joinRules],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheProfileAvatar(String username) => Intl.message(
|
||||||
|
"$username changed the profile avatar",
|
||||||
|
name: "changedTheProfileAvatar",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheRoomAliases(String username) => Intl.message(
|
||||||
|
"$username changed the room aliases",
|
||||||
|
name: "changedTheRoomAliases",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String changedTheRoomInvitationLink(String username) => Intl.message(
|
||||||
|
"$username changed the invitation link",
|
||||||
|
name: "changedTheRoomInvitationLink",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get changelog => Intl.message("Changelog");
|
||||||
|
|
||||||
|
String get changeTheNameOfTheGroup =>
|
||||||
|
Intl.message("Change the name of the group");
|
||||||
|
|
||||||
|
String get chatDetails => Intl.message('Chat details');
|
||||||
|
|
||||||
|
String get chooseAUsername => Intl.message("Choose a username");
|
||||||
|
|
||||||
String get close => Intl.message("Close");
|
String get close => Intl.message("Close");
|
||||||
|
|
||||||
String get confirm => Intl.message("Confirm");
|
String get confirm => Intl.message("Confirm");
|
||||||
|
|
||||||
|
String get connectionAttemptFailed =>
|
||||||
|
Intl.message("Connection attempt failed");
|
||||||
|
|
||||||
|
String get contactHasBeenInvitedToTheGroup =>
|
||||||
|
Intl.message("Contact has been invited to the group");
|
||||||
|
|
||||||
|
String get contentViewer => Intl.message("Content viewer");
|
||||||
|
|
||||||
|
String get copiedToClipboard => Intl.message("Copied to clipboard");
|
||||||
|
|
||||||
|
String get couldNotDecryptMessage =>
|
||||||
|
Intl.message("Could not decrypt message");
|
||||||
|
|
||||||
|
String get couldNotSetAvatar => Intl.message("Could not set avatar");
|
||||||
|
|
||||||
|
String get couldNotSetDisplayname =>
|
||||||
|
Intl.message("Could not set displayname");
|
||||||
|
|
||||||
|
String countParticipants(String count) => Intl.message(
|
||||||
|
"$count participants",
|
||||||
|
name: "countParticipants",
|
||||||
|
args: [count],
|
||||||
|
);
|
||||||
|
|
||||||
String get create => Intl.message("Create");
|
String get create => Intl.message("Create");
|
||||||
|
|
||||||
|
String get createAccountNow => Intl.message("Create account now");
|
||||||
|
|
||||||
|
String createdTheChat(String username) => Intl.message(
|
||||||
|
"$username created the chat",
|
||||||
|
name: "createdTheChat",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
String get createNewGroup => Intl.message("Create new group");
|
String get createNewGroup => Intl.message("Create new group");
|
||||||
|
|
||||||
|
String dateAndTimeOfDay(String date, String timeOfDay) => Intl.message(
|
||||||
|
"$date, $timeOfDay",
|
||||||
|
name: "dateAndTimeOfDay",
|
||||||
|
args: [date, timeOfDay],
|
||||||
|
);
|
||||||
|
|
||||||
|
String dateWithoutYear(String month, String day) => Intl.message(
|
||||||
|
"$month-$day",
|
||||||
|
name: "dateWithoutYear",
|
||||||
|
args: [month, day],
|
||||||
|
);
|
||||||
|
|
||||||
|
String dateWithYear(String year, String month, String day) => Intl.message(
|
||||||
|
"$year-$month-$day",
|
||||||
|
name: "dateWithYear",
|
||||||
|
args: [year, month, day],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get delete => Intl.message("Delete");
|
||||||
|
|
||||||
|
String get deleteMessage => Intl.message("Delete message");
|
||||||
|
|
||||||
|
String get discardPicture => Intl.message("Discard picture");
|
||||||
|
|
||||||
|
String get displaynameHasBeenChanged =>
|
||||||
|
Intl.message("Displayname has been changed");
|
||||||
|
|
||||||
|
String download(String fileName) => Intl.message(
|
||||||
|
"Download $fileName",
|
||||||
|
name: "download",
|
||||||
|
args: [fileName],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get editDisplayname => Intl.message("Edit displayname");
|
||||||
|
|
||||||
|
String get emptyChat => Intl.message("Empty chat");
|
||||||
|
|
||||||
String get enterAGroupName => Intl.message("Enter a group name");
|
String get enterAGroupName => Intl.message("Enter a group name");
|
||||||
|
|
||||||
String get enterAUsername => Intl.message("Enter a username");
|
String get enterAUsername => Intl.message("Enter a username");
|
||||||
|
|
||||||
|
String get fluffychat => Intl.message("FluffyChat");
|
||||||
|
|
||||||
|
String get forward => Intl.message('Forward');
|
||||||
|
|
||||||
|
String get friday => Intl.message("Friday");
|
||||||
|
|
||||||
|
String get fromJoining => Intl.message("From joining");
|
||||||
|
|
||||||
|
String get fromTheInvitation => Intl.message("From the invitation");
|
||||||
|
|
||||||
|
String get group => Intl.message("Group");
|
||||||
|
|
||||||
|
String get groupDescription => Intl.message("Group description");
|
||||||
|
|
||||||
|
String get groupDescriptionHasBeenChanged =>
|
||||||
|
Intl.message("Group description has been changed");
|
||||||
|
|
||||||
String get groupIsPublic => Intl.message("Group is public");
|
String get groupIsPublic => Intl.message("Group is public");
|
||||||
|
|
||||||
|
String groupWith(String displayname) => Intl.message(
|
||||||
|
"Group with $displayname",
|
||||||
|
name: "groupWith",
|
||||||
|
args: [displayname],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get guestsAreForbidden => Intl.message("Guests are forbidden");
|
||||||
|
|
||||||
|
String get guestsCanJoin => Intl.message("Guests can join");
|
||||||
|
|
||||||
|
String hasWithdrawnTheInvitationFor(String username, String targetName) =>
|
||||||
|
Intl.message(
|
||||||
|
"$username has withdrawn the invitation for $targetName",
|
||||||
|
name: "hasWithdrawnTheInvitationFor",
|
||||||
|
args: [username, targetName],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get help => Intl.message("Help");
|
||||||
|
|
||||||
|
String get homeserverIsNotCompatible =>
|
||||||
|
Intl.message("Homeserver is not compatible");
|
||||||
|
|
||||||
|
String get inviteContact => Intl.message("Invite contact");
|
||||||
|
|
||||||
|
String inviteContactToGroup(String groupName) => Intl.message(
|
||||||
|
"Invite contact to $groupName",
|
||||||
|
name: "inviteContactToGroup",
|
||||||
|
args: [groupName],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get invited => Intl.message("Invited");
|
||||||
|
|
||||||
|
String invitedUser(String username, String targetName) => Intl.message(
|
||||||
|
"$username invited $targetName",
|
||||||
|
name: "invitedUser",
|
||||||
|
args: [username, targetName],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get invitedUsersOnly => Intl.message("Invited users only");
|
||||||
|
|
||||||
|
String get isTyping => Intl.message("is typing...");
|
||||||
|
|
||||||
|
String joinedTheChat(String username) => Intl.message(
|
||||||
|
"$username joined the chat",
|
||||||
|
name: "joinedTheChat",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String kicked(String username, String targetName) => Intl.message(
|
||||||
|
"$username kicked $targetName",
|
||||||
|
name: "kicked",
|
||||||
|
args: [username, targetName],
|
||||||
|
);
|
||||||
|
|
||||||
|
String kickedAndBanned(String username, String targetName) => Intl.message(
|
||||||
|
"$username kicked and banned $targetName",
|
||||||
|
name: "kickedAndBanned",
|
||||||
|
args: [username, targetName],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get kickFromChat => Intl.message("Kick from chat");
|
||||||
|
|
||||||
|
String get leave => Intl.message('Leave');
|
||||||
|
|
||||||
|
String get leftTheChat => Intl.message("Left the chat");
|
||||||
|
|
||||||
|
String get logout => Intl.message("Logout");
|
||||||
|
|
||||||
|
String userLeftTheChat(String username) => Intl.message(
|
||||||
|
"$username left the chat",
|
||||||
|
name: "userLeftTheChat",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get license => Intl.message("License");
|
||||||
|
|
||||||
|
String get loadingPleaseWait => Intl.message("Loading... Please wait");
|
||||||
|
|
||||||
|
String loadCountMoreParticipants(String count) => Intl.message(
|
||||||
|
"Load $count more participants",
|
||||||
|
name: "loadCountMoreParticipants",
|
||||||
|
args: [count],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get login => Intl.message("Login");
|
||||||
|
|
||||||
|
String get makeAnAdmin => Intl.message("Make an admin");
|
||||||
|
|
||||||
String get makeSureTheIdentifierIsValid =>
|
String get makeSureTheIdentifierIsValid =>
|
||||||
Intl.message("Make sure the identifier is valid");
|
Intl.message("Make sure the identifier is valid");
|
||||||
|
|
||||||
|
String get messageWillBeRemovedWarning =>
|
||||||
|
Intl.message("Message will be removed for all participants");
|
||||||
|
|
||||||
|
String get moderator => Intl.message("Moderator");
|
||||||
|
|
||||||
|
String get monday => Intl.message("Monday");
|
||||||
|
|
||||||
|
String get muteChat => Intl.message('Mute chat');
|
||||||
|
|
||||||
|
String get newMessageInFluffyChat =>
|
||||||
|
Intl.message('New message in FluffyChat');
|
||||||
|
|
||||||
String get newPrivateChat => Intl.message("New private chat");
|
String get newPrivateChat => Intl.message("New private chat");
|
||||||
|
|
||||||
|
String get noGoogleServicesWarning => Intl.message(
|
||||||
|
"It seems that you have no google services on your phone. That's a good decision for your privacy! To receive push notifications in FluffyChat we recommend using microG: https://microg.org/");
|
||||||
|
|
||||||
|
String get noRoomsFound => Intl.message("No rooms found...");
|
||||||
|
|
||||||
|
String get notSupportedInWeb => Intl.message("Not supported in web");
|
||||||
|
|
||||||
|
String get oopsSomethingWentWrong =>
|
||||||
|
Intl.message("Oops something went wrong...");
|
||||||
|
|
||||||
|
String get openCamera => Intl.message('Open camera');
|
||||||
|
|
||||||
String get optionalGroupName => Intl.message("(Optional) Group name");
|
String get optionalGroupName => Intl.message("(Optional) Group name");
|
||||||
|
|
||||||
|
String get password => Intl.message("Password");
|
||||||
|
|
||||||
|
String play(String fileName) => Intl.message(
|
||||||
|
"Play $fileName",
|
||||||
|
name: "play",
|
||||||
|
args: [fileName],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get pleaseChooseAUsername => Intl.message("Please choose a username");
|
||||||
|
|
||||||
String get pleaseEnterAMatrixIdentifier =>
|
String get pleaseEnterAMatrixIdentifier =>
|
||||||
Intl.message('Please enter a matrix identifier');
|
Intl.message('Please enter a matrix identifier');
|
||||||
|
|
||||||
|
String get pleaseEnterYourPassword =>
|
||||||
|
Intl.message("Please enter your password");
|
||||||
|
|
||||||
|
String get pleaseEnterYourUsername =>
|
||||||
|
Intl.message("Please enter your username");
|
||||||
|
|
||||||
|
String get rejoin => Intl.message("Rejoin");
|
||||||
|
|
||||||
|
String redactedAnEvent(String username) => Intl.message(
|
||||||
|
"$username redacted an event",
|
||||||
|
name: "redactedAnEvent",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String rejectedTheInvitation(String username) => Intl.message(
|
||||||
|
"$username rejected the invitation",
|
||||||
|
name: "rejectedTheInvitation",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String removedBy(String username) => Intl.message(
|
||||||
|
"Removed by $username",
|
||||||
|
name: "removedBy",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get removeExile => Intl.message("Remove exile");
|
||||||
|
|
||||||
|
String get revokeAllPermissions => Intl.message("Revoke all permissions");
|
||||||
|
|
||||||
|
String get remove => Intl.message("Remove");
|
||||||
|
|
||||||
|
String get removeMessage => Intl.message('Remove message');
|
||||||
|
|
||||||
|
String get saturday => Intl.message("Saturday");
|
||||||
|
|
||||||
|
String get share => Intl.message("Share");
|
||||||
|
|
||||||
|
String sharedTheLocation(String username) => Intl.message(
|
||||||
|
"$username shared the location",
|
||||||
|
name: "sharedTheLocation",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get searchForAChat => Intl.message("Search for a chat");
|
||||||
|
|
||||||
|
String get secureYourAccountWithAPassword =>
|
||||||
|
Intl.message("Secure your account with a password");
|
||||||
|
|
||||||
|
String seenByUser(String username) => Intl.message(
|
||||||
|
"Seen by $username",
|
||||||
|
name: "seenByUser",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String seenByUserAndUser(String username, String username2) => Intl.message(
|
||||||
|
"Seen by $username and $username2",
|
||||||
|
name: "seenByUserAndUser",
|
||||||
|
args: [username, username2],
|
||||||
|
);
|
||||||
|
|
||||||
|
String seenByUserAndCountOthers(String username, String count) =>
|
||||||
|
Intl.message(
|
||||||
|
"Seen by $username and $count others",
|
||||||
|
name: "seenByUserAndCountOthers",
|
||||||
|
args: [username, count],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get sendAMessage => Intl.message("Send a message");
|
||||||
|
|
||||||
|
String get sendFile => Intl.message('Send file');
|
||||||
|
|
||||||
|
String get sendImage => Intl.message('Send image');
|
||||||
|
|
||||||
|
String sentAFile(String username) => Intl.message(
|
||||||
|
"$username sent a file",
|
||||||
|
name: "sentAFile",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String sentAnAudio(String username) => Intl.message(
|
||||||
|
"$username sent an audio",
|
||||||
|
name: "sentAnAudio",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String sentAPicture(String username) => Intl.message(
|
||||||
|
"$username sent a picture",
|
||||||
|
name: "sentAPicture",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String sentASticker(String username) => Intl.message(
|
||||||
|
"$username sent a sticker",
|
||||||
|
name: "sentASticker",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String sentAVideo(String username) => Intl.message(
|
||||||
|
"$username sent a video",
|
||||||
|
name: "sentAVideo",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get setAProfilePicture => Intl.message("Set a profile picture");
|
||||||
|
|
||||||
|
String get setGroupDescription => Intl.message("Set group description");
|
||||||
|
|
||||||
|
String get setInvitationLink => Intl.message("Set invitation link");
|
||||||
|
|
||||||
|
String get settings => Intl.message("Settings");
|
||||||
|
|
||||||
|
String get signUp => Intl.message("Sign up");
|
||||||
|
|
||||||
|
String get sourceCode => Intl.message("Source code");
|
||||||
|
|
||||||
|
String get startYourFirstChat => Intl.message("Start your first chat :-)");
|
||||||
|
|
||||||
|
String get sunday => Intl.message("Sunday");
|
||||||
|
|
||||||
|
String get donate => Intl.message("Donate");
|
||||||
|
|
||||||
|
String get tapToShowMenu => Intl.message("Tap to show menu");
|
||||||
|
|
||||||
|
String get thisRoomHasBeenArchived =>
|
||||||
|
Intl.message("This room has been archived.");
|
||||||
|
|
||||||
|
String get thursday => Intl.message("Thursday");
|
||||||
|
|
||||||
|
String timeOfDay(
|
||||||
|
String hours12, String hours24, String minutes, String suffix) =>
|
||||||
|
Intl.message(
|
||||||
|
"$hours12:$minutes $suffix",
|
||||||
|
name: "timeOfDay",
|
||||||
|
args: [hours12, hours24, minutes, suffix],
|
||||||
|
);
|
||||||
|
|
||||||
String get title => Intl.message(
|
String get title => Intl.message(
|
||||||
'FluffyChat',
|
'FluffyChat',
|
||||||
name: 'title',
|
name: 'title',
|
||||||
|
@ -53,10 +562,92 @@ class I18n {
|
||||||
locale: localeName,
|
locale: localeName,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
String get tryToSendAgain => Intl.message("Try to send again");
|
||||||
|
|
||||||
|
String get tuesday => Intl.message("Tuesday");
|
||||||
|
|
||||||
|
String unbannedUser(String username, String targetName) => Intl.message(
|
||||||
|
"$username unbanned $targetName",
|
||||||
|
name: "unbannedUser",
|
||||||
|
args: [username, targetName],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get unmuteChat => Intl.message('Unmute chat');
|
||||||
|
|
||||||
|
String unknownEvent(String type) => Intl.message(
|
||||||
|
"Unknown event '$type'",
|
||||||
|
name: "unknownEvent",
|
||||||
|
args: [type],
|
||||||
|
);
|
||||||
|
|
||||||
|
String unreadMessages(String unreadEvents) => Intl.message(
|
||||||
|
"$unreadEvents unread messages",
|
||||||
|
name: "unreadMessages",
|
||||||
|
args: [unreadEvents],
|
||||||
|
);
|
||||||
|
|
||||||
|
String unreadMessagesInChats(String unreadEvents, String unreadChats) =>
|
||||||
|
Intl.message(
|
||||||
|
"$unreadEvents unread messages in $unreadChats chats",
|
||||||
|
name: "unreadMessagesInChats",
|
||||||
|
args: [unreadEvents, unreadChats],
|
||||||
|
);
|
||||||
|
|
||||||
|
String userAndOthersAreTyping(String username, String count) => Intl.message(
|
||||||
|
"$username and $count others are typing...",
|
||||||
|
name: "userAndOthersAreTyping",
|
||||||
|
args: [username, count],
|
||||||
|
);
|
||||||
|
|
||||||
|
String userAndUserAreTyping(String username, String username2) =>
|
||||||
|
Intl.message(
|
||||||
|
"$username and $username2 are typing...",
|
||||||
|
name: "userAndUserAreTyping",
|
||||||
|
args: [username, username2],
|
||||||
|
);
|
||||||
|
|
||||||
String get username => Intl.message("Username");
|
String get username => Intl.message("Username");
|
||||||
|
|
||||||
|
String userIsTyping(String username) => Intl.message(
|
||||||
|
"$username is typing...",
|
||||||
|
name: "userIsTyping",
|
||||||
|
args: [username],
|
||||||
|
);
|
||||||
|
|
||||||
|
String userSentUnknownEvent(String username, String type) => Intl.message(
|
||||||
|
"$username sent a $type event",
|
||||||
|
name: "userSentUnknownEvent",
|
||||||
|
args: [username, type],
|
||||||
|
);
|
||||||
|
|
||||||
|
String get visibleForAllParticipants =>
|
||||||
|
Intl.message("Visible for all participants");
|
||||||
|
|
||||||
|
String get visibleForEveryone => Intl.message("Visible for everyone");
|
||||||
|
|
||||||
|
String get visibilityOfTheChatHistory =>
|
||||||
|
Intl.message("Visibility of the chat history");
|
||||||
|
|
||||||
|
String get wednesday => Intl.message("Wednesday");
|
||||||
|
|
||||||
|
String get whoIsAllowedToJoinThisGroup =>
|
||||||
|
Intl.message("Who is allowed to join this group");
|
||||||
|
|
||||||
|
String get writeAMessage => Intl.message("Write a message...");
|
||||||
|
|
||||||
|
String get you => Intl.message("You");
|
||||||
|
|
||||||
|
String get youAreInvitedToThisChat =>
|
||||||
|
Intl.message("You are invited to this chat");
|
||||||
|
|
||||||
|
String get youAreNoLongerParticipatingInThisChat =>
|
||||||
|
Intl.message("You are no longer participating in this chat");
|
||||||
|
|
||||||
String get youCannotInviteYourself =>
|
String get youCannotInviteYourself =>
|
||||||
Intl.message("You cannot invite yourself");
|
Intl.message("You cannot invite yourself");
|
||||||
|
|
||||||
|
String get youHaveBeenBannedFromThisChat =>
|
||||||
|
Intl.message("You have been banned from this chat");
|
||||||
|
|
||||||
String get yourOwnUsername => Intl.message("Your own username");
|
String get yourOwnUsername => Intl.message("Your own username");
|
||||||
}
|
}
|
||||||
|
|
1005
lib/i18n/intl_de.arb
1005
lib/i18n/intl_de.arb
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -19,8 +19,290 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
|
||||||
class MessageLookup extends MessageLookupByLibrary {
|
class MessageLookup extends MessageLookupByLibrary {
|
||||||
String get localeName => 'de';
|
String get localeName => 'de';
|
||||||
|
|
||||||
|
static m0(username) => "${username} hat die Einladung akzeptiert";
|
||||||
|
|
||||||
|
static m1(username) => "${username} hat Ende-zu-Ende Verschlüsselung aktiviert";
|
||||||
|
|
||||||
|
static m2(username, targetName) => "${username} hat ${targetName} verbannt";
|
||||||
|
|
||||||
|
static m3(username) => "${username} hat den Chat-Avatar geändert";
|
||||||
|
|
||||||
|
static m4(username, description) => "${username} hat die Beschreibung vom Chat geändert zu: \'${description}\'";
|
||||||
|
|
||||||
|
static m5(username, chatname) => "${username} hat den Chat-Namen geändert zu: \'${chatname}\'";
|
||||||
|
|
||||||
|
static m6(username) => "${username} hat die Berechtigungen vom Chat geändert";
|
||||||
|
|
||||||
|
static m7(username, displayname) => "${username} hat den Nicknamen geändert zu: ${displayname}";
|
||||||
|
|
||||||
|
static m8(username) => "${username} hat Gast-Zugangsregeln geändert";
|
||||||
|
|
||||||
|
static m9(username, rules) => "${username} hat Gast-Zugangsregeln geändert zu: ${rules}";
|
||||||
|
|
||||||
|
static m10(username) => "${username} hat die Sichtbarkeit des Chat-Verlaufs geändert";
|
||||||
|
|
||||||
|
static m11(username, rules) => "${username} hat die Sichtbarkeit des Chat-Verlaufs geändert zu: ${rules}";
|
||||||
|
|
||||||
|
static m12(username) => "${username} hat die Zugangsregeln geändert";
|
||||||
|
|
||||||
|
static m13(username, joinRules) => "${username} hat die Zugangsregeln geändert zu: ${joinRules}";
|
||||||
|
|
||||||
|
static m14(username) => "${username} hat das Profilbild geändert";
|
||||||
|
|
||||||
|
static m15(username) => "${username} hat die Raum-Aliase geändert";
|
||||||
|
|
||||||
|
static m16(username) => "${username} hat den Einladungslink geändert";
|
||||||
|
|
||||||
|
static m17(count) => "${count} Teilnehmer";
|
||||||
|
|
||||||
|
static m18(username) => "${username} hat den Chat erstellt";
|
||||||
|
|
||||||
|
static m19(date, timeOfDay) => "${date}, ${timeOfDay}";
|
||||||
|
|
||||||
|
static m20(year, month, day) => "${day}.${month}.${year}";
|
||||||
|
|
||||||
|
static m21(month, day) => "${day}.${month}";
|
||||||
|
|
||||||
|
static m22(fileName) => "Download ${fileName}";
|
||||||
|
|
||||||
|
static m23(displayname) => "Gruppe mit ${displayname}";
|
||||||
|
|
||||||
|
static m24(username, targetName) => "${username} hat die Einladung für ${targetName} zurückgezogen";
|
||||||
|
|
||||||
|
static m25(groupName) => "Kontakt zu ${groupName} einladen";
|
||||||
|
|
||||||
|
static m26(username, targetName) => "${username} hat ${targetName} eingeladen";
|
||||||
|
|
||||||
|
static m27(username) => "${username} ist dem Chat beigetreten";
|
||||||
|
|
||||||
|
static m28(username, targetName) => "${username} hat ${targetName} hinausgeworfen";
|
||||||
|
|
||||||
|
static m29(username, targetName) => "${username} hat ${targetName} hinausgeworfen und verbannt";
|
||||||
|
|
||||||
|
static m30(count) => "${count} weitere Teilnehmer laden";
|
||||||
|
|
||||||
|
static m31(fileName) => "Play ${fileName}";
|
||||||
|
|
||||||
|
static m32(username) => "${username} hat ein Event enternt";
|
||||||
|
|
||||||
|
static m33(username) => "${username} hat die Einladung abgelehnt";
|
||||||
|
|
||||||
|
static m34(username) => "Entfernt von ${username}";
|
||||||
|
|
||||||
|
static m35(username) => "Gelesen von ${username}";
|
||||||
|
|
||||||
|
static m36(username, count) => "Gelesen von ${username} und ${count} anderen";
|
||||||
|
|
||||||
|
static m37(username, username2) => "Gelesen von ${username} und ${username2}";
|
||||||
|
|
||||||
|
static m38(username) => "${username} hat eine Datei gesendet";
|
||||||
|
|
||||||
|
static m39(username) => "${username} hat ein Bild gesendet";
|
||||||
|
|
||||||
|
static m40(username) => "${username} hat einen Sticker gesendet";
|
||||||
|
|
||||||
|
static m41(username) => "${username} hat ein Video gesendet";
|
||||||
|
|
||||||
|
static m42(username) => "${username} hat eine Audio-Datei gesendet";
|
||||||
|
|
||||||
|
static m43(username) => "${username} hat den Standort geteilt";
|
||||||
|
|
||||||
|
static m44(hours12, hours24, minutes, suffix) => "${hours24}:${minutes}";
|
||||||
|
|
||||||
|
static m45(username, targetName) => "${username} hat die Verbannung von ${targetName} aufgehoben";
|
||||||
|
|
||||||
|
static m46(type) => "Unbekanntes Event \'${type}\'";
|
||||||
|
|
||||||
|
static m47(unreadEvents) => "${unreadEvents} ungelesene Nachrichten";
|
||||||
|
|
||||||
|
static m48(unreadEvents, unreadChats) => "${unreadEvents} ungelesene Nachrichten in ${unreadChats} Chats";
|
||||||
|
|
||||||
|
static m49(username, count) => "${username} und ${count} andere schreiben ...";
|
||||||
|
|
||||||
|
static m50(username, username2) => "${username} und ${username2} schreiben ...";
|
||||||
|
|
||||||
|
static m51(username) => "${username} schreibt ...";
|
||||||
|
|
||||||
|
static m52(username) => "${username} hat den Chat verlassen";
|
||||||
|
|
||||||
|
static m53(username, type) => "${username} hat ${type} Event gesendet";
|
||||||
|
|
||||||
final messages = _notInlinedMessages(_notInlinedMessages);
|
final messages = _notInlinedMessages(_notInlinedMessages);
|
||||||
static _notInlinedMessages(_) => <String, Function> {
|
static _notInlinedMessages(_) => <String, Function> {
|
||||||
|
"(Optional) Group name" : MessageLookupByLibrary.simpleMessage("(Optional) Name für die Gruppe"),
|
||||||
|
"About" : MessageLookupByLibrary.simpleMessage("Über"),
|
||||||
|
"Add a group description" : MessageLookupByLibrary.simpleMessage("Eine Beschreibung für die Gruppe hinzufügen"),
|
||||||
|
"Admin" : MessageLookupByLibrary.simpleMessage("Admin"),
|
||||||
|
"Already have an account?" : MessageLookupByLibrary.simpleMessage("Hast du schon einen Account?"),
|
||||||
|
"Anyone can join" : MessageLookupByLibrary.simpleMessage("Jeder darf beitreten"),
|
||||||
|
"Archive" : MessageLookupByLibrary.simpleMessage("Archiv"),
|
||||||
|
"Archived Room" : MessageLookupByLibrary.simpleMessage("Archivierter Raum"),
|
||||||
|
"Are guest users allowed to join" : MessageLookupByLibrary.simpleMessage("Dürfen Gast-Benutzer beitreten"),
|
||||||
|
"Authentication" : MessageLookupByLibrary.simpleMessage("Authentifizierung"),
|
||||||
|
"Avatar has been changed" : MessageLookupByLibrary.simpleMessage("Avatar wurde geändert"),
|
||||||
|
"Ban from chat" : MessageLookupByLibrary.simpleMessage("Aus dem Chat verbannen"),
|
||||||
|
"Banned" : MessageLookupByLibrary.simpleMessage("Banned"),
|
||||||
|
"Change the name of the group" : MessageLookupByLibrary.simpleMessage("Gruppenname ändern"),
|
||||||
|
"Changelog" : MessageLookupByLibrary.simpleMessage("Changelog"),
|
||||||
|
"Chat details" : MessageLookupByLibrary.simpleMessage("Gruppeninfo"),
|
||||||
|
"Choose a username" : MessageLookupByLibrary.simpleMessage("Wähle einen Benutzernamen"),
|
||||||
|
"Close" : MessageLookupByLibrary.simpleMessage("Schließen"),
|
||||||
|
"Confirm" : MessageLookupByLibrary.simpleMessage("Bestätigen"),
|
||||||
|
"Connection attempt failed" : MessageLookupByLibrary.simpleMessage("Verbindungsversuch fehlgeschlagen"),
|
||||||
|
"Contact has been invited to the group" : MessageLookupByLibrary.simpleMessage("Kontakt wurde in die Gruppe eingeladen"),
|
||||||
|
"Content viewer" : MessageLookupByLibrary.simpleMessage("Content Viewer"),
|
||||||
|
"Copied to clipboard" : MessageLookupByLibrary.simpleMessage("Wurde in die Zwischenablage kopiert"),
|
||||||
|
"Could not decrypt message" : MessageLookupByLibrary.simpleMessage("Nachricht konnte nicht entschlüsselt werden"),
|
||||||
|
"Could not set avatar" : MessageLookupByLibrary.simpleMessage("Profilbild konnte nicht gesetzt werden"),
|
||||||
|
"Could not set displayname" : MessageLookupByLibrary.simpleMessage("Anzeigename konnte nicht gesetzt werden"),
|
||||||
|
"Create" : MessageLookupByLibrary.simpleMessage("Create"),
|
||||||
|
"Create account now" : MessageLookupByLibrary.simpleMessage("Account jetzt erstellen"),
|
||||||
|
"Create new group" : MessageLookupByLibrary.simpleMessage("Create new group"),
|
||||||
|
"Delete" : MessageLookupByLibrary.simpleMessage("Löschen"),
|
||||||
|
"Delete message" : MessageLookupByLibrary.simpleMessage("Nachricht löschen"),
|
||||||
|
"Discard picture" : MessageLookupByLibrary.simpleMessage("Bild verwerfen"),
|
||||||
|
"Displayname has been changed" : MessageLookupByLibrary.simpleMessage("Anzeigename wurde geändert"),
|
||||||
|
"Donate" : MessageLookupByLibrary.simpleMessage("Spenden"),
|
||||||
|
"Edit displayname" : MessageLookupByLibrary.simpleMessage("Anzeigename ändern"),
|
||||||
|
"Empty chat" : MessageLookupByLibrary.simpleMessage("Leerer Chat"),
|
||||||
|
"Enter a group name" : MessageLookupByLibrary.simpleMessage("Gib einen Gruppennamen ein"),
|
||||||
|
"Enter a username" : MessageLookupByLibrary.simpleMessage("Gib einen Benutzernamen ein"),
|
||||||
|
"FluffyChat" : MessageLookupByLibrary.simpleMessage("FluffyChat"),
|
||||||
|
"Forward" : MessageLookupByLibrary.simpleMessage("Weiterleiten"),
|
||||||
|
"Friday" : MessageLookupByLibrary.simpleMessage("Freitag"),
|
||||||
|
"From joining" : MessageLookupByLibrary.simpleMessage("Ab dem Beitritt"),
|
||||||
|
"From the invitation" : MessageLookupByLibrary.simpleMessage("Ab der Einladung"),
|
||||||
|
"Group" : MessageLookupByLibrary.simpleMessage("Gruppe"),
|
||||||
|
"Group description" : MessageLookupByLibrary.simpleMessage("Gruppenbeschreibung"),
|
||||||
|
"Group description has been changed" : MessageLookupByLibrary.simpleMessage("Gruppenbeschreibung wurde geändert"),
|
||||||
|
"Group is public" : MessageLookupByLibrary.simpleMessage("Gruppe ist öffentlich"),
|
||||||
|
"Guests are forbidden" : MessageLookupByLibrary.simpleMessage("Gäste sind verboten"),
|
||||||
|
"Guests can join" : MessageLookupByLibrary.simpleMessage("Gäste dürfen beitreten"),
|
||||||
|
"Help" : MessageLookupByLibrary.simpleMessage("Hilfe"),
|
||||||
|
"Homeserver is not compatible" : MessageLookupByLibrary.simpleMessage("Homeserver ist nicht kompatibel"),
|
||||||
|
"Invite contact" : MessageLookupByLibrary.simpleMessage("Kontakt einladen"),
|
||||||
|
"Invited" : MessageLookupByLibrary.simpleMessage("Eingeladen"),
|
||||||
|
"Invited users only" : MessageLookupByLibrary.simpleMessage("Nur eingeladene Benutzer"),
|
||||||
|
"It seems that you have no google services on your phone. That\'s a good decision for your privacy! To receive push notifications in FluffyChat we recommend using microG: https://microg.org/" : MessageLookupByLibrary.simpleMessage("Es sieht so aus als hättest du keine Google Dienste auf deinem Gerät. Das ist eine gute Entscheidung für deine Privatsphäre. Um Push Benachrichtigungen in FluffyChat zu erhalten, empfehlen wir die Verwendung von microG: https://microg.org/"),
|
||||||
|
"Kick from chat" : MessageLookupByLibrary.simpleMessage("Aus dem Chat hinauswerfen"),
|
||||||
|
"Leave" : MessageLookupByLibrary.simpleMessage("Verlassen"),
|
||||||
|
"Left the chat" : MessageLookupByLibrary.simpleMessage("Hat den Chat verlassen"),
|
||||||
|
"License" : MessageLookupByLibrary.simpleMessage("Lizenz"),
|
||||||
|
"Loading... Please wait" : MessageLookupByLibrary.simpleMessage("Lade ... Bitte warten"),
|
||||||
|
"Login" : MessageLookupByLibrary.simpleMessage("Login"),
|
||||||
|
"Logout" : MessageLookupByLibrary.simpleMessage("Logout"),
|
||||||
|
"Make an admin" : MessageLookupByLibrary.simpleMessage("Zum Admin ernennen"),
|
||||||
|
"Make sure the identifier is valid" : MessageLookupByLibrary.simpleMessage("Gib bitte einen richtigen Benutzernamen ein"),
|
||||||
|
"Message will be removed for all participants" : MessageLookupByLibrary.simpleMessage("Nachricht wird für alle Teilnehmer entfernt"),
|
||||||
|
"Moderator" : MessageLookupByLibrary.simpleMessage("Moderator"),
|
||||||
|
"Monday" : MessageLookupByLibrary.simpleMessage("Montag"),
|
||||||
|
"Mute chat" : MessageLookupByLibrary.simpleMessage("Stummschalten"),
|
||||||
|
"New message in FluffyChat" : MessageLookupByLibrary.simpleMessage("Neue Nachricht in FluffyChat"),
|
||||||
|
"New private chat" : MessageLookupByLibrary.simpleMessage("Neuer privater Chat"),
|
||||||
|
"No rooms found..." : MessageLookupByLibrary.simpleMessage("Keine Räume gefunden ..."),
|
||||||
|
"Not supported in web" : MessageLookupByLibrary.simpleMessage("Wird in der Web-Version nicht unterstützt"),
|
||||||
|
"Oops something went wrong..." : MessageLookupByLibrary.simpleMessage("Hoppla! Da ist etwas schief gelaufen ..."),
|
||||||
|
"Open camera" : MessageLookupByLibrary.simpleMessage("Kamera öffnen"),
|
||||||
|
"Password" : MessageLookupByLibrary.simpleMessage("Passwort"),
|
||||||
|
"Please choose a username" : MessageLookupByLibrary.simpleMessage("Bitte wähle einen Benutzernamen"),
|
||||||
|
"Please enter a matrix identifier" : MessageLookupByLibrary.simpleMessage("Bitte eine Matrix ID eingeben"),
|
||||||
|
"Please enter your password" : MessageLookupByLibrary.simpleMessage("Bitte dein Passwort eingeben"),
|
||||||
|
"Please enter your username" : MessageLookupByLibrary.simpleMessage("Bitte deinen Benutzernamen eingeben"),
|
||||||
|
"Rejoin" : MessageLookupByLibrary.simpleMessage("Wieder beitreten"),
|
||||||
|
"Remove" : MessageLookupByLibrary.simpleMessage("Entfernen"),
|
||||||
|
"Remove exile" : MessageLookupByLibrary.simpleMessage("Verbannung aufheben"),
|
||||||
|
"Remove message" : MessageLookupByLibrary.simpleMessage("Nachricht entfernen"),
|
||||||
|
"Revoke all permissions" : MessageLookupByLibrary.simpleMessage("Alle Berechtigungen zurücknehmen"),
|
||||||
|
"Saturday" : MessageLookupByLibrary.simpleMessage("Samstag"),
|
||||||
|
"Search for a chat" : MessageLookupByLibrary.simpleMessage("Durchsuche die Chats"),
|
||||||
|
"Secure your account with a password" : MessageLookupByLibrary.simpleMessage("Sichere deinen Account mit einem Passwort ab"),
|
||||||
|
"Send a message" : MessageLookupByLibrary.simpleMessage("Nachricht schreiben"),
|
||||||
|
"Send file" : MessageLookupByLibrary.simpleMessage("Datei senden"),
|
||||||
|
"Send image" : MessageLookupByLibrary.simpleMessage("Bild senden"),
|
||||||
|
"Set a profile picture" : MessageLookupByLibrary.simpleMessage("Ein Profilbild festlegen"),
|
||||||
|
"Set group description" : MessageLookupByLibrary.simpleMessage("Gruppenbeschreibung festlegen"),
|
||||||
|
"Set invitation link" : MessageLookupByLibrary.simpleMessage("Einladungslink festlegen"),
|
||||||
|
"Settings" : MessageLookupByLibrary.simpleMessage("Einstellungen"),
|
||||||
|
"Share" : MessageLookupByLibrary.simpleMessage("Teilen"),
|
||||||
|
"Sign up" : MessageLookupByLibrary.simpleMessage("Registrieren"),
|
||||||
|
"Source code" : MessageLookupByLibrary.simpleMessage("Quellcode"),
|
||||||
|
"Start your first chat :-)" : MessageLookupByLibrary.simpleMessage("Starte deinen ersten Chat :-)"),
|
||||||
|
"Sunday" : MessageLookupByLibrary.simpleMessage("Sonntag"),
|
||||||
|
"Tap to show menu" : MessageLookupByLibrary.simpleMessage("Tippen, um das Menü anzuzeigen"),
|
||||||
|
"This room has been archived." : MessageLookupByLibrary.simpleMessage("Dieser Raum wurde archiviert."),
|
||||||
|
"Thursday" : MessageLookupByLibrary.simpleMessage("Donnerstag"),
|
||||||
|
"Try to send again" : MessageLookupByLibrary.simpleMessage("Nochmal versuchen zu senden"),
|
||||||
|
"Tuesday" : MessageLookupByLibrary.simpleMessage("Tuesday"),
|
||||||
|
"Unmute chat" : MessageLookupByLibrary.simpleMessage("Nicht mehr stummschalten"),
|
||||||
|
"Username" : MessageLookupByLibrary.simpleMessage("Benutzername"),
|
||||||
|
"Visibility of the chat history" : MessageLookupByLibrary.simpleMessage("Sichtbarkeit des Chat-Verlaufs"),
|
||||||
|
"Visible for all participants" : MessageLookupByLibrary.simpleMessage("Sichtbar für alle Teilnehmer"),
|
||||||
|
"Visible for everyone" : MessageLookupByLibrary.simpleMessage("Für jeden sichtbar"),
|
||||||
|
"Wednesday" : MessageLookupByLibrary.simpleMessage("Mittwoch"),
|
||||||
|
"Who is allowed to join this group" : MessageLookupByLibrary.simpleMessage("Wer darf der Gruppe beitreten"),
|
||||||
|
"Write a message..." : MessageLookupByLibrary.simpleMessage("Schreibe eine Nachricht ..."),
|
||||||
|
"You" : MessageLookupByLibrary.simpleMessage("Du"),
|
||||||
|
"You are invited to this chat" : MessageLookupByLibrary.simpleMessage("Du wurdest eingeladen in diesen Chat"),
|
||||||
|
"You are no longer participating in this chat" : MessageLookupByLibrary.simpleMessage("Du bist kein Teilnehmer mehr in diesem Chat"),
|
||||||
|
"You cannot invite yourself" : MessageLookupByLibrary.simpleMessage("Du kannst dich nicht selbst einladen"),
|
||||||
|
"You have been banned from this chat" : MessageLookupByLibrary.simpleMessage("Du wurdest aus dem Chat verbannt"),
|
||||||
|
"Your own username" : MessageLookupByLibrary.simpleMessage("Dein eigener Benutzername"),
|
||||||
|
"acceptedTheInvitation" : m0,
|
||||||
|
"activatedEndToEndEncryption" : m1,
|
||||||
|
"alias" : MessageLookupByLibrary.simpleMessage("Alias"),
|
||||||
|
"bannedUser" : m2,
|
||||||
|
"changedTheChatAvatar" : m3,
|
||||||
|
"changedTheChatDescriptionTo" : m4,
|
||||||
|
"changedTheChatNameTo" : m5,
|
||||||
|
"changedTheChatPermissions" : m6,
|
||||||
|
"changedTheDisplaynameTo" : m7,
|
||||||
|
"changedTheGuestAccessRules" : m8,
|
||||||
|
"changedTheGuestAccessRulesTo" : m9,
|
||||||
|
"changedTheHistoryVisibility" : m10,
|
||||||
|
"changedTheHistoryVisibilityTo" : m11,
|
||||||
|
"changedTheJoinRules" : m12,
|
||||||
|
"changedTheJoinRulesTo" : m13,
|
||||||
|
"changedTheProfileAvatar" : m14,
|
||||||
|
"changedTheRoomAliases" : m15,
|
||||||
|
"changedTheRoomInvitationLink" : m16,
|
||||||
|
"countParticipants" : m17,
|
||||||
|
"createdTheChat" : m18,
|
||||||
|
"dateAndTimeOfDay" : m19,
|
||||||
|
"dateWithYear" : m20,
|
||||||
|
"dateWithoutYear" : m21,
|
||||||
|
"download" : m22,
|
||||||
|
"groupWith" : m23,
|
||||||
|
"hasWithdrawnTheInvitationFor" : m24,
|
||||||
|
"inviteContactToGroup" : m25,
|
||||||
|
"invitedUser" : m26,
|
||||||
|
"is typing..." : MessageLookupByLibrary.simpleMessage("schreibt..."),
|
||||||
|
"joinedTheChat" : m27,
|
||||||
|
"kicked" : m28,
|
||||||
|
"kickedAndBanned" : m29,
|
||||||
|
"loadCountMoreParticipants" : m30,
|
||||||
|
"play" : m31,
|
||||||
|
"redactedAnEvent" : m32,
|
||||||
|
"rejectedTheInvitation" : m33,
|
||||||
|
"removedBy" : m34,
|
||||||
|
"seenByUser" : m35,
|
||||||
|
"seenByUserAndCountOthers" : m36,
|
||||||
|
"seenByUserAndUser" : m37,
|
||||||
|
"sentAFile" : m38,
|
||||||
|
"sentAPicture" : m39,
|
||||||
|
"sentASticker" : m40,
|
||||||
|
"sentAVideo" : m41,
|
||||||
|
"sentAnAudio" : m42,
|
||||||
|
"sharedTheLocation" : m43,
|
||||||
|
"timeOfDay" : m44,
|
||||||
|
"title" : MessageLookupByLibrary.simpleMessage("FluffyChat"),
|
||||||
|
"unbannedUser" : m45,
|
||||||
|
"unknownEvent" : m46,
|
||||||
|
"unreadMessages" : m47,
|
||||||
|
"unreadMessagesInChats" : m48,
|
||||||
|
"userAndOthersAreTyping" : m49,
|
||||||
|
"userAndUserAreTyping" : m50,
|
||||||
|
"userIsTyping" : m51,
|
||||||
|
"userLeftTheChat" : m52,
|
||||||
|
"userSentUnknownEvent" : m53
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,290 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
|
||||||
class MessageLookup extends MessageLookupByLibrary {
|
class MessageLookup extends MessageLookupByLibrary {
|
||||||
String get localeName => 'messages';
|
String get localeName => 'messages';
|
||||||
|
|
||||||
|
static m0(username) => "${username} accepted the invitation";
|
||||||
|
|
||||||
|
static m1(username) => "${username} activated end to end encryption";
|
||||||
|
|
||||||
|
static m2(username, targetName) => "${username} banned ${targetName}";
|
||||||
|
|
||||||
|
static m3(username) => "${username} changed the chat avatar";
|
||||||
|
|
||||||
|
static m4(username, description) => "${username} changed the chat description to: \'${description}\'";
|
||||||
|
|
||||||
|
static m5(username, chatname) => "${username} changed the chat name to: \'${chatname}\'";
|
||||||
|
|
||||||
|
static m6(username) => "${username} changed the chat permissions";
|
||||||
|
|
||||||
|
static m7(username, displayname) => "${username} changed the displayname to: ${displayname}";
|
||||||
|
|
||||||
|
static m8(username) => "${username} changed the guest access rules";
|
||||||
|
|
||||||
|
static m9(username, rules) => "${username} changed the guest access rules to: ${rules}";
|
||||||
|
|
||||||
|
static m10(username) => "${username} changed the history visibility";
|
||||||
|
|
||||||
|
static m11(username, rules) => "${username} changed the history visibility to: ${rules}";
|
||||||
|
|
||||||
|
static m12(username) => "${username} changed the join rules";
|
||||||
|
|
||||||
|
static m13(username, joinRules) => "${username} changed the join rules to: ${joinRules}";
|
||||||
|
|
||||||
|
static m14(username) => "${username} changed the profile avatar";
|
||||||
|
|
||||||
|
static m15(username) => "${username} changed the room aliases";
|
||||||
|
|
||||||
|
static m16(username) => "${username} changed the invitation link";
|
||||||
|
|
||||||
|
static m17(count) => "${count} participants";
|
||||||
|
|
||||||
|
static m18(username) => "${username} created the chat";
|
||||||
|
|
||||||
|
static m19(date, timeOfDay) => "${date}, ${timeOfDay}";
|
||||||
|
|
||||||
|
static m20(year, month, day) => "${year}-${month}-${day}";
|
||||||
|
|
||||||
|
static m21(month, day) => "${month}-${day}";
|
||||||
|
|
||||||
|
static m22(fileName) => "Download ${fileName}";
|
||||||
|
|
||||||
|
static m23(displayname) => "Group with ${displayname}";
|
||||||
|
|
||||||
|
static m24(username, targetName) => "${username} has withdrawn the invitation for ${targetName}";
|
||||||
|
|
||||||
|
static m25(groupName) => "Invite contact to ${groupName}";
|
||||||
|
|
||||||
|
static m26(username, targetName) => "${username} invited ${targetName}";
|
||||||
|
|
||||||
|
static m27(username) => "${username} joined the chat";
|
||||||
|
|
||||||
|
static m28(username, targetName) => "${username} kicked ${targetName}";
|
||||||
|
|
||||||
|
static m29(username, targetName) => "${username} kicked and banned ${targetName}";
|
||||||
|
|
||||||
|
static m30(count) => "Load ${count} more participants";
|
||||||
|
|
||||||
|
static m31(fileName) => "Play ${fileName}";
|
||||||
|
|
||||||
|
static m32(username) => "${username} redacted an event";
|
||||||
|
|
||||||
|
static m33(username) => "${username} rejected the invitation";
|
||||||
|
|
||||||
|
static m34(username) => "Removed by ${username}";
|
||||||
|
|
||||||
|
static m35(username) => "Seen by ${username}";
|
||||||
|
|
||||||
|
static m36(username, count) => "Seen by ${username} and ${count} others";
|
||||||
|
|
||||||
|
static m37(username, username2) => "Seen by ${username} and ${username2}";
|
||||||
|
|
||||||
|
static m38(username) => "${username} sent a file";
|
||||||
|
|
||||||
|
static m39(username) => "${username} sent a picture";
|
||||||
|
|
||||||
|
static m40(username) => "${username} sent a sticker";
|
||||||
|
|
||||||
|
static m41(username) => "${username} sent a video";
|
||||||
|
|
||||||
|
static m42(username) => "${username} sent an audio";
|
||||||
|
|
||||||
|
static m43(username) => "${username} shared the location";
|
||||||
|
|
||||||
|
static m44(hours12, hours24, minutes, suffix) => "${hours12}:${minutes} ${suffix}";
|
||||||
|
|
||||||
|
static m45(username, targetName) => "${username} unbanned ${targetName}";
|
||||||
|
|
||||||
|
static m46(type) => "Unknown event \'${type}\'";
|
||||||
|
|
||||||
|
static m47(unreadEvents) => "${unreadEvents} unread messages";
|
||||||
|
|
||||||
|
static m48(unreadEvents, unreadChats) => "${unreadEvents} unread messages in ${unreadChats} chats";
|
||||||
|
|
||||||
|
static m49(username, count) => "${username} and ${count} others are typing...";
|
||||||
|
|
||||||
|
static m50(username, username2) => "${username} and ${username2} are typing...";
|
||||||
|
|
||||||
|
static m51(username) => "${username} is typing...";
|
||||||
|
|
||||||
|
static m52(username) => "${username} left the chat";
|
||||||
|
|
||||||
|
static m53(username, type) => "${username} sent a ${type} event";
|
||||||
|
|
||||||
final messages = _notInlinedMessages(_notInlinedMessages);
|
final messages = _notInlinedMessages(_notInlinedMessages);
|
||||||
static _notInlinedMessages(_) => <String, Function> {
|
static _notInlinedMessages(_) => <String, Function> {
|
||||||
|
"(Optional) Group name" : MessageLookupByLibrary.simpleMessage("(Optional) Group name"),
|
||||||
|
"About" : MessageLookupByLibrary.simpleMessage("About"),
|
||||||
|
"Add a group description" : MessageLookupByLibrary.simpleMessage("Add a group description"),
|
||||||
|
"Admin" : MessageLookupByLibrary.simpleMessage("Admin"),
|
||||||
|
"Already have an account?" : MessageLookupByLibrary.simpleMessage("Already have an account?"),
|
||||||
|
"Anyone can join" : MessageLookupByLibrary.simpleMessage("Anyone can join"),
|
||||||
|
"Archive" : MessageLookupByLibrary.simpleMessage("Archive"),
|
||||||
|
"Archived Room" : MessageLookupByLibrary.simpleMessage("Archived Room"),
|
||||||
|
"Are guest users allowed to join" : MessageLookupByLibrary.simpleMessage("Are guest users allowed to join"),
|
||||||
|
"Authentication" : MessageLookupByLibrary.simpleMessage("Authentication"),
|
||||||
|
"Avatar has been changed" : MessageLookupByLibrary.simpleMessage("Avatar has been changed"),
|
||||||
|
"Ban from chat" : MessageLookupByLibrary.simpleMessage("Ban from chat"),
|
||||||
|
"Banned" : MessageLookupByLibrary.simpleMessage("Banned"),
|
||||||
|
"Change the name of the group" : MessageLookupByLibrary.simpleMessage("Change the name of the group"),
|
||||||
|
"Changelog" : MessageLookupByLibrary.simpleMessage("Changelog"),
|
||||||
|
"Chat details" : MessageLookupByLibrary.simpleMessage("Chat details"),
|
||||||
|
"Choose a username" : MessageLookupByLibrary.simpleMessage("Choose a username"),
|
||||||
|
"Close" : MessageLookupByLibrary.simpleMessage("Close"),
|
||||||
|
"Confirm" : MessageLookupByLibrary.simpleMessage("Confirm"),
|
||||||
|
"Connection attempt failed" : MessageLookupByLibrary.simpleMessage("Connection attempt failed"),
|
||||||
|
"Contact has been invited to the group" : MessageLookupByLibrary.simpleMessage("Contact has been invited to the group"),
|
||||||
|
"Content viewer" : MessageLookupByLibrary.simpleMessage("Content viewer"),
|
||||||
|
"Copied to clipboard" : MessageLookupByLibrary.simpleMessage("Copied to clipboard"),
|
||||||
|
"Could not decrypt message" : MessageLookupByLibrary.simpleMessage("Could not decrypt message"),
|
||||||
|
"Could not set avatar" : MessageLookupByLibrary.simpleMessage("Could not set avatar"),
|
||||||
|
"Could not set displayname" : MessageLookupByLibrary.simpleMessage("Could not set displayname"),
|
||||||
|
"Create" : MessageLookupByLibrary.simpleMessage("Create"),
|
||||||
|
"Create account now" : MessageLookupByLibrary.simpleMessage("Create account now"),
|
||||||
|
"Create new group" : MessageLookupByLibrary.simpleMessage("Create new group"),
|
||||||
|
"Delete" : MessageLookupByLibrary.simpleMessage("Delete"),
|
||||||
|
"Delete message" : MessageLookupByLibrary.simpleMessage("Delete message"),
|
||||||
|
"Discard picture" : MessageLookupByLibrary.simpleMessage("Discard picture"),
|
||||||
|
"Displayname has been changed" : MessageLookupByLibrary.simpleMessage("Displayname has been changed"),
|
||||||
|
"Donate" : MessageLookupByLibrary.simpleMessage("Donate"),
|
||||||
|
"Edit displayname" : MessageLookupByLibrary.simpleMessage("Edit displayname"),
|
||||||
|
"Empty chat" : MessageLookupByLibrary.simpleMessage("Empty chat"),
|
||||||
|
"Enter a group name" : MessageLookupByLibrary.simpleMessage("Enter a group name"),
|
||||||
|
"Enter a username" : MessageLookupByLibrary.simpleMessage("Enter a username"),
|
||||||
|
"FluffyChat" : MessageLookupByLibrary.simpleMessage("FluffyChat"),
|
||||||
|
"Forward" : MessageLookupByLibrary.simpleMessage("Forward"),
|
||||||
|
"Friday" : MessageLookupByLibrary.simpleMessage("Friday"),
|
||||||
|
"From joining" : MessageLookupByLibrary.simpleMessage("From joining"),
|
||||||
|
"From the invitation" : MessageLookupByLibrary.simpleMessage("From the invitation"),
|
||||||
|
"Group" : MessageLookupByLibrary.simpleMessage("Group"),
|
||||||
|
"Group description" : MessageLookupByLibrary.simpleMessage("Group description"),
|
||||||
|
"Group description has been changed" : MessageLookupByLibrary.simpleMessage("Group description has been changed"),
|
||||||
|
"Group is public" : MessageLookupByLibrary.simpleMessage("Group is public"),
|
||||||
|
"Guests are forbidden" : MessageLookupByLibrary.simpleMessage("Guests are forbidden"),
|
||||||
|
"Guests can join" : MessageLookupByLibrary.simpleMessage("Guests can join"),
|
||||||
|
"Help" : MessageLookupByLibrary.simpleMessage("Help"),
|
||||||
|
"Homeserver is not compatible" : MessageLookupByLibrary.simpleMessage("Homeserver is not compatible"),
|
||||||
|
"Invite contact" : MessageLookupByLibrary.simpleMessage("Invite contact"),
|
||||||
|
"Invited" : MessageLookupByLibrary.simpleMessage("Invited"),
|
||||||
|
"Invited users only" : MessageLookupByLibrary.simpleMessage("Invited users only"),
|
||||||
|
"It seems that you have no google services on your phone. That\'s a good decision for your privacy! To receive push notifications in FluffyChat we recommend using microG: https://microg.org/" : MessageLookupByLibrary.simpleMessage("It seems that you have no google services on your phone. That\'s a good decision for your privacy! To receive push notifications in FluffyChat we recommend using microG: https://microg.org/"),
|
||||||
|
"Kick from chat" : MessageLookupByLibrary.simpleMessage("Kick from chat"),
|
||||||
|
"Leave" : MessageLookupByLibrary.simpleMessage("Leave"),
|
||||||
|
"Left the chat" : MessageLookupByLibrary.simpleMessage("Left the chat"),
|
||||||
|
"License" : MessageLookupByLibrary.simpleMessage("License"),
|
||||||
|
"Loading... Please wait" : MessageLookupByLibrary.simpleMessage("Loading... Please wait"),
|
||||||
|
"Login" : MessageLookupByLibrary.simpleMessage("Login"),
|
||||||
|
"Logout" : MessageLookupByLibrary.simpleMessage("Logout"),
|
||||||
|
"Make an admin" : MessageLookupByLibrary.simpleMessage("Make an admin"),
|
||||||
|
"Make sure the identifier is valid" : MessageLookupByLibrary.simpleMessage("Make sure the identifier is valid"),
|
||||||
|
"Message will be removed for all participants" : MessageLookupByLibrary.simpleMessage("Message will be removed for all participants"),
|
||||||
|
"Moderator" : MessageLookupByLibrary.simpleMessage("Moderator"),
|
||||||
|
"Monday" : MessageLookupByLibrary.simpleMessage("Monday"),
|
||||||
|
"Mute chat" : MessageLookupByLibrary.simpleMessage("Mute chat"),
|
||||||
|
"New message in FluffyChat" : MessageLookupByLibrary.simpleMessage("New message in FluffyChat"),
|
||||||
|
"New private chat" : MessageLookupByLibrary.simpleMessage("New private chat"),
|
||||||
|
"No rooms found..." : MessageLookupByLibrary.simpleMessage("No rooms found..."),
|
||||||
|
"Not supported in web" : MessageLookupByLibrary.simpleMessage("Not supported in web"),
|
||||||
|
"Oops something went wrong..." : MessageLookupByLibrary.simpleMessage("Oops something went wrong..."),
|
||||||
|
"Open camera" : MessageLookupByLibrary.simpleMessage("Open camera"),
|
||||||
|
"Password" : MessageLookupByLibrary.simpleMessage("Password"),
|
||||||
|
"Please choose a username" : MessageLookupByLibrary.simpleMessage("Please choose a username"),
|
||||||
|
"Please enter a matrix identifier" : MessageLookupByLibrary.simpleMessage("Please enter a matrix identifier"),
|
||||||
|
"Please enter your password" : MessageLookupByLibrary.simpleMessage("Please enter your password"),
|
||||||
|
"Please enter your username" : MessageLookupByLibrary.simpleMessage("Please enter your username"),
|
||||||
|
"Rejoin" : MessageLookupByLibrary.simpleMessage("Rejoin"),
|
||||||
|
"Remove" : MessageLookupByLibrary.simpleMessage("Remove"),
|
||||||
|
"Remove exile" : MessageLookupByLibrary.simpleMessage("Remove exile"),
|
||||||
|
"Remove message" : MessageLookupByLibrary.simpleMessage("Remove message"),
|
||||||
|
"Revoke all permissions" : MessageLookupByLibrary.simpleMessage("Revoke all permissions"),
|
||||||
|
"Saturday" : MessageLookupByLibrary.simpleMessage("Saturday"),
|
||||||
|
"Search for a chat" : MessageLookupByLibrary.simpleMessage("Search for a chat"),
|
||||||
|
"Secure your account with a password" : MessageLookupByLibrary.simpleMessage("Secure your account with a password"),
|
||||||
|
"Send a message" : MessageLookupByLibrary.simpleMessage("Send a message"),
|
||||||
|
"Send file" : MessageLookupByLibrary.simpleMessage("Send file"),
|
||||||
|
"Send image" : MessageLookupByLibrary.simpleMessage("Send image"),
|
||||||
|
"Set a profile picture" : MessageLookupByLibrary.simpleMessage("Set a profile picture"),
|
||||||
|
"Set group description" : MessageLookupByLibrary.simpleMessage("Set group description"),
|
||||||
|
"Set invitation link" : MessageLookupByLibrary.simpleMessage("Set invitation link"),
|
||||||
|
"Settings" : MessageLookupByLibrary.simpleMessage("Settings"),
|
||||||
|
"Share" : MessageLookupByLibrary.simpleMessage("Share"),
|
||||||
|
"Sign up" : MessageLookupByLibrary.simpleMessage("Sign up"),
|
||||||
|
"Source code" : MessageLookupByLibrary.simpleMessage("Source code"),
|
||||||
|
"Start your first chat :-)" : MessageLookupByLibrary.simpleMessage("Start your first chat :-)"),
|
||||||
|
"Sunday" : MessageLookupByLibrary.simpleMessage("Sunday"),
|
||||||
|
"Tap to show menu" : MessageLookupByLibrary.simpleMessage("Tap to show menu"),
|
||||||
|
"This room has been archived." : MessageLookupByLibrary.simpleMessage("This room has been archived."),
|
||||||
|
"Thursday" : MessageLookupByLibrary.simpleMessage("Thursday"),
|
||||||
|
"Try to send again" : MessageLookupByLibrary.simpleMessage("Try to send again"),
|
||||||
|
"Tuesday" : MessageLookupByLibrary.simpleMessage("Tuesday"),
|
||||||
|
"Unmute chat" : MessageLookupByLibrary.simpleMessage("Unmute chat"),
|
||||||
|
"Username" : MessageLookupByLibrary.simpleMessage("Username"),
|
||||||
|
"Visibility of the chat history" : MessageLookupByLibrary.simpleMessage("Visibility of the chat history"),
|
||||||
|
"Visible for all participants" : MessageLookupByLibrary.simpleMessage("Visible for all participants"),
|
||||||
|
"Visible for everyone" : MessageLookupByLibrary.simpleMessage("Visible for everyone"),
|
||||||
|
"Wednesday" : MessageLookupByLibrary.simpleMessage("Wednesday"),
|
||||||
|
"Who is allowed to join this group" : MessageLookupByLibrary.simpleMessage("Who is allowed to join this group"),
|
||||||
|
"Write a message..." : MessageLookupByLibrary.simpleMessage("Write a message..."),
|
||||||
|
"You" : MessageLookupByLibrary.simpleMessage("You"),
|
||||||
|
"You are invited to this chat" : MessageLookupByLibrary.simpleMessage("You are invited to this chat"),
|
||||||
|
"You are no longer participating in this chat" : MessageLookupByLibrary.simpleMessage("You are no longer participating in this chat"),
|
||||||
|
"You cannot invite yourself" : MessageLookupByLibrary.simpleMessage("You cannot invite yourself"),
|
||||||
|
"You have been banned from this chat" : MessageLookupByLibrary.simpleMessage("You have been banned from this chat"),
|
||||||
|
"Your own username" : MessageLookupByLibrary.simpleMessage("Your own username"),
|
||||||
|
"acceptedTheInvitation" : m0,
|
||||||
|
"activatedEndToEndEncryption" : m1,
|
||||||
|
"alias" : MessageLookupByLibrary.simpleMessage("alias"),
|
||||||
|
"bannedUser" : m2,
|
||||||
|
"changedTheChatAvatar" : m3,
|
||||||
|
"changedTheChatDescriptionTo" : m4,
|
||||||
|
"changedTheChatNameTo" : m5,
|
||||||
|
"changedTheChatPermissions" : m6,
|
||||||
|
"changedTheDisplaynameTo" : m7,
|
||||||
|
"changedTheGuestAccessRules" : m8,
|
||||||
|
"changedTheGuestAccessRulesTo" : m9,
|
||||||
|
"changedTheHistoryVisibility" : m10,
|
||||||
|
"changedTheHistoryVisibilityTo" : m11,
|
||||||
|
"changedTheJoinRules" : m12,
|
||||||
|
"changedTheJoinRulesTo" : m13,
|
||||||
|
"changedTheProfileAvatar" : m14,
|
||||||
|
"changedTheRoomAliases" : m15,
|
||||||
|
"changedTheRoomInvitationLink" : m16,
|
||||||
|
"countParticipants" : m17,
|
||||||
|
"createdTheChat" : m18,
|
||||||
|
"dateAndTimeOfDay" : m19,
|
||||||
|
"dateWithYear" : m20,
|
||||||
|
"dateWithoutYear" : m21,
|
||||||
|
"download" : m22,
|
||||||
|
"groupWith" : m23,
|
||||||
|
"hasWithdrawnTheInvitationFor" : m24,
|
||||||
|
"inviteContactToGroup" : m25,
|
||||||
|
"invitedUser" : m26,
|
||||||
|
"is typing..." : MessageLookupByLibrary.simpleMessage("is typing..."),
|
||||||
|
"joinedTheChat" : m27,
|
||||||
|
"kicked" : m28,
|
||||||
|
"kickedAndBanned" : m29,
|
||||||
|
"loadCountMoreParticipants" : m30,
|
||||||
|
"play" : m31,
|
||||||
|
"redactedAnEvent" : m32,
|
||||||
|
"rejectedTheInvitation" : m33,
|
||||||
|
"removedBy" : m34,
|
||||||
|
"seenByUser" : m35,
|
||||||
|
"seenByUserAndCountOthers" : m36,
|
||||||
|
"seenByUserAndUser" : m37,
|
||||||
|
"sentAFile" : m38,
|
||||||
|
"sentAPicture" : m39,
|
||||||
|
"sentASticker" : m40,
|
||||||
|
"sentAVideo" : m41,
|
||||||
|
"sentAnAudio" : m42,
|
||||||
|
"sharedTheLocation" : m43,
|
||||||
|
"timeOfDay" : m44,
|
||||||
|
"title" : MessageLookupByLibrary.simpleMessage("FluffyChat"),
|
||||||
|
"unbannedUser" : m45,
|
||||||
|
"unknownEvent" : m46,
|
||||||
|
"unreadMessages" : m47,
|
||||||
|
"unreadMessagesInChats" : m48,
|
||||||
|
"userAndOthersAreTyping" : m49,
|
||||||
|
"userAndUserAreTyping" : m50,
|
||||||
|
"userIsTyping" : m51,
|
||||||
|
"userLeftTheChat" : m52,
|
||||||
|
"userSentUnknownEvent" : m53
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/views/sign_up.dart';
|
import 'package:fluffychat/views/sign_up.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
@ -48,6 +49,7 @@ class App extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
localizationsDelegates: [
|
localizationsDelegates: [
|
||||||
|
AppLocalizationsDelegate(),
|
||||||
GlobalMaterialLocalizations.delegate,
|
GlobalMaterialLocalizations.delegate,
|
||||||
GlobalWidgetsLocalizations.delegate,
|
GlobalWidgetsLocalizations.delegate,
|
||||||
GlobalCupertinoLocalizations.delegate,
|
GlobalCupertinoLocalizations.delegate,
|
||||||
|
|
|
@ -1,15 +1,8 @@
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
/// Provides extra functionality for formatting the time.
|
/// Provides extra functionality for formatting the time.
|
||||||
extension DateTimeExtension on DateTime {
|
extension DateTimeExtension on DateTime {
|
||||||
@Deprecated('Use [millisecondsSinceEpoch] instead.')
|
|
||||||
num toTimeStamp() => this.millisecondsSinceEpoch;
|
|
||||||
|
|
||||||
@deprecated
|
|
||||||
String toTimeString() => localizedTimeOfDay(null);
|
|
||||||
@deprecated
|
|
||||||
String toEventTimeString() => localizedTime(null);
|
|
||||||
|
|
||||||
operator <(DateTime other) {
|
operator <(DateTime other) {
|
||||||
return this.millisecondsSinceEpoch < other.millisecondsSinceEpoch;
|
return this.millisecondsSinceEpoch < other.millisecondsSinceEpoch;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +34,8 @@ extension DateTimeExtension on DateTime {
|
||||||
/// Returns a simple time String.
|
/// Returns a simple time String.
|
||||||
/// TODO: Add localization
|
/// TODO: Add localization
|
||||||
String localizedTimeOfDay(BuildContext context) {
|
String localizedTimeOfDay(BuildContext context) {
|
||||||
return "${_z(this.hour % 12)}:${_z(this.minute)} ${this.hour > 11 ? 'pm' : 'am'}";
|
return I18n.of(context).timeOfDay(_z(this.hour % 12), _z(this.hour),
|
||||||
|
_z(this.minute), this.hour > 11 ? 'pm' : 'am');
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns [localizedTimeOfDay()] if the ChatTime is today, the name of the week
|
/// Returns [localizedTimeOfDay()] if the ChatTime is today, the name of the week
|
||||||
|
@ -63,24 +57,29 @@ extension DateTimeExtension on DateTime {
|
||||||
} else if (sameWeek) {
|
} else if (sameWeek) {
|
||||||
switch (this.weekday) {
|
switch (this.weekday) {
|
||||||
case 1:
|
case 1:
|
||||||
return "Monday";
|
return I18n.of(context).monday;
|
||||||
case 2:
|
case 2:
|
||||||
return "Tuesday";
|
return I18n.of(context).tuesday;
|
||||||
case 3:
|
case 3:
|
||||||
return "Wednesday";
|
return I18n.of(context).wednesday;
|
||||||
case 4:
|
case 4:
|
||||||
return "Thursday";
|
return I18n.of(context).thursday;
|
||||||
case 5:
|
case 5:
|
||||||
return "Friday";
|
return I18n.of(context).friday;
|
||||||
case 6:
|
case 6:
|
||||||
return "Saturday";
|
return I18n.of(context).saturday;
|
||||||
case 7:
|
case 7:
|
||||||
return "Sunday";
|
return I18n.of(context).sunday;
|
||||||
}
|
}
|
||||||
} else if (sameYear) {
|
} else if (sameYear) {
|
||||||
return "${this.month.toString().padLeft(2, '0')}-${this.day.toString().padLeft(2, '0')}";
|
return I18n.of(context).dateWithoutYear(
|
||||||
|
this.month.toString().padLeft(2, '0'),
|
||||||
|
this.day.toString().padLeft(2, '0'));
|
||||||
}
|
}
|
||||||
return "${this.year.toString()}-${this.month.toString().padLeft(2, '0')}-${this.day.toString().padLeft(2, '0')}";
|
return I18n.of(context).dateWithYear(
|
||||||
|
this.year.toString(),
|
||||||
|
this.month.toString().padLeft(2, '0'),
|
||||||
|
this.day.toString().padLeft(2, '0'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If the DateTime is today, this returns [localizedTimeOfDay()], if not it also
|
/// If the DateTime is today, this returns [localizedTimeOfDay()], if not it also
|
||||||
|
@ -94,7 +93,8 @@ extension DateTimeExtension on DateTime {
|
||||||
bool sameDay = sameYear && now.month == this.month && now.day == this.day;
|
bool sameDay = sameYear && now.month == this.month && now.day == this.day;
|
||||||
|
|
||||||
if (sameDay) return localizedTimeOfDay(context);
|
if (sameDay) return localizedTimeOfDay(context);
|
||||||
return "${localizedTimeShort(context)}, ${localizedTimeOfDay(context)}";
|
return I18n.of(context).dateAndTimeOfDay(
|
||||||
|
localizedTimeShort(context), localizedTimeOfDay(context));
|
||||||
}
|
}
|
||||||
|
|
||||||
static String _z(int i) => i < 10 ? "0${i.toString()}" : i.toString();
|
static String _z(int i) => i < 10 ? "0${i.toString()}" : i.toString();
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'room_state_enums_extensions.dart';
|
import 'room_state_enums_extensions.dart';
|
||||||
|
|
||||||
|
@ -14,25 +15,27 @@ extension LocalizedBody on Event {
|
||||||
getLocalizedBody(BuildContext context,
|
getLocalizedBody(BuildContext context,
|
||||||
{bool withSenderNamePrefix = false, hideQuotes = false}) {
|
{bool withSenderNamePrefix = false, hideQuotes = false}) {
|
||||||
if (this.redacted) {
|
if (this.redacted) {
|
||||||
return "Removed by ${this.redactedBecause.sender.calcDisplayname()}";
|
return I18n.of(context)
|
||||||
|
.removedBy(redactedBecause.sender.calcDisplayname());
|
||||||
}
|
}
|
||||||
String localizedBody = body;
|
String localizedBody = body;
|
||||||
final String senderName = this.sender.calcDisplayname();
|
final String senderName = this.sender.calcDisplayname();
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
case EventTypes.Sticker:
|
case EventTypes.Sticker:
|
||||||
localizedBody = "$senderName sent a sticker";
|
localizedBody = I18n.of(context).sentASticker(senderName);
|
||||||
break;
|
break;
|
||||||
case EventTypes.Redaction:
|
case EventTypes.Redaction:
|
||||||
localizedBody = "$senderName redacted an event";
|
localizedBody = I18n.of(context).redactedAnEvent(senderName);
|
||||||
break;
|
break;
|
||||||
case EventTypes.RoomAliases:
|
case EventTypes.RoomAliases:
|
||||||
localizedBody = "$senderName changed the room aliases";
|
localizedBody = I18n.of(context).changedTheRoomAliases(senderName);
|
||||||
break;
|
break;
|
||||||
case EventTypes.RoomCanonicalAlias:
|
case EventTypes.RoomCanonicalAlias:
|
||||||
localizedBody = "$senderName changed the room invite link";
|
localizedBody =
|
||||||
|
I18n.of(context).changedTheRoomInvitationLink(senderName);
|
||||||
break;
|
break;
|
||||||
case EventTypes.RoomCreate:
|
case EventTypes.RoomCreate:
|
||||||
localizedBody = "$senderName created the room";
|
localizedBody = I18n.of(context).createdTheChat(senderName);
|
||||||
break;
|
break;
|
||||||
case EventTypes.RoomJoinRules:
|
case EventTypes.RoomJoinRules:
|
||||||
JoinRules joinRules = JoinRules.values.firstWhere(
|
JoinRules joinRules = JoinRules.values.firstWhere(
|
||||||
|
@ -41,10 +44,10 @@ extension LocalizedBody on Event {
|
||||||
content["join_rule"],
|
content["join_rule"],
|
||||||
orElse: () => null);
|
orElse: () => null);
|
||||||
if (joinRules == null) {
|
if (joinRules == null) {
|
||||||
localizedBody = "$senderName changed the join rules";
|
localizedBody = I18n.of(context).changedTheJoinRules(senderName);
|
||||||
} else {
|
} else {
|
||||||
localizedBody =
|
localizedBody = I18n.of(context).changedTheJoinRulesTo(
|
||||||
"$senderName changed the join rules to: ${joinRules.getLocalizedString(context)}";
|
senderName, joinRules.getLocalizedString(context));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EventTypes.RoomMember:
|
case EventTypes.RoomMember:
|
||||||
|
@ -58,35 +61,36 @@ extension LocalizedBody on Event {
|
||||||
: "";
|
: "";
|
||||||
if (newMembership != oldMembership) {
|
if (newMembership != oldMembership) {
|
||||||
if (oldMembership == "invite" && newMembership == "join") {
|
if (oldMembership == "invite" && newMembership == "join") {
|
||||||
text = "$targetName has accepted the invitation";
|
text = I18n.of(context).acceptedTheInvitation(targetName);
|
||||||
} else if (oldMembership == "invite" && newMembership == "leave") {
|
} else if (oldMembership == "invite" && newMembership == "leave") {
|
||||||
if (this.stateKey == this.senderId) {
|
if (this.stateKey == this.senderId) {
|
||||||
text = "$targetName has rejected the invitation";
|
text = I18n.of(context).rejectedTheInvitation(targetName);
|
||||||
} else {
|
} else {
|
||||||
text = "$senderName has withdrawn the invitation for $targetName";
|
text = I18n.of(context)
|
||||||
|
.hasWithdrawnTheInvitationFor(senderName, targetName);
|
||||||
}
|
}
|
||||||
} else if (oldMembership == "leave" && newMembership == "join") {
|
} else if (oldMembership == "leave" && newMembership == "join") {
|
||||||
text = "$targetName has joined the chat";
|
text = I18n.of(context).joinedTheChat(targetName);
|
||||||
} else if (oldMembership == "join" && newMembership == "ban") {
|
} else if (oldMembership == "join" && newMembership == "ban") {
|
||||||
text = "$senderName has kicked and banned $targetName";
|
text = I18n.of(context).kickedAndBanned(senderName, targetName);
|
||||||
} else if (oldMembership == "join" &&
|
} else if (oldMembership == "join" &&
|
||||||
newMembership == "leave" &&
|
newMembership == "leave" &&
|
||||||
this.stateKey != this.senderId) {
|
this.stateKey != this.senderId) {
|
||||||
text = "$senderName has kicked $targetName";
|
text = I18n.of(context).kicked(senderName, targetName);
|
||||||
} else if (oldMembership == "join" &&
|
} else if (oldMembership == "join" &&
|
||||||
newMembership == "leave" &&
|
newMembership == "leave" &&
|
||||||
this.stateKey == this.senderId) {
|
this.stateKey == this.senderId) {
|
||||||
text = "$senderName has left the room";
|
text = I18n.of(context).userLeftTheChat(targetName);
|
||||||
} else if (oldMembership == "invite" && newMembership == "ban") {
|
} else if (oldMembership == "invite" && newMembership == "ban") {
|
||||||
text = "$senderName has banned $targetName";
|
text = I18n.of(context).bannedUser(senderName, targetName);
|
||||||
} else if (oldMembership == "leave" && newMembership == "ban") {
|
} else if (oldMembership == "leave" && newMembership == "ban") {
|
||||||
text = "$senderName has banned $targetName";
|
text = I18n.of(context).bannedUser(senderName, targetName);
|
||||||
} else if (oldMembership == "ban" && newMembership == "leave") {
|
} else if (oldMembership == "ban" && newMembership == "leave") {
|
||||||
text = "$senderName has unbanned $targetName";
|
text = I18n.of(context).unbannedUser(senderName, targetName);
|
||||||
} else if (newMembership == "invite") {
|
} else if (newMembership == "invite") {
|
||||||
text = "$senderName has invited $targetName";
|
text = I18n.of(context).invitedUser(senderName, targetName);
|
||||||
} else if (newMembership == "join") {
|
} else if (newMembership == "join") {
|
||||||
text = "$targetName has joined";
|
text = I18n.of(context).joinedTheChat(targetName);
|
||||||
}
|
}
|
||||||
} else if (newMembership == "join") {
|
} else if (newMembership == "join") {
|
||||||
final String newAvatar = this.content["avatar_url"] ?? "";
|
final String newAvatar = this.content["avatar_url"] ?? "";
|
||||||
|
@ -103,29 +107,29 @@ extension LocalizedBody on Event {
|
||||||
|
|
||||||
// Has the user avatar changed?
|
// Has the user avatar changed?
|
||||||
if (newAvatar != oldAvatar) {
|
if (newAvatar != oldAvatar) {
|
||||||
text = "$targetName has changed the profile avatar";
|
text = I18n.of(context).changedTheProfileAvatar(targetName);
|
||||||
}
|
}
|
||||||
// Has the user avatar changed?
|
// Has the user avatar changed?
|
||||||
else if (newDisplayname != oldDisplayname) {
|
else if (newDisplayname != oldDisplayname) {
|
||||||
text =
|
text = I18n.of(context)
|
||||||
"${this.stateKeyUser.id} has changed the displayname to '$newDisplayname'";
|
.changedTheDisplaynameTo(targetName, newDisplayname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
localizedBody = text;
|
localizedBody = text;
|
||||||
break;
|
break;
|
||||||
case EventTypes.RoomPowerLevels:
|
case EventTypes.RoomPowerLevels:
|
||||||
localizedBody = "$senderName changed the group permissions";
|
localizedBody = I18n.of(context).changedTheChatPermissions(senderName);
|
||||||
break;
|
break;
|
||||||
case EventTypes.RoomName:
|
case EventTypes.RoomName:
|
||||||
localizedBody =
|
localizedBody =
|
||||||
"$senderName changed the group name to: '${content["name"]}'";
|
I18n.of(context).changedTheChatNameTo(senderName, content["name"]);
|
||||||
break;
|
break;
|
||||||
case EventTypes.RoomTopic:
|
case EventTypes.RoomTopic:
|
||||||
localizedBody =
|
localizedBody = I18n.of(context)
|
||||||
"$senderName changed the group name to: '${content["topic"]}'";
|
.changedTheChatDescriptionTo(senderName, content["topic"]);
|
||||||
break;
|
break;
|
||||||
case EventTypes.RoomAvatar:
|
case EventTypes.RoomAvatar:
|
||||||
localizedBody = "$senderName changed the group avatar";
|
localizedBody = I18n.of(context).changedTheChatAvatar(senderName);
|
||||||
break;
|
break;
|
||||||
case EventTypes.GuestAccess:
|
case EventTypes.GuestAccess:
|
||||||
GuestAccess guestAccess = GuestAccess.values.firstWhere(
|
GuestAccess guestAccess = GuestAccess.values.firstWhere(
|
||||||
|
@ -134,10 +138,11 @@ extension LocalizedBody on Event {
|
||||||
content["guest_access"],
|
content["guest_access"],
|
||||||
orElse: () => null);
|
orElse: () => null);
|
||||||
if (guestAccess == null) {
|
if (guestAccess == null) {
|
||||||
localizedBody = "$senderName changed the guest access rules";
|
|
||||||
} else {
|
|
||||||
localizedBody =
|
localizedBody =
|
||||||
"$senderName changed the guest access rules to: ${guestAccess.getLocalizedString(context)}";
|
I18n.of(context).changedTheGuestAccessRules(senderName);
|
||||||
|
} else {
|
||||||
|
localizedBody = I18n.of(context).changedTheGuestAccessRulesTo(
|
||||||
|
senderName, guestAccess.getLocalizedString(context));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EventTypes.HistoryVisibility:
|
case EventTypes.HistoryVisibility:
|
||||||
|
@ -148,52 +153,39 @@ extension LocalizedBody on Event {
|
||||||
content["history_visibility"],
|
content["history_visibility"],
|
||||||
orElse: () => null);
|
orElse: () => null);
|
||||||
if (historyVisibility == null) {
|
if (historyVisibility == null) {
|
||||||
localizedBody = "$senderName changed the history visibility";
|
|
||||||
} else {
|
|
||||||
localizedBody =
|
localizedBody =
|
||||||
"$senderName changed the history visibility to: ${historyVisibility.getLocalizedString(context)}";
|
I18n.of(context).changedTheHistoryVisibility(senderName);
|
||||||
|
} else {
|
||||||
|
localizedBody = I18n.of(context).changedTheHistoryVisibilityTo(
|
||||||
|
senderName, historyVisibility.getLocalizedString(context));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EventTypes.Encryption:
|
case EventTypes.Encryption:
|
||||||
localizedBody = "$senderName activated end to end encryption";
|
localizedBody =
|
||||||
|
I18n.of(context).activatedEndToEndEncryption(senderName);
|
||||||
break;
|
break;
|
||||||
case EventTypes.Encrypted:
|
case EventTypes.Encrypted:
|
||||||
localizedBody = "Could not decrypt message";
|
localizedBody = I18n.of(context).couldNotDecryptMessage;
|
||||||
break;
|
|
||||||
case EventTypes.CallInvite:
|
|
||||||
localizedBody = body;
|
|
||||||
break;
|
|
||||||
case EventTypes.CallAnswer:
|
|
||||||
localizedBody = body;
|
|
||||||
break;
|
|
||||||
case EventTypes.CallCandidates:
|
|
||||||
localizedBody = body;
|
|
||||||
break;
|
|
||||||
case EventTypes.CallHangup:
|
|
||||||
localizedBody = body;
|
|
||||||
break;
|
|
||||||
case EventTypes.Unknown:
|
|
||||||
localizedBody = body;
|
|
||||||
break;
|
break;
|
||||||
case EventTypes.Message:
|
case EventTypes.Message:
|
||||||
switch (this.messageType) {
|
switch (this.messageType) {
|
||||||
case MessageTypes.Image:
|
case MessageTypes.Image:
|
||||||
localizedBody = "$senderName sent a picture";
|
localizedBody = I18n.of(context).sentAPicture(senderName);
|
||||||
break;
|
break;
|
||||||
case MessageTypes.File:
|
case MessageTypes.File:
|
||||||
localizedBody = "$senderName sent a file";
|
localizedBody = I18n.of(context).sentAFile(senderName);
|
||||||
break;
|
break;
|
||||||
case MessageTypes.Audio:
|
case MessageTypes.Audio:
|
||||||
localizedBody = "$senderName sent an audio";
|
localizedBody = I18n.of(context).sentAnAudio(senderName);
|
||||||
break;
|
break;
|
||||||
case MessageTypes.Video:
|
case MessageTypes.Video:
|
||||||
localizedBody = "$senderName sent a video";
|
localizedBody = I18n.of(context).sentAVideo(senderName);
|
||||||
break;
|
break;
|
||||||
case MessageTypes.Location:
|
case MessageTypes.Location:
|
||||||
localizedBody = "$senderName shared the location";
|
localizedBody = I18n.of(context).sharedTheLocation(senderName);
|
||||||
break;
|
break;
|
||||||
case MessageTypes.Sticker:
|
case MessageTypes.Sticker:
|
||||||
localizedBody = "$senderName sent a sticker";
|
localizedBody = I18n.of(context).sentASticker(senderName);
|
||||||
break;
|
break;
|
||||||
case MessageTypes.Emote:
|
case MessageTypes.Emote:
|
||||||
localizedBody = "* $body";
|
localizedBody = "* $body";
|
||||||
|
@ -207,8 +199,7 @@ extension LocalizedBody on Event {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
localizedBody =
|
localizedBody = I18n.of(context).unknownEvent(this.typeKey);
|
||||||
"Unknown event '${this.type.toString().replaceAll("EventTypes.", "")}'";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the sender name prefix
|
// Add the sender name prefix
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
extension LocalizedRoomDisplayname on Room {
|
extension LocalizedRoomDisplayname on Room {
|
||||||
|
@ -7,7 +8,7 @@ extension LocalizedRoomDisplayname on Room {
|
||||||
(this.canonicalAlias?.isEmpty ?? true) &&
|
(this.canonicalAlias?.isEmpty ?? true) &&
|
||||||
!this.isDirectChat &&
|
!this.isDirectChat &&
|
||||||
this.mHeroes.isNotEmpty) {
|
this.mHeroes.isNotEmpty) {
|
||||||
return "Group with ${this.displayname}";
|
return I18n.of(context).groupWith(this.displayname);
|
||||||
}
|
}
|
||||||
return this.displayname;
|
return this.displayname;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
extension HistoryVisibilityDisplayString on HistoryVisibility {
|
extension HistoryVisibilityDisplayString on HistoryVisibility {
|
||||||
String getLocalizedString(BuildContext context) {
|
String getLocalizedString(BuildContext context) {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case HistoryVisibility.invited:
|
case HistoryVisibility.invited:
|
||||||
return "From the invitation";
|
return I18n.of(context).fromTheInvitation;
|
||||||
case HistoryVisibility.joined:
|
case HistoryVisibility.joined:
|
||||||
return "From joining";
|
return I18n.of(context).fromJoining;
|
||||||
case HistoryVisibility.shared:
|
case HistoryVisibility.shared:
|
||||||
return "Visible for all participants";
|
return I18n.of(context).visibleForAllParticipants;
|
||||||
case HistoryVisibility.world_readable:
|
case HistoryVisibility.world_readable:
|
||||||
return "Visible for everyone";
|
return I18n.of(context).visibleForEveryone;
|
||||||
default:
|
default:
|
||||||
return this.toString().replaceAll("HistoryVisibility.", "");
|
return this.toString().replaceAll("HistoryVisibility.", "");
|
||||||
}
|
}
|
||||||
|
@ -22,9 +23,9 @@ extension GuestAccessDisplayString on GuestAccess {
|
||||||
String getLocalizedString(BuildContext context) {
|
String getLocalizedString(BuildContext context) {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case GuestAccess.can_join:
|
case GuestAccess.can_join:
|
||||||
return "Guests can join";
|
return I18n.of(context).guestsCanJoin;
|
||||||
case GuestAccess.forbidden:
|
case GuestAccess.forbidden:
|
||||||
return "Guests are forbidden";
|
return I18n.of(context).guestsAreForbidden;
|
||||||
default:
|
default:
|
||||||
return this.toString().replaceAll("GuestAccess.", "");
|
return this.toString().replaceAll("GuestAccess.", "");
|
||||||
}
|
}
|
||||||
|
@ -35,9 +36,9 @@ extension JoinRulesDisplayString on JoinRules {
|
||||||
String getLocalizedString(BuildContext context) {
|
String getLocalizedString(BuildContext context) {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case JoinRules.public:
|
case JoinRules.public:
|
||||||
return "Anyone can join";
|
return I18n.of(context).anyoneCanJoin;
|
||||||
case JoinRules.invite:
|
case JoinRules.invite:
|
||||||
return "Invited users only";
|
return I18n.of(context).invitedUsersOnly;
|
||||||
default:
|
default:
|
||||||
return this.toString().replaceAll("JoinRules.", "");
|
return this.toString().replaceAll("JoinRules.", "");
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:famedlysdk/famedlysdk.dart';
|
||||||
import 'package:fluffychat/components/adaptive_page_layout.dart';
|
import 'package:fluffychat/components/adaptive_page_layout.dart';
|
||||||
import 'package:fluffychat/components/list_items/chat_list_item.dart';
|
import 'package:fluffychat/components/list_items/chat_list_item.dart';
|
||||||
import 'package:fluffychat/components/matrix.dart';
|
import 'package:fluffychat/components/matrix.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class Archive extends StatefulWidget {
|
class Archive extends StatefulWidget {
|
||||||
|
@ -22,7 +23,7 @@ class _ArchiveState extends State<Archive> {
|
||||||
return AdaptivePageLayout(
|
return AdaptivePageLayout(
|
||||||
firstScaffold: Scaffold(
|
firstScaffold: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("Archive"),
|
title: Text(I18n.of(context).archive),
|
||||||
),
|
),
|
||||||
body: FutureBuilder<List<Room>>(
|
body: FutureBuilder<List<Room>>(
|
||||||
future: getArchive(context),
|
future: getArchive(context),
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:fluffychat/components/matrix.dart';
|
import 'package:fluffychat/components/matrix.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:webview_flutter/webview_flutter.dart';
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
|
|
||||||
|
@ -16,7 +17,7 @@ class AuthWebView extends StatelessWidget {
|
||||||
print(url);
|
print(url);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("Authentication"),
|
title: Text(I18n.of(context).authentication),
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.arrow_back),
|
icon: Icon(Icons.arrow_back),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|
|
@ -7,6 +7,7 @@ import 'package:fluffychat/components/adaptive_page_layout.dart';
|
||||||
import 'package:fluffychat/components/chat_settings_popup_menu.dart';
|
import 'package:fluffychat/components/chat_settings_popup_menu.dart';
|
||||||
import 'package:fluffychat/components/list_items/message.dart';
|
import 'package:fluffychat/components/list_items/message.dart';
|
||||||
import 'package:fluffychat/components/matrix.dart';
|
import 'package:fluffychat/components/matrix.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/room_extension.dart';
|
import 'package:fluffychat/utils/room_extension.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -61,13 +62,16 @@ class _ChatState extends State<Chat> {
|
||||||
r.user.id == room.client.userID ||
|
r.user.id == room.client.userID ||
|
||||||
r.user.id == timeline.events.first.senderId);
|
r.user.id == timeline.events.first.senderId);
|
||||||
if (lastReceipts.length == 1) {
|
if (lastReceipts.length == 1) {
|
||||||
seenByText = "Seen by ${lastReceipts.first.user.calcDisplayname()}";
|
seenByText = I18n.of(context)
|
||||||
|
.seenByUser(lastReceipts.first.user.calcDisplayname());
|
||||||
} else if (lastReceipts.length == 2) {
|
} else if (lastReceipts.length == 2) {
|
||||||
seenByText =
|
seenByText = seenByText = I18n.of(context).seenByUserAndUser(
|
||||||
"Seen by ${lastReceipts.first.user.calcDisplayname()} and ${lastReceipts[1].user.calcDisplayname()}";
|
lastReceipts.first.user.calcDisplayname(),
|
||||||
|
lastReceipts[1].user.calcDisplayname());
|
||||||
} else if (lastReceipts.length > 2) {
|
} else if (lastReceipts.length > 2) {
|
||||||
seenByText =
|
seenByText = I18n.of(context).seenByUserAndCountOthers(
|
||||||
"Seen by ${lastReceipts.first.user.calcDisplayname()} and ${lastReceipts.length - 1} others";
|
lastReceipts.first.user.calcDisplayname(),
|
||||||
|
(lastReceipts.length - 1).toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -98,7 +102,7 @@ class _ChatState extends State<Chat> {
|
||||||
|
|
||||||
void sendFileAction(BuildContext context) async {
|
void sendFileAction(BuildContext context) async {
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
return Toast.show("Not supported in web", context);
|
return Toast.show(I18n.of(context).notSupportedInWeb, context);
|
||||||
}
|
}
|
||||||
File file = await FilePicker.getFile();
|
File file = await FilePicker.getFile();
|
||||||
if (file == null) return;
|
if (file == null) return;
|
||||||
|
@ -111,7 +115,7 @@ class _ChatState extends State<Chat> {
|
||||||
|
|
||||||
void sendImageAction(BuildContext context) async {
|
void sendImageAction(BuildContext context) async {
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
return Toast.show("Not supported in web", context);
|
return Toast.show(I18n.of(context).notSupportedInWeb, context);
|
||||||
}
|
}
|
||||||
File file = await ImagePicker.pickImage(
|
File file = await ImagePicker.pickImage(
|
||||||
source: ImageSource.gallery,
|
source: ImageSource.gallery,
|
||||||
|
@ -128,7 +132,7 @@ class _ChatState extends State<Chat> {
|
||||||
|
|
||||||
void openCameraAction(BuildContext context) async {
|
void openCameraAction(BuildContext context) async {
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
return Toast.show("Not supported in web", context);
|
return Toast.show(I18n.of(context).notSupportedInWeb, context);
|
||||||
}
|
}
|
||||||
File file = await ImagePicker.pickImage(
|
File file = await ImagePicker.pickImage(
|
||||||
source: ImageSource.camera,
|
source: ImageSource.camera,
|
||||||
|
@ -149,8 +153,13 @@ class _ChatState extends State<Chat> {
|
||||||
Client client = matrix.client;
|
Client client = matrix.client;
|
||||||
room ??= client.getRoomById(widget.id);
|
room ??= client.getRoomById(widget.id);
|
||||||
if (room == null) {
|
if (room == null) {
|
||||||
return Center(
|
return Scaffold(
|
||||||
child: Text("You are no longer participating in this chat"),
|
appBar: AppBar(
|
||||||
|
title: Text(I18n.of(context).oopsSomethingWentWrong),
|
||||||
|
),
|
||||||
|
body: Center(
|
||||||
|
child: Text(I18n.of(context).youAreNoLongerParticipatingInThisChat),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
matrix.activeRoomId = widget.id;
|
matrix.activeRoomId = widget.id;
|
||||||
|
@ -164,16 +173,19 @@ class _ChatState extends State<Chat> {
|
||||||
typingUsers.removeWhere((User u) => u.id == client.userID);
|
typingUsers.removeWhere((User u) => u.id == client.userID);
|
||||||
|
|
||||||
if (typingUsers.length == 1) {
|
if (typingUsers.length == 1) {
|
||||||
typingText = "is typing...";
|
typingText = I18n.of(context).isTyping;
|
||||||
if (typingUsers.first.id != room.directChatMatrixID) {
|
if (typingUsers.first.id != room.directChatMatrixID) {
|
||||||
typingText = typingUsers.first.calcDisplayname() + " " + typingText;
|
typingText =
|
||||||
|
I18n.of(context).userIsTyping(typingUsers.first.calcDisplayname());
|
||||||
}
|
}
|
||||||
} else if (typingUsers.length == 2) {
|
} else if (typingUsers.length == 2) {
|
||||||
typingText =
|
typingText = I18n.of(context).userAndUserAreTyping(
|
||||||
"${typingUsers.first.calcDisplayname()} and ${typingUsers[1].calcDisplayname()} are typing...";
|
typingUsers.first.calcDisplayname(),
|
||||||
|
typingUsers[1].calcDisplayname());
|
||||||
} else if (typingUsers.length > 2) {
|
} else if (typingUsers.length > 2) {
|
||||||
typingText =
|
typingText = I18n.of(context).userAndOthersAreTyping(
|
||||||
"${typingUsers.first.calcDisplayname()} and ${typingUsers.length - 1} others are typing...";
|
typingUsers.first.calcDisplayname(),
|
||||||
|
(typingUsers.length - 1).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
return AdaptivePageLayout(
|
return AdaptivePageLayout(
|
||||||
|
@ -298,7 +310,7 @@ class _ChatState extends State<Chat> {
|
||||||
},
|
},
|
||||||
itemBuilder: (BuildContext context) =>
|
itemBuilder: (BuildContext context) =>
|
||||||
<PopupMenuEntry<String>>[
|
<PopupMenuEntry<String>>[
|
||||||
const PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
value: "file",
|
value: "file",
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
|
@ -306,11 +318,11 @@ class _ChatState extends State<Chat> {
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
child: Icon(Icons.attachment),
|
child: Icon(Icons.attachment),
|
||||||
),
|
),
|
||||||
title: Text('Send file'),
|
title: Text(I18n.of(context).sendFile),
|
||||||
contentPadding: EdgeInsets.all(0),
|
contentPadding: EdgeInsets.all(0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
value: "image",
|
value: "image",
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
|
@ -318,11 +330,11 @@ class _ChatState extends State<Chat> {
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
child: Icon(Icons.image),
|
child: Icon(Icons.image),
|
||||||
),
|
),
|
||||||
title: Text('Send image'),
|
title: Text(I18n.of(context).sendImage),
|
||||||
contentPadding: EdgeInsets.all(0),
|
contentPadding: EdgeInsets.all(0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
value: "camera",
|
value: "camera",
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
|
@ -330,7 +342,8 @@ class _ChatState extends State<Chat> {
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
child: Icon(Icons.camera),
|
child: Icon(Icons.camera),
|
||||||
),
|
),
|
||||||
title: Text('Open camera'),
|
title:
|
||||||
|
Text(I18n.of(context).openCamera),
|
||||||
contentPadding: EdgeInsets.all(0),
|
contentPadding: EdgeInsets.all(0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -349,7 +362,7 @@ class _ChatState extends State<Chat> {
|
||||||
onSubmitted: (t) => send(),
|
onSubmitted: (t) => send(),
|
||||||
controller: sendController,
|
controller: sendController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: "Write a message...",
|
hintText: I18n.of(context).writeAMessage,
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
),
|
),
|
||||||
onChanged: (String text) {
|
onChanged: (String text) {
|
||||||
|
|
|
@ -7,6 +7,7 @@ import 'package:fluffychat/components/chat_settings_popup_menu.dart';
|
||||||
import 'package:fluffychat/components/content_banner.dart';
|
import 'package:fluffychat/components/content_banner.dart';
|
||||||
import 'package:fluffychat/components/list_items/participant_list_item.dart';
|
import 'package:fluffychat/components/list_items/participant_list_item.dart';
|
||||||
import 'package:fluffychat/components/matrix.dart';
|
import 'package:fluffychat/components/matrix.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
import 'package:fluffychat/utils/room_extension.dart';
|
import 'package:fluffychat/utils/room_extension.dart';
|
||||||
import 'package:fluffychat/utils/room_state_enums_extensions.dart';
|
import 'package:fluffychat/utils/room_state_enums_extensions.dart';
|
||||||
|
@ -37,7 +38,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
);
|
);
|
||||||
if (success != false) {
|
if (success != false) {
|
||||||
Toast.show(
|
Toast.show(
|
||||||
"Displayname has been changed",
|
I18n.of(context).displaynameHasBeenChanged,
|
||||||
context,
|
context,
|
||||||
duration: Toast.LENGTH_LONG,
|
duration: Toast.LENGTH_LONG,
|
||||||
);
|
);
|
||||||
|
@ -86,7 +87,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
);
|
);
|
||||||
if (success != false) {
|
if (success != false) {
|
||||||
Toast.show(
|
Toast.show(
|
||||||
"Group description has been changed",
|
I18n.of(context).groupDescriptionHasBeenChanged,
|
||||||
context,
|
context,
|
||||||
duration: Toast.LENGTH_LONG,
|
duration: Toast.LENGTH_LONG,
|
||||||
);
|
);
|
||||||
|
@ -111,7 +112,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
);
|
);
|
||||||
if (success != false) {
|
if (success != false) {
|
||||||
Toast.show(
|
Toast.show(
|
||||||
"Avatar has been changed",
|
I18n.of(context).avatarHasBeenChanged,
|
||||||
context,
|
context,
|
||||||
duration: Toast.LENGTH_LONG,
|
duration: Toast.LENGTH_LONG,
|
||||||
);
|
);
|
||||||
|
@ -135,8 +136,13 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (widget.room == null) {
|
if (widget.room == null) {
|
||||||
return Center(
|
return Scaffold(
|
||||||
child: Text("You are no longer participating in this chat"),
|
appBar: AppBar(
|
||||||
|
title: Text(I18n.of(context).oopsSomethingWentWrong),
|
||||||
|
),
|
||||||
|
body: Center(
|
||||||
|
child: Text(I18n.of(context).youAreNoLongerParticipatingInThisChat),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
members ??= widget.room.getParticipants();
|
members ??= widget.room.getParticipants();
|
||||||
|
@ -161,7 +167,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
Clipboard.setData(
|
Clipboard.setData(
|
||||||
ClipboardData(text: widget.room.canonicalAlias),
|
ClipboardData(text: widget.room.canonicalAlias),
|
||||||
);
|
);
|
||||||
Toast.show("Invitation link copied to clipboard", context,
|
Toast.show(I18n.of(context).copiedToClipboard, context,
|
||||||
duration: 5);
|
duration: 5);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -189,12 +195,13 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
maxLines: 4,
|
maxLines: 4,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
labelText: "Group description:",
|
labelText:
|
||||||
|
"${I18n.of(context).groupDescription}:",
|
||||||
labelStyle: TextStyle(
|
labelStyle: TextStyle(
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
fontWeight: FontWeight.bold),
|
fontWeight: FontWeight.bold),
|
||||||
hintText: widget.room.topic ??
|
hintText: widget.room.topic ??
|
||||||
"Set group description",
|
I18n.of(context).setGroupDescription,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -212,7 +219,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
fontWeight: FontWeight.bold)),
|
fontWeight: FontWeight.bold)),
|
||||||
subtitle: LinkText(
|
subtitle: LinkText(
|
||||||
text: widget.room.topic?.isEmpty ?? true
|
text: widget.room.topic?.isEmpty ?? true
|
||||||
? "Add a group description"
|
? I18n.of(context).addGroupDescription
|
||||||
: widget.room.topic,
|
: widget.room.topic,
|
||||||
linkStyle: TextStyle(color: Colors.blueAccent),
|
linkStyle: TextStyle(color: Colors.blueAccent),
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
|
@ -227,7 +234,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
Divider(thickness: 8),
|
Divider(thickness: 8),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
"Settings",
|
I18n.of(context).settings,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
@ -246,7 +253,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
onSubmitted: (s) => setDisplaynameAction(context, s),
|
onSubmitted: (s) => setDisplaynameAction(context, s),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
labelText: "Change the name of the group",
|
labelText: I18n.of(context).changeTheNameOfTheGroup,
|
||||||
labelStyle: TextStyle(color: Colors.black),
|
labelStyle: TextStyle(color: Colors.black),
|
||||||
hintText:
|
hintText:
|
||||||
widget.room.getLocalizedDisplayname(context),
|
widget.room.getLocalizedDisplayname(context),
|
||||||
|
@ -267,11 +274,11 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
setCanonicalAliasAction(context, s),
|
setCanonicalAliasAction(context, s),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
labelText: "Set invitation link",
|
labelText: I18n.of(context).setInvitationLink,
|
||||||
labelStyle: TextStyle(color: Colors.black),
|
labelStyle: TextStyle(color: Colors.black),
|
||||||
hintText: widget.room.canonicalAlias
|
hintText: widget.room.canonicalAlias
|
||||||
?.replaceAll("#", "") ??
|
?.replaceAll("#", "") ??
|
||||||
"alias",
|
I18n.of(context).alias,
|
||||||
prefixText: "#",
|
prefixText: "#",
|
||||||
suffixText: widget.room.client.userID.split(":")[1],
|
suffixText: widget.room.client.userID.split(":")[1],
|
||||||
),
|
),
|
||||||
|
@ -283,7 +290,8 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
foregroundColor: Colors.grey,
|
foregroundColor: Colors.grey,
|
||||||
child: Icon(Icons.public)),
|
child: Icon(Icons.public)),
|
||||||
title: Text("Who is allowed to join this group"),
|
title:
|
||||||
|
Text(I18n.of(context).whoIsAllowedToJoinThisGroup),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
widget.room.joinRules.getLocalizedString(context),
|
widget.room.joinRules.getLocalizedString(context),
|
||||||
),
|
),
|
||||||
|
@ -315,7 +323,8 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
foregroundColor: Colors.grey,
|
foregroundColor: Colors.grey,
|
||||||
child: Icon(Icons.visibility),
|
child: Icon(Icons.visibility),
|
||||||
),
|
),
|
||||||
title: Text("Visibility of the chat history"),
|
title:
|
||||||
|
Text(I18n.of(context).visibilityOfTheChatHistory),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
widget.room.historyVisibility
|
widget.room.historyVisibility
|
||||||
.getLocalizedString(context),
|
.getLocalizedString(context),
|
||||||
|
@ -361,7 +370,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
foregroundColor: Colors.grey,
|
foregroundColor: Colors.grey,
|
||||||
child: Icon(Icons.info_outline),
|
child: Icon(Icons.info_outline),
|
||||||
),
|
),
|
||||||
title: Text("Are guest users allowed to join"),
|
title: Text(I18n.of(context).areGuestsAllowedToJoin),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
widget.room.guestAccess.getLocalizedString(context),
|
widget.room.guestAccess.getLocalizedString(context),
|
||||||
),
|
),
|
||||||
|
@ -393,8 +402,10 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
Divider(thickness: 8),
|
Divider(thickness: 8),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
"$actualMembersCount participant" +
|
actualMembersCount > 1
|
||||||
(actualMembersCount > 1 ? "s:" : ":"),
|
? I18n.of(context).countParticipants(
|
||||||
|
actualMembersCount.toString())
|
||||||
|
: I18n.of(context).emptyChat,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
@ -404,7 +415,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
Divider(height: 1),
|
Divider(height: 1),
|
||||||
widget.room.canInvite
|
widget.room.canInvite
|
||||||
? ListTile(
|
? ListTile(
|
||||||
title: Text("Invite contact"),
|
title: Text(I18n.of(context).inviteContact),
|
||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
child: Icon(Icons.add),
|
child: Icon(Icons.add),
|
||||||
backgroundColor: Theme.of(context).primaryColor,
|
backgroundColor: Theme.of(context).primaryColor,
|
||||||
|
@ -423,8 +434,8 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
: i < members.length + 1
|
: i < members.length + 1
|
||||||
? ParticipantListItem(members[i - 1])
|
? ParticipantListItem(members[i - 1])
|
||||||
: ListTile(
|
: ListTile(
|
||||||
title: Text(
|
title: Text(I18n.of(context).loadCountMoreParticipants(
|
||||||
"Load more ${actualMembersCount - members.length} participants"),
|
(actualMembersCount - members.length).toString())),
|
||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
|
|
|
@ -6,6 +6,7 @@ import 'package:fluffychat/components/dialogs/new_group_dialog.dart';
|
||||||
import 'package:fluffychat/components/dialogs/new_private_chat_dialog.dart';
|
import 'package:fluffychat/components/dialogs/new_private_chat_dialog.dart';
|
||||||
import 'package:fluffychat/components/list_items/chat_list_item.dart';
|
import 'package:fluffychat/components/list_items/chat_list_item.dart';
|
||||||
import 'package:fluffychat/components/matrix.dart';
|
import 'package:fluffychat/components/matrix.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
import 'package:fluffychat/utils/url_launcher.dart';
|
import 'package:fluffychat/utils/url_launcher.dart';
|
||||||
import 'package:fluffychat/views/archive.dart';
|
import 'package:fluffychat/views/archive.dart';
|
||||||
|
@ -112,11 +113,13 @@ class _ChatListState extends State<ChatList> {
|
||||||
controller: searchController,
|
controller: searchController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
hintText: "Search for a chat",
|
hintText: I18n.of(context).searchForAChat,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Text(
|
: Text(
|
||||||
selectMode == SelectMode.share ? "Share" : "FluffyChat",
|
selectMode == SelectMode.share
|
||||||
|
? I18n.of(context).share
|
||||||
|
: I18n.of(context).fluffychat,
|
||||||
),
|
),
|
||||||
leading: searchMode
|
leading: searchMode
|
||||||
? IconButton(
|
? IconButton(
|
||||||
|
@ -166,13 +169,13 @@ class _ChatListState extends State<ChatList> {
|
||||||
},
|
},
|
||||||
itemBuilder: (BuildContext context) =>
|
itemBuilder: (BuildContext context) =>
|
||||||
<PopupMenuEntry<String>>[
|
<PopupMenuEntry<String>>[
|
||||||
const PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
value: "archive",
|
value: "archive",
|
||||||
child: Text('Archive'),
|
child: Text(I18n.of(context).archive),
|
||||||
),
|
),
|
||||||
const PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
value: "settings",
|
value: "settings",
|
||||||
child: Text('Settings'),
|
child: Text(I18n.of(context).settings),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -185,7 +188,7 @@ class _ChatListState extends State<ChatList> {
|
||||||
SpeedDialChild(
|
SpeedDialChild(
|
||||||
child: Icon(Icons.people_outline),
|
child: Icon(Icons.people_outline),
|
||||||
backgroundColor: Colors.blue,
|
backgroundColor: Colors.blue,
|
||||||
label: 'Create new group',
|
label: I18n.of(context).createNewGroup,
|
||||||
labelStyle: TextStyle(fontSize: 18.0),
|
labelStyle: TextStyle(fontSize: 18.0),
|
||||||
onTap: () => showDialog(
|
onTap: () => showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
@ -195,7 +198,7 @@ class _ChatListState extends State<ChatList> {
|
||||||
SpeedDialChild(
|
SpeedDialChild(
|
||||||
child: Icon(Icons.person_add),
|
child: Icon(Icons.person_add),
|
||||||
backgroundColor: Colors.green,
|
backgroundColor: Colors.green,
|
||||||
label: 'New private chat',
|
label: I18n.of(context).newPrivateChat,
|
||||||
labelStyle: TextStyle(fontSize: 18.0),
|
labelStyle: TextStyle(fontSize: 18.0),
|
||||||
onTap: () => showDialog(
|
onTap: () => showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
@ -224,8 +227,8 @@ class _ChatListState extends State<ChatList> {
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
),
|
),
|
||||||
Text(searchMode
|
Text(searchMode
|
||||||
? "No rooms found..."
|
? I18n.of(context).noRoomsFound
|
||||||
: "Start your first chat :-)"),
|
: I18n.of(context).startYourFirstChat),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
import 'package:fluffychat/components/matrix.dart';
|
import 'package:fluffychat/components/matrix.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
import 'package:webview_flutter/webview_flutter.dart';
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
|
@ -16,7 +17,7 @@ class ContentWebView extends StatelessWidget {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(
|
title: Text(
|
||||||
"Content viewer",
|
I18n.of(context).contentViewer,
|
||||||
),
|
),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
IconButton(
|
IconButton(
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:famedlysdk/famedlysdk.dart';
|
||||||
import 'package:fluffychat/components/adaptive_page_layout.dart';
|
import 'package:fluffychat/components/adaptive_page_layout.dart';
|
||||||
import 'package:fluffychat/components/avatar.dart';
|
import 'package:fluffychat/components/avatar.dart';
|
||||||
import 'package:fluffychat/components/matrix.dart';
|
import 'package:fluffychat/components/matrix.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:toast/toast.dart';
|
import 'package:toast/toast.dart';
|
||||||
|
|
||||||
|
@ -39,7 +40,7 @@ class InvitationSelection extends StatelessWidget {
|
||||||
);
|
);
|
||||||
if (success != false) {
|
if (success != false) {
|
||||||
Toast.show(
|
Toast.show(
|
||||||
"Contact has been invited to the group.",
|
I18n.of(context).contactHasBeenInvitedToTheGroup,
|
||||||
context,
|
context,
|
||||||
duration: Toast.LENGTH_LONG,
|
duration: Toast.LENGTH_LONG,
|
||||||
);
|
);
|
||||||
|
@ -48,13 +49,14 @@ class InvitationSelection extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final String groupName = room.name?.isEmpty ?? false ? "group" : room.name;
|
final String groupName =
|
||||||
|
room.name?.isEmpty ?? false ? I18n.of(context).group : room.name;
|
||||||
return AdaptivePageLayout(
|
return AdaptivePageLayout(
|
||||||
primaryPage: FocusPage.SECOND,
|
primaryPage: FocusPage.SECOND,
|
||||||
firstScaffold: ChatList(activeChat: room.id),
|
firstScaffold: ChatList(activeChat: room.id),
|
||||||
secondScaffold: Scaffold(
|
secondScaffold: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("Invite contact to $groupName"),
|
title: Text(I18n.of(context).inviteContactToGroup(groupName)),
|
||||||
),
|
),
|
||||||
body: FutureBuilder<List<User>>(
|
body: FutureBuilder<List<User>>(
|
||||||
future: getContacts(context),
|
future: getContacts(context),
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'dart:math';
|
||||||
|
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
import 'package:fluffychat/components/matrix.dart';
|
import 'package:fluffychat/components/matrix.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
@ -26,12 +27,12 @@ class _LoginState extends State<Login> {
|
||||||
void login(BuildContext context) async {
|
void login(BuildContext context) async {
|
||||||
MatrixState matrix = Matrix.of(context);
|
MatrixState matrix = Matrix.of(context);
|
||||||
if (usernameController.text.isEmpty) {
|
if (usernameController.text.isEmpty) {
|
||||||
setState(() => usernameError = "Please enter your username.");
|
setState(() => usernameError = I18n.of(context).pleaseEnterYourUsername);
|
||||||
} else {
|
} else {
|
||||||
setState(() => usernameError = null);
|
setState(() => usernameError = null);
|
||||||
}
|
}
|
||||||
if (passwordController.text.isEmpty) {
|
if (passwordController.text.isEmpty) {
|
||||||
setState(() => passwordError = "Please enter your password.");
|
setState(() => passwordError = I18n.of(context).pleaseEnterYourPassword);
|
||||||
} else {
|
} else {
|
||||||
setState(() => passwordError = null);
|
setState(() => passwordError = null);
|
||||||
}
|
}
|
||||||
|
@ -51,12 +52,13 @@ class _LoginState extends State<Login> {
|
||||||
print("[Login] Check server...");
|
print("[Login] Check server...");
|
||||||
setState(() => loading = true);
|
setState(() => loading = true);
|
||||||
if (!await matrix.client.checkServer(homeserver)) {
|
if (!await matrix.client.checkServer(homeserver)) {
|
||||||
setState(() => serverError = "Homeserver is not compatible.");
|
setState(
|
||||||
|
() => serverError = I18n.of(context).homeserverIsNotCompatible);
|
||||||
|
|
||||||
return setState(() => loading = false);
|
return setState(() => loading = false);
|
||||||
}
|
}
|
||||||
} catch (exception) {
|
} catch (exception) {
|
||||||
setState(() => serverError = "Connection attempt failed!");
|
setState(() => serverError = I18n.of(context).connectionAttemptFailed);
|
||||||
return setState(() => loading = false);
|
return setState(() => loading = false);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -93,6 +95,7 @@ class _LoginState extends State<Login> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: TextField(
|
title: TextField(
|
||||||
|
autocorrect: false,
|
||||||
controller: serverController,
|
controller: serverController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: Icon(Icons.domain),
|
icon: Icon(Icons.domain),
|
||||||
|
@ -125,11 +128,13 @@ class _LoginState extends State<Login> {
|
||||||
child: Icon(Icons.account_box),
|
child: Icon(Icons.account_box),
|
||||||
),
|
),
|
||||||
title: TextField(
|
title: TextField(
|
||||||
|
autocorrect: false,
|
||||||
controller: usernameController,
|
controller: usernameController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: "@username:domain",
|
hintText:
|
||||||
|
"@${I18n.of(context).username.toLowerCase()}:domain",
|
||||||
errorText: usernameError,
|
errorText: usernameError,
|
||||||
labelText: "Username"),
|
labelText: I18n.of(context).username),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
|
@ -138,6 +143,7 @@ class _LoginState extends State<Login> {
|
||||||
child: Icon(Icons.lock),
|
child: Icon(Icons.lock),
|
||||||
),
|
),
|
||||||
title: TextField(
|
title: TextField(
|
||||||
|
autocorrect: false,
|
||||||
controller: passwordController,
|
controller: passwordController,
|
||||||
obscureText: !showPassword,
|
obscureText: !showPassword,
|
||||||
onSubmitted: (t) => login(context),
|
onSubmitted: (t) => login(context),
|
||||||
|
@ -150,7 +156,7 @@ class _LoginState extends State<Login> {
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
setState(() => showPassword = !showPassword),
|
setState(() => showPassword = !showPassword),
|
||||||
),
|
),
|
||||||
labelText: "Password"),
|
labelText: I18n.of(context).password),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 20),
|
SizedBox(height: 20),
|
||||||
|
@ -165,7 +171,7 @@ class _LoginState extends State<Login> {
|
||||||
child: loading
|
child: loading
|
||||||
? CircularProgressIndicator()
|
? CircularProgressIndicator()
|
||||||
: Text(
|
: Text(
|
||||||
"Login",
|
I18n.of(context).login,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 16),
|
style: TextStyle(color: Colors.white, fontSize: 16),
|
||||||
),
|
),
|
||||||
onPressed: () => loading ? null : login(context),
|
onPressed: () => loading ? null : login(context),
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'package:famedlysdk/famedlysdk.dart';
|
||||||
import 'package:fluffychat/components/adaptive_page_layout.dart';
|
import 'package:fluffychat/components/adaptive_page_layout.dart';
|
||||||
import 'package:fluffychat/components/content_banner.dart';
|
import 'package:fluffychat/components/content_banner.dart';
|
||||||
import 'package:fluffychat/components/matrix.dart';
|
import 'package:fluffychat/components/matrix.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
import 'package:fluffychat/views/chat_list.dart';
|
import 'package:fluffychat/views/chat_list.dart';
|
||||||
import 'package:fluffychat/views/sign_up.dart';
|
import 'package:fluffychat/views/sign_up.dart';
|
||||||
|
@ -47,7 +48,7 @@ class _SettingsState extends State<Settings> {
|
||||||
);
|
);
|
||||||
if (success != null && success.isEmpty) {
|
if (success != null && success.isEmpty) {
|
||||||
Toast.show(
|
Toast.show(
|
||||||
"Displayname has been changed",
|
I18n.of(context).displaynameHasBeenChanged,
|
||||||
context,
|
context,
|
||||||
duration: Toast.LENGTH_LONG,
|
duration: Toast.LENGTH_LONG,
|
||||||
);
|
);
|
||||||
|
@ -77,7 +78,7 @@ class _SettingsState extends State<Settings> {
|
||||||
print(success);
|
print(success);
|
||||||
if (success != false) {
|
if (success != false) {
|
||||||
Toast.show(
|
Toast.show(
|
||||||
"Avatar has been changed",
|
I18n.of(context).avatarHasBeenChanged,
|
||||||
context,
|
context,
|
||||||
duration: Toast.LENGTH_LONG,
|
duration: Toast.LENGTH_LONG,
|
||||||
);
|
);
|
||||||
|
@ -97,7 +98,7 @@ class _SettingsState extends State<Settings> {
|
||||||
});
|
});
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("Settings"),
|
title: Text(I18n.of(context).settings),
|
||||||
),
|
),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
@ -115,7 +116,7 @@ class _SettingsState extends State<Settings> {
|
||||||
onSubmitted: (s) => setDisplaynameAction(context, s),
|
onSubmitted: (s) => setDisplaynameAction(context, s),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
labelText: "Edit displayname",
|
labelText: I18n.of(context).editDisplayname,
|
||||||
labelStyle: TextStyle(color: Colors.black),
|
labelStyle: TextStyle(color: Colors.black),
|
||||||
hintText: (profile?.displayname ?? ""),
|
hintText: (profile?.displayname ?? ""),
|
||||||
),
|
),
|
||||||
|
@ -124,7 +125,7 @@ class _SettingsState extends State<Settings> {
|
||||||
Divider(thickness: 8),
|
Divider(thickness: 8),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
"About",
|
I18n.of(context).about,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
@ -132,29 +133,38 @@ class _SettingsState extends State<Settings> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.help),
|
leading: Icon(Icons.sentiment_very_satisfied),
|
||||||
title: Text("Help"),
|
title: Text(I18n.of(context).donate),
|
||||||
onTap: () => launch(
|
onTap: () => launch("https://ko-fi.com/krille"),
|
||||||
"https://gitlab.com/ChristianPauly/fluffychat-flutter/issues")),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.list),
|
leading: Icon(Icons.help),
|
||||||
title: Text("Changelog"),
|
title: Text(I18n.of(context).help),
|
||||||
onTap: () => launch(
|
onTap: () => launch(
|
||||||
"https://gitlab.com/ChristianPauly/fluffychat-flutter/blob/master/CHANGELOG.md")),
|
"https://gitlab.com/ChristianPauly/fluffychat-flutter/issues"),
|
||||||
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.link),
|
leading: Icon(Icons.list),
|
||||||
title: Text("License"),
|
title: Text(I18n.of(context).changelog),
|
||||||
onTap: () => launch(
|
onTap: () => launch(
|
||||||
"https://gitlab.com/ChristianPauly/fluffychat-flutter/raw/master/LICENSE")),
|
"https://gitlab.com/ChristianPauly/fluffychat-flutter/blob/master/CHANGELOG.md"),
|
||||||
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.code),
|
leading: Icon(Icons.link),
|
||||||
title: Text("Source code"),
|
title: Text(I18n.of(context).license),
|
||||||
onTap: () => launch(
|
onTap: () => launch(
|
||||||
"https://gitlab.com/ChristianPauly/fluffychat-flutter")),
|
"https://gitlab.com/ChristianPauly/fluffychat-flutter/raw/master/LICENSE"),
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
leading: Icon(Icons.code),
|
||||||
|
title: Text(I18n.of(context).sourceCode),
|
||||||
|
onTap: () =>
|
||||||
|
launch("https://gitlab.com/ChristianPauly/fluffychat-flutter"),
|
||||||
|
),
|
||||||
Divider(thickness: 8),
|
Divider(thickness: 8),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
"Logout",
|
I18n.of(context).logout,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
@ -163,7 +173,7 @@ class _SettingsState extends State<Settings> {
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.exit_to_app),
|
leading: Icon(Icons.exit_to_app),
|
||||||
title: Text("Logout"),
|
title: Text(I18n.of(context).logout),
|
||||||
onTap: () => logoutAction(context),
|
onTap: () => logoutAction(context),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'dart:math';
|
||||||
|
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
import 'package:fluffychat/components/matrix.dart';
|
import 'package:fluffychat/components/matrix.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
import 'package:fluffychat/views/login.dart';
|
import 'package:fluffychat/views/login.dart';
|
||||||
import 'package:fluffychat/views/sign_up_password.dart';
|
import 'package:fluffychat/views/sign_up_password.dart';
|
||||||
|
@ -37,7 +38,7 @@ class _SignUpState extends State<SignUp> {
|
||||||
void signUpAction(BuildContext context) async {
|
void signUpAction(BuildContext context) async {
|
||||||
MatrixState matrix = Matrix.of(context);
|
MatrixState matrix = Matrix.of(context);
|
||||||
if (usernameController.text.isEmpty) {
|
if (usernameController.text.isEmpty) {
|
||||||
setState(() => usernameError = "Please choose a username.");
|
setState(() => usernameError = I18n.of(context).pleaseChooseAUsername);
|
||||||
} else {
|
} else {
|
||||||
setState(() => usernameError = null);
|
setState(() => usernameError = null);
|
||||||
}
|
}
|
||||||
|
@ -60,12 +61,13 @@ class _SignUpState extends State<SignUp> {
|
||||||
print("[Sign Up] Check server...");
|
print("[Sign Up] Check server...");
|
||||||
setState(() => loading = true);
|
setState(() => loading = true);
|
||||||
if (!await matrix.client.checkServer(homeserver)) {
|
if (!await matrix.client.checkServer(homeserver)) {
|
||||||
setState(() => serverError = "Homeserver is not compatible.");
|
setState(
|
||||||
|
() => serverError = I18n.of(context).homeserverIsNotCompatible);
|
||||||
|
|
||||||
return setState(() => loading = false);
|
return setState(() => loading = false);
|
||||||
}
|
}
|
||||||
} catch (exception) {
|
} catch (exception) {
|
||||||
setState(() => serverError = "Connection attempt failed!");
|
setState(() => serverError = I18n.of(context).connectionAttemptFailed);
|
||||||
return setState(() => loading = false);
|
return setState(() => loading = false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,6 +96,7 @@ class _SignUpState extends State<SignUp> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: TextField(
|
title: TextField(
|
||||||
|
autocorrect: false,
|
||||||
controller: serverController,
|
controller: serverController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: Icon(Icons.domain),
|
icon: Icon(Icons.domain),
|
||||||
|
@ -125,8 +128,9 @@ class _SignUpState extends State<SignUp> {
|
||||||
Icons.close,
|
Icons.close,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
),
|
),
|
||||||
title: Text(
|
title: Text(avatar == null
|
||||||
avatar == null ? "Set a profile picture" : "Discard picture"),
|
? I18n.of(context).setAProfilePicture
|
||||||
|
: I18n.of(context).discardPicture),
|
||||||
onTap: avatar == null
|
onTap: avatar == null
|
||||||
? setAvatarAction
|
? setAvatarAction
|
||||||
: () => setState(() => avatar = null),
|
: () => setState(() => avatar = null),
|
||||||
|
@ -137,12 +141,13 @@ class _SignUpState extends State<SignUp> {
|
||||||
child: Icon(Icons.account_box),
|
child: Icon(Icons.account_box),
|
||||||
),
|
),
|
||||||
title: TextField(
|
title: TextField(
|
||||||
|
autocorrect: false,
|
||||||
controller: usernameController,
|
controller: usernameController,
|
||||||
onSubmitted: (s) => signUpAction(context),
|
onSubmitted: (s) => signUpAction(context),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: "Username",
|
hintText: I18n.of(context).username,
|
||||||
errorText: usernameError,
|
errorText: usernameError,
|
||||||
labelText: "Choose a username"),
|
labelText: I18n.of(context).chooseAUsername),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 20),
|
SizedBox(height: 20),
|
||||||
|
@ -157,7 +162,7 @@ class _SignUpState extends State<SignUp> {
|
||||||
child: loading
|
child: loading
|
||||||
? CircularProgressIndicator()
|
? CircularProgressIndicator()
|
||||||
: Text(
|
: Text(
|
||||||
"Sign up",
|
I18n.of(context).signUp,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 16),
|
style: TextStyle(color: Colors.white, fontSize: 16),
|
||||||
),
|
),
|
||||||
onPressed: () => signUpAction(context),
|
onPressed: () => signUpAction(context),
|
||||||
|
@ -166,7 +171,7 @@ class _SignUpState extends State<SignUp> {
|
||||||
Center(
|
Center(
|
||||||
child: FlatButton(
|
child: FlatButton(
|
||||||
child: Text(
|
child: Text(
|
||||||
"Already have an account?",
|
I18n.of(context).alreadyHaveAnAccount,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
decoration: TextDecoration.underline,
|
decoration: TextDecoration.underline,
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'dart:math';
|
||||||
|
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
import 'package:fluffychat/components/matrix.dart';
|
import 'package:fluffychat/components/matrix.dart';
|
||||||
|
import 'package:fluffychat/i18n/i18n.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
import 'package:fluffychat/views/auth_web_view.dart';
|
import 'package:fluffychat/views/auth_web_view.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -28,7 +29,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
|
||||||
void _signUpAction(BuildContext context, {Map<String, dynamic> auth}) async {
|
void _signUpAction(BuildContext context, {Map<String, dynamic> auth}) async {
|
||||||
MatrixState matrix = Matrix.of(context);
|
MatrixState matrix = Matrix.of(context);
|
||||||
if (passwordController.text.isEmpty) {
|
if (passwordController.text.isEmpty) {
|
||||||
setState(() => passwordError = "Please enter your password.");
|
setState(() => passwordError = I18n.of(context).pleaseEnterYourPassword);
|
||||||
} else {
|
} else {
|
||||||
setState(() => passwordError = null);
|
setState(() => passwordError = null);
|
||||||
}
|
}
|
||||||
|
@ -100,7 +101,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
|
||||||
data: {"displayname": widget.displayname},
|
data: {"displayname": widget.displayname},
|
||||||
);
|
);
|
||||||
} catch (exception) {
|
} catch (exception) {
|
||||||
Toast.show("Could not set displayname", context, duration: 5);
|
Toast.show(I18n.of(context).couldNotSetDisplayname, context, duration: 5);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await matrix.client.setAvatar(
|
await matrix.client.setAvatar(
|
||||||
|
@ -110,7 +111,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} catch (exception) {
|
} catch (exception) {
|
||||||
Toast.show("Could not set profile picture", context, duration: 5);
|
Toast.show(I18n.of(context).couldNotSetAvatar, context, duration: 5);
|
||||||
}
|
}
|
||||||
if (matrix.client.isLogged()) {
|
if (matrix.client.isLogged()) {
|
||||||
await Navigator.of(context).pushAndRemoveUntil(
|
await Navigator.of(context).pushAndRemoveUntil(
|
||||||
|
@ -123,7 +124,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("Secure your account with a password"),
|
title: Text(I18n.of(context).secureYourAccountWithAPassword),
|
||||||
),
|
),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
|
@ -161,7 +162,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
setState(() => showPassword = !showPassword),
|
setState(() => showPassword = !showPassword),
|
||||||
),
|
),
|
||||||
labelText: "Password"),
|
labelText: I18n.of(context).password),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 20),
|
SizedBox(height: 20),
|
||||||
|
@ -176,7 +177,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
|
||||||
child: loading
|
child: loading
|
||||||
? CircularProgressIndicator()
|
? CircularProgressIndicator()
|
||||||
: Text(
|
: Text(
|
||||||
"Create account now",
|
I18n.of(context).createAccountNow,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 16),
|
style: TextStyle(color: Colors.white, fontSize: 16),
|
||||||
),
|
),
|
||||||
onPressed: () => loading ? null : _signUpAction(context),
|
onPressed: () => loading ? null : _signUpAction(context),
|
||||||
|
|
Loading…
Reference in a new issue