diff --git a/docs/en_US/release_notes_7_9.rst b/docs/en_US/release_notes_7_9.rst index 56690cdd4..3e3b0c28f 100644 --- a/docs/en_US/release_notes_7_9.rst +++ b/docs/en_US/release_notes_7_9.rst @@ -35,4 +35,5 @@ Bug fixes | `Issue #2986 `_ - Fix an issue where the scroll position of panels was not remembered on Firefox. | `Issue #6602 `_ - Fix an issue where the default server-group is being deleted if the load-server json file contains no servers. | `Issue #6720 `_ - Fix an issue of the incorrect format (no indent) of SQL stored functions/procedures. + | `Issue #6784 `_ - Fixed an issue where Schema Diff does not work when the user language is set to any language other than English in Preferences. | `Issue #6874 `_ - Fix an issue where the browser window stuck on spinning with an Oauth user without email. diff --git a/web/pgadmin/tools/schema_diff/directory_compare.py b/web/pgadmin/tools/schema_diff/directory_compare.py index 6e6e3948d..6696f302c 100644 --- a/web/pgadmin/tools/schema_diff/directory_compare.py +++ b/web/pgadmin/tools/schema_diff/directory_compare.py @@ -11,8 +11,8 @@ import copy import string -from pgadmin.tools.schema_diff.model import SchemaDiffModel from flask import current_app +from flask_babel import gettext from pgadmin.utils.constants import PGADMIN_STRING_SEPARATOR count = 1 @@ -97,7 +97,7 @@ def _get_source_list(**kwargs): 'label': node_label, 'title': title, 'oid': source_object_id, - 'status': SchemaDiffModel.COMPARISON_STATUS['source_only'], + 'status': gettext('Source Only'), 'source_ddl': source_ddl, 'target_ddl': '', 'diff_ddl': diff_ddl, @@ -178,7 +178,7 @@ def _get_target_list(removed, target_dict, node, target_params, view_object, 'label': node_label, 'title': title, 'oid': target_object_id, - 'status': SchemaDiffModel.COMPARISON_STATUS['target_only'], + 'status': gettext('Target Only'), 'source_ddl': '', 'target_ddl': target_ddl, 'diff_ddl': diff_ddl, @@ -279,7 +279,7 @@ def _get_identical_and_different_list(intersect_keys, source_dict, target_dict, 'oid': source_object_id, 'source_oid': source_object_id, 'target_oid': target_object_id, - 'status': SchemaDiffModel.COMPARISON_STATUS['identical'], + 'status': gettext('Identical'), 'group_name': group_name, 'dependencies': [], 'source_scid': source_params['scid'] @@ -363,7 +363,7 @@ def _get_identical_and_different_list(intersect_keys, source_dict, target_dict, 'oid': source_object_id, 'source_oid': source_object_id, 'target_oid': target_object_id, - 'status': SchemaDiffModel.COMPARISON_STATUS['different'], + 'status': gettext('Different'), 'source_ddl': source_ddl, 'target_ddl': target_ddl, 'diff_ddl': diff_ddl, diff --git a/web/pgadmin/tools/schema_diff/model.py b/web/pgadmin/tools/schema_diff/model.py index 7ef9b1ab4..2bf90e261 100644 --- a/web/pgadmin/tools/schema_diff/model.py +++ b/web/pgadmin/tools/schema_diff/model.py @@ -7,21 +7,12 @@ # ########################################################################## -from flask_babel import gettext - -class SchemaDiffModel(): +class SchemaDiffModel: """ SchemaDiffModel """ - COMPARISON_STATUS = { - 'source_only': 'Source Only', - 'target_only': 'Target Only', - 'different': 'Different', - 'identical': 'Identical' - } - def __init__(self, **kwargs): """ This method is used to initialize the class and