From c939f7a29ce9c9686c5c37899b3de9e94d255a46 Mon Sep 17 00:00:00 2001 From: zjs81 Date: Sat, 7 Nov 2026 22:31:14 -0700 Subject: [PATCH 1/2] Add Czech, in-chat search, typed-hash path trace and contact sharing - Czech UI locale (app_cs.arb), selectable in the language picker and as a message translation language; language names added to every locale. - Fix wrong language names: Slovak shown as Slovenian in it/ja/pt/sl, garbled Slovak/Bulgarian in pl, Ukrainian in ru, Hungarian in ko/zh. - Search inside DM and channel chats across the full stored history, with highlighted matches; filtered channel messages are excluded. - Path trace by typed hashes (e.g. A1,B2,C3) from the Contacts and map menus, without needing node locations; the map trace panel can hand its hops to it. - Share contacts in chats using the official app's format; received cards have a one-tap Add contact button that reuses the QR card import path. - Translations for all new strings in every locale; docs updated. --- CLAUDE.md | 2 +- README.md | 2 +- documentation/additional-features.md | 2 +- documentation/chat-and-messaging.md | 11 +- documentation/map-and-location.md | 9 + documentation/navigation.md | 1 + documentation/settings.md | 2 +- lib/connector/meshcore_connector.dart | 52 + lib/helpers/contact_share_message.dart | 63 + lib/helpers/message_search.dart | 45 + lib/helpers/path_trace_input.dart | 117 + lib/l10n/app_bg.arb | 77 +- lib/l10n/app_cs.arb | 4282 +++++++++++ lib/l10n/app_de.arb | 77 +- lib/l10n/app_en.arb | 75 + lib/l10n/app_es.arb | 77 +- lib/l10n/app_fr.arb | 77 +- lib/l10n/app_hu.arb | 77 +- lib/l10n/app_it.arb | 79 +- lib/l10n/app_ja.arb | 77 +- lib/l10n/app_ko.arb | 77 +- lib/l10n/app_localizations.dart | 203 + lib/l10n/app_localizations_bg.dart | 123 + lib/l10n/app_localizations_cs.dart | 7175 ++++++++++++++++++ lib/l10n/app_localizations_de.dart | 123 + lib/l10n/app_localizations_en.dart | 122 + lib/l10n/app_localizations_es.dart | 123 + lib/l10n/app_localizations_fr.dart | 123 + lib/l10n/app_localizations_hu.dart | 123 + lib/l10n/app_localizations_it.dart | 125 +- lib/l10n/app_localizations_ja.dart | 120 +- lib/l10n/app_localizations_ko.dart | 119 +- lib/l10n/app_localizations_nl.dart | 123 + lib/l10n/app_localizations_pl.dart | 131 +- lib/l10n/app_localizations_pt.dart | 125 +- lib/l10n/app_localizations_ru.dart | 126 +- lib/l10n/app_localizations_sk.dart | 125 + lib/l10n/app_localizations_sl.dart | 127 +- lib/l10n/app_localizations_sv.dart | 122 + lib/l10n/app_localizations_uk.dart | 125 + lib/l10n/app_localizations_zh.dart | 119 +- lib/l10n/app_nl.arb | 77 +- lib/l10n/app_pl.arb | 81 +- lib/l10n/app_pt.arb | 79 +- lib/l10n/app_ru.arb | 79 +- lib/l10n/app_sk.arb | 77 +- lib/l10n/app_sl.arb | 77 +- lib/l10n/app_sv.arb | 77 +- lib/l10n/app_uk.arb | 77 +- lib/l10n/app_zh.arb | 79 +- lib/models/map_path_trace_draft.dart | 4 + lib/models/translation_support.dart | 1 + lib/screens/channel_chat_screen.dart | 645 +- lib/screens/channels_screen.dart | 6 + lib/screens/chat_screen.dart | 298 +- lib/screens/contact_qr_scanner_screen.dart | 21 +- lib/screens/contacts_screen.dart | 11 + lib/screens/manual_path_trace_screen.dart | 273 + lib/screens/map_screen.dart | 30 + lib/services/notification_service.dart | 7 + lib/widgets/chat_search_results.dart | 222 + lib/widgets/language_picker_sheet.dart | 1 + lib/widgets/share_contact_sheet.dart | 157 + lib/widgets/shared_contact_card.dart | 187 + test/helpers/contact_share_message_test.dart | 68 + test/helpers/message_search_test.dart | 59 + test/helpers/path_trace_input_test.dart | 50 + 67 files changed, 17245 insertions(+), 381 deletions(-) create mode 100644 lib/helpers/contact_share_message.dart create mode 100644 lib/helpers/message_search.dart create mode 100644 lib/helpers/path_trace_input.dart create mode 100644 lib/l10n/app_cs.arb create mode 100644 lib/l10n/app_localizations_cs.dart create mode 100644 lib/screens/manual_path_trace_screen.dart create mode 100644 lib/widgets/chat_search_results.dart create mode 100644 lib/widgets/share_contact_sheet.dart create mode 100644 lib/widgets/shared_contact_card.dart create mode 100644 test/helpers/contact_share_message_test.dart create mode 100644 test/helpers/message_search_test.dart create mode 100644 test/helpers/path_trace_input_test.dart diff --git a/CLAUDE.md b/CLAUDE.md index 9a348612..4f24d742 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -47,7 +47,7 @@ For Linux, use `nix develop`; see [Linux with Nix](README.md#linux-with-nix) for | Image reassembly and file persistence | `lib/services/received_image_store.dart`, `lib/services/received_image_blob_store_io.dart` | | Material themes | `lib/theme/mesh_theme.dart` | | Screens and reusable UI | `lib/screens/`, `lib/widgets/` | -| Localization | `lib/l10n/` (18 locales) | +| Localization | `lib/l10n/` (19 locales) | `Provider`/`ChangeNotifier` drives UI state. `main.dart` wires `MeshTheme.light()` and `MeshTheme.dark()` and uses the saved theme preference. Its `MultiProvider` exposes `MeshCoreConnector`, `MessageRetryService`, `PathHistoryService`, `AppSettingsService`, `BleDebugLogService`, `AppDebugLogService`, `ChatTextScaleService`, `TranslationService`, `UiViewStateService`, `StorageService` (plain `Provider`), `MapTileCacheService`, `TimeoutPredictionService`, `ImageCodecService`, `ReceivedImageStore`, and `MessageFilterService`; screens read them with `Consumer`, `context.watch()`, or `context.read()`. diff --git a/README.md b/README.md index 5579a34b..3a768b7f 100644 --- a/README.md +++ b/README.md @@ -360,7 +360,7 @@ Messages are transmitted as binary frames using a custom protocol optimized for ### App Settings - **Theme**: System default, light, or dark mode -- **Language**: Use one of 18 languages (English, Chinese, French, Spanish, Portuguese, German, Dutch, Polish, Swedish, Italian, Slovak, Slovenian, Bulgarian, Russian, Ukrainian, Hungarian, Japanese, Korean) +- **Language**: Use one of 19 languages (English, Chinese, French, Spanish, Portuguese, German, Dutch, Polish, Swedish, Italian, Slovak, Czech, Slovenian, Bulgarian, Russian, Ukrainian, Hungarian, Japanese, Korean) - **Notifications**: Configurable for messages, channels, and node advertisements; per-channel muting; reply, mark-as-read, and mute actions on Android notifications and watches (reply and mark-as-read in Android Auto when built with `--android-project-arg=androidAuto=true`) - **Battery Chemistry**: Support for NMC, LiFePO4, LiPo, and LiPo HV battery types - **Message Retry**: Automatic retry with configurable path clearing diff --git a/documentation/additional-features.md b/documentation/additional-features.md index 46b81f96..75f039e5 100644 --- a/documentation/additional-features.md +++ b/documentation/additional-features.md @@ -26,7 +26,7 @@ A bottom sheet with a search field and a grid of GIF thumbnails. App Settings → Appearance → Language ### Supported Languages (18) -English, French, Spanish, German, Polish, Slovenian, Portuguese, Italian, Chinese, Swedish, Dutch, Slovak, Bulgarian, Russian, Ukrainian, Hungarian, Japanese, Korean +English, French, Spanish, German, Polish, Slovenian, Portuguese, Italian, Chinese, Swedish, Dutch, Slovak, Czech, Bulgarian, Russian, Ukrainian, Hungarian, Japanese, Korean ### How It Works - All UI strings go through Flutter's ARB localization system diff --git a/documentation/chat-and-messaging.md b/documentation/chat-and-messaging.md index 8c47e507..693f7b7d 100644 --- a/documentation/chat-and-messaging.md +++ b/documentation/chat-and-messaging.md @@ -18,7 +18,8 @@ From the Contacts screen, tap any Chat-type contact to open the ChatScreen. - **Title**: Contact name - **Subtitle**: Current routing path label (e.g., "2 hops", "flood (auto)", "direct (forced)") and unread count. Tapping the subtitle shows the full path details. -- **Action button**: +- **Action buttons**: + - **Search** (magnifier icon): Replaces the title with a search field and lists every message in this conversation's full history whose text (or translation) contains the typed word, newest first, with matches highlighted. Channel search also matches sender names and skips messages caught by the [message filter](message-filter.md). Back, Esc or the arrow closes search. Channel chats have the same button. - **Overflow menu** (⋮ icon): Contains Routing, Info, Telemetry, Settings, Chat background, and Clear Chat. Routing opens the routing sheet where you can switch between Auto, Direct, and Flood routing and manage recent paths (hop count, round-trip time, age, success count, color-coded by repeater). Info shows a dialog with contact type, path, GPS coordinates, and public key. Chat background sets a color or picture (with a fade slider) behind this chat only; see [Chat backgrounds](themes.md#chat-backgrounds). ### Message List @@ -56,6 +57,14 @@ From the Contacts screen, tap any Chat-type contact to open the ChatScreen. | Location pin | `m:,\|