Skip to content

A Swift script to determine and optionally remove unused localization keys in your project.

License

Notifications You must be signed in to change notification settings

stavares843/strings-sweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Captura de ecrã 2023-12-06, às 01 18 19

A Swift script to determine and optionally remove unused localization keys in your project.

Description

  • Determines unused localization keys by scanning Swift files in the project.
  • Optionally removes unused keys from the specified language file.
  • Creates a backup of the original language file before removal.

Usage

Prerequisites

  • Swift installed on your machine.

Running the Script

  1. Open Terminal.
  2. Copy paste the script in your project
  3. Navigate to your project

Replace /path/to/your/Localizable.strings with the actual path to your Localizable.strings file.

The --remove flag is optional and will automatically remove unused keys from the file.

swift strings-sweeper.swift --lang /path/to/your/Localizable.strings --remove

swift strings-sweeper.swift --lang ./Localizable.strings --remove

strings-sweeper.mov

Options

--lang: Specify the path to the language file (default is ./Localizable.strings).

--remove: Automatically remove unused keys from the language file.

About

A Swift script to determine and optionally remove unused localization keys in your project.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages