diff --git a/README.md b/README.md index 1ef42ca..9fd9dc5 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ usage: strsync-runner.py [-h] [-b BASE_LANG_NAME] [-v [VERIFY_RESULTS [VERIFY_RESULTS ...]]] [-s [INCLUDE_SECONDARY_LANGUAGES [INCLUDE_SECONDARY_LANGUAGES ...]]] [-i [IGNORE_UNVERIFIED_RESULTS [IGNORE_UNVERIFIED_RESULTS ...]]] - [target path] + [target path] [only for keys [only for keys ...]] Automatically translate and synchronize .strings files from defined base language. @@ -72,6 +72,9 @@ language. positional arguments: target path Target localization resource path. (root path of Base.lproj, default=./) + only for keys Some specified keys for exclusive work. All operations + will work for only that keys therefore other keys will + be ignored. Not specified by default. (default=None) optional arguments: -h, --help show this help message and exit @@ -122,6 +125,11 @@ Copy all items from Base language without translation. $ strsync ./myapp/Resources/Localizations -w ``` +All operations will work for only keys "exclusive key1" "exclusive key2" "exclusive key3". Other keys will be ignored. +``` +$ strsync ./myapp/Resources/Localizations "exclusive key1" "exclusive key2" "exclusive key3" +``` + Excluding japanese, spanish, finnish ``` $ strsync ./myapp/Resources/Localizations -x ja es fi @@ -230,7 +238,7 @@ zh-CN ``` -## Utilities +## Utilities There are some additional scripts to help your workflow with strsync. diff --git a/setup.py b/setup.py index ebd73b7..6113201 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( name="strsync", - version="1.6.1", + version="1.7", packages=[ 'strsync', ], @@ -36,7 +36,7 @@ classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: English", "Operating System :: OS Independent", "Topic :: Software Development :: Internationalization", diff --git a/strsync/strsync.py b/strsync/strsync.py index 9967c8d..36b10cf 100755 --- a/strsync/strsync.py +++ b/strsync/strsync.py @@ -344,8 +344,9 @@ def resolve_file_names(target_file_names): # Init with Base.lproj for dir, subdirs, files in walked: if os.path.basename(dir) == __BASE_RESOUCE_DIR__: - for _file in resolve_file_names(files): - f = os.path.join(dir, _file) + for _file in resolve_file_names(files): + f = os.path.join(dir, _file) + if notexist_or_empty_file(f):