🌐 Add somethingWentWrong to i18n dict

This commit is contained in:
LittleSheep 2025-04-26 00:50:45 +08:00
parent 05ec3b2ba7
commit 7bf4f9ef47
2 changed files with 4 additions and 2 deletions

View File

@ -37,5 +37,6 @@
"edit": "Edit", "edit": "Edit",
"delete": "Delete", "delete": "Delete",
"deletePublisher": "Delete Publisher {}", "deletePublisher": "Delete Publisher {}",
"deletePublisherHint": "Are you sure to delete this publisher? This will also deleted all the post and collections under this publisher." "deletePublisherHint": "Are you sure to delete this publisher? This will also deleted all the post and collections under this publisher.",
"somethingWentWrong": "Something went wrong..."
} }

View File

@ -1,8 +1,9 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter_platform_alert/flutter_platform_alert.dart'; import 'package:flutter_platform_alert/flutter_platform_alert.dart';
void showErrorAlert(dynamic err) async { void showErrorAlert(dynamic err) async {
FlutterPlatformAlert.showAlert( FlutterPlatformAlert.showAlert(
windowTitle: 'Something went wrong...', windowTitle: 'somethingWentWrong'.tr(),
text: err.toString(), text: err.toString(),
alertStyle: AlertButtonStyle.ok, alertStyle: AlertButtonStyle.ok,
iconStyle: IconStyle.error, iconStyle: IconStyle.error,