Files
amethyst/crowdin.yml
T
Claude a839ef226a refactor(commons): extract GitStatusPill to commons; wire commons i18n
Second batch of the note-ui-commons extraction, and the load-bearing
setup for every string-bearing renderer that follows.

Commons had no translation pipeline — crowdin.yml synced only the Android
app's strings.xml — so moving an already-translated string to commons
Res.string would drop its translations and remove it from future syncs.
This commit fixes that first:

- crowdin.yml: add commons/composeResources as a second Android source
  with the same language mapping, so shared keys keep flowing through
  Crowdin.
- Migrate the four git_status_* pill labels (open/merged/closed/draft)
  and all 56 existing locale translations from amethyst/res into
  commons/composeResources, deleting the amethyst copies. No language
  regresses.

Then the renderer split (NIP-34 git status pill):

- commons/ui/note/GitStatusPill.kt: the StatusKind enum + the pure
  GitStatusPill(kind, modifier) presentation composable, resolving labels
  via commons Res.string. Shared by Android and Desktop.
- amethyst keeps the thin GitStatusPill(targetIdHex, …) entry that reads
  the account-bound GitStatusIndex and delegates to the commons pill.
- Callers (GitItemListRow, Git.kt) re-point StatusKind to commons.

Verified: :commons:compileKotlinJvm (accessor generation + all 56 locale
qualifiers accepted) and :amethyst:compileFdroidDebugKotlin both pass;
every modified/added strings.xml is well-formed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gmrt3jwYPDJ38MJGJ6GaNr
2026-07-17 22:47:39 +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: commons/src/commonMain/composeResources/values/strings.xml
translation: commons/src/commonMain/composeResources/values-%android_code%/%original_file_name%
type: android
skip_untranslated_strings: true
languages_mapping:
android_code:
cs: cs
sw-KE: sw