Skip to main content
# igenstrings

[![build-status-image]][travis]
[![build-coverage-image]][codecov]
[![pypi-version-image]][pypi]
[![docs-image]][docs]

> Eventually, all things merge into one, and a river runs through it.

Enhance the genstrings command by adding merging capabilities
Documentation is available at [https://igenstrings.readthedocs.org][docs].

## Features

* Ensure your files are encoded in UTF-8 (as [recommended by Apple](https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html) now)
* Takes care of runing the genstrings command on all files `\*.m`, `\*.mm` and `\*.swift`
* Merge the results with previous version of the Localizable.string files you may have
* Inform you if it works correctly

## Installation

```sh
$ pip install igenstrings
```

## Requirements

Ensure your `*.strings` files are UTF-8 encoded as [Apple recommends it](https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html) now :

> It is recommended that you save strings files using the UTF-8 encoding, which is the default encoding for standard strings files. Xcode automatically transcodes strings files from UTF-8 to UTF-16 when they’re copied into the product.

## Usage

```sh
$ igenstrings ./MyXcodeProjectDir
```

*output*

```sh
Running the script on path ./MyXcodeProjectDir
Excluded path regex: None
languages found : ['./MyXcodeProjectDir/en.lproj', './MyXcodeProjectDir/fr.lproj']
Job done for language: ./MyXcodeProjectDir/en.lproj
Job done for language: ./MyXcodeProjectDir/fr.lproj
```

## Known Issues

* The Apple `genstrings` command doesn't like path that contains spaces.
So avoid subfolders containing spaces, otherwise the Localizable.string will not be complete
* You need to respect the format used by the genstrings command unless it will breaks.
So, to avoid issues use strictly the format below for each translated text.
Also do not remove the line break between two fields or it will breaks too.

```ruby
/* Comment for localizable string */
"Your string" = "Translated string";

/* Comment for localizable string */
"Your string #2" = "Translated string #2";
```

## Credits

Tools used in rendering this package:

* [`Cookiecutter`][Cookiecutter]
* [`cookiecutter-pypackage`][cookiecutter]

## Contact

[Pierre Dulac][github-dulaccc]
[@dulaccc][twitter-dulaccc]

## License

`igenstrings` is available under the MIT license. See the [LICENSE](LICENSE) file for more info.


[build-status-image]: https://img.shields.io/travis/dulaccc/igenstrings.svg
[build-coverage-image]: https://img.shields.io/codecov/c/github/dulaccc/igenstrings.svg
[travis]: https://travis-ci.org/dulaccc/igenstrings
[codecov]: https://codecov.io/github/dulaccc/igenstrings?branch=master
[pypi-version-image]: https://img.shields.io/pypi/v/igenstrings.svg
[pypi]: https://pypi.python.org/pypi/igenstrings
[docs-image]: https://readthedocs.org/projects/igenstrings/badge/?version=latest
[docs]: http://igenstrings.readthedocs.org/en/latest/

[Cookiecutter]: https://github.com/audreyr/cookiecutter
[cookiecutter-pypackage]: https://github.com/audreyr/cookiecutter-pypackage
[github-dulaccc]: https://github.com/dulaccc
[twitter-dulaccc]: https://twitter.com/dulaccc

Metadata

Release files for igenstrings 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for igenstrings 1.1.0
File Size Uploaded
igenstrings-1.1.0.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for igenstrings 1.1.0
File Interpreter ABI Platform
igenstrings-1.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 24.0 kB

Release files / igenstrings-1.1.0.tar.gz

Download URL igenstrings-1.1.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3c4b9898547a55fbb1f5ed029d90c20d08f339270a417c98980fea6453b109cb
BLAKE2b-256 checksum
How to use checksums
6bd34da8895e1f7326a90a4ef8953b0688b547035c0146f53955289718bdb774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / igenstrings-1.1.0-py2.py3-none-any.whl

Download URL igenstrings-1.1.0-py2.py3-none-any.whl
Size 7.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
11a418819973d730392f1bf8f682c4d48bd661c39f76a057a30121e03322d360
BLAKE2b-256 checksum
How to use checksums
d3fadcfc02b8362f0213ce30638d5750dbb962c1f01baecceeec7d1d82c19119
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page