Giter Site home page Giter Site logo

cocoanetics / dtlocalizablestringscanner Goto Github PK

View Code? Open in Web Editor NEW
109.0 109.0 29.0 389 KB

An open source substitute for Apple's genstrings which can be integrated in Apps.

License: BSD 2-Clause "Simplified" License

Objective-C 95.04% Ruby 4.96%

dtlocalizablestringscanner's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dtlocalizablestringscanner's Issues

Make Macro params optional

If the second parameter of NSLocalizedString(key, comment) would be optional then this would also support people using custom MacrosLike ODLocalizedString(key). The comment would be assumed to be nil.

Homebrew

Should the command line tool be added to Homebrew?

Output is broken if you have a NSLocalizedString with an empty string.

Description:
It seems Localized.strings must never contain a row like this:

"" = "";

If it does, the localization tables will mess up, and the application will complain it does not find strings in Foundation framework.

App warning looks like this:
Localizable string "(A Document Being Saved By %@)" not found in strings table "Document" of bundle CFBundle 0x12e508f60 </System/Library/Frameworks/Foundation.framework>
(need to have -NSShowNonLocalizedStrings YES as startup argument to enable the warning)

The original genstrings tool will not include empty strings, but output a warning.
DTLocalizableStringScanner unfortunately does include the empty string, and thus, the output is broken.

Proposed fix:
Make sure empty strings are never included in the output.

This can be done by adding:
if([key compare:@""""] == NSOrderedSame) {
continue;
}

in the for-loop in [DTLocalizableStringTable stringRepresentationWithEncoding], but there are probably better ways to do it :)

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.