i18n: minor tweaks for easier translation
1. tweaks for characterEditor.py and patternEditor.py according to PR discussion. 2. fix for "Recent Fits" label not translated
This commit is contained in:
@@ -126,14 +126,14 @@ class NavigationPanel(SFItem.SFBrowserItem):
|
||||
|
||||
if not toggle:
|
||||
self.shipBrowser.recentFits = False
|
||||
self.btnRecent.label = "Recent Fits"
|
||||
self.btnRecent.label = _t("Recent Fits")
|
||||
self.btnRecent.normalBmp = self.recentBmpD
|
||||
|
||||
if emitEvent:
|
||||
wx.PostEvent(self.shipBrowser, Stage1Selected())
|
||||
else:
|
||||
self.shipBrowser.recentFits = True
|
||||
self.btnRecent.label = "Hide Recent Fits"
|
||||
self.btnRecent.label = _t("Hide Recent Fits")
|
||||
self.btnRecent.normalBmp = self.recentBmp
|
||||
|
||||
if emitEvent:
|
||||
|
||||
@@ -369,10 +369,10 @@ class SkillTreeView(wx.Panel):
|
||||
|
||||
bSizerButtons.AddStretchSpacer()
|
||||
|
||||
importExport = ((_t("Import"), wx.ART_FILE_OPEN, _t("from")),
|
||||
(_t("Export"), wx.ART_FILE_SAVE_AS, _t("to")))
|
||||
importExport = ((_t("Import skills from clipboard"), wx.ART_FILE_OPEN, "import"),
|
||||
(_t("Export skills from clipboard"), wx.ART_FILE_SAVE_AS, "export"))
|
||||
|
||||
for name, art, direction in importExport:
|
||||
for tooltip, art, attr in importExport:
|
||||
bitmap = wx.ArtProvider.GetBitmap(art, wx.ART_BUTTON)
|
||||
btn = wx.BitmapButton(self, wx.ID_ANY, bitmap)
|
||||
|
||||
@@ -380,11 +380,11 @@ class SkillTreeView(wx.Panel):
|
||||
btn.SetMaxSize(btn.GetSize())
|
||||
|
||||
btn.Layout()
|
||||
setattr(self, "{}Btn".format(name.lower()), btn)
|
||||
setattr(self, "{}Btn".format(attr), btn)
|
||||
btn.Enable(True)
|
||||
btn.SetToolTip(_t("%s skills %s clipboard") % (name, direction))
|
||||
btn.SetToolTip(tooltip)
|
||||
bSizerButtons.Add(btn, 0, wx.ALL, 5)
|
||||
btn.Bind(wx.EVT_BUTTON, getattr(self, "{}Skills".format(name.lower())))
|
||||
btn.Bind(wx.EVT_BUTTON, getattr(self, "{}Skills".format(attr)))
|
||||
|
||||
pmainSizer.Add(bSizerButtons, 0, wx.EXPAND, 5)
|
||||
|
||||
|
||||
@@ -168,10 +168,10 @@ class DmgPatternEditor(AuxiliaryFrame):
|
||||
|
||||
self.SetSizer(mainSizer)
|
||||
|
||||
importExport = (("Import", wx.ART_FILE_OPEN, _t("from")),
|
||||
("Export", wx.ART_FILE_SAVE_AS, _t("to")))
|
||||
importExport = ((_t("Import patterns from clipboard"), wx.ART_FILE_OPEN, "import"),
|
||||
(_t("Export patterns to clipboard"), wx.ART_FILE_SAVE_AS, "export"))
|
||||
|
||||
for name, art, direction in importExport:
|
||||
for tooltip, art, attr in importExport:
|
||||
bitmap = wx.ArtProvider.GetBitmap(art, wx.ART_BUTTON)
|
||||
btn = wx.BitmapButton(self, wx.ID_ANY, bitmap)
|
||||
|
||||
@@ -179,11 +179,11 @@ class DmgPatternEditor(AuxiliaryFrame):
|
||||
btn.SetMaxSize(btn.GetSize())
|
||||
|
||||
btn.Layout()
|
||||
setattr(self, name, btn)
|
||||
setattr(self, "{}Btn".format(attr), btn)
|
||||
btn.Enable(True)
|
||||
btn.SetToolTip(_t("%s patterns %s clipboard") % (name, direction))
|
||||
btn.SetToolTip(tooltip)
|
||||
footerSizer.Add(btn, 0)
|
||||
btn.Bind(wx.EVT_BUTTON, getattr(self, "{}Patterns".format(name.lower())))
|
||||
btn.Bind(wx.EVT_BUTTON, getattr(self, "{}Patterns".format(attr)))
|
||||
|
||||
if not self.entityEditor.checkEntitiesExist():
|
||||
self.Close()
|
||||
|
||||
Reference in New Issue
Block a user