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:
Janez T
2026-02-28 19:39:20 +01:00
parent f78d56ccb1
commit 1597d66439
7 changed files with 6135 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ permissions:
env: env:
FLUTTER_VERSION: "3.35.6" FLUTTER_VERSION: "3.35.6"
APP_NAME: meshcore-sar APP_NAME: meshcore-sar
ANDROID_NDK_VERSION: "27.0.12077973"
jobs: jobs:
build-android: build-android:
@@ -28,6 +29,9 @@ jobs:
distribution: temurin distribution: temurin
java-version: "17" java-version: "17"
- name: Setup Gradle cache
uses: gradle/actions/setup-gradle@v4
- name: Setup Flutter - name: Setup Flutter
uses: subosito/flutter-action@v2 uses: subosito/flutter-action@v2
with: with:
@@ -35,6 +39,14 @@ jobs:
channel: stable channel: stable
cache: true cache: true
- name: Cache Android NDK
uses: actions/cache@v4
with:
path: |
/usr/local/lib/android/sdk/ndk/${{ env.ANDROID_NDK_VERSION }}
/usr/local/lib/android/sdk/licenses
key: ${{ runner.os }}-android-ndk-${{ env.ANDROID_NDK_VERSION }}
- name: Install dependencies - name: Install dependencies
run: flutter pub get run: flutter pub get
@@ -188,6 +200,56 @@ jobs:
path: "${{ env.APP_NAME }}-*-macos.dmg" path: "${{ env.APP_NAME }}-*-macos.dmg"
if-no-files-found: error if-no-files-found: error
build-ios:
name: Build iOS Archive (Manual Signing)
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
- name: Install dependencies
run: flutter pub get
- name: Build iOS app (no codesign)
run: flutter build ios --release --no-codesign
- name: Package iOS unsigned artifacts
run: |
RAW_TAG="${{ github.event.release.tag_name || github.ref_name }}"
TAG="${RAW_TAG//\//-}"
APP_PATH="build/ios/iphoneos/Runner.app"
if [ ! -d "$APP_PATH" ]; then
echo "Runner.app not found at $APP_PATH"
exit 1
fi
mkdir -p ios_payload/Payload
cp -R "$APP_PATH" ios_payload/Payload/
(
cd ios_payload
zip -qry "../${APP_NAME}-${TAG}-ios-unsigned.ipa" Payload
)
rm -rf ios_payload
zip -qry "${APP_NAME}-${TAG}-ios-runner-app.zip" "$APP_PATH"
- name: Upload iOS artifact
uses: actions/upload-artifact@v4
with:
name: release-ios
path: |
"${{ env.APP_NAME }}-*-ios-unsigned.ipa"
"${{ env.APP_NAME }}-*-ios-runner-app.zip"
if-no-files-found: error
upload-release-assets: upload-release-assets:
name: Upload Assets To Release name: Upload Assets To Release
if: github.event_name == 'release' if: github.event_name == 'release'
@@ -197,6 +259,7 @@ jobs:
- build-linux - build-linux
- build-windows - build-windows
- build-macos - build-macos
- build-ios
steps: steps:
- name: Download all build artifacts - name: Download all build artifacts
@@ -216,11 +279,20 @@ jobs:
- Linux (`.tar.gz`) - Linux (`.tar.gz`)
- macOS (`.dmg`) - macOS (`.dmg`)
- Windows (`.zip`) - Windows (`.zip`)
- iOS unsigned (`-ios-unsigned.ipa`, `-ios-runner-app.zip`)
Windows status: currently unusable. The BLE stack on Windows is broken, so BLE features do not work. Windows status: currently unusable. The BLE stack on Windows is broken, so BLE features do not work.
iOS manual signing and install:
1. Download `*-ios-unsigned.ipa` (or `*-ios-runner-app.zip`) from this release.
2. Re-sign it with your Apple Development/Distribution certificate and provisioning profile.
3. If you used `*-ios-runner-app.zip`, create a signed `.ipa` from `Runner.app` during signing.
4. Install the signed `.ipa` on your iPhone using Apple Configurator 2 or Xcode (Devices and Simulators).
files: | files: |
dist/*.apk dist/*.apk
dist/*.tar.gz dist/*.tar.gz
dist/*.zip dist/*.zip
dist/*.dmg dist/*.dmg
dist/*-ios-unsigned.ipa
dist/*-ios-runner-app.zip
fail_on_unmatched_files: true fail_on_unmatched_files: true

3793
lib/l10n/app_el.arb Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -6,6 +6,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/intl.dart' as intl; import 'package:intl/intl.dart' as intl;
import 'app_localizations_de.dart'; import 'app_localizations_de.dart';
import 'app_localizations_el.dart';
import 'app_localizations_en.dart'; import 'app_localizations_en.dart';
import 'app_localizations_es.dart'; import 'app_localizations_es.dart';
import 'app_localizations_fr.dart'; import 'app_localizations_fr.dart';
@@ -100,6 +101,7 @@ abstract class AppLocalizations {
/// A list of this localizations delegate's supported locales. /// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[ static const List<Locale> supportedLocales = <Locale>[
Locale('de'), Locale('de'),
Locale('el'),
Locale('en'), Locale('en'),
Locale('es'), Locale('es'),
Locale('fr'), Locale('fr'),
@@ -4066,6 +4068,7 @@ class _AppLocalizationsDelegate
@override @override
bool isSupported(Locale locale) => <String>[ bool isSupported(Locale locale) => <String>[
'de', 'de',
'el',
'en', 'en',
'es', 'es',
'fr', 'fr',
@@ -4083,6 +4086,8 @@ AppLocalizations lookupAppLocalizations(Locale locale) {
switch (locale.languageCode) { switch (locale.languageCode) {
case 'de': case 'de':
return AppLocalizationsDe(); return AppLocalizationsDe();
case 'el':
return AppLocalizationsEl();
case 'en': case 'en':
return AppLocalizationsEn(); return AppLocalizationsEn();
case 'es': case 'es':

File diff suppressed because it is too large Load Diff

View File

@@ -54,7 +54,7 @@ class _MessagesTabState extends State<MessagesTab> {
bool _isRecording = false; bool _isRecording = false;
bool _isSendingVoice = false; bool _isSendingVoice = false;
static const int _maxVoicePackets = 10; static const int _maxVoicePackets = 10;
bool get _voiceSupported => Platform.isIOS || Platform.isMacOS; bool get _voiceSupported => Platform.isIOS;
StreamSubscription<Int16List>? _voiceStreamSub; StreamSubscription<Int16List>? _voiceStreamSub;
String? _currentVoiceSessionId; String? _currentVoiceSessionId;
final List<Int16List> _recordedChunks = []; final List<Int16List> _recordedChunks = [];

View File

@@ -14,6 +14,7 @@ class LocalePreferences {
Locale('es'), // Spanish Locale('es'), // Spanish
Locale('fr'), // French Locale('fr'), // French
Locale('it'), // Italian Locale('it'), // Italian
Locale('el'), // Greek
]; ];
/// Get the saved locale or return null to use system locale /// Get the saved locale or return null to use system locale
@@ -61,6 +62,8 @@ class LocalePreferences {
return 'Français'; return 'Français';
case 'it': case 'it':
return 'Italiano'; return 'Italiano';
case 'el':
return 'Greek';
default: default:
return locale.languageCode; return locale.languageCode;
} }
@@ -83,6 +86,8 @@ class LocalePreferences {
return 'Français'; return 'Français';
case 'it': case 'it':
return 'Italiano'; return 'Italiano';
case 'el':
return 'Ελληνικά';
default: default:
return locale.languageCode; return locale.languageCode;
} }

View File

@@ -38,5 +38,13 @@ end
post_install do |installer| post_install do |installer|
installer.pods_project.targets.each do |target| installer.pods_project.targets.each do |target|
flutter_additional_macos_build_settings(target) flutter_additional_macos_build_settings(target)
# codec2_flutter uses ARM-specific register asm("sp") in debug_alloc.h that
# does not compile on x86_64 macOS. Voice messages are iOS-only, so exclude
# all C source files from the macOS codec2_flutter build entirely.
if target.name == 'codec2_flutter'
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_SOURCE_FILE_NAMES'] = '*.c *.cpp'
end
end
end end
end end