mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-11 13:05:37 +02:00
feat: Allow changing languages (#1488)
Co-authored-by: validcube <pun.butrach@gmail.com>
This commit is contained in:
parent
c498cff096
commit
f82c439b26
64 changed files with 1302 additions and 1488 deletions
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_i18n/flutter_i18n.dart';
|
||||
import 'package:revanced_manager/app/app.locator.dart';
|
||||
import 'package:revanced_manager/gen/strings.g.dart';
|
||||
import 'package:revanced_manager/models/patch.dart';
|
||||
import 'package:revanced_manager/services/manager_api.dart';
|
||||
import 'package:revanced_manager/services/toast.dart';
|
||||
|
@ -162,7 +162,7 @@ class _PatchItemState extends State<PatchItem> {
|
|||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: TextButton.icon(
|
||||
label: I18nText('warning'),
|
||||
label: Text(t.warning),
|
||||
icon: const Icon(
|
||||
Icons.warning_amber_outlined,
|
||||
size: 20.0,
|
||||
|
@ -215,19 +215,18 @@ class _PatchItemState extends State<PatchItem> {
|
|||
return showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: I18nText('warning'),
|
||||
content: I18nText(
|
||||
'patchItem.unsupportedDialogText',
|
||||
translationParams: {
|
||||
'packageVersion': widget.packageVersion,
|
||||
'supportedVersions':
|
||||
title: Text(t.warning),
|
||||
content: Text(
|
||||
t.patchItem.unsupportedDialogText(
|
||||
packageVersion: widget.packageVersion,
|
||||
supportedVersions:
|
||||
'• ${widget.supportedPackageVersions.reversed.join('\n• ')}',
|
||||
},
|
||||
),
|
||||
),
|
||||
actions: <Widget>[
|
||||
FilledButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: I18nText('okButton'),
|
||||
child: Text(t.okButton),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -238,14 +237,14 @@ class _PatchItemState extends State<PatchItem> {
|
|||
return showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: I18nText('notice'),
|
||||
content: I18nText(
|
||||
'patchItem.unsupportedRequiredOption',
|
||||
title: Text(t.notice),
|
||||
content: Text(
|
||||
t.patchItem.unsupportedRequiredOption,
|
||||
),
|
||||
actions: <Widget>[
|
||||
FilledButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: I18nText('okButton'),
|
||||
child: Text(t.okButton),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue