Files
amethyst/crowdin.yml
Claude a87222c51f refactor: split Compose UI out of commons into a new commonsUI module
`:commons` is on the CLI classpath, yet it declared Compose UI, Coil, Compose
resources, markdown and desktop Compose as dependencies, dragging ~40 MB of
UI/Skiko jars into every `amy` distribution. This moves every
Compose-dependent file into a new KMP module, `:commonsUI`, that
`api`-depends on `:commons`; `:commons` keeps only the Compose runtime
(stability annotations + snapshot state) and lifecycle-viewmodel.

Files keep their `com.vitorpamplona.amethyst.commons.*` packages, so the split
is a build-graph boundary and no consumer import changed. 236 files were
`git mv`'d (composables, icons, robohash, theme, Coil fetchers, the
`@Composable` relay-client entry points, `composeResources`, and the tests
that exercise them). Two headless files needed surgery instead of a move:
`GalleryParser` lost a vestigial foundation `@OptIn`, and the
`LocalPrivacyLockState`/`lockStateFor` CompositionLocal accessor moved out of
`PrivacyLockState` into its own commonsUI file. The feed DAL under `ui/feeds`
and `ui/note/ParentNote`+`ReplyContext` stay in `commons` because ViewModels
depend on them.

`amethyst`, `desktopApp`, `nappletHost` (NappletWebContract serves the shell
from composeResources) and `benchmark` now depend on `:commonsUI`; `cli`,
`geode` and `marmotBench` do not. commons' androidMain gains an explicit
androidx.core KTX dep it previously got transitively through Compose UI.

CI, crowdin, the icon-font tools and the escaping hook point at the new
composeResources location; CLAUDE.md, commons/ARCHITECTURE.md, a new
commonsUI/ARCHITECTURE.md, CONTRIBUTING, BUILDING and the affected skills
document the boundary. A plan doc under commons/plans records the
classification method and follow-ups.

Verified: JVM compiles for commons, commonsUI, cli, desktopApp; Android debug
compiles for nappletHost and amethyst; commons/commonsUI/cli JVM test suites;
both verifyKmpPurity gates; the cli runtime classpath no longer resolves
Compose UI, material3, Skiko or Coil.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N56KzPSYiN5edMRamvKEgD
2026-09-12 16:26:59 +00:00

41 lines
1.9 KiB
YAML

"project_id_env": "CROWDIN_PROJECT_ID"
"api_token_env": "CROWDIN_PERSONAL_TOKEN"
"base_path": "."
"base_url": "https://api.crowdin.com"
"preserve_hierarchy": true
files:
- source: amethyst/src/main/res/values/strings.xml
translation: amethyst/src/main/res/values-%android_code%/%original_file_name%
type: android
skip_untranslated_strings: true
# Land Kenyan Swahili (sw-KE) at the base qualifier so every Swahili speaker
# (incl. regions we don't target individually) gets full coverage instead of
# falling through to English.
# REQUIRED Crowdin UI changes (target languages live under Project Settings ->
# Languages), otherwise the next sync undoes this:
# - keep "Swahili, Kenya" (sw-KE) checked -> mapped here to values-sw
# - UNCHECK base "Swahili" (sw): it is an empty target, and leaving it on
# makes both sw and the mapped sw-KE write values-sw (collision).
# - UNCHECK "Swahili, Tanzania" (sw-TZ): empty, else it recreates an empty
# values-sw-rTZ.
languages_mapping:
android_code:
# Czech: single target, but Crowdin's default android_code is cs-rCZ, so
# without this it writes values-cs-rCZ instead of base values-cs. Single
# target => no collision; cs-CZ is dropped from locales_config to match.
cs: cs
sw-KE: sw
# Shared UI strings that have been pulled down from the Android app into
# commons (Compose Multiplatform resources, consumed by amethyst + desktopApp).
# Same android layout + language mapping as the amethyst source so a key reads
# identically whichever module owns it after the note-ui-commons extraction.
- source: commonsUI/src/commonMain/composeResources/values/strings.xml
translation: commonsUI/src/commonMain/composeResources/values-%android_code%/%original_file_name%
type: android
skip_untranslated_strings: true
languages_mapping:
android_code:
cs: cs
sw-KE: sw