Git Product home page Git Product logo

localizer's Introduction

Localizer

Localizer is a pretty simple and naive string localizer Xcode Source Editor Extension.

It was developed more like a learning exercise rather that to be used in the real world.

What does it do?

It expects a selection (e.g. you can't call the command unless you selected some text).

It then breaks apart any String declarations it founds by splitting the selection based off " and then wrap the resulting String inside NSLocalizedString.

Example

let _ = "This is a string"

If we select the above line (or only the string including the ") and run Localizer we'll get the following output:

let _ = NSLocalizedString("This is a string", comment: "This is a string")

TODO

  • Add an option to «localize» a whole document
  • Make it smart enough to detect Strings already wrapped in NSLocalizedString and avoid touching them
  • Improve the String detection (tried with RegularExpression but it did not work, most likely my fault and a lack of regular-expression-fu).

Author

Esteban Torres

License

Localizer is available under the MIT license. See the LICENSE file for more info.

localizer's People

Contributors

esttorhe avatar

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

Watchers

 avatar  avatar

localizer's Issues

How to install it

please add brief description explaining how to install this extension

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.