{"id":1325,"url":"https://github.com/samdmarshall/nslocalizer","last_synced_at":"2025-04-09T06:36:48.614Z","repository":{"id":57447085,"uuid":"63786762","full_name":"samdmarshall/nslocalizer","owner":"samdmarshall","description":"A tool for finding missing and unused NSLocalizedStrings","archived":false,"fork":false,"pushed_at":"2019-04-02T18:00:55.000Z","size":231,"stargazers_count":157,"open_issues_count":1,"forks_count":10,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-04-05T13:47:05.328Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samdmarshall.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-20T14:10:52.000Z","updated_at":"2024-12-17T21:42:49.000Z","dependencies_parsed_at":"2022-09-07T22:11:11.380Z","dependency_job_id":null,"html_url":"https://github.com/samdmarshall/nslocalizer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdmarshall%2Fnslocalizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdmarshall%2Fnslocalizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdmarshall%2Fnslocalizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdmarshall%2Fnslocalizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samdmarshall","download_url":"https://codeload.github.com/samdmarshall/nslocalizer/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247993938,"owners_count":21030045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:43.864Z","updated_at":"2025-04-09T06:36:43.562Z","avatar_url":"https://github.com/samdmarshall.png","language":"Python","funding_links":[],"categories":["Localization","Python"],"sub_categories":["Other Hardware","Other free courses"],"readme":"nslocalizer\n===========\n\n[![Code Climate](https://img.shields.io/codeclimate/github/samdmarshall/nslocalizer.svg)](https://codeclimate.com/github/samdmarshall/nslocalizer)\n[![Test Coverage](https://img.shields.io/codeclimate/coverage/github/samdmarshall/nslocalizer.svg)](https://codeclimate.com/github/samdmarshall/nslocalizer/coverage)\n[![CircleCI branch](https://img.shields.io/circleci/project/samdmarshall/nslocalizer/develop.svg)](https://circleci.com/gh/samdmarshall/nslocalizer/tree/develop)\n[![Dependency Status](https://dependencyci.com/github/samdmarshall/nslocalizer/badge)](https://dependencyci.com/github/samdmarshall/nslocalizer)\n\nThis is a command line tool that is used for discovering missing and unused localization strings in Xcode projects.\n\n## Contributing and Code of Conduct [![License](https://img.shields.io/badge/License-3--Clause%20BSD-blue.svg)](./LICENSE)\nThis project and related material has a Code of Conduct that is listed in the [contributing.md](./contributing.md) file. This must be read and adhered to when interacting with this project. Additionally this code is released under a 3-clause BSD license that you can read [here](./LICENSE).\n\n## Requirements  ![Python](https://img.shields.io/badge/Python3-3.5.0-brightgreen.svg)\nThis tool is built and tested against Python 3.5.0.\n\n   Module | Version\n----------|-----------\npbPlist   | \u003e=1.0\npyobjc-core | \u003e= 2.5.1\npyobjc-framework-Cocoa | \u003e= 2.5.1\nlangcodes | \u003e= 1.2.0\n\n## Installation\nVia pip and python 3\n\n\t$ pip3 install nslocalizer\n\nTo install the tool from the repo, clone from Github then run the `make build` command.\n\n## Usage\nTo use **nslocalizer** to generate warnings about missing or unused NSLocalizedStrings, you will have to pass it a project and target as input:\n\n\t$ nslocalizer --project \u003cpath to xcodeproj file\u003e --target \u003cnames of targets to analyze\u003e\n\nThere are a number of flags that can be passed to modify the behavior of **pyconfig**:\n\n   Flags | Usage\n-------------------|-----------------------------------------------------------\n`--version`        | Displays the version of **nslocalizer** and exits\n`--find-missing`   | Finds any strings that are missing translations for any of the supported languages\n`--find-unused`    | Finds any strings that are unused in the code\n`--quiet`          | Silences all logging output\n`--verbose`        | Logs additional information\n`--ignore \u003clanguages\u003e` | Will silence warnings for any of the languages listed to be ignored\n\n\u003e Note: Both `--find-missing` and `--find-unused` flags can be supplied to the same invocation of `nslocalizer`.\n\n## Example\n\nFind missing translation strings:\n```\n$ nslocalizer --project Foo.xcodeproj --target MyNewApp --find-missing\n/Users/Samantha/Projects/Foo/Foo/Assets/Base.lproj/Localizable.strings:327: warning: String \"foo_setup_twitter_integation\" missing for: German, Traditional Chinese, European Portuguese, Spanish\n/Users/Samantha/Projects/Foo/Foo/Assets/Base.lproj/Localizable.strings:356: warning: String \"foo_setup_facebook_integation\" missing for: German, Traditional Chinese, European Portuguese, Swedish, Polish, Latin American Spanish, British English, Brazilian Portuguese\n```\n\nFind unused translation strings:\n```\n$ nslocalizer --project Foo.xcodeproj --target MyNewApp --find-unused\n/Users/Samantha/Projects/Foo/Foo/Assets/Base.lproj/Localizable.strings:327: warning: String \"foo_setup_twitter_integation\" is not used\n/Users/Samantha/Projects/Foo/Foo/Assets/Base.lproj/Localizable.strings:356: warning: String \"foo_setup_facebook_integation\" is not used\n```\n\n\n## Integration\n**nslocalizer** is intended to be used as part of a build of the Xcode project file. To integrate you will have to add a new \"run script\" phase to your target and then invoke as such:\n\n```\nnslocalizer --project $PROJECT_DIR/YourProject.xcodeproj --target $TARGET_NAME --find-missing --find-unused\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdmarshall%2Fnslocalizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamdmarshall%2Fnslocalizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdmarshall%2Fnslocalizer/lists"}