Skip to content

chore(auth): delete 35 unreferenced fui_ string resources and their translations - #2521

Draft
demolaf wants to merge 1 commit into
feat/untranslated-resource-lintfrom
auth/remove-unreferenced-strings
Draft

demolaf wants to merge 1 commit into
feat/untranslated-resource-lintfrom
auth/remove-unreferenced-strings

Conversation

@demolaf

@demolaf demolaf commented Sep 21, 2026

Copy link
Copy Markdown
Member

Deletes 35 fui_* string resources that nothing in :auth references, and their 2,687 translations across 84 locale folders.

Changes

Why this is not marked breaking

These are public resource surface, but the README documents overriding these names rather than reading them, and an override of a name the library no longer declares still compiles.


Maintainer note: Fixes internal CPRN-445

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors error message resolution in FirebaseUI Auth by mapping specific Firebase error codes to distinct exceptions and localized strings, while removing unused progress dialog strings across numerous localization files. It also updates the TopLevelDialogController to resolve strings dynamically from LocalAuthUIStringProvider. Feedback on these changes includes a recommendation to provide a default implementation for the new passwordTooLong method in AuthUIStringProvider to prevent breaking external implementations, and a suggestion to extract the digit regex in firstNumberIn to a companion object constant to optimize performance.

I am having trouble creating individual review comments. Click here to see my feedback.

auth/src/main/java/com/firebase/ui/auth/configuration/string_provider/AuthUIStringProvider.kt (187-188)

high

Adding a new abstract method passwordTooLong to the public interface AuthUIStringProvider is a breaking change for any external clients implementing this interface. To maintain backward compatibility, we should provide a default implementation (e.g., returning an empty string ""), which will automatically fall back to the default/English string without breaking compilation for existing custom implementations.

    /** Error message when the password is longer than the maximum length allowed. Should support string formatting with maximum length parameter. */
    fun passwordTooLong(maximumLength: Int): String = ""

auth/src/main/java/com/firebase/ui/auth/AuthException.kt (1022-1023)

medium

To avoid compiling the regular expression pattern \d+ on every invocation of firstNumberIn, we should extract it as a private constant DIGIT_REGEX in the companion object. This improves performance and avoids unnecessary object allocation.

        private val DIGIT_REGEX = Regex("\\d+")

        private fun firstNumberIn(text: String): Int? =
            DIGIT_REGEX.find(text)?.value?.toIntOrNull()

@demolaf
demolaf force-pushed the feat/untranslated-resource-lint branch from b2519bf to 2447342 Compare September 21, 2026 12:52
@demolaf
demolaf force-pushed the auth/remove-unreferenced-strings branch 2 times, most recently from 4956f24 to 1457f75 Compare September 21, 2026 14:29
@demolaf demolaf changed the title chore(auth): delete 33 unreferenced fui_ string resources and their translations chore(auth): delete 34 unreferenced fui_ string resources and their translations Sep 21, 2026
@demolaf
demolaf force-pushed the auth/remove-unreferenced-strings branch from 1457f75 to 7ed73c8 Compare September 21, 2026 16:07
@demolaf demolaf changed the title chore(auth): delete 34 unreferenced fui_ string resources and their translations chore(auth): delete 35 unreferenced fui_ string resources and their translations Sep 21, 2026
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.

1 participant