mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where Schema Diff does not work when the user language is set to any language other than English in Preferences. #6784
This commit is contained in:
@@ -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,
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user