Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a custom Android Lint detector, UntranslatedResourceDetector, designed to flag localized strings that are identical to their base English counterparts. It integrates this detector into the auth module, updates several locale files with tools:ignore attributes for valid identical terms, and adds a helper to locate the Android SDK during tests. Feedback on the tests suggests escaping the backslash in \u00A0 within Kotlin triple-quoted strings to ensure the UNICODE_ESCAPE regex is tested against a literal string rather than a compiler-evaluated Unicode character.
demolaf
force-pushed
the
feat/untranslated-resource-lint
branch
from
September 21, 2026 11:33
f63cda2 to
d5a3f11
Compare
demolaf
force-pushed
the
auth/localize-error-codes
branch
from
September 21, 2026 12:04
b8b5531 to
eca7cb4
Compare
demolaf
force-pushed
the
feat/untranslated-resource-lint
branch
from
September 21, 2026 12:20
d5a3f11 to
b2519bf
Compare
demolaf
force-pushed
the
feat/untranslated-resource-lint
branch
from
September 21, 2026 12:52
b2519bf to
2447342
Compare
demolaf
marked this pull request as ready for review
September 21, 2026 12:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an
UntranslatedResourcelint check, so a string that is present in a locale but still holds the base English text now fails the build.MissingTranslationonly fires on absent strings, so this defect class was never reportable.Changes
UntranslatedResourceDetectorcompares each locale string to its base value, skipping English regional folders,translatable="false"and values with no translatable words.tools:ignore. Againstpre-GAbefore fix(auth): localize user-facing auth errors by Firebase error code #2509 the check found 258 strings; it finds none now.lintChecksinto:auth, which does not propagate overdebugImplementation, so no custom check had ever run there,NonGlobalIdInLayoutincluded.:internal:lint's own suite, which never compiled: JUnit was missing and the SDK lookup only resolved on Windows. AddsUntranslatedResourceDetectorTest.fui_idp_name_facebook, which has readFecebookinvalues-filandvalues-tlsince the original translation import (Translations for auth #771), while the same files spell it correctly two lines below.Why fui_mfa_method_sms is exempted too
It is genuinely translated in some locales, so the exemption silences about 70 real hits. It is unreferenced dead copy, and the entry is marked to be dropped rather than kept when that string goes.
Maintainer note: Fixes internal CPRN-444