i18n: more string annotation
This commit is contained in:
@@ -160,7 +160,7 @@ class CommandView(d.Display):
|
||||
self.fits.sort(key=self.fitSort)
|
||||
stuff.extend(self.fits)
|
||||
if not stuff:
|
||||
stuff = [DummyEntry("Drag a fit to this area")]
|
||||
stuff = [DummyEntry(_t("Drag a fit to this area"))]
|
||||
self.update(stuff)
|
||||
|
||||
def click(self, event):
|
||||
|
||||
@@ -35,6 +35,7 @@ from service.market import Market
|
||||
|
||||
|
||||
FIGHTER_ORDER = ('Light Fighter', 'Heavy Fighter', 'Support Fighter')
|
||||
_t = wx.GetTranslation
|
||||
|
||||
|
||||
class FighterViewDrop(wx.DropTarget):
|
||||
@@ -58,7 +59,7 @@ class FighterView(wx.Panel):
|
||||
def __init__(self, parent):
|
||||
wx.Panel.__init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, style=wx.TAB_TRAVERSAL)
|
||||
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
|
||||
self.labels = ["Light", "Heavy", "Support"]
|
||||
self.labels = [("Light", _t("Light")), ("Heavy", _t("Heavy")), ("Support", _t("Support"))]
|
||||
|
||||
mainSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
@@ -68,18 +69,18 @@ class FighterView(wx.Panel):
|
||||
textSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
textSizer.AddStretchSpacer()
|
||||
|
||||
for x in self.labels:
|
||||
lbl = wx.StaticText(self, wx.ID_ANY, x.capitalize())
|
||||
for attr, label in self.labels:
|
||||
lbl = wx.StaticText(self, wx.ID_ANY, label)
|
||||
textSizer.Add(lbl, 0, wx.ALIGN_CENTER | wx.LEFT, 5)
|
||||
|
||||
lbl = wx.StaticText(self, wx.ID_ANY, "0")
|
||||
setattr(self, "label%sUsed" % (x.capitalize()), lbl)
|
||||
setattr(self, "label%sUsed" % attr, lbl)
|
||||
textSizer.Add(lbl, 0, wx.ALIGN_CENTER | wx.LEFT, 5)
|
||||
|
||||
textSizer.Add(wx.StaticText(self, wx.ID_ANY, "/"), 0, wx.ALIGN_CENTER)
|
||||
|
||||
lbl = wx.StaticText(self, wx.ID_ANY, "0")
|
||||
setattr(self, "label%sTotal" % (x.capitalize()), lbl)
|
||||
setattr(self, "label%sTotal" % attr, lbl)
|
||||
textSizer.Add(lbl, 0, wx.ALIGN_CENTER)
|
||||
textSizer.AddStretchSpacer()
|
||||
|
||||
@@ -100,7 +101,7 @@ class FighterView(wx.Panel):
|
||||
fit = sFit.getFit(activeFitID)
|
||||
|
||||
if fit:
|
||||
for x in self.labels:
|
||||
for x, _ in self.labels:
|
||||
if fit.isStructure:
|
||||
slot = getattr(FittingSlot, "FS_{}".format(x.upper()))
|
||||
else:
|
||||
|
||||
@@ -32,6 +32,8 @@ from gui.utils.staticHelpers import DragDropHelper
|
||||
from service.fit import Fit
|
||||
from service.market import Market
|
||||
|
||||
_t = wx.GetTranslation
|
||||
|
||||
|
||||
class ImplantViewDrop(wx.DropTarget):
|
||||
def __init__(self, dropFn, *args, **kwargs):
|
||||
@@ -62,8 +64,8 @@ class ImplantView(wx.Panel):
|
||||
|
||||
radioSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
radioSizer.AddStretchSpacer()
|
||||
self.rbFit = wx.RadioButton(self, id=wx.ID_ANY, label="Use Fit-specific Implants", style=wx.RB_GROUP)
|
||||
self.rbChar = wx.RadioButton(self, id=wx.ID_ANY, label="Use Character Implants")
|
||||
self.rbFit = wx.RadioButton(self, id=wx.ID_ANY, label=_t("Use Fit-specific Implants"), style=wx.RB_GROUP)
|
||||
self.rbChar = wx.RadioButton(self, id=wx.ID_ANY, label=_t("Use Character Implants"))
|
||||
radioSizer.Add(self.rbFit, 0, wx.ALL, 5)
|
||||
radioSizer.Add(self.rbChar, 0, wx.ALL, 5)
|
||||
radioSizer.AddStretchSpacer()
|
||||
|
||||
@@ -223,7 +223,7 @@ class ProjectedView(d.Display):
|
||||
stuff.extend(self.drones)
|
||||
stuff.extend(self.fighters)
|
||||
if not stuff:
|
||||
stuff = [DummyEntry('Drag an item or fit, or use right-click menu for wormhole effects')]
|
||||
stuff = [DummyEntry(_t('Drag an item or fit, or use right-click menu for wormhole effects'))]
|
||||
self.update(stuff)
|
||||
|
||||
def get(self, row):
|
||||
|
||||
@@ -6,6 +6,7 @@ from gui.builtinMarketBrowser.events import RECENTLY_USED_MODULES
|
||||
from logbook import Logger
|
||||
|
||||
pyfalog = Logger(__name__)
|
||||
_t = wx.GetTranslation
|
||||
|
||||
|
||||
class MarketTree(wx.TreeCtrl):
|
||||
@@ -33,7 +34,7 @@ class MarketTree(wx.TreeCtrl):
|
||||
|
||||
# Add recently used modules node
|
||||
rumIconId = self.addImage("market_small", "gui")
|
||||
self.AppendItem(self.root, "Recently Used Items", rumIconId, data=RECENTLY_USED_MODULES)
|
||||
self.AppendItem(self.root, _t("Recently Used Items"), rumIconId, data=RECENTLY_USED_MODULES)
|
||||
|
||||
# Bind our lookup method to when the tree gets expanded
|
||||
self.Bind(wx.EVT_TREE_ITEM_EXPANDING, self.expandLookup)
|
||||
|
||||
@@ -226,7 +226,7 @@ class ExportToEve(AuxiliaryFrame):
|
||||
|
||||
mainSizer.Add(hSizer, 0, wx.EXPAND, 5)
|
||||
|
||||
self.exportChargesCb = wx.CheckBox(self, wx.ID_ANY, 'Export Loaded Charges', wx.DefaultPosition, wx.DefaultSize, 0)
|
||||
self.exportChargesCb = wx.CheckBox(self, wx.ID_ANY, _t('Export Loaded Charges'), wx.DefaultPosition, wx.DefaultSize, 0)
|
||||
self.exportChargesCb.SetValue(EsiSettings.getInstance().get('exportCharges'))
|
||||
self.exportChargesCb.Bind(wx.EVT_CHECKBOX, self.OnChargeExportChange)
|
||||
mainSizer.Add(self.exportChargesCb, 0, 0, 5)
|
||||
|
||||
Reference in New Issue
Block a user