Background
The plugin delegates all localization work to the bandlab-localizer CLI (LocalizerOps):
update-strings (full sync)
update-strings --update-keys <keys>
update-strings --add-keys <keys> --target-file <path>
update-strings --delete-keys <keys>
Localizer 3.2.0 renamed --add-keys-to-file → --target-file (localizer #152). The plugin kept
emitting the old flag and nothing failed in CI — no test asserts the argv we send to the CLI.
Done already (flag-surface contract)
LocalizerCliContractTest now asserts every flag the plugin emits is a recognised update-strings
option, via update-strings --help — no network, no Tolgee creds. It runs against the localizer jar
pinned to the version the app's wrapper uses (LOCALIZER_JAR, currently 3.2.0) and self-skips when
that env var is unset, so the default hermetic ./gradlew test is unaffected. This would have caught
the rename instantly.
This issue: real end-to-end execution
Go beyond the --help surface and actually run the commands against real-shaped project data, so
we catch behavioural drift (output format, exit codes, [[file]] routing), not just flag names.
Proposed shape
- Fixture from bandlab-android. Copy a small, realistic slice: the
bandlab-localizer wrapper
pinned to the app's version, a bandlab-localizer-config.toml, and a couple of [[file]] entries
with their base + translation strings.xml. ⚠️ Scrub the Tolgee api-key from the copied
config — the real one must not be committed; use a dummy / ${TOLGEE_API_KEY} interpolation.
- Creds-free path (always runs when a jar is available): execute
update-strings --delete-keys <key>
on the fixture and assert the key is removed from the base file and every translation, exit 0.
Delete needs zero network/creds.
- Tolgee path (opt-in, gated on a live key):
--add-keys … --target-file, --update-keys, and
full sync hit Tolgee. Run these against keys copied from the Android project when TOLGEE_API_KEY
is present; skip otherwise.
- Gating: a separate tagged task / source set, off by default and excluded from
check, so the
hermetic ./gradlew test and normal CI stay green. Optionally a dedicated CI job that builds the
localizer jar (or pulls the pinned release) and runs it.
Acceptance
Follow-up to the --target-file fix and LocalizerCliContractTest. Relates to #214.
Background
The plugin delegates all localization work to the
bandlab-localizerCLI (LocalizerOps):update-strings(full sync)update-strings --update-keys <keys>update-strings --add-keys <keys> --target-file <path>update-strings --delete-keys <keys>Localizer 3.2.0 renamed
--add-keys-to-file→--target-file(localizer #152). The plugin keptemitting the old flag and nothing failed in CI — no test asserts the argv we send to the CLI.
Done already (flag-surface contract)
LocalizerCliContractTestnow asserts every flag the plugin emits is a recognisedupdate-stringsoption, via
update-strings --help— no network, no Tolgee creds. It runs against the localizer jarpinned to the version the app's wrapper uses (
LOCALIZER_JAR, currently 3.2.0) and self-skips whenthat env var is unset, so the default hermetic
./gradlew testis unaffected. This would have caughtthe rename instantly.
This issue: real end-to-end execution
Go beyond the
--helpsurface and actually run the commands against real-shaped project data, sowe catch behavioural drift (output format, exit codes,
[[file]]routing), not just flag names.Proposed shape
bandlab-localizerwrapperpinned to the app's version, a
bandlab-localizer-config.toml, and a couple of[[file]]entrieswith their base + translation
strings.xml.api-keyfrom the copiedconfig — the real one must not be committed; use a dummy /
${TOLGEE_API_KEY}interpolation.update-strings --delete-keys <key>on the fixture and assert the key is removed from the base file and every translation, exit 0.
Delete needs zero network/creds.
--add-keys … --target-file,--update-keys, andfull sync hit Tolgee. Run these against keys copied from the Android project when
TOLGEE_API_KEYis present; skip otherwise.
check, so thehermetic
./gradlew testand normal CI stay green. Optionally a dedicated CI job that builds thelocalizer jar (or pulls the pinned release) and runs it.
Acceptance
--delete-keysexecuted end-to-end; asserts removal from base + all translations.TOLGEE_API_KEYis set; skipped cleanly otherwise../gradlew testunchanged.Follow-up to the
--target-filefix andLocalizerCliContractTest. Relates to #214.