diff --git a/gui/aboutData.py b/gui/aboutData.py index ef0a5fd7b..1fb7ca2b2 100644 --- a/gui/aboutData.py +++ b/gui/aboutData.py @@ -19,7 +19,7 @@ import config import wx -_ = wx.GetTranslation +_t = wx.GetTranslation try: versionString = "{0}".format(config.getVersion()) @@ -28,10 +28,10 @@ except NameError: versionString = "0.0" licenses = ( - _("pyfa is released under GNU GPLv3 - see included LICENSE file"), - _("All EVE-Online related materials are property of CCP hf."), - _("Silk Icons Set by famfamfam.com - Creative Commons Attribution 2.5 License"), - _("Fat Cow Icons by fatcow.com - Creative Commons Attribution 3.0 License") + _t("pyfa is released under GNU GPLv3 - see included LICENSE file"), + _t("All EVE-Online related materials are property of CCP hf."), + _t("Silk Icons Set by famfamfam.com - Creative Commons Attribution 2.5 License"), + _t("Fat Cow Icons by fatcow.com - Creative Commons Attribution 3.0 License") ) developers = ( "blitzmann \tSable Blitzmann (maintainer)", @@ -46,7 +46,7 @@ credits = ( "Corollax (Aamrr) \tVarious EOS / pyfa improvements", "Dreae (Dreae)\tPyCrest") description = ( - _("Pyfa (the Python Fitting Assistant) is an open-source standalone application able to " + _t("Pyfa (the Python Fitting Assistant) is an open-source standalone application able to " "create and simulate fittings for EVE-Online SciFi MMORPG with a very high degree of " "accuracy. Pyfa can run on all platforms where Python and wxWidgets are supported.") ) diff --git a/gui/additionsPane.py b/gui/additionsPane.py index 21b246069..c7c8eb376 100644 --- a/gui/additionsPane.py +++ b/gui/additionsPane.py @@ -33,7 +33,7 @@ from gui.builtinAdditionPanes.projectedView import ProjectedView from gui.chrome_tabs import ChromeNotebook from gui.toggle_panel import TogglePanel -_ = wx.GetTranslation +_t = wx.GetTranslation class AdditionsPane(TogglePanel): @@ -42,7 +42,7 @@ class AdditionsPane(TogglePanel): TogglePanel.__init__(self, parent, force_layout=1) self.mainFrame = mainFrame - self.SetLabel(_("Additions")) + self.SetLabel(_t("Additions")) pane = self.GetContentPanel() baseSizer = wx.BoxSizer(wx.HORIZONTAL) @@ -63,28 +63,28 @@ class AdditionsPane(TogglePanel): notesImg = BitmapLoader.getImage("skill_small", "gui") self.drone = DroneView(self.notebook) - self.notebook.AddPage(self.drone, _("Drones"), image=droneImg, closeable=False) + self.notebook.AddPage(self.drone, _t("Drones"), image=droneImg, closeable=False) self.fighter = FighterView(self.notebook) - self.notebook.AddPage(self.fighter, _("Fighters"), image=fighterImg, closeable=False) + self.notebook.AddPage(self.fighter, _t("Fighters"), image=fighterImg, closeable=False) self.cargo = CargoView(self.notebook) - self.notebook.AddPage(self.cargo, _("Cargo"), image=cargoImg, closeable=False) + self.notebook.AddPage(self.cargo, _t("Cargo"), image=cargoImg, closeable=False) self.implant = ImplantView(self.notebook) - self.notebook.AddPage(self.implant, _("Implants"), image=implantImg, closeable=False) + self.notebook.AddPage(self.implant, _t("Implants"), image=implantImg, closeable=False) self.booster = BoosterView(self.notebook) - self.notebook.AddPage(self.booster, _("Boosters"), image=boosterImg, closeable=False) + self.notebook.AddPage(self.booster, _t("Boosters"), image=boosterImg, closeable=False) self.projectedPage = ProjectedView(self.notebook) - self.notebook.AddPage(self.projectedPage, _("Projected"), image=projectedImg, closeable=False) + self.notebook.AddPage(self.projectedPage, _t("Projected"), image=projectedImg, closeable=False) self.gangPage = CommandView(self.notebook) - self.notebook.AddPage(self.gangPage, _("Command"), image=gangImg, closeable=False) + self.notebook.AddPage(self.gangPage, _t("Command"), image=gangImg, closeable=False) self.notes = NotesView(self.notebook) - self.notebook.AddPage(self.notes, _("Notes"), image=notesImg, closeable=False) + self.notebook.AddPage(self.notes, _t("Notes"), image=notesImg, closeable=False) self.mainFrame.Bind(GE.FIT_CHANGED, self.OnFitChanged) self.mainFrame.Bind(GE.FIT_NOTES_CHANGED, self.OnNotesChanged) diff --git a/gui/builtinShipBrowser/navigationPanel.py b/gui/builtinShipBrowser/navigationPanel.py index b03808de5..d0b4ff593 100644 --- a/gui/builtinShipBrowser/navigationPanel.py +++ b/gui/builtinShipBrowser/navigationPanel.py @@ -15,7 +15,7 @@ from utils.cjk import isStringCjk from .events import FitSelected, SearchSelected, ImportSelected, Stage1Selected, Stage2Selected, Stage3Selected pyfalog = Logger(__name__) -_ = wx.GetTranslation +_t = wx.GetTranslation class NavigationPanel(SFItem.SFBrowserItem): @@ -45,20 +45,20 @@ class NavigationPanel(SFItem.SFBrowserItem): self.recentBmp = self.AdjustChannels(self.recentBmpH) self.newBmp = self.AdjustChannels(self.newBmpH) - self.toolbar.AddButton(self.resetBmp, _("Ship groups"), clickCallback=self.OnHistoryReset, + self.toolbar.AddButton(self.resetBmp, _t("Ship groups"), clickCallback=self.OnHistoryReset, hoverBitmap=self.resetBmpH) - self.toolbar.AddButton(self.rewBmp, _("Back"), clickCallback=self.OnHistoryBack, hoverBitmap=self.rewBmpH) - self.btnNew = self.toolbar.AddButton(self.newBmp, _("New fitting"), clickCallback=self.OnNewFitting, + self.toolbar.AddButton(self.rewBmp, _t("Back"), clickCallback=self.OnHistoryBack, hoverBitmap=self.rewBmpH) + self.btnNew = self.toolbar.AddButton(self.newBmp, _t("New fitting"), clickCallback=self.OnNewFitting, hoverBitmap=self.newBmpH, show=False) - self.btnSwitch = self.toolbar.AddButton(self.switchBmpD, _("Hide empty ship groups"), + self.btnSwitch = self.toolbar.AddButton(self.switchBmpD, _t("Hide empty ship groups"), clickCallback=self.ToggleEmptyGroupsView, hoverBitmap=self.switchBmpH, show=False) - self.btnRecent = self.toolbar.AddButton(self.recentBmpD, _("Recent Fits"), + self.btnRecent = self.toolbar.AddButton(self.recentBmpD, _t("Recent Fits"), clickCallback=self.ToggleRecentShips, hoverBitmap=self.recentBmpH, show=True) modifier = "CTRL" if 'wxMac' not in wx.PlatformInfo else "CMD" - self.toolbar.AddButton(self.searchBmp, _("Search fittings") + " ({}+F)".format(modifier), clickCallback=self.ToggleSearchBox, + self.toolbar.AddButton(self.searchBmp, _t("Search fittings") + " ({}+F)".format(modifier), clickCallback=self.ToggleSearchBox, hoverBitmap=self.searchBmpH) self.padding = 4 @@ -144,11 +144,11 @@ class NavigationPanel(SFItem.SFBrowserItem): def ToggleEmptyGroupsView(self): if self.shipBrowser.filterShipsWithNoFits: self.shipBrowser.filterShipsWithNoFits = False - self.btnSwitch.label = _("Hide empty ship groups") + self.btnSwitch.label = _t("Hide empty ship groups") self.btnSwitch.normalBmp = self.switchBmpD else: self.shipBrowser.filterShipsWithNoFits = True - self.btnSwitch.label = _("Show empty ship groups") + self.btnSwitch.label = _t("Show empty ship groups") self.btnSwitch.normalBmp = self.switchBmp stage = self.shipBrowser.GetActiveStage() diff --git a/gui/builtinStatsViews/outgoingViewFull.py b/gui/builtinStatsViews/outgoingViewFull.py index bb71cb672..8b214c052 100644 --- a/gui/builtinStatsViews/outgoingViewFull.py +++ b/gui/builtinStatsViews/outgoingViewFull.py @@ -25,7 +25,7 @@ from gui.utils.numberFormatter import formatAmount, roundToPrec from eos.utils.spoolSupport import SpoolType, SpoolOptions import eos.config -_ = wx.GetTranslation +_t = wx.GetTranslation stats = [ ( @@ -63,7 +63,7 @@ class OutgoingViewFull(StatsView): self._cachedValues = [] def getHeaderText(self, fit): - return _("Remote Reps") + return _t("Remote Reps") def getTextExtentW(self, text): width, height = self.parent.GetTextExtent(text) diff --git a/gui/builtinStatsViews/outgoingViewMinimal.py b/gui/builtinStatsViews/outgoingViewMinimal.py index 56f910dc0..9ce5439a8 100644 --- a/gui/builtinStatsViews/outgoingViewMinimal.py +++ b/gui/builtinStatsViews/outgoingViewMinimal.py @@ -24,7 +24,7 @@ from gui.utils.numberFormatter import formatAmount, roundToPrec from eos.utils.spoolSupport import SpoolType, SpoolOptions import eos.config -_ = wx.GetTranslation +_t = wx.GetTranslation stats = [ ( @@ -62,7 +62,7 @@ class OutgoingViewMinimal(StatsView): self._cachedValues = [] def getHeaderText(self, fit): - return _("Remote Reps") + return _t("Remote Reps") def getTextExtentW(self, text): width, height = self.parent.GetTextExtent(text) diff --git a/gui/errorDialog.py b/gui/errorDialog.py index a5e2a0c2d..3b5c65f50 100644 --- a/gui/errorDialog.py +++ b/gui/errorDialog.py @@ -30,7 +30,7 @@ from gui.auxWindow import AuxiliaryFrame from service.prereqsCheck import version_block -_ = wx.GetTranslation +_t = wx.GetTranslation pyfalog = Logger(__name__) @@ -65,15 +65,15 @@ class ErrorHandler: class ErrorFrame(AuxiliaryFrame): - def __init__(self, parent=None, error_title=_('Error!')): - super().__init__(parent, id=wx.ID_ANY, title=_("pyfa error"), pos=wx.DefaultPosition, size=wx.Size(500, 600)) + def __init__(self, parent=None, error_title=_t('Error!')): + super().__init__(parent, id=wx.ID_ANY, title=_t("pyfa error"), pos=wx.DefaultPosition, size=wx.Size(500, 600)) from eos.config import gamedata_version, gamedata_date time = datetime.datetime.fromtimestamp(int(gamedata_date)).strftime('%Y-%m-%d %H:%M:%S') version = "pyfa " + config.getVersion() + '\nEVE Data Version: {} ({})\n\n'.format(gamedata_version, time) # gui.aboutData.versionString - desc = _("pyfa has experienced an unexpected issue. Below is a message that contains crucial \n" + desc = _t("pyfa has experienced an unexpected issue. Below is a message that contains crucial \n" "information about how this was triggered. Please contact the developers with the \n" "information provided through the EVE Online forums or file a GitHub issue.")