mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
- Created `app_localizations_hr.dart` and `app_localizations_sl.dart` for Croatian and Slovenian translations. - Added `app_sl.arb` file for Slovenian localization strings. - Enhanced `main.dart` to support locale selection and initialization. - Updated `home_screen.dart` and `settings_screen.dart` to handle locale changes and display current language. - Implemented `locale_preferences.dart` service for managing locale settings using SharedPreferences. - Modified `pubspec.yaml` to include `flutter_localizations` and enable localization file generation.
282 lines
6.8 KiB
Dart
282 lines
6.8 KiB
Dart
// ignore: unused_import
|
|
import 'package:intl/intl.dart' as intl;
|
|
import 'app_localizations.dart';
|
|
|
|
// ignore_for_file: type=lint
|
|
|
|
/// The translations for English (`en`).
|
|
class AppLocalizationsEn extends AppLocalizations {
|
|
AppLocalizationsEn([String locale = 'en']) : super(locale);
|
|
|
|
@override
|
|
String get appTitle => 'MeshCore SAR';
|
|
|
|
@override
|
|
String get messages => 'Messages';
|
|
|
|
@override
|
|
String get contacts => 'Contacts';
|
|
|
|
@override
|
|
String get map => 'Map';
|
|
|
|
@override
|
|
String get settings => 'Settings';
|
|
|
|
@override
|
|
String get connect => 'Connect';
|
|
|
|
@override
|
|
String get disconnect => 'Disconnect';
|
|
|
|
@override
|
|
String get scanningForDevices => 'Scanning for devices...';
|
|
|
|
@override
|
|
String get noDevicesFound => 'No devices found';
|
|
|
|
@override
|
|
String get scanAgain => 'Scan Again';
|
|
|
|
@override
|
|
String get tapToConnect => 'Tap to connect';
|
|
|
|
@override
|
|
String get deviceNotConnected => 'Device not connected';
|
|
|
|
@override
|
|
String get locationPermissionDenied => 'Location permission denied';
|
|
|
|
@override
|
|
String get locationPermissionPermanentlyDenied =>
|
|
'Location permission permanently denied. Please enable in Settings.';
|
|
|
|
@override
|
|
String get locationServicesDisabled =>
|
|
'Location services are disabled. Please enable them in Settings.';
|
|
|
|
@override
|
|
String get failedToGetGpsLocation => 'Failed to get GPS location';
|
|
|
|
@override
|
|
String advertisedAtLocation(String latitude, String longitude) {
|
|
return 'Advertised at $latitude, $longitude';
|
|
}
|
|
|
|
@override
|
|
String failedToAdvertise(String error) {
|
|
return 'Failed to advertise: $error';
|
|
}
|
|
|
|
@override
|
|
String reconnecting(int attempt, int max) {
|
|
return 'Reconnecting... ($attempt/$max)';
|
|
}
|
|
|
|
@override
|
|
String get cancelReconnection => 'Cancel reconnection';
|
|
|
|
@override
|
|
String get mapManagement => 'Map Management';
|
|
|
|
@override
|
|
String get general => 'General';
|
|
|
|
@override
|
|
String get theme => 'Theme';
|
|
|
|
@override
|
|
String get chooseTheme => 'Choose Theme';
|
|
|
|
@override
|
|
String get light => 'Light';
|
|
|
|
@override
|
|
String get dark => 'Dark';
|
|
|
|
@override
|
|
String get blueLightTheme => 'Blue light theme';
|
|
|
|
@override
|
|
String get blueDarkTheme => 'Blue dark theme';
|
|
|
|
@override
|
|
String get sarRed => 'SAR Red';
|
|
|
|
@override
|
|
String get alertEmergencyMode => 'Alert/Emergency mode';
|
|
|
|
@override
|
|
String get sarGreen => 'SAR Green';
|
|
|
|
@override
|
|
String get safeAllClearMode => 'Safe/All Clear mode';
|
|
|
|
@override
|
|
String get autoSystem => 'Auto (System)';
|
|
|
|
@override
|
|
String get followSystemTheme => 'Follow system theme';
|
|
|
|
@override
|
|
String get showRxTxIndicators => 'Show RX/TX Indicators';
|
|
|
|
@override
|
|
String get displayPacketActivity =>
|
|
'Display packet activity indicators in top bar';
|
|
|
|
@override
|
|
String get language => 'Language';
|
|
|
|
@override
|
|
String get chooseLanguage => 'Choose Language';
|
|
|
|
@override
|
|
String get english => 'English';
|
|
|
|
@override
|
|
String get slovenian => 'Slovenian';
|
|
|
|
@override
|
|
String get croatian => 'Croatian';
|
|
|
|
@override
|
|
String get locationBroadcasting => 'Location Broadcasting';
|
|
|
|
@override
|
|
String get autoLocationTracking => 'Auto Location Tracking';
|
|
|
|
@override
|
|
String get automaticallyBroadcastPosition =>
|
|
'Automatically broadcast position updates';
|
|
|
|
@override
|
|
String get configureTracking => 'Configure Tracking';
|
|
|
|
@override
|
|
String get distanceAndTimeThresholds => 'Distance and time thresholds';
|
|
|
|
@override
|
|
String get locationTrackingConfiguration => 'Location Tracking Configuration';
|
|
|
|
@override
|
|
String get configureWhenLocationBroadcasts =>
|
|
'Configure when location broadcasts are sent to the mesh network';
|
|
|
|
@override
|
|
String get minimumDistance => 'Minimum Distance';
|
|
|
|
@override
|
|
String broadcastAfterMoving(String distance) {
|
|
return 'Broadcast only after moving $distance meters';
|
|
}
|
|
|
|
@override
|
|
String get maximumDistance => 'Maximum Distance';
|
|
|
|
@override
|
|
String alwaysBroadcastAfterMoving(String distance) {
|
|
return 'Always broadcast after moving $distance meters';
|
|
}
|
|
|
|
@override
|
|
String get minimumTimeInterval => 'Minimum Time Interval';
|
|
|
|
@override
|
|
String alwaysBroadcastEvery(String duration) {
|
|
return 'Always broadcast every $duration';
|
|
}
|
|
|
|
@override
|
|
String get save => 'Save';
|
|
|
|
@override
|
|
String get cancel => 'Cancel';
|
|
|
|
@override
|
|
String get close => 'Close';
|
|
|
|
@override
|
|
String get about => 'About';
|
|
|
|
@override
|
|
String get appVersion => 'App Version';
|
|
|
|
@override
|
|
String get appName => 'App Name';
|
|
|
|
@override
|
|
String get aboutMeshCoreSar => 'About MeshCore SAR';
|
|
|
|
@override
|
|
String get aboutDescription =>
|
|
'A Search & Rescue application designed for emergency response teams. Features include:\n\n• BLE mesh networking for device-to-device communication\n• Offline maps with multiple layer options\n• Real-time team member tracking\n• SAR tactical markers (found person, fire, staging)\n• Contact management and messaging\n• GPS tracking with compass heading\n• Map tile caching for offline use';
|
|
|
|
@override
|
|
String get technologiesUsed => 'Technologies Used:';
|
|
|
|
@override
|
|
String get technologiesList =>
|
|
'• Flutter for cross-platform development\n• BLE (Bluetooth Low Energy) for mesh networking\n• OpenStreetMap for mapping\n• Provider for state management\n• SharedPreferences for local storage';
|
|
|
|
@override
|
|
String get developer => 'Developer';
|
|
|
|
@override
|
|
String get packageName => 'Package Name';
|
|
|
|
@override
|
|
String get sampleData => 'Sample Data';
|
|
|
|
@override
|
|
String get sampleDataDescription =>
|
|
'Load or clear sample contacts, channel messages, and SAR markers for testing';
|
|
|
|
@override
|
|
String get loadSampleData => 'Load Sample Data';
|
|
|
|
@override
|
|
String get clearAllData => 'Clear All Data';
|
|
|
|
@override
|
|
String get clearAllDataConfirmTitle => 'Clear All Data';
|
|
|
|
@override
|
|
String get clearAllDataConfirmMessage =>
|
|
'This will clear all contacts and SAR markers. Are you sure?';
|
|
|
|
@override
|
|
String get clear => 'Clear';
|
|
|
|
@override
|
|
String loadedSampleData(
|
|
int teamCount,
|
|
int channelCount,
|
|
int sarCount,
|
|
int messageCount,
|
|
) {
|
|
return 'Loaded $teamCount team members, $channelCount channels, $sarCount SAR markers, $messageCount messages';
|
|
}
|
|
|
|
@override
|
|
String failedToLoadSampleData(String error) {
|
|
return 'Failed to load sample data: $error';
|
|
}
|
|
|
|
@override
|
|
String get allDataCleared => 'All data cleared';
|
|
|
|
@override
|
|
String get failedToStartBackgroundTracking =>
|
|
'Failed to start background tracking. Check permissions and BLE connection.';
|
|
|
|
@override
|
|
String locationBroadcast(String latitude, String longitude) {
|
|
return 'Location broadcast: $latitude, $longitude';
|
|
}
|
|
|
|
@override
|
|
String get defaultPinInfo =>
|
|
'The default pin for devices without a screen is 123456. Trouble pairing? Forget the bluetooth device in system settings.';
|
|
}
|