diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a8c216..5dc4c0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ *Applanga CLI Documentation:* *** +### Version 1.0.93 (18 Apr 2024) +#### Fixed +- Fixed keepTagIds option for push commands +--- + ### Version 1.0.92 (4 Jan 2024) #### Added - Added `xliff` file format diff --git a/README.md b/README.md index 5989e13..6a1c5c1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Applanga Localization Command Line Interface (CLI) *** -*Version:* 1.0.92 +*Version:* 1.0.93 *Website:* @@ -254,6 +254,11 @@ It is possible to set the variable `` in the path. In the "source" blo ***Example (Tag Array):*** `"tag": ["main page", "other page"]` +- **"keepTagIds"** *(push commands only)* + + This option is only considered when you provide the 'tag' option. If you wish to retain all entries tagged with the current Tag, even if they are not included in the uploaded file, then set this option to true. + + ***Example:*** `"keepTagIds": true` - **"language"** diff --git a/lib/api.py b/lib/api.py index b57b60b..7922ebf 100644 --- a/lib/api.py +++ b/lib/api.py @@ -246,6 +246,9 @@ def uploadFiles(upload_files, force=False, draft=False, debug=False): if 'tag' in file_data: send_data['tag'] = file_data['tag'] + if 'keepTagIds' in file_data: + send_data['keepTagIds'] = file_data['keepTagIds'] + if 'key_prefix' in file_data: send_data['key_prefix'] = file_data['key_prefix'] @@ -354,6 +357,9 @@ def uploadFile(file_data, force=False, draft=False, debug=False): if 'tag' in file_data: request_data['tag'] = file_data['tag'] + if 'keepTagIds' in file_data: + request_data['keepTagIds'] = file_data['keepTagIds'] + if 'key_prefix' in file_data: request_data['addKeyPrefix'] = file_data['key_prefix'] diff --git a/lib/constants.py b/lib/constants.py index 81f940d..be0109b 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -1,4 +1,4 @@ -VERSION_NUMBER = '1.0.92' +VERSION_NUMBER = '1.0.93' APPLANGA_HOST = 'https://api.applanga.com' API_BASE_PATH = '/v1/api' CONFIG_FILE_NAME = '.applanga.json' diff --git a/lib/files.py b/lib/files.py index a127327..855e39e 100644 --- a/lib/files.py +++ b/lib/files.py @@ -136,6 +136,8 @@ def getFiles(source): # Add other properties which got defined for file if 'tag' in source: return_files[file]['tag'] = source['tag'] + if 'keepTagIds' in source: + return_files[file]['keepTagIds'] = source['keepTagIds'] if 'file_format' in source: return_files[file]['file_format'] = source['file_format'] if 'key_prefix' in source: