Skip to content

Add Hungarian localisation - #21

Merged
Aredarn merged 10 commits into
mainfrom
feature/localization
Oct 6, 2026
Merged

Aredarn merged 10 commits into
mainfrom
feature/localization

Conversation

@Aredarn

@Aredarn Aredarn commented Oct 6, 2026

Copy link
Copy Markdown
Owner
  • Added an option for switching between English and Hungarian
  • Added full Hungarian texts

Aredarn and others added 10 commits October 1, 2026 10:54
Replaces the blackout-dash world with the Paddock night direction chosen
with the mobile-app-ui-design skill: graphite ground, racing-orange accent,
rounded cards with soft tinted shadows, one family at four sizes and two
weights, sentence case everywhere.

- Theme: new colour roles (standard + sunlight contrast), type scale,
  radii, Material mapping, dark system bars
- Components: cards, action tiles, rounded delta/progress bar, floating
  tab bar, segmented section switch, pills, empty state with action
- Drive: greeting, rig pill, car card, Track/Drag tiles, last session
  with delta to the previous visit
- Garage: car cards, backup pill; tracks as cards
- Profile: driver card, career card, main car, personal bests with place
  badges, account and app lists

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rview

- Drag and track HUDs in cards; the delta and split readouts keep their
  at-speed size; status and reference switches as pills; red for no signal
- Session summary: a spring-in trophy with an orange glow when the session
  beats the driver's previous best on the track (read at load, voided
  sessions excluded), Keep as the primary button
- Car sheet: photo card, backup pill, bests, performance and specs cards
- Settings: sunlight-contrast switch replaces dark/light; real app version,
  the always-'Connected' database row removed
- Track overview in cards; 'Corners' was the GPS point count, now labelled so
- Chart and map colours moved to the Paddock night palette

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd car forms

Session detail, lap detail and drag run detail move to Paddock night cards;
history rows get a shared SessionRow; session setup shows ready chips instead
of a 0/2 bar; empty history lists offer a start action; account and edit
profile screens use cards; speed units read km/h and mph; dropdown arrows
visible; lap detail action row becomes an opaque dock so a closed sheet
cannot show behind it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tering for Track and Drag modes.

This commit introduces `AccountRestore`, enabling full recovery of user tracks and shared sessions from the TrackBoard service when signing in on a new device. It also adds a comprehensive filtering and sorting system to history screens, allowing users to narrow down sessions by vehicle, track, or date, and sort track sessions by pace.

**Key Changes:**

*   **Account Restoration:**
    *   **Data Recovery:** Integrated `AccountRestore` into the `SyncEngine` to download and rebuild tracks, points, sessions, laps, and sectors from the server.
    *   **Deduplication:** Added logic to identify and link sessions already present on the device to prevent duplicate records during sync.
    *   **Vehicle Linking:** Restored sessions automatically resolve and download their associated vehicle profiles if missing from the local garage.
    *   **Database:** Added batch insert methods to `SyncDao` for tracks, sessions, and timing data to support atomic restoration.

*   **History & Filtering:**
    *   **Session Filtering:** Introduced `SessionFilterBar` in `TimeAttackListView` and `DragTimesList`. Users can now filter history by `Vehicle` and `Track`.
    *   **Dynamic Sorting:** Added pace-based sorting for track sessions. `LapTimeDataDAO` now provides `getBestLapPerSession` to facilitate ranking sessions by their fastest lap.
    *   **State Persistence:** History filters are now preserved using `rememberSaveable` when navigating between sections or viewing session details.
    *   **UI Enhancements:** Updated `ExpandableTrackGroup` to display the session's best lap time directly in the list and improved empty states for filtered results.

*   **Sync Engine & API:**
    *   **API Expansion:** Updated `TrackBoardApi` with endpoints for paginated track/session listings and detailed resource fetching (`getTrackDetail`, `getSession`).
    *   **Sync Tally:** Expanded sync reporting to include "downloaded" metrics for restored resources.
    *   **Conflict Handling:** Improved track deletion logic to handle "TrackInUse" errors by marking the local link as deleted rather than retrying indefinitely.

*   **Technical Improvements:**
    *   Refactored `GarageSync` vehicle mapping to a shared internal utility.
    *   Enhanced `SessionViewModel` to reactively track best lap times for all sessions.
    *   Standardized header heights and scroll behavior across list screens using `SectionSwitchHeight` and `SessionFilterBarHeight`.
… skill definitions.

This commit introduces a robust account restoration system for synchronizing tracks, sessions, and vehicles from the TrackBoard service. It also adds a comprehensive filtering and sorting engine for the history screens, including UI components for filter chips and dropdowns. Additionally, it integrates a new "Mobile App UI Design" skill set for the development environment.

**Key Changes:**

*   **Account Restoration & Sync:**
    *   **`AccountRestore.kt`:** Implemented logic to pull remote tracks, sessions, and vehicles. It includes fingerprint-based matching to prevent duplicate records and logic to reattach vehicles to sessions where the link was previously missing.
    *   **Data Integrity:** Added `dropRestoredDuplicates` to clean up redundant session copies without GPS traces. Improved `Instant` parsing to handle varied ISO-8601 formats from .NET backends.
