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:
|
if not toggle:
|
||||||
self.shipBrowser.recentFits = False
|
self.shipBrowser.recentFits = False
|
||||||
self.btnRecent.label = "Recent Fits"
|
self.btnRecent.label = _t("Recent Fits")
|
||||||
self.btnRecent.normalBmp = self.recentBmpD
|
self.btnRecent.normalBmp = self.recentBmpD
|
||||||
|
|
||||||
if emitEvent:
|
if emitEvent:
|
||||||
wx.PostEvent(self.shipBrowser, Stage1Selected())
|
wx.PostEvent(self.shipBrowser, Stage1Selected())
|
||||||
else:
|
else:
|
||||||
self.shipBrowser.recentFits = True
|
self.shipBrowser.recentFits = True
|
||||||
self.btnRecent.label = "Hide Recent Fits"
|
self.btnRecent.label = _t("Hide Recent Fits")
|
||||||
self.btnRecent.normalBmp = self.recentBmp
|
self.btnRecent.normalBmp = self.recentBmp
|
||||||
|
|
||||||
if emitEvent:
|
if emitEvent:
|
||||||
|
|||||||
@@ -369,10 +369,10 @@ class SkillTreeView(wx.Panel):
|
|||||||
|
|
||||||
bSizerButtons.AddStretchSpacer()
|
bSizerButtons.AddStretchSpacer()
|
||||||
|
|
||||||
importExport = ((_t("Import"), wx.ART_FILE_OPEN, _t("from")),
|
importExport = ((_t("Import skills from clipboard"), wx.ART_FILE_OPEN, "import"),
|
||||||
(_t("Export"), wx.ART_FILE_SAVE_AS, _t("to")))
|
(_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)
|
bitmap = wx.ArtProvider.GetBitmap(art, wx.ART_BUTTON)
|
||||||
btn = wx.BitmapButton(self, wx.ID_ANY, bitmap)
|
btn = wx.BitmapButton(self, wx.ID_ANY, bitmap)
|
||||||
|
|
||||||
@@ -380,11 +380,11 @@ class SkillTreeView(wx.Panel):
|
|||||||
btn.SetMaxSize(btn.GetSize())
|
btn.SetMaxSize(btn.GetSize())
|
||||||
|
|
||||||
btn.Layout()
|
btn.Layout()
|
||||||
setattr(self, "{}Btn".format(name.lower()), btn)
|
setattr(self, "{}Btn".format(attr), btn)
|
||||||
btn.Enable(True)
|
btn.Enable(True)
|
||||||
btn.SetToolTip(_t("%s skills %s clipboard") % (name, direction))
|
btn.SetToolTip(tooltip)
|
||||||
bSizerButtons.Add(btn, 0, wx.ALL, 5)
|
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)
|
pmainSizer.Add(bSizerButtons, 0, wx.EXPAND, 5)
|
||||||
|
|
||||||
|
|||||||
@@ -168,10 +168,10 @@ class DmgPatternEditor(AuxiliaryFrame):
|
|||||||
|
|
||||||
self.SetSizer(mainSizer)
|
self.SetSizer(mainSizer)
|
||||||
|
|
||||||
importExport = (("Import", wx.ART_FILE_OPEN, _t("from")),
|
importExport = ((_t("Import patterns from clipboard"), wx.ART_FILE_OPEN, "import"),
|
||||||
("Export", wx.ART_FILE_SAVE_AS, _t("to")))
|
(_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)
|
bitmap = wx.ArtProvider.GetBitmap(art, wx.ART_BUTTON)
|
||||||
btn = wx.BitmapButton(self, wx.ID_ANY, bitmap)
|
btn = wx.BitmapButton(self, wx.ID_ANY, bitmap)
|
||||||
|
|
||||||
@@ -179,11 +179,11 @@ class DmgPatternEditor(AuxiliaryFrame):
|
|||||||
btn.SetMaxSize(btn.GetSize())
|
btn.SetMaxSize(btn.GetSize())
|
||||||
|
|
||||||
btn.Layout()
|
btn.Layout()
|
||||||
setattr(self, name, btn)
|
setattr(self, "{}Btn".format(attr), btn)
|
||||||
btn.Enable(True)
|
btn.Enable(True)
|
||||||
btn.SetToolTip(_t("%s patterns %s clipboard") % (name, direction))
|
btn.SetToolTip(tooltip)
|
||||||
footerSizer.Add(btn, 0)
|
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():
|
if not self.entityEditor.checkEntitiesExist():
|
||||||
self.Close()
|
self.Close()
|
||||||
|
|||||||
Reference in New Issue
Block a user