From 1145a27e045f8e4afbb1a65b72723f61ef0136f4 Mon Sep 17 00:00:00 2001 From: zhaoweny Date: Mon, 29 Jun 2020 15:31:50 +0800 Subject: [PATCH] i18n_db: update shipBrowser to use displayName --- gui/shipBrowser.py | 4 ++-- service/market.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index 57aea3be9..b1eb2d1e7 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -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) diff --git a/service/market.py b/service/market.py index 2d8a05383..adadccd0e 100644 --- a/service/market.py +++ b/service/market.py @@ -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