Skip to content

Fail the build on translations whose placeholders drift - #6696

Draft
gpunto wants to merge 2 commits into
developfrom
fix/develop-string-format-lint
Draft

Fail the build on translations whose placeholders drift#6696
gpunto wants to merge 2 commits into
developfrom
fix/develop-string-format-lint

Conversation

@gpunto

@gpunto gpunto commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Goal

Follow-up to #6695, which fixed a crash on v6 caused by an Italian translation reading canale% 1$s.
Lint reports that as StringFormatCount, but the check is a warning by default, so ./gradlew lint
stayed green and the broken string shipped.

Closes AND-1529

Implementation

  • Promote StringFormatCount to an error for every Android module, in the root build.gradle.kts
    next to the existing shared lint config. A translation whose placeholders drift from the default
    locale now fails the build instead of adding a line to a report nobody opens.
  • Carry over the two %1d spellings still left in stream-chat-android-docs and the XML sample,
    spotted in review on Fix malformed format specifiers in localized strings #6695. Single argument strings, so nothing renders differently.

Scoped to this one check rather than warningsAsErrors, which would pull in the existing backlog
(121 warnings in the Compose module alone).

Testing

  • ./gradlew lint passes across every module. No StringFormat finding exists anywhere today, so
    the promotion starts from a clean slate.
  • Injected both shapes of the original defect into an Italian string, the misplaced space and the
    full width , and confirmed the build now fails on each with StringFormatCount. Reverted after.

@gpunto gpunto added the pr:internal Internal changes / housekeeping label Sep 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled, or the PR is bot-authored.
  • An issue is linked (Linear ticket or GitHub issue), or the PR is bot-authored.

🎉 Great job! This PR is ready for review.

@github-actions

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 6.09 MB 6.09 MB 0.00 MB 🟢
stream-chat-android-ui-components 11.40 MB 11.40 MB 0.00 MB 🟢
stream-chat-android-compose 13.07 MB 13.07 MB 0.00 MB 🟢

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:internal Internal changes / housekeeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant