i18n_db: update shipBrowser to use displayName

This commit is contained in:
zhaoweny
2020-06-29 15:31:50 +08:00
parent b18205a184
commit 1145a27e04
2 changed files with 4 additions and 2 deletions

View File

@@ -164,7 +164,7 @@ class ShipBrowser(wx.Panel):
if len(self.categoryList) == 0:
# set cache of category list
self.categoryList = list(sMkt.getShipRoot())
self.categoryList.sort(key=lambda _ship: _ship.name)
self.categoryList.sort(key=lambda _ship: _ship.displayName)
counts = sFit.countAllFitsGroupedByShip()
@@ -176,7 +176,7 @@ class ShipBrowser(wx.Panel):
if self.filterShipsWithNoFits and not self.categoryFitCache[ship.ID]:
continue
else:
self.lpane.AddWidget(CategoryItem(self.lpane, ship.ID, (ship.name, 0)))
self.lpane.AddWidget(CategoryItem(self.lpane, ship.ID, (ship.displayName, 0)))
self.navpanel.ShowSwitchEmptyGroupsButton(True)

View File

@@ -37,6 +37,7 @@ from service.jargon import JargonLoader
from service.settings import SettingsProvider
pyfalog = Logger(__name__)
_t = wx.GetTranslation
# Event which tells threads dependent on Market that it's initialized
mktRdy = threading.Event()
@@ -262,6 +263,7 @@ class Market:
self.les_grp = types_Group()
self.les_grp.ID = -1
self.les_grp.name = "Limited Issue Ships"
self.les_grp.displayName = _t("Limited Issue Ships")
self.les_grp.published = True
ships = self.getCategory("Ship")
self.les_grp.category = ships