Skip to content

Commit

Permalink
Merge branch 'i18n' into i18n_db
Browse files Browse the repository at this point in the history
  • Loading branch information
blitzmann committed Jun 28, 2020
2 parents 3db9c63 + 47dd6f7 commit 9703ce7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions gui/builtinViewColumns/baseName.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ def __init__(self, fittingView, params):
self.columnText = _t("Name")
self.mask = wx.LIST_MASK_TEXT
self.projectedView = isinstance(fittingView, gui.builtinAdditionPanes.projectedView.ProjectedView)
self.rackTranslations = {
FittingSlot.HIGH: _t('High'),
FittingSlot.MED: _t('Med'),
FittingSlot.LOW: _t('Low'),
FittingSlot.SUBSYSTEM: _t('Subsystem'),
FittingSlot.RIG: _t('Rig')
}


def getText(self, stuff):
if isinstance(stuff, BaseWrapper):
Expand Down Expand Up @@ -90,9 +98,9 @@ def getText(self, stuff):
elif isinstance(stuff, Rack):
if FitSvc.getInstance().serviceFittingOptions["rackLabels"]:
if stuff.slot == FittingSlot.MODE:
return '─ Tactical Mode ─'
return '─ {} ─'.format(_t('Tactical Mode'))
else:
return '─ {} {} Slot{}─'.format(stuff.num, FittingSlot(stuff.slot).name.capitalize(), '' if stuff.num == 1 else 's')
return '─ {} ─'.format(_t('{} {} Slot', '{} {} Slots', stuff.num).format(stuff.num, self.rackTranslations.get(stuff.slot, FittingSlot(stuff.slot).name.capitalize())))
else:
return ""
elif isinstance(stuff, Module):
Expand Down

0 comments on commit 9703ce7

Please sign in to comment.