Skip to content

GitHub Action to Look for Unused Strings#1951

Merged
LePips merged 6 commits intojellyfin:mainfrom
JPKribs:actionUnusedStrings
Mar 27, 2026
Merged

GitHub Action to Look for Unused Strings#1951
LePips merged 6 commits intojellyfin:mainfrom
JPKribs:actionUnusedStrings

Conversation

@JPKribs
Copy link
Copy Markdown
Member

@JPKribs JPKribs commented Mar 26, 2026

Summary

The goal of this is to work similarly to our linting but for localization that created but unused in PRs.

This migrates our PurgeUnusedStrings.swift to FindUnusedStrings.swift. By default, this script exits as an error when unused strings are found and returns a list of the strings in CLI.

To purge strings, you run FindUnusedStrings.swift --purge.

When run on Main, this is what we get:

Screenshot 2026-03-26 at 14 59 32

So this PR also removes these strings to comply with this new Action.


This is what this looks like in CLI and what this looked like to remove these unused strings:

Screenshot 2026-03-26 at 15 02 51

@JPKribs JPKribs added the developer Alters the developer experience label Mar 26, 2026
  - accessibility
  - childDeletionWarning
  - children
  - cinematicBackground
  - episodeLandscapePoster
  - missingItems
  - next
  - rememberLayoutFooter
  - rememberSortingFooter
  - seriesBackdrop
  - showFavorites
  - showRecentlyAdded
@JPKribs
Copy link
Copy Markdown
Member Author

JPKribs commented Mar 26, 2026

For live usage, please see:

https://github.com/jellyfin/Swiftfin/actions/runs/23617837222/job/68789743051

My former commit where I still had our Main unused strings

Copy link
Copy Markdown
Member

@LePips LePips left a comment

Choose a reason for hiding this comment

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

Let's have these smaller checks all in one action, spinning up individual jobs for each one is a bit overkill.

@JPKribs
Copy link
Copy Markdown
Member Author

JPKribs commented Mar 27, 2026

Let's have these smaller checks all in one action, spinning up individual jobs for each one is a bit overkill.

Good call. I've combined Linting and Localization checks into one action called "Validate PR". I'm terrible at naming so let me know if that's a bad name for this. Also, let me know if we want to merge this with CI as well. I think you meant Lint but just checking those are the only 2 to merge.

@JPKribs JPKribs requested a review from LePips March 27, 2026 01:16
Copy link
Copy Markdown
Member

@LePips LePips left a comment

Choose a reason for hiding this comment

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

Yep, just like that. Looks great!

@LePips LePips merged commit 216bd1f into jellyfin:main Mar 27, 2026
4 checks passed
@JPKribs JPKribs deleted the actionUnusedStrings branch March 27, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

developer Alters the developer experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants