Skip to content

[FIX] Remove unused resources#4869

Open
jesmrec wants to merge 4 commits into
masterfrom
fix/delete_unused_resources
Open

[FIX] Remove unused resources#4869
jesmrec wants to merge 4 commits into
masterfrom
fix/delete_unused_resources

Conversation

@jesmrec
Copy link
Copy Markdown
Contributor

@jesmrec jesmrec commented May 20, 2026

Follow up #4821

The following script will check all strings*.xml files and remove those ones that are not in the list

#!/usr/bin/env bash

NAMES_FILE="strings_to_delete.txt"

find . -type f -path "*/res/values*/strings*.xml" | while IFS= read -r file; do
  echo "Processing: $file"

  while IFS= read -r name; do
    gsed -i \
      -e "/<string[^>]*name=\"$name\"[^>]*>.*<\/string>/d" \
      -e "/<string[^>]*name=\"$name\"[^>]*>/,/<\/string>/d" \
      "$file"
  done < "$NAMES_FILE"
done

echo "Done."

List:

strings_to_delete.txt.zip

Related Issues

App:

  • Add changelog files for the fixed issues in folder changelog/unreleased. More info here
  • Add feature to Release Notes in ReleaseNotesViewModel.kt creating a new ReleaseNote() with String resources (if required)

QA

@jesmrec jesmrec force-pushed the fix/delete_unused_resources branch 2 times, most recently from e56f831 to b290b62 Compare May 20, 2026 12:51
@jesmrec jesmrec marked this pull request as ready for review May 20, 2026 13:08
@jesmrec jesmrec requested a review from joragua May 20, 2026 13:08
@jesmrec jesmrec force-pushed the fix/delete_unused_resources branch from b290b62 to 2f430ca Compare May 20, 2026 14:37
Copy link
Copy Markdown
Contributor

@joragua joragua left a comment

Choose a reason for hiding this comment

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

Just one comment @jesmrec! I’d remove all comments related to the removed resources because they’re no longer useful 🤔 I've marked an example just below

Comment on lines -99 to -105
<!-- USED IN SHAREACTIVITY!! !! -->
<style name="Theme.ownCloud.AlertDialog.NoTitle">
<item name="windowNoTitle">true</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>
</style>
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.

^^^^^

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch! removed useless comments after the cleanup

@jesmrec jesmrec requested a review from joragua May 22, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants