diff --git a/lib/components/user_bottom_sheet.dart b/lib/components/user_bottom_sheet.dart index aa6d82c0..e0ac561d 100644 --- a/lib/components/user_bottom_sheet.dart +++ b/lib/components/user_bottom_sheet.dart @@ -180,6 +180,7 @@ class UserBottomSheet extends StatelessWidget { leading: IconButton( icon: Icon(Icons.arrow_downward_outlined), onPressed: Navigator.of(context).pop, + tooltip: L10n.of(context).close, ), title: Text(user.calcDisplayname()), actions: [ diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 895ebd5e..9925acd7 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -448,6 +448,26 @@ "type": "text", "placeholders": {} }, + "zoomIn": "Zoom in", + "@zoomIn": { + "type": "text", + "placeholders": {} + }, + "zoomOut": "Zoom out", + "@zoomOut": { + "type": "text", + "placeholders": {} + }, + "addEmail": "Add email", + "@addEmail": { + "type": "text", + "placeholders": {} + }, + "showPassword": "Show password", + "@showPassword": { + "type": "text", + "placeholders": {} + }, "chatBackup": "Chat backup", "@chatBackup": { "type": "text", diff --git a/lib/views/chat.dart b/lib/views/chat.dart index c8ee2bb6..ce65b70d 100644 --- a/lib/views/chat.dart +++ b/lib/views/chat.dart @@ -521,6 +521,7 @@ class _ChatState extends State { ? IconButton( icon: Icon(Icons.close), onPressed: () => setState(() => selectedEvents.clear()), + tooltip: L10n.of(context).close, ) : null, titleSpacing: @@ -592,6 +593,7 @@ class _ChatState extends State { selectedEvents.first.senderId == client.userID) IconButton( icon: Icon(Icons.edit_outlined), + tooltip: L10n.of(context).edit, onPressed: () { setState(() { pendingText = sendController.text; @@ -645,6 +647,7 @@ class _ChatState extends State { ] : [ IconButton( + tooltip: L10n.of(context).videoCall, icon: Icon(Icons.call_outlined), onPressed: () => startCallAction(context), ), @@ -959,6 +962,7 @@ class _ChatState extends State { child: Row( children: [ IconButton( + tooltip: L10n.of(context).close, icon: Icon(Icons.close), onPressed: () => setState(() { if (editEvent != null) { @@ -1196,6 +1200,7 @@ class _ChatState extends State { height: 56, alignment: Alignment.center, child: IconButton( + tooltip: L10n.of(context).voiceMessage, icon: Icon(Icons.mic_none_outlined), onPressed: () => voiceMessageAction(context), @@ -1209,6 +1214,7 @@ class _ChatState extends State { child: IconButton( icon: Icon(Icons.send_outlined), onPressed: () => send(), + tooltip: L10n.of(context).send, ), ), ], diff --git a/lib/views/chat_details.dart b/lib/views/chat_details.dart index a31502a8..d7e87f07 100644 --- a/lib/views/chat_details.dart +++ b/lib/views/chat_details.dart @@ -202,6 +202,7 @@ class _ChatDetailsState extends State { actions: [ if (room.canonicalAlias?.isNotEmpty ?? false) IconButton( + tooltip: L10n.of(context).share, icon: Icon(Icons.share_outlined), onPressed: () => FluffyShare.share( AppConfig.inviteLinkPrefix + room.canonicalAlias, diff --git a/lib/views/chat_list.dart b/lib/views/chat_list.dart index 24e95795..5109f0b6 100644 --- a/lib/views/chat_list.dart +++ b/lib/views/chat_list.dart @@ -284,6 +284,7 @@ class _ChatListState extends State { : [ IconButton( icon: Icon(Icons.search_outlined), + tooltip: L10n.of(context).search, onPressed: () async { await _scrollController.animateTo( _scrollController.position.minScrollExtent, diff --git a/lib/views/image_view.dart b/lib/views/image_view.dart index 56ca2acb..57ce8241 100644 --- a/lib/views/image_view.dart +++ b/lib/views/image_view.dart @@ -4,6 +4,7 @@ import 'package:fluffychat/components/image_bubble.dart'; import 'package:fluffychat/components/matrix.dart'; import 'package:flutter/material.dart'; import '../utils/event_extension.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; import '../utils/platform_infos.dart'; class ImageView extends StatelessWidget { @@ -30,6 +31,7 @@ class ImageView extends StatelessWidget { icon: Icon(Icons.close), onPressed: () => Navigator.of(context).pop(), color: Colors.white, + tooltip: L10n.of(context).close, ), backgroundColor: Color(0x44000000), actions: [ @@ -37,11 +39,13 @@ class ImageView extends StatelessWidget { icon: Icon(Icons.reply_outlined), onPressed: () => _forwardAction(context), color: Colors.white, + tooltip: L10n.of(context).share, ), IconButton( icon: Icon(Icons.download_outlined), onPressed: () => event.openFile(context, downloadOnly: true), color: Colors.white, + tooltip: L10n.of(context).downloadFile, ), ], ), diff --git a/lib/views/log_view.dart b/lib/views/log_view.dart index e205473f..5dcce572 100644 --- a/lib/views/log_view.dart +++ b/lib/views/log_view.dart @@ -1,6 +1,7 @@ import 'package:famedlysdk/famedlysdk.dart'; import 'package:flutter/material.dart'; import 'package:logger/logger.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; class LogViewer extends StatefulWidget { @override @@ -25,10 +26,12 @@ class _LogViewerState extends State { IconButton( icon: Icon(Icons.zoom_in_outlined), onPressed: () => setState(() => fontSize++), + tooltip: L10n.of(context).zoomIn, ), IconButton( icon: Icon(Icons.zoom_out_outlined), onPressed: () => setState(() => fontSize--), + tooltip: L10n.of(context).zoomOut, ), PopupMenuButton( itemBuilder: (context) => Level.values diff --git a/lib/views/login.dart b/lib/views/login.dart index 53892d6f..23188ab4 100644 --- a/lib/views/login.dart +++ b/lib/views/login.dart @@ -205,6 +205,7 @@ class _LoginState extends State { hintText: '****', errorText: passwordError, suffixIcon: IconButton( + tooltip: L10n.of(context).showPassword, icon: Icon(showPassword ? Icons.visibility_off_outlined : Icons.visibility_outlined), diff --git a/lib/views/settings_3pid.dart b/lib/views/settings_3pid.dart index 76b1c45a..2b4aea5d 100644 --- a/lib/views/settings_3pid.dart +++ b/lib/views/settings_3pid.dart @@ -103,6 +103,7 @@ class _Settings3PidState extends State { IconButton( icon: Icon(Icons.add_outlined), onPressed: () => _add3PidAction(context), + tooltip: L10n.of(context).addEmail, ) ], ), @@ -153,6 +154,7 @@ class _Settings3PidState extends State { child: Icon(identifier[i].iconData)), title: Text(identifier[i].address), trailing: IconButton( + tooltip: L10n.of(context).delete, icon: Icon(Icons.delete_forever_outlined), color: Colors.red, onPressed: () => _delete3Pid(context, identifier[i]), diff --git a/lib/views/settings_ignore_list.dart b/lib/views/settings_ignore_list.dart index f02ff01e..8542280a 100644 --- a/lib/views/settings_ignore_list.dart +++ b/lib/views/settings_ignore_list.dart @@ -63,6 +63,7 @@ class _SettingsIgnoreListState extends State { prefixText: '@', labelText: L10n.of(context).ignoreUsername, suffixIcon: IconButton( + tooltip: L10n.of(context).ignore, icon: Icon(Icons.done_outlined), onPressed: () => _ignoreUser(context), ), @@ -95,6 +96,7 @@ class _SettingsIgnoreListState extends State { title: Text(s.data?.displayname ?? client.ignoredUsers[i]), trailing: IconButton( + tooltip: L10n.of(context).delete, icon: Icon(Icons.delete_forever_outlined), onPressed: () => showFutureLoadingDialog( context: context, diff --git a/lib/views/sign_up_password.dart b/lib/views/sign_up_password.dart index 8d49a2bd..c662bf0b 100644 --- a/lib/views/sign_up_password.dart +++ b/lib/views/sign_up_password.dart @@ -159,6 +159,7 @@ class _SignUpPasswordState extends State { hintText: '****', errorText: passwordError, suffixIcon: IconButton( + tooltip: L10n.of(context).showPassword, icon: Icon(showPassword ? Icons.visibility_off_outlined : Icons.visibility_outlined), diff --git a/pubspec.lock b/pubspec.lock index 30db96c1..9e84368c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -631,7 +631,7 @@ packages: name: matrix_api_lite url: "https://pub.dartlang.org" source: hosted - version: "0.1.7" + version: "0.1.9" matrix_file_e2ee: dependency: transitive description: