From 2eee35b83876f3d722909e6b785ac0b9e44c7280 Mon Sep 17 00:00:00 2001 From: mytchj Date: Sun, 20 Aug 2023 18:07:23 -0700 Subject: [PATCH 1/2] scrubbed through app widgets and added localization text --- assets/l10n/intl_en.arb | 62 ++++- lib/pages/communities_tab.dart | 6 +- lib/pages/community/community_about_tab.dart | 28 ++- lib/pages/create_post/create_post.dart | 2 +- lib/pages/full_post/comment_section.dart | 9 +- lib/pages/full_post/full_post.dart | 3 +- lib/pages/home_page.dart | 2 +- lib/pages/home_tab.dart | 10 +- lib/pages/inbox.dart | 16 +- lib/pages/media_view.dart | 13 +- lib/pages/pick_image.dart | 2 +- lib/pages/profile_tab.dart | 7 +- lib/pages/saved_page.dart | 6 +- lib/pages/search_results.dart | 2 +- lib/pages/search_tab.dart | 2 +- lib/pages/user.dart | 3 +- pubspec.lock | 234 +++++++++---------- 17 files changed, 226 insertions(+), 181 deletions(-) diff --git a/assets/l10n/intl_en.arb b/assets/l10n/intl_en.arb index 2b67dada..27bfec42 100644 --- a/assets/l10n/intl_en.arb +++ b/assets/l10n/intl_en.arb @@ -36,6 +36,8 @@ "@posts": {}, "comments": "Comments", "@comments": {}, + "comment": "Comment", + "@comment": {}, "modlog": "Modlog", "@modlog": {}, "modlog_reason": "Reason", @@ -236,8 +238,10 @@ "@not_an_admin": {}, "couldnt_find_post": "Couldn't find post.", "@couldnt_find_post": {}, - "not_logged_in": "Not logged in.", - "@not_logged_in": {}, + "not_logged_in": "Not logged in", + "@not_logged_in": { + "description": "a message to the user informing them they are not logged into a Lemmy instance" + }, "site_ban": "You have been banned from the site", "@site_ban": {}, "community_ban": "You have been banned from this community.", @@ -256,6 +260,10 @@ "@couldnt_update_comment": {}, "no_comment_edit_allowed": "Not allowed to edit comment.", "@no_comment_edit_allowed": {}, + "no_comments_yet": "no comments yet", + "@no_comments_yet": { + "description": "informers the user that the post has zero comments in-place of comment thread" + }, "couldnt_save_comment": "Couldn't save comment.", "@couldnt_save_comment": {}, "couldnt_get_comments": "Couldn't get comments.", @@ -446,6 +454,8 @@ }, "block": "Block", "@block": {}, + "blocked": "Blocked", + "@blocked": {}, "block_user": "Block user", "@block_user": {}, "no_users_blocked": "No users blocked", @@ -456,6 +466,8 @@ "@no_communities_blocked": {}, "unblock": "Unblock", "@unblock": {}, + "unblocked": "Unblocked", + "@unblocked": {}, "unblock_user": "Unblock user", "@unblock_user": {}, "unblock_community": "Unblock community", @@ -538,10 +550,32 @@ "@nerd_stuff": {}, "open_in_browser": "Open in browser", "@open_in_browser": {}, + "share": "share", + "@share": { + "description": "tooltip for user for sharing" + }, "share_text": "Share text", - "@share_text": {}, + "@share_text": { + "description": "tooltip for user to share text" + + }, "share_url": "Share URL", - "@share_url": {}, + "@share_url": { + "description": "tooltip for user to share a URL" + + }, + "share_link": "Share Link", + "@share_link": { + "description": "tooltip for user to share a link" + }, + "share_image": "Share Image", + "@share_image": { + "description": "tooltip on button/selector for user to share an image" + }, + "share_file": "Share File", + "@share_file": { + "description": "tooltip on button/selector for user to share a file or image" + }, "translate": "Translate", "@translate": {}, "make_text_selectable": "Make text selectable", @@ -698,6 +732,10 @@ "@use_this_image": {}, "photo_picker_explanation": "Pick an image, then adjust the crop box to the right shape.\n\nYou can then drag the image until it's in the right place. \n\nResizing the crop box will zoom the selection in and out.", "@photo_picker_explanation": {}, + "edit_image": "Edit Image", + "@edit_image": { + "description": "notes to the user that the image can me edited" + }, "accounts_explanation": "The first instance on this screen will be treated as your default in other screens, and the marked account will be the default on that instance.\n\nPress and hold on an account to make it your default on that instance.\n\nPress and hold an instance or account to remove it from this app. You can add it back later. You may lose some local settings but your bookmarks, subscriptions etc will still be held on your instance.", "@accounts_explanation": {}, "comment_tag_op": "OP", @@ -705,5 +743,19 @@ "comment_tag_you": "YOU", "@comment_tag_you": {}, "code_of_conduct_clickthrough": "By accessing the Lemmy network using Liftoff! you agree to adhere to our Code of Conduct", - "@code_of_conduct_clickthrough": {} + "@code_of_conduct_clickthrough": {}, + "join": "{tense, select, past{joined} present{join} future{will join} other{join}}", + "@join": { + "description": "the verb describing the act of adding a lemmy community to the user's subscriptions", + "placeholder" : { + "tense": { + "type": "String" + } + } + }, + "download": "download", + "@download": {}, + "create_post": "Create Post", + "@create_post": {} + } \ No newline at end of file diff --git a/lib/pages/communities_tab.dart b/lib/pages/communities_tab.dart index 28c9063e..302b9e4d 100644 --- a/lib/pages/communities_tab.dart +++ b/lib/pages/communities_tab.dart @@ -10,6 +10,7 @@ import '../hooks/delayed_loading.dart'; import '../hooks/logged_in_action.dart'; import '../hooks/refreshable.dart'; import '../hooks/stores.dart'; +import '../l10n/gen/l10n.dart'; import '../stores/accounts_store.dart'; import '../util/extensions/api.dart'; import '../util/extensions/iterators.dart'; @@ -164,8 +165,9 @@ class CommunitiesTab extends HookWidget { body: PullToRefresh( onRefresh: refresh, child: amountOfDisplayInstances == 0 - ? const Center( - child: Text('You are not logged in to any instances'), + ? Center( + child: Text(L10n.of(context).not_logged_in), + //child: Text('You are not logged in to any instances'), // TODO localize this string ) : ListView( children: [ diff --git a/lib/pages/community/community_about_tab.dart b/lib/pages/community/community_about_tab.dart index 4e56d74b..88a4b2b2 100644 --- a/lib/pages/community/community_about_tab.dart +++ b/lib/pages/community/community_about_tab.dart @@ -53,26 +53,30 @@ class CommmunityAboutTab extends StatelessWidget { label: Text(L10n.of(context) .number_of_users_online(onlineUsers ?? 0))), Chip( - label: - Text('${community.counts.usersActiveDay} users / day')), + label: Text('${L10n.of(context) + .number_of_users(community.counts.usersActiveDay)}' + ' / ${L10n.of(context).day}')), Chip( - label: Text( - '${community.counts.usersActiveWeek} users / week')), + label: Text('${L10n.of(context) + .number_of_users(community.counts.usersActiveWeek)}' + ' / ${L10n.of(context).week}')), Chip( - label: Text( - '${community.counts.usersActiveMonth} users / month')), + label: Text('${L10n.of(context) + .number_of_users(community.counts.usersActiveMonth)}' + ' / ${L10n.of(context).month}')), Chip( - label: Text( - '${community.counts.usersActiveHalfYear} users / 6 months')), + label: Text('${L10n.of(context) + .number_of_users(community.counts.usersActiveHalfYear)}' + ' / 6 ${L10n.of(context).month}s')), Chip( label: Text(L10n.of(context) .number_of_subscribers(community.counts.subscribers))), Chip( - label: Text( - '${community.counts.posts} post${community.counts.posts == 1 ? '' : 's'}')), + label: Text(L10n.of(context) + .number_of_posts(community.counts.posts ))), Chip( - label: Text( - '${community.counts.comments} comment${community.counts.comments == 1 ? '' : 's'}')), + label: Text(L10n.of(context) + .number_of_comments(community.counts.comments, 0))), // TODO why does this need 2 args??? ].spaced(8), ), ), diff --git a/lib/pages/create_post/create_post.dart b/lib/pages/create_post/create_post.dart index c4da8f42..d6cde0e2 100644 --- a/lib/pages/create_post/create_post.dart +++ b/lib/pages/create_post/create_post.dart @@ -73,7 +73,7 @@ class CreatePostPage extends HookWidget { }, child: Scaffold( appBar: AppBar( - title: const Text('Create post'), + title: Text(L10n.of(context).create_post), actions: [ ObserverBuilder( builder: (context, store) => IconButton( diff --git a/lib/pages/full_post/comment_section.dart b/lib/pages/full_post/comment_section.dart index 8352a37a..b0f3c727 100644 --- a/lib/pages/full_post/comment_section.dart +++ b/lib/pages/full_post/comment_section.dart @@ -69,11 +69,10 @@ class CommentSection { // sorting menu goes here if (postComments != null && postComments.isEmpty && newComments.isEmpty) _centeredWithConstraints( - child: const Padding( - padding: EdgeInsets.symmetric(vertical: 50), - child: Text( - 'no comments yet', - style: TextStyle(fontStyle: FontStyle.italic), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 50), + child: Text(L10n.of(context).no_comments_yet, + style: const TextStyle(fontStyle: FontStyle.italic), ), ), ) diff --git a/lib/pages/full_post/full_post.dart b/lib/pages/full_post/full_post.dart index 9563c1a6..c3ee8e9f 100644 --- a/lib/pages/full_post/full_post.dart +++ b/lib/pages/full_post/full_post.dart @@ -48,7 +48,8 @@ class FullPostPage extends HookWidget { asyncStore: fullPostStore.communityBlockingState, successMessageBuilder: (context, data) { final name = data.communityView.community.originPreferredName; - return '${data.blocked ? 'Blocked' : 'Unblocked'} $name'; + return '${data.blocked ? + L10n.of(context).blocked : L10n.of(context).unblocked} $name'; }, ), ], diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 23218462..7fc74885 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -74,7 +74,7 @@ class HomePage extends HookWidget { snackBarShowing.value = true; ScaffoldMessenger.of(context) .showSnackBar(const SnackBar( - content: Text('Tap back again to leave'), + content: Text('Tap back again to leave'), // TODO localize this string )) .closed .then((SnackBarClosedReason reason) => diff --git a/lib/pages/home_tab.dart b/lib/pages/home_tab.dart index 3c2a5457..4c8e597a 100644 --- a/lib/pages/home_tab.dart +++ b/lib/pages/home_tab.dart @@ -93,7 +93,7 @@ class HomeTab extends HookWidget { final everythingChoices = [ const ListTile( - title: Text('EVERYTHING'), + title: Text('EVERYTHING'), // TODO localize this string dense: true, contentPadding: EdgeInsets.zero, visualDensity: @@ -227,7 +227,7 @@ class HomeTab extends HookWidget { body: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Center(child: Text('there needs to be at least one instance')), + Center(child: Text('there needs to be at least one instance')), // TODO localize this string ], ), ); @@ -306,21 +306,21 @@ class HomeTab extends HookWidget { value: 0, child: ListTile( leading: Icon(Icons.keyboard_double_arrow_up), - title: Text('Back to top'), + title: Text('Back to top'), // TODO localize this string ), ), const PopupMenuItem( value: 1, child: ListTile( leading: Icon(Icons.refresh), - title: Text('Refresh'), + title: Text('Refresh'), // TODO localize this string ), ), const PopupMenuItem( value: 2, child: ListTile( leading: Icon(Icons.settings), - title: Text('Settings'), + title: Text('Settings'), // TODO localize this string ), ), // PopupMenuItem( diff --git a/lib/pages/inbox.dart b/lib/pages/inbox.dart index 21c8563e..aeec7962 100644 --- a/lib/pages/inbox.dart +++ b/lib/pages/inbox.dart @@ -40,7 +40,7 @@ class InboxPage extends HookWidget { if (accStore.hasNoAccount) { return Scaffold( appBar: AppBar(), - body: const Center(child: Text('no accounts added')), + body: const Center(child: Text('no accounts added')), // TODO localize this string ); } @@ -108,12 +108,12 @@ class InboxPage extends HookWidget { IconButton( icon: const Icon(Icons.checklist), onPressed: markAllAsRead, - tooltip: 'Mark all as read', + tooltip: 'Mark all as read', // TODO localize this string ), IconButton( icon: Icon(unreadOnly.value ? Icons.mail : Icons.mail_outline), onPressed: toggleUnreadOnly, - tooltip: unreadOnly.value ? 'show all' : 'show only unread', + tooltip: unreadOnly.value ? 'show all' : 'show only unread', // TODO localize this string ) ], bottom: TabBar( @@ -153,7 +153,7 @@ class InboxPage extends HookWidget { child: TabBarView( children: [ SortableInfiniteList( - noItems: const Text('no replies'), + noItems: const Text('no replies'), // TODO localize this string controller: isc, defaultSort: SortType.new_, fetcher: (page, batchSize, sortType) => @@ -173,7 +173,7 @@ class InboxPage extends HookWidget { uniqueProp: (item) => item.comment.apId, ), SortableInfiniteList( - noItems: const Text('no mentions'), + noItems: const Text('no mentions'), // TODO localize this string controller: isc, defaultSort: SortType.new_, fetcher: (page, batchSize, sortType) => @@ -194,7 +194,7 @@ class InboxPage extends HookWidget { InfiniteScroll( noItems: const Padding( padding: EdgeInsets.only(top: 60), - child: Text('no messages'), + child: Text('no messages'), // TODO localize this string ), controller: isc, fetcher: (page, batchSize) => @@ -264,7 +264,7 @@ class PrivateMessageTile extends HookWidget { return Column( children: [ ListTile( - title: Text(raw.value ? 'Show fancy' : 'Show raw'), + title: Text(raw.value ? 'Show fancy' : 'Show raw'), // TODO localize this string leading: markdownModeIcon(fancy: !raw.value), onTap: () { raw.value = !raw.value; @@ -281,7 +281,7 @@ class PrivateMessageTile extends HookWidget { }, ), ListTile( - title: const Text('Nerd stuff'), + title: const Text('Nerd stuff'), // TODO localize this string leading: const Icon(Icons.info_outline), onTap: () { pop(); diff --git a/lib/pages/media_view.dart b/lib/pages/media_view.dart index 65add8ef..60cbaa33 100644 --- a/lib/pages/media_view.dart +++ b/lib/pages/media_view.dart @@ -15,6 +15,7 @@ import 'package:photo_view/photo_view.dart'; import 'package:provider/provider.dart'; import 'package:share_plus/share_plus.dart'; +import '../l10n/gen/l10n.dart'; import '../stores/config_store.dart'; import '../util/convert_webp.dart'; import '../util/icons.dart'; @@ -54,7 +55,7 @@ class MediaViewPage extends HookWidget { children: [ ListTile( leading: const Icon(Icons.link), - title: const Text('Share link'), + title: Text(L10n.of(context).share_link), onTap: () { Navigator.of(context).pop(); share(url, context: context); @@ -62,7 +63,7 @@ class MediaViewPage extends HookWidget { ), ListTile( leading: const Icon(Icons.image), - title: const Text('Share file'), + title: Text(L10n.of(context).share_image), onTap: () async { Navigator.of(context).pop(); final File file = @@ -70,7 +71,7 @@ class MediaViewPage extends HookWidget { if (Platform.isAndroid || Platform.isIOS) { await Share.shareXFiles([XFile(file.path)]); } else if (Platform.isLinux || Platform.isWindows) { - _showSnackBar(context, 'sharing does not work on Desktop'); + _showSnackBar(context, 'sharing does not work on Desktop'); // TODO localize this string } }, ), @@ -93,12 +94,12 @@ class MediaViewPage extends HookWidget { actions: [ IconButton( icon: Icon(shareIcon), - tooltip: 'share', + tooltip: L10n.of(context).share, onPressed: sharePhoto, ), IconButton( icon: const Icon(Icons.file_download), - tooltip: 'download', + tooltip: L10n.of(context).download, onPressed: () async { File file = await DefaultCacheManager().getSingleFile(url); final filePath = file.path; @@ -129,7 +130,7 @@ class MediaViewPage extends HookWidget { if (Platform.isAndroid || Platform.isIOS) { if (!await requestMediaPermission()) { _showSnackBar(context, - 'Media permission revoked. Please go to the settings to fix'); + 'Media permission revoked. Please go to the settings to fix'); // TODO localize this string return; } var result = await GallerySaver.saveImage(file.path, diff --git a/lib/pages/pick_image.dart b/lib/pages/pick_image.dart index e2bde68b..f97298c5 100644 --- a/lib/pages/pick_image.dart +++ b/lib/pages/pick_image.dart @@ -76,7 +76,7 @@ class PickImagePage extends HookWidget { return Scaffold( appBar: AppBar( - title: const Text('Edit Image'), + title: Text(L10n.of(context).edit_image), ), body: Center( child: Column( diff --git a/lib/pages/profile_tab.dart b/lib/pages/profile_tab.dart index 1c992982..007a0dc6 100644 --- a/lib/pages/profile_tab.dart +++ b/lib/pages/profile_tab.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import '../hooks/stores.dart'; +import '../l10n/gen/l10n.dart'; import '../util/goto.dart'; import '../widgets/radio_picker.dart'; import '../widgets/user_profile.dart'; @@ -38,13 +39,13 @@ class UserProfileTab extends HookWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Text('No account was added.'), + Text(L10n.of(context).add_user), FilledButton.icon( onPressed: () { goTo(context, (_) => AccountsConfigPage()); }, icon: const Icon(Icons.add), - label: const Text('Add account'), + label: Text(L10n.of(context).add_account), ) ], ), @@ -56,7 +57,7 @@ class UserProfileTab extends HookWidget { extendBodyBehindAppBar: true, appBar: AppBar( title: RadioPicker( - title: 'account', + title: L10n.of(context).accounts, values: accountsStore.loggedInInstances .expand( (instanceHost) => accountsStore diff --git a/lib/pages/saved_page.dart b/lib/pages/saved_page.dart index b265b655..e8df8331 100644 --- a/lib/pages/saved_page.dart +++ b/lib/pages/saved_page.dart @@ -16,11 +16,11 @@ class SavedPage extends HookWidget { Widget build(BuildContext context) { final accountStore = useAccountsStore(); - if (accountStore.hasNoAccount) { + if (accountStore.hasNoAccount) { // TODO this doesn't work but body shows error from failed API call Scaffold( appBar: AppBar(), - body: const Center( - child: Text('no account found'), + body: Center( + child: Text(L10n.of(context).not_logged_in), ), ); } diff --git a/lib/pages/search_results.dart b/lib/pages/search_results.dart index 06157564..0591f50f 100644 --- a/lib/pages/search_results.dart +++ b/lib/pages/search_results.dart @@ -26,7 +26,7 @@ class SearchResultsPage extends HookWidget { length: 4, child: Scaffold( appBar: AppBar( - title: Text('Looking for "$query"'), + title: Text('Looking for "$query"'), // TODO localize this string bottom: TabBar( isScrollable: true, indicatorColor: Theme.of(context).colorScheme.primary, diff --git a/lib/pages/search_tab.dart b/lib/pages/search_tab.dart index 1ba9084b..1e25b893 100644 --- a/lib/pages/search_tab.dart +++ b/lib/pages/search_tab.dart @@ -25,7 +25,7 @@ class SearchTab extends HookWidget { return Scaffold( appBar: AppBar(), body: const Center( - child: Text('You do not have any instances added'), + child: Text('You do not have any instances added'), // TODO localize this string ), ); } diff --git a/lib/pages/user.dart b/lib/pages/user.dart index 33483c4c..3f515b0e 100644 --- a/lib/pages/user.dart +++ b/lib/pages/user.dart @@ -3,6 +3,7 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:lemmy_api_client/v3.dart'; import '../hooks/logged_in_action.dart'; +import '../l10n/gen/l10n.dart'; import '../util/icons.dart'; import '../util/share.dart'; import '../widgets/user_profile.dart'; @@ -33,7 +34,7 @@ class UserPage extends HookWidget { if (userDetailsSnap.hasData) { return UserProfile.fromFullPersonView(userDetailsSnap.data!); } else if (userDetailsSnap.hasError) { - return const Center(child: Text('Could not find that user.')); + return Center(child: Text(L10n.of(context).couldnt_find_that_account)); } else { return const Center(child: CircularProgressIndicator.adaptive()); } diff --git a/pubspec.lock b/pubspec.lock index 339748b1..97e025b3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: build - sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" build_config: dependency: transitive description: @@ -93,18 +93,18 @@ packages: dependency: transitive description: name: build_resolvers - sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + sha256: "6c4dd11d05d056e76320b828a1db0fc01ccd376922526f8e9d6c796a5adbac20" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.1" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "5e1929ad37d48bd382b124266cb8e521de5548d406a45a5ae6656c13dab73e37" + sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" url: "https://pub.dev" source: hosted - version: "2.4.5" + version: "2.4.6" build_runner_core: dependency: transitive description: @@ -213,10 +213,10 @@ packages: dependency: transitive description: name: dart_style - sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad + sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" double_back_to_close_app: dependency: "direct main" description: @@ -253,10 +253,10 @@ packages: dependency: transitive description: name: ffi - sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.0" file: dependency: transitive description: @@ -269,42 +269,42 @@ packages: dependency: "direct main" description: name: file_picker - sha256: b1729fc96627dd44012d0a901558177418818d6bd428df59dcfeb594e5f66432 + sha256: "21145c9c268d54b1f771d8380c195d2d6f655e0567dc1ca2f9c134c02c819e0a" url: "https://pub.dev" source: hosted - version: "5.3.2" + version: "5.3.3" file_selector_linux: dependency: transitive description: name: file_selector_linux - sha256: d17c5e450192cdc40b718804dfb4eaf79a71bed60ee9530703900879ba50baa3 + sha256: "770eb1ab057b5ae4326d1c24cc57710758b9a46026349d021d6311bd27580046" url: "https://pub.dev" source: hosted - version: "0.9.1+3" + version: "0.9.2" file_selector_macos: dependency: transitive description: name: file_selector_macos - sha256: "6290eec24fc4cc62535fe609e0c6714d3c1306191dc8c3b0319eaecc09423a3a" + sha256: "4ada532862917bf16e3adb3891fe3a5917a58bae03293e497082203a80909412" url: "https://pub.dev" source: hosted - version: "0.9.2" + version: "0.9.3+1" file_selector_platform_interface: dependency: transitive description: name: file_selector_platform_interface - sha256: "2a7f4bbf7bd2f022ecea85bfb1754e87f7dd403a9abc17a84a4fa2ddfe2abc0a" + sha256: "412705a646a0ae90f33f37acfae6a0f7cbc02222d6cd34e479421c3e74d3853c" url: "https://pub.dev" source: hosted - version: "2.5.1" + version: "2.6.0" file_selector_windows: dependency: transitive description: name: file_selector_windows - sha256: ef246380b66d1fb9089fc65622c387bf3780bca79f533424c31d07f12c2c7fd8 + sha256: "1372760c6b389842b77156203308940558a2817360154084368608413835fc26" url: "https://pub.dev" source: hosted - version: "0.9.2" + version: "0.9.3" fixnum: dependency: transitive description: @@ -322,10 +322,10 @@ packages: dependency: "direct main" description: name: flutter_cache_manager - sha256: "32cd900555219333326a2d0653aaaf8671264c29befa65bbd9856d204a4c9fb3" + sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "3.3.1" flutter_colorpicker: dependency: "direct main" description: @@ -439,10 +439,10 @@ packages: dependency: "direct main" description: name: flutter_markdown - sha256: dc6d5258653f6857135b32896ccda7f7af0c54dcec832495ad6835154c6c77c0 + sha256: "2b206d397dd7836ea60035b2d43825c8a303a76a5098e66f42d55a753e18d431" url: "https://pub.dev" source: hosted - version: "0.6.15" + version: "0.6.17+1" flutter_mobx: dependency: "direct main" description: @@ -489,18 +489,18 @@ packages: dependency: "direct dev" description: name: freezed - sha256: a9520490532087cf38bf3f7de478ab6ebeb5f68bb1eb2641546d92719b224445 + sha256: "2df89855fe181baae3b6d714dc3c4317acf4fccd495a6f36e5e00f24144c6c3b" url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.4.1" freezed_annotation: dependency: "direct main" description: name: freezed_annotation - sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338 + sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.1" frontend_server_client: dependency: transitive description: @@ -625,10 +625,10 @@ packages: dependency: transitive description: name: image_picker_android - sha256: "216dbfb6609e46f78613b8913d046a162588ad4f34909ae7bf85e9f94ea6d922" + sha256: "8179b54039b50eee561676232304f487602e2950ffb3e8995ed9034d6505ca34" url: "https://pub.dev" source: hosted - version: "0.8.7" + version: "0.8.7+4" image_picker_for_web: dependency: transitive description: @@ -665,10 +665,10 @@ packages: dependency: transitive description: name: image_picker_platform_interface - sha256: "7c7b96bb9413a9c28229e717e6fd1e3edd1cc5569c1778fcca060ecf729b65ee" + sha256: c1134543ae2187e85299996d21c526b2f403854994026d575ae4cf30d7bb2a32 url: "https://pub.dev" source: hosted - version: "2.8.0" + version: "2.9.0" image_picker_windows: dependency: transitive description: @@ -721,10 +721,10 @@ packages: dependency: "direct dev" description: name: json_serializable - sha256: "61a60716544392a82726dd0fa1dd6f5f1fd32aec66422b6e229e7b90d52325c4" + sha256: aa1f5a8912615733e0fdc7a02af03308933c93235bdc8d50d0b0c8a8ccb0b969 url: "https://pub.dev" source: hosted - version: "6.7.0" + version: "6.7.1" keyboard_dismisser: dependency: "direct main" description: @@ -754,7 +754,7 @@ packages: description: path: "." ref: master - resolved-ref: "0d7c53a539b87d8f77405e943e0615fe9fca9ba3" + resolved-ref: "61dd98c4588c5cd723b2982478d2d2c2ffdd6cbb" url: "https://github.com/liftoff-app/lemmy_api_client.git" source: git version: "0.21.0" @@ -874,10 +874,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: ceb027f6bc6a60674a233b4a90a7658af1aebdea833da0b5b53c1e9821a78c7b + sha256: "6ff267fcd9d48cb61c8df74a82680e8b82e940231bb5f68356672fde0397334a" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.0" package_info_plus_platform_interface: dependency: transitive description: @@ -898,90 +898,82 @@ packages: dependency: "direct main" description: name: path_provider - sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2" + sha256: "909b84830485dbcd0308edf6f7368bc8fd76afa26a270420f34cabea2a6467a0" url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.1.0" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" + sha256: "5d44fc3314d969b84816b569070d7ace0f1dea04bd94a83f74c4829615d22ad8" url: "https://pub.dev" source: hosted - version: "2.0.27" + version: "2.1.0" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3" + sha256: "1b744d3d774e5a879bb76d6cd1ecee2ba2c6960c03b1020cd35212f6aa267ac5" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57 + sha256: ba2b77f0c52a33db09fc8caf85b12df691bf28d983e84cf87ff6d693cfa007b3 url: "https://pub.dev" source: hosted - version: "2.1.11" + version: "2.2.0" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + sha256: bced5679c7df11190e1ddc35f3222c858f328fff85c3942e46e7f5589bf9eb84 url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.0" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: "1cb68ba4cd3a795033de62ba1b7b4564dace301f952de6bfb3cd91b202b6ee96" + sha256: ee0e0d164516b90ae1f970bdf29f726f1aa730d7cfc449ecc74c495378b705da url: "https://pub.dev" source: hosted - version: "2.1.7" - pedantic: - dependency: transitive - description: - name: pedantic - sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" - url: "https://pub.dev" - source: hosted - version: "1.11.1" + version: "2.2.0" permission_handler: dependency: "direct main" description: name: permission_handler - sha256: "2fd3a61adf28e0f7774fa40c469a740eca42ef4f10c9b91559f66ff45f28876c" + sha256: "63e5216aae014a72fe9579ccd027323395ce7a98271d9defa9d57320d001af81" url: "https://pub.dev" source: hosted - version: "10.4.0" + version: "10.4.3" permission_handler_android: dependency: transitive description: name: permission_handler_android - sha256: "3b61f3da3b1c83bc3fb6a2b431e8dab01d0e5b45f6a3d9c7609770ec88b2a89e" + sha256: "2ffaf52a21f64ac9b35fe7369bb9533edbd4f698e5604db8645b1064ff4cf221" url: "https://pub.dev" source: hosted - version: "10.3.0" + version: "10.3.3" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - sha256: "9aab0712fab020b90f5a49ea504bb347a2eae21da16f94c74bc70d0031a46c96" + sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5" url: "https://pub.dev" source: hosted - version: "9.1.1" + version: "9.1.4" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: "0bcae4a6c349f37bcc2a5019c97c03229bdd0eedf98dcf6966710c615bb566ce" + sha256: "7c6b1500385dd1d2ca61bb89e2488ca178e274a69144d26bbd65e33eae7c02a9" url: "https://pub.dev" source: hosted - version: "3.11.0" + version: "3.11.3" permission_handler_windows: dependency: transitive description: @@ -1010,18 +1002,18 @@ packages: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "57c07bf82207aee366dfaa3867b3164e4f03a238a461a11b0e8a3a510d51203d" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" pointer_interceptor: dependency: transitive description: @@ -1046,14 +1038,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" provider: dependency: "direct main" description: @@ -1090,74 +1074,74 @@ packages: dependency: "direct main" description: name: share_plus - sha256: ed3fcea4f789ed95913328e629c0c53e69e80e08b6c24542f1b3576046c614e8 + sha256: "6cec740fa0943a826951223e76218df002804adb588235a8910dc3d6b0654e11" url: "https://pub.dev" source: hosted - version: "7.0.2" + version: "7.1.0" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface - sha256: "0c6e61471bd71b04a138b8b588fa388e66d8b005e6f2deda63371c5c505a0981" + sha256: "357412af4178d8e11d14f41723f80f12caea54cf0d5cd29af9dcdab85d58aea7" url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.3.0" shared_preferences: dependency: "direct main" description: name: shared_preferences - sha256: "396f85b8afc6865182610c0a2fc470853d56499f75f7499e2a73a9f0539d23d0" + sha256: "0344316c947ffeb3a529eac929e1978fcd37c26be4e8468628bac399365a3ca1" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.2.0" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "6478c6bbbecfe9aced34c483171e90d7c078f5883558b30ec3163cf18402c749" + sha256: fe8401ec5b6dcd739a0fe9588802069e608c3fdbfd3c3c93e546cf2f90438076 url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: e014107bb79d6d3297196f4f2d0db54b5d1f85b8ea8ff63b8e8b391a02700feb + sha256: d29753996d8eb8f7619a1f13df6ce65e34bc107bef6330739ed76f18b22310ef url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.3.3" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: "9d387433ca65717bbf1be88f4d5bb18f10508917a8fa2fb02e0fd0d7479a9afa" + sha256: "71d6806d1449b0a9d4e85e0c7a917771e672a3d5dc61149cc9fac871115018e1" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - sha256: fb5cf25c0235df2d0640ac1b1174f6466bd311f621574997ac59018a6664548d + sha256: "23b052f17a25b90ff2b61aad4cc962154da76fb62848a9ce088efe30d7c50ab1" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: "74083203a8eae241e0de4a0d597dbedab3b8fef5563f33cf3c12d7e93c655ca5" + sha256: "7347b194fb0bbeb4058e6a4e87ee70350b6b2b90f8ac5f8bd5b3a01548f6d33a" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.0" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: "5e588e2efef56916a3b229c3bfe81e6a525665a454519ca51dbcc4236a274173" + sha256: f95e6a43162bce43c9c3405f3eb6f39e5b5d11f65fab19196cf8225e2777624d url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" shelf: dependency: transitive description: @@ -1183,26 +1167,26 @@ packages: dependency: transitive description: name: sliver_tools - sha256: ccdc502098a8bfa07b3ec582c282620031481300035584e1bb3aca296a505e8c + sha256: eae28220badfb9d0559207badcbbc9ad5331aac829a88cb0964d330d2a4636a6 url: "https://pub.dev" source: hosted - version: "0.2.10" + version: "0.2.12" source_gen: dependency: transitive description: name: source_gen - sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" + sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" source_helper: dependency: transitive description: name: source_helper - sha256: "3b67aade1d52416149c633ba1bb36df44d97c6b51830c2198e934e3fca87ca1f" + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" url: "https://pub.dev" source: hosted - version: "1.3.3" + version: "1.3.4" source_span: dependency: transitive description: @@ -1215,18 +1199,18 @@ packages: dependency: transitive description: name: sqflite - sha256: b4d6710e1200e96845747e37338ea8a819a12b51689a3bcf31eff0003b37a0b9 + sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a" url: "https://pub.dev" source: hosted - version: "2.2.8+4" + version: "2.3.0" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "8f7603f3f8f126740bc55c4ca2d1027aab4b74a1267a3e31ce51fe40e3b65b8f" + sha256: "1b92f368f44b0dee2425bb861cfa17b6f6cf3961f762ff6f941d20b33355660a" url: "https://pub.dev" source: hosted - version: "2.4.5+1" + version: "2.5.0" stack_trace: dependency: transitive description: @@ -1295,10 +1279,10 @@ packages: dependency: "direct main" description: name: timeago - sha256: a415b9a05ef64b845c859a91161fc9f689f88eaaa4c04759517d201891b99e90 + sha256: "4addcda362e51f23cf7ae2357fccd053f29d59b4ddd17fb07fc3e7febb47a456" url: "https://pub.dev" source: hosted - version: "3.4.0" + version: "3.5.0" timing: dependency: transitive description: @@ -1319,18 +1303,18 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 + sha256: "781bd58a1eb16069412365c98597726cd8810ae27435f04b3b4d3a470bacd61e" url: "https://pub.dev" source: hosted - version: "6.1.11" + version: "6.1.12" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: eed4e6a1164aa9794409325c3b707ff424d4d1c2a785e7db67f8bbda00e36e51 + sha256: "3dd2388cc0c42912eee04434531a26a82512b9cb1827e0214430c9bcbddfe025" url: "https://pub.dev" source: hosted - version: "6.0.35" + version: "6.0.38" url_launcher_ios: dependency: transitive description: @@ -1351,10 +1335,10 @@ packages: dependency: transitive description: name: url_launcher_macos - sha256: "91ee3e75ea9dadf38036200c5d3743518f4a5eb77a8d13fda1ee5764373f185e" + sha256: "1c4fdc0bfea61a70792ce97157e5cc17260f61abbe4f39354513f39ec6fd73b1" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" url_launcher_platform_interface: dependency: transitive description: @@ -1367,18 +1351,18 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "6bb1e5d7fe53daf02a8fee85352432a40b1f868a81880e99ec7440113d5cfcab" + sha256: cc26720eefe98c1b71d85f9dc7ef0cada5132617046369d9dc296b3ecaa5cbb4 url: "https://pub.dev" source: hosted - version: "2.0.17" + version: "2.0.18" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771" + sha256: "7967065dd2b5fccc18c653b97958fdf839c5478c28e767c61ee879f4e7882422" url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.0.7" uuid: dependency: "direct main" description: @@ -1415,18 +1399,18 @@ packages: dependency: transitive description: name: video_player_avfoundation - sha256: "4c274e439f349a0ee5cb3c42978393ede173a443b98f50de6ffe6900eaa19216" + sha256: f5f5b7fe8c865be8a57fe80c2dca130772e1db775b7af4e5c5aa1905069cfc6c url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.9" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface - sha256: a8c4dcae2a7a6e7cc1d7f9808294d968eca1993af34a98e95b9bdfa959bec684 + sha256: "1ca9acd7a0fb15fb1a990cb554e6f004465c6f37c99d2285766f08a4b2802988" url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.2.0" video_player_web: dependency: transitive description: @@ -1463,18 +1447,18 @@ packages: dependency: transitive description: name: win32 - sha256: "7dacfda1edcca378031db9905ad7d7bd56b29fd1a90b0908b71a52a12c41e36b" + sha256: f2add6fa510d3ae152903412227bda57d0d5a8da61d2c39c1fb022c9429a41c0 url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "5.0.6" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + sha256: f0c26453a2d47aa4c2570c6a033246a3fc62da2fe23c7ffdd0a7495086dc0247 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.2" xml: dependency: transitive description: From 994321fd9150cd15fa215ad2a056a0bb128fcbd2 Mon Sep 17 00:00:00 2001 From: mytchj Date: Sat, 26 Aug 2023 15:28:52 -0700 Subject: [PATCH 2/2] added a few more localized strings and cleaned up TODOs --- assets/l10n/intl_en.arb | 35 ++++++++++++++++++++++++++++++++++ lib/pages/communities_tab.dart | 1 - lib/pages/home_page.dart | 6 ++++-- lib/pages/inbox.dart | 24 +++++++++++++---------- lib/pages/media_view.dart | 4 ++-- lib/pages/search_results.dart | 2 +- lib/pages/search_tab.dart | 4 ++-- 7 files changed, 58 insertions(+), 18 deletions(-) diff --git a/assets/l10n/intl_en.arb b/assets/l10n/intl_en.arb index 27bfec42..5764b5e0 100644 --- a/assets/l10n/intl_en.arb +++ b/assets/l10n/intl_en.arb @@ -102,6 +102,7 @@ "@all": {}, "replies": "Replies", "@replies": {}, + "mentions": "Mentions", "@mentions": {}, "from": "from", @@ -114,6 +115,8 @@ "@more": {}, "mark_as_read": "mark as read", "@mark_as_read": {}, + "mark_all_as_read": "mark all as read", + "@mark_all_as_read": {}, "mark_as_unread": "mark as unread", "@mark_as_unread": {}, "reply": "reply", @@ -164,6 +167,10 @@ "@hide_nsfw_explanation": {}, "show_nsfw": "Show NSFW content", "@show_nsfw": {}, + "show_all": "show all", + "@show_all": {}, + "show_only_unread": "show only unread", + "@show_only_unread": {}, "send_notifications_to_email": "Send notifications to Email", "@send_notifications_to_email": {}, "remove_account": "Remove account", @@ -264,6 +271,18 @@ "@no_comments_yet": { "description": "informers the user that the post has zero comments in-place of comment thread" }, + "no_replies": "no replies", + "@no_replies": { + "description": "informers the user that the post has no replies yet" + }, + "no_mentions": "no mentions", + "@no_mentions": { + "description": "informers the user that the post has no mentions yet" + }, + "no_messages": "no messages", + "@no_messages": { + "description": "informers the user that the post has no messages yet" + }, "couldnt_save_comment": "Couldn't save comment.", "@couldnt_save_comment": {}, "couldnt_get_comments": "Couldn't get comments.", @@ -710,6 +729,10 @@ "@cancel": { "description": "Cancel button on popup" }, + "tap_back_again_to_leave": "tap back again to leave", + "@tap_back_again_to_leave": { + "description": "inform the user that another press of the 'back' button will close the app" + }, "editor_add_link_label": "label", "@editor_add_link_label": { "description": "palceholder for link label on an Add link popup in markdown editor" @@ -722,10 +745,22 @@ "@instance_error": {}, "instance_record_notfound": "Hmm... it seems like your instance couldn't find what you were looking for.", "@instance_record_notfound": {}, + "looking_for": "Looking for {item}", + "@looking_for": { + "description": "used in search bar to remind user what they searched for", + "placeholders" : { + "item": { + "type": "String", + "example": "..." + } + } + }, "try_again": "Try Again", "@try_again": {}, "kbin_instances_not_supported": "Please note that kbin instances are not supported at present.", "@kbin_instances_not_supported": {}, + "no_instances_added": "You do not have any instances added", + "@no_instances_added": {}, "pick_a_photo": "Pick a photo", "@pick_a_photo": {}, "use_this_image": "Use this image", diff --git a/lib/pages/communities_tab.dart b/lib/pages/communities_tab.dart index 302b9e4d..2999c0df 100644 --- a/lib/pages/communities_tab.dart +++ b/lib/pages/communities_tab.dart @@ -167,7 +167,6 @@ class CommunitiesTab extends HookWidget { child: amountOfDisplayInstances == 0 ? Center( child: Text(L10n.of(context).not_logged_in), - //child: Text('You are not logged in to any instances'), // TODO localize this string ) : ListView( children: [ diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 7fc74885..ec7af0eb 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -4,9 +4,11 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; +import '../../l10n/l10n.dart'; import '../app_link_handler.dart'; import '../hooks/stores.dart'; import '../util/extensions/brightness.dart'; + import 'communities_tab.dart'; import 'create_post/create_post_fab.dart'; import 'home_tab.dart'; @@ -73,8 +75,8 @@ class HomePage extends HookWidget { // show snackbar warning snackBarShowing.value = true; ScaffoldMessenger.of(context) - .showSnackBar(const SnackBar( - content: Text('Tap back again to leave'), // TODO localize this string + .showSnackBar(SnackBar( + content: Text(L10n.of(context).tap_back_again_to_leave), )) .closed .then((SnackBarClosedReason reason) => diff --git a/lib/pages/inbox.dart b/lib/pages/inbox.dart index aeec7962..8e5afd53 100644 --- a/lib/pages/inbox.dart +++ b/lib/pages/inbox.dart @@ -5,6 +5,7 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:lemmy_api_client/v3.dart'; import 'package:matrix4_transform/matrix4_transform.dart'; +import '../app.dart'; import '../hooks/delayed_loading.dart'; import '../hooks/infinite_scroll.dart'; import '../hooks/stores.dart'; @@ -40,7 +41,7 @@ class InboxPage extends HookWidget { if (accStore.hasNoAccount) { return Scaffold( appBar: AppBar(), - body: const Center(child: Text('no accounts added')), // TODO localize this string + body: Center(child: Text(L10n.of(context).couldnt_find_that_account)), ); } @@ -108,12 +109,13 @@ class InboxPage extends HookWidget { IconButton( icon: const Icon(Icons.checklist), onPressed: markAllAsRead, - tooltip: 'Mark all as read', // TODO localize this string + tooltip: L10n.of(context).mark_all_as_read, ), IconButton( icon: Icon(unreadOnly.value ? Icons.mail : Icons.mail_outline), onPressed: toggleUnreadOnly, - tooltip: unreadOnly.value ? 'show all' : 'show only unread', // TODO localize this string + tooltip: unreadOnly.value ? + L10n.of(context).show_all : L10n.of(context).show_only_unread, ) ], bottom: TabBar( @@ -153,7 +155,7 @@ class InboxPage extends HookWidget { child: TabBarView( children: [ SortableInfiniteList( - noItems: const Text('no replies'), // TODO localize this string + noItems: Text(L10n.of(context).no_replies), controller: isc, defaultSort: SortType.new_, fetcher: (page, batchSize, sortType) => @@ -173,7 +175,7 @@ class InboxPage extends HookWidget { uniqueProp: (item) => item.comment.apId, ), SortableInfiniteList( - noItems: const Text('no mentions'), // TODO localize this string + noItems: Text(L10n.of(context).no_mentions), controller: isc, defaultSort: SortType.new_, fetcher: (page, batchSize, sortType) => @@ -192,9 +194,9 @@ class InboxPage extends HookWidget { uniqueProp: (item) => item.personMention.id, ), InfiniteScroll( - noItems: const Padding( - padding: EdgeInsets.only(top: 60), - child: Text('no messages'), // TODO localize this string + noItems: Padding( + padding: const EdgeInsets.only(top: 60), + child: Text(L10n.of(context).no_messages), ), controller: isc, fetcher: (page, batchSize) => @@ -264,7 +266,9 @@ class PrivateMessageTile extends HookWidget { return Column( children: [ ListTile( - title: Text(raw.value ? 'Show fancy' : 'Show raw'), // TODO localize this string + title: Text(raw.value ? + L10n.of(context).show_fancy_text : + L10n.of(context).show_raw_text), leading: markdownModeIcon(fancy: !raw.value), onTap: () { raw.value = !raw.value; @@ -281,7 +285,7 @@ class PrivateMessageTile extends HookWidget { }, ), ListTile( - title: const Text('Nerd stuff'), // TODO localize this string + title: Text(L10n.of(context).nerd_stuff), leading: const Icon(Icons.info_outline), onTap: () { pop(); diff --git a/lib/pages/media_view.dart b/lib/pages/media_view.dart index 60cbaa33..e6492613 100644 --- a/lib/pages/media_view.dart +++ b/lib/pages/media_view.dart @@ -71,7 +71,7 @@ class MediaViewPage extends HookWidget { if (Platform.isAndroid || Platform.isIOS) { await Share.shareXFiles([XFile(file.path)]); } else if (Platform.isLinux || Platform.isWindows) { - _showSnackBar(context, 'sharing does not work on Desktop'); // TODO localize this string + _showSnackBar(context, 'sharing does not work on Desktop'); } }, ), @@ -130,7 +130,7 @@ class MediaViewPage extends HookWidget { if (Platform.isAndroid || Platform.isIOS) { if (!await requestMediaPermission()) { _showSnackBar(context, - 'Media permission revoked. Please go to the settings to fix'); // TODO localize this string + 'Media permission revoked. Please go to the settings to fix'); return; } var result = await GallerySaver.saveImage(file.path, diff --git a/lib/pages/search_results.dart b/lib/pages/search_results.dart index 0591f50f..a4782f72 100644 --- a/lib/pages/search_results.dart +++ b/lib/pages/search_results.dart @@ -26,7 +26,7 @@ class SearchResultsPage extends HookWidget { length: 4, child: Scaffold( appBar: AppBar( - title: Text('Looking for "$query"'), // TODO localize this string + title: Text(L10n.of(context).looking_for(query)), bottom: TabBar( isScrollable: true, indicatorColor: Theme.of(context).colorScheme.primary, diff --git a/lib/pages/search_tab.dart b/lib/pages/search_tab.dart index 1e25b893..ed4c4575 100644 --- a/lib/pages/search_tab.dart +++ b/lib/pages/search_tab.dart @@ -24,8 +24,8 @@ class SearchTab extends HookWidget { if (instanceHost.value == null) { return Scaffold( appBar: AppBar(), - body: const Center( - child: Text('You do not have any instances added'), // TODO localize this string + body: Center( + child: Text(L10n.of(context).no_instances_added), ), ); }