Sha256: 393a3132c1b5364d263997eac558a3d636464682293ba6fc001a6a9932ae38c5

Contents?: true

Size: 1.81 KB

Versions: 1

Compression:

Stored size: 1.81 KB

Contents

# danger-localizationlinter

Verify consistency over your project localizable files (localizable.strings and Localizable.stringdict)
 It uses Swiftgen to generate a localizables output per target and language and compare the output with
 a reference language one.
 The comparison ensure:
   - missing keys
   - additional keys
   - wrong parameters in string format

## Installation

    $ gem install danger-localizationlinter

## Usage

Methods and attributes from this plugin are available in your `Dangerfile` under the `localizationlinter` namespace.

	localizationlinter.lint

#### Attributes

`clean_after_execution` - Keep or clean derived data after execution

`inline_mode` - Print inline or as markdown

`verbose` - Print execution logs

`language_configuration_path` - Path to language configuration yml, defining main language per target
	example:
		My_target: en
		My_other_target: fr

default value is Configuration/Defaults/all_target_main_language.yml

`swift_gen_path` - Path to swift gen, default value is Pods/SwiftGen/bin/swiftgen

`derived_data_path` - Path to derived data, default value is localization_linter_derived_data

`resource_path` - Path to derived data, default value is Resources

`project_path` - Path to xcode project, default is taking the first project in root folder

#### Methods

`lint` - Verify the localizable files integrity over the project
rubocop:disable Metrics/MethodLength

`linter` - Returns the object in charge of verification

## Development

1. Clone this repo
2. Run `bundle install` to setup dependencies.
3. Run `bundle exec rake spec` to run the tests.
4. Use `bundle exec guard` to automatically have tests run as you make changes.
5. Make your changes.

To update swiftgen bin, use Test project in `spec`:
1. `cd spec/Test`
2. Open Podfile and update SwiftGen version
3. `pod update SwiftGen`

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
danger-localizationlinter-0.0.2 README.md