From a3e9b2803fe8542222c88640cf110ac5f585afca Mon Sep 17 00:00:00 2001 From: mr-shekhar <85621953+mr-shekhar@users.noreply.github.com> Date: Tue, 25 Jan 2022 19:10:39 +0530 Subject: [PATCH] NXDRIVE-2748: review auto update install latest update behavior (#3364) * NXDRIVE-2748: Review Auto Update Install latest update behavior Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- nxdrive/data/i18n/i18n.json | 2 +- nxdrive/feature.py | 2 -- nxdrive/gui/api.py | 7 ++----- tools/scripts/check_update_process.py | 6 ------ 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/nxdrive/data/i18n/i18n.json b/nxdrive/data/i18n/i18n.json index 24a4fed94c..ad4e8e1928 100644 --- a/nxdrive/data/i18n/i18n.json +++ b/nxdrive/data/i18n/i18n.json @@ -160,7 +160,7 @@ "FATAL_ERROR_TITLE": "%1 - Fatal error", "FATAL_ERROR_UPDATE_BTN": "Download latest version", "FATAL_ERROR_UPDATE_TOOLTIP": "We advise you to update to the latest version of %1", - "FEATURE_AUTO_UPDATE": "Enable or disable the update mechanism of the application.", + "FEATURE_AUTO_UPDATE": "Notify when new update is available.", "FEATURE_DIRECT_TRANSFER": "One-time transfer of content between the Nuxeo Server and the desktop.", "FEATURE_DIRECT_EDIT": "Edit any of document’s content from their Summary tab even if they are not synchronized.", "FEATURE_S3": "Improve the speed of your uploads by leveraging the AWS infrastructure. Even enabled, this feature will be effective only for Nuxeo Cloud customers and for Nuxeo servers with S3 Direct Upload addon installed and up-to-date.", diff --git a/nxdrive/feature.py b/nxdrive/feature.py index 42219d9191..582db3cb90 100644 --- a/nxdrive/feature.py +++ b/nxdrive/feature.py @@ -33,8 +33,6 @@ s3=False, ) -FeatureList = {"auto_update": "Notify when new update is available"} - Beta: List[str] = ["s3"] DisabledFeatures: List[str] = [] diff --git a/nxdrive/gui/api.py b/nxdrive/gui/api.py index 6c11fff68d..fa24568837 100644 --- a/nxdrive/gui/api.py +++ b/nxdrive/gui/api.py @@ -33,7 +33,7 @@ RootAlreadyBindWithDifferentAccount, StartupPageConnectionError, ) -from ..feature import Feature, FeatureList +from ..feature import Feature from ..notification import Notification from ..objects import Binder, DocPair from ..options import Options @@ -335,10 +335,7 @@ def get_features_list(self) -> List[List[str]]: """Return the list of declared features with their value, title and translation key.""" result = [] for feature in vars(Feature).keys(): - if feature in FeatureList.keys(): - title = FeatureList[feature] - else: - title = feature.replace("_", " ").title() + title = feature.replace("_", " ").title() translation_key = f"FEATURE_{feature.upper()}" result.append([title, feature, translation_key]) return result diff --git a/tools/scripts/check_update_process.py b/tools/scripts/check_update_process.py index d15439342d..38c660d250 100644 --- a/tools/scripts/check_update_process.py +++ b/tools/scripts/check_update_process.py @@ -144,9 +144,6 @@ def get_version(): f"{Path.home()}/Applications/Nuxeo Drive.app/Contents/MacOS/ndrive", "--version", ] - print("get_version() ", cmd) - print(subprocess.check_output(cmd, text=True)) - return subprocess.check_output(cmd, text=True).strip() file = ( @@ -154,9 +151,7 @@ def get_version(): if EXT == "exe" else expanduser("~/.nuxeo-drive/VERSION") ) - print("file: ", file) with open(file, encoding="utf-8") as f: - print(f.read()) return f.read().strip() @@ -357,7 +352,6 @@ def version_find(): with open(path, encoding="utf-8") as handler: for lineno, line in enumerate(handler.readlines()): if line.startswith("__version__"): - print(re.findall(r'"(.+)"', line)) version = re.findall(r'"(.+)"', line)[0] print(">>> Current version is", version, "at line", lineno, flush=True) return version, lineno