mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure database driver names and description strings can be translated. Fixes #2190
This commit is contained in:
parent
d663d553c5
commit
a3007b7335
@ -12,6 +12,12 @@ from pgadmin.browser.server_groups.servers.types import ServerType
|
|||||||
|
|
||||||
|
|
||||||
class PPAS(ServerType):
|
class PPAS(ServerType):
|
||||||
|
UTILITY_PATH_LABEL = gettext("EDB Advanced Server Binary Path")
|
||||||
|
UTILITY_PATH_HELP = gettext(
|
||||||
|
"Path to the directory containing the EDB Advanced Server utility"
|
||||||
|
" programs (pg_dump, pg_restore etc)."
|
||||||
|
)
|
||||||
|
|
||||||
def instanceOf(self, ver):
|
def instanceOf(self, ver):
|
||||||
return ver.startswith("EnterpriseDB")
|
return ver.startswith("EnterpriseDB")
|
||||||
|
|
||||||
|
@ -25,6 +25,11 @@ class ServerType(object):
|
|||||||
identification based on the version.
|
identification based on the version.
|
||||||
"""
|
"""
|
||||||
registry = dict()
|
registry = dict()
|
||||||
|
UTILITY_PATH_LABEL = _("PostgreSQL Binary Path")
|
||||||
|
UTILITY_PATH_HELP = _(
|
||||||
|
"Path to the directory containing the PostgreSQL utility programs"
|
||||||
|
" (pg_dump, pg_restore etc)."
|
||||||
|
)
|
||||||
|
|
||||||
def __init__(self, server_type, description, priority):
|
def __init__(self, server_type, description, priority):
|
||||||
self.stype = server_type
|
self.stype = server_type
|
||||||
@ -53,14 +58,9 @@ class ServerType(object):
|
|||||||
|
|
||||||
st.utility_path = paths.register(
|
st.utility_path = paths.register(
|
||||||
'bin_paths', st.stype + '_bin_dir',
|
'bin_paths', st.stype + '_bin_dir',
|
||||||
_("{0} Binary Path").format(st.desc),
|
st.UTILITY_PATH_LABEL,
|
||||||
'text', default_path, category_label=_('Binary paths'),
|
'text', default_path, category_label=_('Binary paths'),
|
||||||
help_str=_(
|
help_str=st.UTILITY_PATH_HELP
|
||||||
"Path to the directory containing the {0} utility"
|
|
||||||
" programs (pg_dump, pg_restore etc).".format(
|
|
||||||
st.desc
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
Reference in New Issue
Block a user