GithubHelp home page GithubHelp logo

num42 / fastlane-plugin-localize Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 1.0 8.1 MB

Searches the code for extractable strings and allows interactive extraction to .strings file.

License: MIT License

Ruby 100.00%
developer-tool fastlane-plugin ios

fastlane-plugin-localize's Introduction

localize plugin

fastlane Plugin Badge

Getting Started

This project is a fastlane plugin. To get started with fastlane-plugin-localize, add it to your project by running:

fastlane add_plugin localize

About localize

Searches the code for extractable strings and allows interactive extraction to .strings file.

  • Whitelists non-extracted strings for further runs
  • Extracts as NSLocalizedString by default
  • Support for Swiftgen by supplying use_swiftgen:true

Example Gif

Run from Commandline

To show all options:

fastlane action localize

Example:

fastlane run localize strings_file:"Sources/Base/Supporting Files/en.lproj/Localizable.strings" file_filter:"Swiftgen,Sourcery" use_swiftgen:"true"

Run from Fastfile

desc "Search for localizable strings"
lane :localize_strings do
  localize(
    strings_file: "Sources/Base/Supporting Files/en.lproj/Localizable.strings",
    file_filter: "Swiftgen,Sourcery", # filters files with these words in their path
    use_swiftgen: "true" # remove to use NSLocalizableString instead
  )
end

Run tests for this plugin

To run both the tests, and code style validation, run

rake

To automatically fix many of the styling issues, use

rubocop -a

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting guide.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.

fastlane-plugin-localize's People

Contributors

lutzifer avatar revolter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

revolter

fastlane-plugin-localize's Issues

Crashes with some embedded SQL statement strings

Examples:

try database.execute(
          "INSERT INTO \(NodeAssetsRelationship.databaseTableName) " +
            "(\(NodeAssetsRelationship.GRDBRows.nodeId.rawValue), \(NodeAssetsRelationship.GRDBRows.assetId.rawValue)) " +
            "VALUES (?,?)", arguments: StatementArguments([nodeId, localAsset.id])
        )
var request = "Select * from ( " // outer select
        request.append("""
        Select \(assetIdColumnName), Count(\(assetIdColumnName)) as matches
        from \(AssetInformationFieldValue.databaseTableName)
        """)

Error message example:

[!] end pattern with unmatched parenthesis: /(?<!\#imageLiteral\(resourceName:|\#imageLiteral\(resourceName: |NSLocalizedString\()" || group_concat(data.name,"/ (RegexpError)

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.