*   **History Filtering & Sorting:**
    *   **`SessionFilters.kt`:** Defined `SessionFilter` and `SessionKey` logic. Implemented calendar-aware period filtering (e.g., "Last 7 days") and sorting options (Newest, Oldest, Fastest Lap).
    *   **`SessionFilterBar.kt`:** Created a horizontally scrolling Compose UI for filter chips. Active filters are highlighted using the theme's accent color.
    *   **Unit Testing:** Added `SessionFiltersTest.kt` to verify filtering logic, period boundaries, and grouping behavior under various sort orders.
*   **Infrastructure & Models:**
    *   **`SessionBestLap.kt`:** Added a model to track the fastest lap time per session for ranking purposes.
    *   **`AccountRestore.kt`:** Introduced `RestoreTally` for reporting sync results to the UI.
*   **Developer Skills & Documentation:**
    *   Integrated a comprehensive **Mobile App UI/UX Design** skill guide (under `.agents/` and `.claude/`) covering core philosophies (60/30/10 rule, 8-point grid), industry conventions, and emotional design principles (Peak-End Rule).
    *   Added `skills-lock.json` to manage the lifecycle of these external design references.
…new Events navigation tab.

This commit introduces "Track Days" functionality, allowing drivers to join events via codes and participate in live event boards. It integrates real-time session uploads after each lap for event participants, even when public sharing is disabled, by utilizing a new "Private" session visibility state.

**Key Changes:**

*   **Live Event Synchronization:**
    *   **Real-time Uploads:** Added `pushLive` to `SyncEngine` and `onLapCompleted` to `OnlineServices`. Sessions joined to an active event are now uploaded immediately after each lap completion.
    *   **Concurrency Management:** Introduced `syncLock` to ensure atomic updates between background sync workers and live lap pushes, preventing duplicate session records.
    *   **Visibility Control:** Added `ApiSessionVisibility.Private` to allow event-specific tracking without appearing on public leaderboards when global sharing is toggled off.

*   **Events Infrastructure:**
    *   **New API Interface:** Introduced `TrackBoardEventsApi` for managing event discovery, joining/leaving via codes, and fetching live event boards.
    *   **Event Repository:** Added `EventRepository` to manage the lifecycle of joined events and track day metadata.
    *   **Navigation:** Added an "Events" tab to the main dashboard and defined routes for `EventsScreen` and `EventBoardScreen`.

*   **Sync Engine & Data Model:**
    *   **Track Linking:** Added `KIND_SHARED_TRACK` to `RemoteLink` to support tracks downloaded specifically for events without driver ownership.
    *   **Sync Logic:** Updated `SyncEngine` to prioritize event-related sessions and prevent the withdrawal of active running sessions that may have live data in flight.
    *   **Database:** Added `getRunningSessionIds` to `SyncDao` to identify active sessions during sync cycles.

*   **UI & Account:**
    *   **Navigation Updates:** Integrated `Icons.Default.Flag` for the new Events tab.
    *   **Cleanup:** Ensured event data is cleared from the device upon account sign-out or deletion.
…s on

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…g automation, enabling R8 minification, and refining Proguard rules.

This commit introduces a secure way to handle release signing via a local `keystore.properties` file and optimizes the release build type by enabling shrinking and obfuscation. It also includes necessary R8 keep rules for Gson serialization and removes the unused generative AI dependency.

**Key Changes:**

*   **Build & Signing:**
    *   **Automated Signing:** Updated `build.gradle.kts` to dynamically load signing configurations (storeFile, passwords, alias) from a `keystore.properties` file if present.
    *   **Build Optimization:** Enabled `isMinifyEnabled` and `isShrinkResources` for the `release` build type.
    *   **Security:** Updated `.gitignore` to ensure `keystore.properties` and `.jks` files are not tracked by version control.

*   **Proguard & R8:**
    *   **Gson Support:** Added keep rules for `dataClasses` and `BundledPremadeTracks` to preserve field names and generic signatures required for Gson reflection during JSON parsing.
    *   **Type Retention:** Added rules to keep classes extending `TypeToken` and suppressed warnings for `errorprone` annotations.

*   **Cleanup:**
    *   **Dependency Removal:** Removed the `generativeai` library from `libs.versions.toml` and `app/build.gradle.kts` as it is no longer required.
Every on-screen string moves to resources (values and values-hu, 640 strings
and 9 plurals). Settings gets a Language section - System, English, Magyar -
that applies at once by recreating the activity; the choice is stored and
also laid over the application's resources and the recording service, so
the notification follows it.

Values stored in English stay stored that way and are translated for
display only: car options, track type and country (via Locale), weather
codes and wind points. Messages from TrackBoard and the sync layer stay
English where they are made and tested, and MessageText translates them at
the point they are shown. Dates use Hungarian order in Hungarian.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Aredarn
Aredarn requested a review from BeseBarni October 6, 2026 09:41
@Aredarn Aredarn self-assigned this Oct 6, 2026
@Aredarn Aredarn added the enhancement New feature or request label Oct 6, 2026
@Aredarn
Aredarn removed the request for review from BeseBarni October 6, 2026 09:41
@Aredarn
Aredarn merged commit 2225089 into main Oct 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant