mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-11 13:46:17 +00:00
feat: Allow changing languages (#1488)
Co-authored-by: validcube <pun.butrach@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_i18n/flutter_i18n.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:revanced_manager/gen/strings.g.dart';
|
||||
import 'package:revanced_manager/models/patched_application.dart';
|
||||
import 'package:revanced_manager/ui/widgets/appInfoView/app_info_viewmodel.dart';
|
||||
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
|
||||
@@ -22,13 +22,10 @@ class AppInfoView extends StatelessWidget {
|
||||
body: CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
CustomSliverAppBar(
|
||||
title: I18nText(
|
||||
'appInfoView.widgetTitle',
|
||||
child: Text(
|
||||
'',
|
||||
style: GoogleFonts.inter(
|
||||
color: Theme.of(context).textTheme.titleLarge!.color,
|
||||
),
|
||||
title: Text(
|
||||
t.appInfoView.widgetTitle,
|
||||
style: GoogleFonts.inter(
|
||||
color: Theme.of(context).textTheme.titleLarge!.color,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -86,16 +83,13 @@ class AppInfoView extends StatelessWidget {
|
||||
.primary,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
I18nText(
|
||||
'appInfoView.openButton',
|
||||
child: Text(
|
||||
'',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
Text(
|
||||
t.appInfoView.openButton,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -130,16 +124,13 @@ class AppInfoView extends StatelessWidget {
|
||||
.primary,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
I18nText(
|
||||
'appInfoView.uninstallButton',
|
||||
child: Text(
|
||||
'',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
Text(
|
||||
t.appInfoView.uninstallButton,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -183,16 +174,13 @@ class AppInfoView extends StatelessWidget {
|
||||
.primary,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
I18nText(
|
||||
'appInfoView.unmountButton',
|
||||
child: Text(
|
||||
'',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
Text(
|
||||
t.appInfoView.unmountButton,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -209,14 +197,11 @@ class AppInfoView extends StatelessWidget {
|
||||
ListTile(
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 20.0),
|
||||
title: I18nText(
|
||||
'appInfoView.packageNameLabel',
|
||||
child: const Text(
|
||||
'',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
title: Text(
|
||||
t.appInfoView.packageNameLabel,
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
subtitle: Text(app.packageName),
|
||||
@@ -225,61 +210,50 @@ class AppInfoView extends StatelessWidget {
|
||||
ListTile(
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 20.0),
|
||||
title: I18nText(
|
||||
'appInfoView.installTypeLabel',
|
||||
child: const Text(
|
||||
'',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
title: Text(
|
||||
t.appInfoView.installTypeLabel,
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
subtitle: app.isRooted
|
||||
? I18nText('appInfoView.mountTypeLabel')
|
||||
: I18nText('appInfoView.regularTypeLabel'),
|
||||
? Text(t.appInfoView.mountTypeLabel)
|
||||
: Text(t.appInfoView.regularTypeLabel),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
ListTile(
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 20.0),
|
||||
title: I18nText(
|
||||
'appInfoView.patchedDateLabel',
|
||||
child: const Text(
|
||||
'',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
title: Text(
|
||||
t.appInfoView.patchedDateLabel,
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
subtitle: I18nText(
|
||||
'appInfoView.patchedDateHint',
|
||||
translationParams: {
|
||||
'date': model.getPrettyDate(context, app.patchDate),
|
||||
'time': model.getPrettyTime(context, app.patchDate),
|
||||
},
|
||||
subtitle: Text(
|
||||
t.appInfoView.patchedDateHint(
|
||||
date: model.getPrettyDate(context, app.patchDate),
|
||||
time: model.getPrettyTime(context, app.patchDate),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
ListTile(
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 20.0),
|
||||
title: I18nText(
|
||||
'appInfoView.appliedPatchesLabel',
|
||||
child: const Text(
|
||||
'',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
title: Text(
|
||||
t.appInfoView.appliedPatchesLabel,
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
subtitle: I18nText(
|
||||
'appInfoView.appliedPatchesHint',
|
||||
translationParams: {
|
||||
'quantity': app.appliedPatches.length.toString(),
|
||||
},
|
||||
subtitle: Text(
|
||||
t.appInfoView.appliedPatchesHint(
|
||||
quantity: app.appliedPatches.length.toString(),
|
||||
),
|
||||
),
|
||||
onTap: () => model.showAppliedPatchesDialog(context, app),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user