Skip to content

Fix StringFormatInvalid lint errors in translated strings - #691

Merged
kasnder merged 1 commit into
masterfrom
claude/stringformat-lint-errors-p87z1b
Jul 28, 2026
Merged

Fix StringFormatInvalid lint errors in translated strings#691
kasnder merged 1 commit into
masterfrom
claude/stringformat-lint-errors-p87z1b

Conversation

@kasnder

@kasnder kasnder commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

  • :app:lintGithubDebug was failing with 6 StringFormatInvalid errors, all pre-existing in translated strings.xml files, unrelated to any in-flight changes.
  • Five app_eula translations (da, eu, fi, nl, no) contain a literal 100% immediately followed by a letter (e.g. b, s) that lint's Java Formatter parser reads as a conversion character, producing an invalid format spec like % b. Escaped the % as %% in each so it's treated as a literal percent sign.
  • The Slovenian msg_wg_mullvad_countries_failed string was empty, silently dropping the %s placeholder required by the code that calls getString(R.string.msg_wg_mullvad_countries_failed, ex.getMessage()) (ActivityWireGuardProfiles.java:187). Added a translation with the placeholder restored, following the phrasing of the neighboring msg_wg_mullvad_failed string.

Test plan

  • ./gradlew :app:lintGithubDebug — 0 errors (was 6), 512 warnings (unchanged)

🤖 Generated with Claude Code

https://claude.ai/code/session_01M5uW2XvYGhBTBE19Nsod6z


Generated by Claude Code

Five app_eula translations (da, eu, fi, nl, no) had a literal "100%"
followed by a letter lint's formatter parser treats as a conversion
character (e.g. "% b", "% s"), making the string an invalid format
spec; escape the percent sign as "%%" in each. The Slovenian
msg_wg_mullvad_countries_failed string was empty, dropping the
required %s placeholder from its source counterpart entirely; added
a translation with the placeholder restored.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M5uW2XvYGhBTBE19Nsod6z
@kasnder
kasnder marked this pull request as ready for review July 28, 2026 08:09
@kasnder
kasnder merged commit 1c1c8ba into master Jul 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants