Giter Site home page Giter Site logo

objc_strings's Introduction

Goal

Helps Cocoa applications localization by detecting unused and missing keys in '.strings' files.

Input

Path of an Objective-C project.

Output

  1. warnings for untranslated strings in *.m
  2. warnings for unused keys in Localization.strings
  3. errors for keys defined twice or more in the same .strings file

Typical usage

$ python objc_strings.py /path/to/obj_c/project
./MyProject/en.lproj/Localizable.strings:13: warning: unused key in en.lproj: "Misc"
./MyProject/ViewController.m:16: warning: missing key in fr.lproj: "World"

Xcode integration

  1. make objc_strings.py executable

    $ chmod +x objc_strings.py

  2. copy objc_strings.py to the root of your project

  3. add a "Run Script" build phase to your target

  4. move this build phase in second position

  5. set the script path to ${SOURCE_ROOT}/objc_strings.py

settings warnings

objc_strings's People

Contributors

nst avatar swissquote-nst avatar

Watchers

James Cloos avatar Håkon Bogen avatar

Forkers

victert

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.