Ukrainian translation polished; localized remaining hardcoded UI strings

This commit is contained in:
Serge Tarkovski
2026-04-23 17:27:39 +03:00
parent 6b6a881c7a
commit 5e446207c6
52 changed files with 2543 additions and 417 deletions
+18 -3
View File
@@ -1,6 +1,9 @@
import '../utils/platform_info.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_foreground_task/flutter_foreground_task.dart';
import '../l10n/app_localizations.dart';
import '../utils/platform_info.dart';
class BackgroundService {
bool _initialized = false;
@@ -34,13 +37,25 @@ class BackgroundService {
}
final running = await FlutterForegroundTask.isRunningService;
if (running) return;
final l10n = await _loadLocalizations();
await FlutterForegroundTask.startService(
notificationTitle: 'MeshCore running',
notificationText: 'Keeping BLE connected',
notificationTitle: l10n.background_serviceTitle,
notificationText: l10n.background_serviceText,
callback: startCallback,
);
}
Future<AppLocalizations> _loadLocalizations() async {
final supported = AppLocalizations.supportedLocales;
final system =
WidgetsBinding.instance.platformDispatcher.locale;
final match = basicLocaleListResolution(
<Locale>[system],
supported,
);
return AppLocalizations.delegate.load(match);
}
Future<void> stop() async {
if (!PlatformInfo.isAndroid) return;
final running = await FlutterForegroundTask.isRunningService;