https://github.com/terhechte/difflocal
Compare Localizable.strings files for changes
https://github.com/terhechte/difflocal
Last synced: about 2 months ago
JSON representation
Compare Localizable.strings files for changes
- Host: GitHub
- URL: https://github.com/terhechte/difflocal
- Owner: terhechte
- Created: 2013-04-17T11:11:52.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-04-17T11:56:38.000Z (about 12 years ago)
- Last Synced: 2025-03-26T06:04:38.755Z (2 months ago)
- Language: Python
- Size: 105 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Difflocal
#### Compare "Localizable.strings" files
If you don't use a full fledged localization tool for Cocoa or iOS development, like the [Localization Suite](http://www.loc-suite.org/), then at some point you will have changed your primary localization file (say English.lproj/Localizable.strings) and need to port these additions to your other locales, so that your translators can work on them.
Here, the problem arises that if you generate a new Localizable.strings via
`find -E . -iregex '.*\.(m|h|mm)$' -print0 | xargs -0 genstrings -a -o Resources/en.lproj`
then the order of the keys in the file can change. This makes it very difficult to 'diff' the new locale for changes.
Difflocal remedies that by comparing two locale files (say your current, updated locale, and the older, unupdated locale) and printing all keys that exist in the one but not in the other.
## Installation:
* Download the file `or` Clone the repository
* Copy difflocal.py into your path (/usr/local/bin, or /usr/bin) or your source directory
* `chmod +x difflocal.py` on the script## Usage:
difflocal.py Resources/English.lproj/Localizable.strings Resources/de.lproj/Localizable.strings## Returns:
> Locale is missing key: %i Likes, %i Comments
>
> Locale is missing key: %i More