Skip to content

Commit

Permalink
wxGUI: rename location to project for new project wizard (#3520)
Browse files Browse the repository at this point in the history
* wxGUI: rename location to project for new project wizard
  • Loading branch information
petrasovaa authored Mar 27, 2024
1 parent 17dac19 commit 9541615
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions gui/wxpython/location_wizard/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class DatabasePage(TitledPage):
"""Wizard page for setting GIS data directory and location name"""

def __init__(self, wizard, parent, grassdatabase):
TitledPage.__init__(self, wizard, _("Define new GRASS Location"))
TitledPage.__init__(self, wizard, _("Define new GRASS project"))

# grid definition
self.sizer = wx.GridBagSizer(vgap=0, hgap=0)
Expand All @@ -198,7 +198,7 @@ def __init__(self, wizard, parent, grassdatabase):

# text controls
self.tgisdbase = self.MakeLabel(grassdatabase)
self.tlocation = self.MakeTextCtrl("newLocation")
self.tlocation = self.MakeTextCtrl("newProject")
self.tlocation.SetFocus()

checks = [
Expand All @@ -225,7 +225,7 @@ def __init__(self, wizard, parent, grassdatabase):
self.sizer.Add(
self.MakeLabel(
"%s:" % _("Name"),
tooltip=_("Name of location directory in GIS Data Directory"),
tooltip=_("Name of project directory in GIS Data Directory"),
),
flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL,
border=5,
Expand All @@ -247,7 +247,7 @@ def __init__(self, wizard, parent, grassdatabase):
self.sizer.Add(
self.MakeLabel(
"%s:" % _("Description"),
tooltip=_("Description of location directory in GIS Data Directory"),
tooltip=_("Description of project directory in GIS Data Directory"),
),
flag=wx.ALIGN_LEFT | wx.ALIGN_TOP | wx.ALIGN_CENTER_VERTICAL | wx.ALL,
border=5,
Expand All @@ -267,7 +267,7 @@ def __init__(self, wizard, parent, grassdatabase):
)

self.sizer.Add(
self.MakeLabel(_("Location will be created in GRASS database:")),
self.MakeLabel(_("Project will be created in GRASS database:")),
flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL,
border=2,
pos=(5, 1),
Expand All @@ -293,7 +293,7 @@ def __init__(self, wizard, parent, grassdatabase):

def _nameValidationFailed(self, ctrl):
message = _(
"Name '{}' is not a valid name for location. "
"Name '{}' is not a valid name for project. "
"Please use only ASCII characters excluding characters {} "
"and space."
).format(ctrl.GetValue(), "/\"'@,=*~")
Expand All @@ -307,10 +307,10 @@ def _checkLocationNotExists(self, text):

def _locationAlreadyExists(self, ctrl):
message = _(
"Location '{}' already exists. Please consider using "
"another name for your location."
"Project '{}' already exists. Please consider using "
"another name for your project."
).format(ctrl.GetValue())
GError(parent=self, message=message, caption=_("Existing location path"))
GError(parent=self, message=message, caption=_("Existing project path"))

def OnChangeName(self, event):
"""Name for new location was changed"""
Expand Down Expand Up @@ -342,7 +342,7 @@ def OnPageChanging(self, event=None):
GWarning(
parent=self,
message=_(
"Title of the location is limited only to one line and "
"Title of the project is limited only to one line and "
"256 characters. The rest of the text will be ignored."
),
)
Expand Down Expand Up @@ -2235,7 +2235,7 @@ def _doLayout(self):
self.ldatabase, flag=wx.ALIGN_LEFT | wx.ALL, border=5, pos=(1, 1)
)
self.sizer.Add(
self.MakeLabel(_("Location Name:")),
self.MakeLabel(_("Project Name:")),
flag=wx.ALIGN_LEFT | wx.ALL,
border=5,
pos=(2, 0),
Expand Down Expand Up @@ -2428,7 +2428,7 @@ def __init__(self, parent, grassdatabase):
# define wizard pages
#
self.wizard = WizardWithHelpButton(
parent, id=wx.ID_ANY, title=_("Define new GRASS Location")
parent, id=wx.ID_ANY, title=_("Define new GRASS project")
)
self.wizard.Bind(wiz.EVT_WIZARD_HELP, self.OnHelp)

Expand Down Expand Up @@ -2527,8 +2527,8 @@ def __init__(self, parent, grassdatabase):
parent=self.parent,
message="%s"
% _(
"Unable to create new location. "
"Location <%(loc)s> not created.\n\n"
"Unable to create new project. "
"Project <%(loc)s> not created.\n\n"
"Details: %(err)s"
)
% {"loc": self.startpage.location, "err": msg},
Expand Down Expand Up @@ -2660,9 +2660,9 @@ def OnWizFinished(self):
parent=self.wizard,
message="%s <%s>: %s"
% (
_("Unable to create new location"),
_("Unable to create new project"),
os.path.join(database, location),
_("Location already exists in GRASS Database."),
_("Project already exists in GRASS Database."),
),
)
return None
Expand Down

0 comments on commit 9541615

Please sign in to comment.