Repository navigation
chore(res): remove unused strings, bool and drawables - #839
Merged
Merged
Conversation
12 strings/bool and 2 drawables have no references in code, resources, assets or tests, and none can be reached by name (not a ToolbarKey name, not a layout_ / label_ / popup_keys_ / style_name_ / theme_name_ / toolbar_mode_ lookup, not in the custom icon picker list). The matching pref key constants are unchanged. Removed: spoken_current_text_is, spoken_description_search, spoken_description_upper_case, next_word_boost_level, gesture_method, clipboard_keys_alignment, auto_show_toolbar, toolbar_swipe_down_dismiss, custom_subtype, voice_futo_models_summary, unicode_panel, config_default_key_preview_popup (all locales and form-factor variants), ic_launcher_foreground, ic_open_in_full.
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.
Summary
Remove 12 strings/bool and 2 drawables that lint reports as unused and that I confirmed are really unused:
ToolbarKeyname (resolved viagetStringResourceOrName("")), not alayout_/label_/popup_keys_/style_name_/theme_name_/toolbar_mode_lookup, not in the custom icon picker list (customIconIdsonly resolves names the picker can offer).PREF_*key constants with the same names are unchanged, only the string resources go.Removed:
spoken_current_text_is,spoken_description_search,spoken_description_upper_case,next_word_boost_level,gesture_method,clipboard_keys_alignment,auto_show_toolbar,toolbar_swipe_down_dismiss,custom_subtype,voice_futo_models_summary,unicode_panel,config_default_key_preview_popup(all locales and form-factor variants),ic_launcher_foreground,ic_open_in_full.The 19 other
UnusedResourceshits are real and stay:custom_ai_1..10,touchpad,select_mode,ocr,gif,font_style,force_auto_caps(toolbar key labels) andlayout_tamil,layout_tamil_v4,layout_functional_keys_khipro(layout names), all resolved by name at runtime.i18n hook side effect
Staging the base
strings.xmlran the pre-commit hook, which re-addedno_dictionary_messagein el, ml and ur (6 lines). I had removed those stale 1-argument translations in #836, and the hook fills any locale missing a key. They have the correct%1$s %2$s %3$splaceholders, but the spacing around the link placeholder is slightly off (cosmetic, 3 locales).Verification
./gradlew :app:assembleStandardDebug,compileOfflineRunTestsKotlinpasslintStandardDebug: 0 errors,ExtraTranslation0,MissingDefaultResource0,UnusedResources33 -> 19, warnings 197 -> 183app/src/main/java**)