Skip to content

Commit

Permalink
Merge pull request #715 from micahmo/feature/profile-string-improvements
Browse files Browse the repository at this point in the history
Improve text/labels on profile page
  • Loading branch information
hjiangsu committed Sep 7, 2023
2 parents ba71808 + 9c4888e commit 4d91b89
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 11 deletions.
3 changes: 3 additions & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"posts": "Posts",
"saved": "Saved",
"overview": "Overview",
"somethingWentWrong": "Oops, something went wrong!",
"unableToLoadPostsFrominstance": "Unable to load posts from {instance}",
"internetOrInstanceIssues": "You may not be connected to the internet, or your instance may be currently unavailable.",
Expand Down
3 changes: 3 additions & 0 deletions lib/l10n/app_es.arb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"posts": "Posts",
"saved": "Saved",
"overview": "Overview",
"somethingWentWrong": "Oops, something went wrong!",
"unableToLoadPostsFrominstance": "Unable to load posts from {instance}",
"internetOrInstanceIssues": "You may not be connected to the internet, or your instance may be currently unavailable.",
Expand Down
3 changes: 3 additions & 0 deletions lib/l10n/app_fi.arb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"posts": "Posts",
"saved": "Saved",
"overview": "Overview",
"somethingWentWrong": "Oops, something went wrong!",
"unableToLoadPostsFrominstance": "Unable to load posts from {instance}",
"internetOrInstanceIssues": "You may not be connected to the internet, or your instance may be currently unavailable.",
Expand Down
3 changes: 3 additions & 0 deletions lib/l10n/app_pl.arb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"posts": "Posts",
"saved": "Saved",
"overview": "Overview",
"somethingWentWrong": "Oops, something went wrong!",
"unableToLoadPostsFrominstance": "Unable to load posts from {instance}",
"internetOrInstanceIssues": "You may not be connected to the internet, or your instance may be currently unavailable.",
Expand Down
3 changes: 3 additions & 0 deletions lib/l10n/app_sv.arb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"posts": "Posts",
"saved": "Saved",
"overview": "Overview",
"somethingWentWrong": "Oops, something went wrong!",
"unableToLoadPostsFrominstance": "Unable to load posts from {instance}",
"internetOrInstanceIssues": "You may not be connected to the internet, or your instance may be currently unavailable.",
Expand Down
27 changes: 16 additions & 11 deletions lib/user/pages/user_page_success.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ import 'package:thunder/user/widgets/user_header.dart';
import 'package:thunder/core/models/comment_view_tree.dart';
import 'package:thunder/core/models/post_view_media.dart';
import 'package:thunder/user/bloc/user_bloc.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:thunder/utils/global_context.dart';

import '../../post/pages/create_comment_page.dart';
import '../../thunder/bloc/thunder_bloc.dart';
import '../widgets/user_sidebar.dart';

const List<Widget> userOptionTypes = <Widget>[
Padding(padding: EdgeInsets.all(8.0), child: Text('Posts')),
Padding(padding: EdgeInsets.all(8.0), child: Text('Comments')),
List<Widget> userOptionTypes = <Widget>[
Padding(padding: const EdgeInsets.all(8.0), child: Text(AppLocalizations.of(GlobalContext.context)!.posts)),
Padding(padding: const EdgeInsets.all(8.0), child: Text(AppLocalizations.of(GlobalContext.context)!.comment)),
];

class UserPageSuccess extends StatefulWidget {
Expand Down Expand Up @@ -176,20 +178,23 @@ class _UserPageSuccessState extends State<UserPageSuccess> with TickerProviderSt
padding: EdgeInsets.zero,
),
child: !savedToggle
? const Row(
? Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(width: 8.0),
Text('Saved'),
Icon(Icons.chevron_right),
const SizedBox(width: 8.0),
Text(AppLocalizations.of(context)!.saved),
const Icon(Icons.chevron_right),
],
)
: const Row(
: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.chevron_left),
Text('History'),
SizedBox(width: 8.0),
const Icon(Icons.chevron_left),
Text(
AppLocalizations.of(context)!.overview,
semanticsLabel: '${AppLocalizations.of(context)!.overview}, ${AppLocalizations.of(context)!.back}',
),
const SizedBox(width: 8.0),
],
),
),
Expand Down

0 comments on commit 4d91b89

Please sign in to comment.