mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 11:48:24 +00:00
- String helpers: files that only read Compose resources import the commons stringRes, not the app's Android-resource overloads. browser_address_hint and napplet_untitled get Compose copies (every locale) so the browser and connected-apps screens stop reading commons' Android R. - ReactionsRow/LikeReaction/ZapReaction and LoadCityName are imported through the note-platform shims instead of the app implementations. - QR: the drawer moves to commonsUI with the encoding behind encodeQrMatrix (zxing core on JVM/Android, nothing yet on iOS); KeepScreenBrightAndAwake becomes expect/actual; ScanOutcome is shared and the camera scanner is an AppPlatform slot. - AppPlatform gains the app launcher and the Concord/napplet/manifest/favicon image models. favoriteCoordinateOf moves to commons. - New AppServices port (favorites, browser history and icons, napplet and signer permissions, Tor settings) installed as LocalAppServices; AccountViewModelHost gains the Tor relay evaluation and NIP-42 auth state. Screens read these instead of Amethyst.instance. - uriToRoute and its helpers leave MainActivity for UriToRoute.kt and decode with the KMP UrlEncoder; findQueryParameterValue leaves AppNavigation. - Settings rows split out of AppSettingsScreen; formatGrouped replaces NumberFormat; Uuid replaces java.util.UUID; javaClass and toBigDecimalOrNull swapped for KMP forms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S7FuNBSKiyVecARSoE4B9P
strings-migrate
Moves string keys from the Android app's res/ into commons Compose
resources (commonsUI/src/commonMain/composeResources) across all
locales in one shot, preserving each element byte-for-byte so Crowdin
sees a pure move. Both trees are Crowdin-managed with the same android
layout (see crowdin.yml), so a migrated key keeps its translations.
tools/strings-migrate/migrate.py copy_to_clipboard relay_info
After migrating, repoint the code: R.string.key becomes Res.string.key
(com.vitorpamplona.amethyst.commons.resources), and the composable keeps
calling stringRes(...) via the commons bridge
(com.vitorpamplona.amethyst.commons.ui.stringRes).
The tool refuses keys whose value uses bare %s/%d: compose-resources
only formats positional %1$s args. Rewrite those keys (code and every
locale) first.