mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-12 00:40:28 +00:00
Refactor voice support and add Greek localization
- Updated voice support to only include iOS, removing MacOS support. - Added Greek (el) to the list of supported locales in LocalePreferences. - Enhanced localization strings for Greek language. - Modified Podfile to exclude C source files from the macOS build of codec2_flutter, as voice messages are iOS-only.
This commit is contained in:
3793
lib/l10n/app_el.arb
Normal file
3793
lib/l10n/app_el.arb
Normal file
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:intl/intl.dart' as intl;
|
||||
|
||||
import 'app_localizations_de.dart';
|
||||
import 'app_localizations_el.dart';
|
||||
import 'app_localizations_en.dart';
|
||||
import 'app_localizations_es.dart';
|
||||
import 'app_localizations_fr.dart';
|
||||
@@ -100,6 +101,7 @@ abstract class AppLocalizations {
|
||||
/// A list of this localizations delegate's supported locales.
|
||||
static const List<Locale> supportedLocales = <Locale>[
|
||||
Locale('de'),
|
||||
Locale('el'),
|
||||
Locale('en'),
|
||||
Locale('es'),
|
||||
Locale('fr'),
|
||||
@@ -4066,6 +4068,7 @@ class _AppLocalizationsDelegate
|
||||
@override
|
||||
bool isSupported(Locale locale) => <String>[
|
||||
'de',
|
||||
'el',
|
||||
'en',
|
||||
'es',
|
||||
'fr',
|
||||
@@ -4083,6 +4086,8 @@ AppLocalizations lookupAppLocalizations(Locale locale) {
|
||||
switch (locale.languageCode) {
|
||||
case 'de':
|
||||
return AppLocalizationsDe();
|
||||
case 'el':
|
||||
return AppLocalizationsEl();
|
||||
case 'en':
|
||||
return AppLocalizationsEn();
|
||||
case 'es':
|
||||
|
||||
2251
lib/l10n/app_localizations_el.dart
Normal file
2251
lib/l10n/app_localizations_el.dart
Normal file
File diff suppressed because it is too large
Load Diff
@@ -54,7 +54,7 @@ class _MessagesTabState extends State<MessagesTab> {
|
||||
bool _isRecording = false;
|
||||
bool _isSendingVoice = false;
|
||||
static const int _maxVoicePackets = 10;
|
||||
bool get _voiceSupported => Platform.isIOS || Platform.isMacOS;
|
||||
bool get _voiceSupported => Platform.isIOS;
|
||||
StreamSubscription<Int16List>? _voiceStreamSub;
|
||||
String? _currentVoiceSessionId;
|
||||
final List<Int16List> _recordedChunks = [];
|
||||
|
||||
@@ -14,6 +14,7 @@ class LocalePreferences {
|
||||
Locale('es'), // Spanish
|
||||
Locale('fr'), // French
|
||||
Locale('it'), // Italian
|
||||
Locale('el'), // Greek
|
||||
];
|
||||
|
||||
/// Get the saved locale or return null to use system locale
|
||||
@@ -61,6 +62,8 @@ class LocalePreferences {
|
||||
return 'Français';
|
||||
case 'it':
|
||||
return 'Italiano';
|
||||
case 'el':
|
||||
return 'Greek';
|
||||
default:
|
||||
return locale.languageCode;
|
||||
}
|
||||
@@ -83,6 +86,8 @@ class LocalePreferences {
|
||||
return 'Français';
|
||||
case 'it':
|
||||
return 'Italiano';
|
||||
case 'el':
|
||||
return 'Ελληνικά';
|
||||
default:
|
||||
return locale.languageCode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user