mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 19:28:25 +00:00
Compose resources substitute only %N$s / %N$d and never unescape %%, so the
Android printf escape rendered literally ("100%% uptime", "12%% of all").
Unescape uptime, active_subs_share and podcast_value_split_percent in every
locale, teach the Compose escaping check to flag %% (Crowdin reintroduces
Android escapes on sync) and fix_escapes.py to repair it.
Also fix the uptime icon tint: successRate is 0..100 but was compared with
0.1 / 0.60, so every relay below 1% went red and everything else green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.