i18n: improve string literal annotations
1. annotate more strings for statsViews, itemStats 2. fix raw title and description for preferences 3. fix crash on opening AttributeEditor, characterEditor
This commit is contained in:
@@ -26,7 +26,7 @@ class AttributeEditor(AuxiliaryFrame):
|
||||
|
||||
def __init__(self, parent):
|
||||
super().__init__(
|
||||
parent, wx.ID_ANY, title=_("Attribute Editor"), pos=wx.DefaultPosition,
|
||||
parent, wx.ID_ANY, title=_t("Attribute Editor"), pos=wx.DefaultPosition,
|
||||
size=wx.Size(650, 600), resizeable=True)
|
||||
|
||||
i = wx.Icon(BitmapLoader.getBitmap("fit_rename_small", "gui"))
|
||||
@@ -36,11 +36,11 @@ class AttributeEditor(AuxiliaryFrame):
|
||||
|
||||
menubar = wx.MenuBar()
|
||||
fileMenu = wx.Menu()
|
||||
fileImport = fileMenu.Append(wx.ID_ANY, _('Import'), _('Import overrides'))
|
||||
fileExport = fileMenu.Append(wx.ID_ANY, _('Export'), _('Import overrides'))
|
||||
fileClear = fileMenu.Append(wx.ID_ANY, _('Clear All'), _('Clear all overrides'))
|
||||
fileImport = fileMenu.Append(wx.ID_ANY, _t('Import'), _t('Import overrides'))
|
||||
fileExport = fileMenu.Append(wx.ID_ANY, _t('Export'), _t('Import overrides'))
|
||||
fileClear = fileMenu.Append(wx.ID_ANY, _t('Clear All'), _t('Clear all overrides'))
|
||||
|
||||
menubar.Append(fileMenu, '&File')
|
||||
menubar.Append(fileMenu, _t('&File'))
|
||||
self.SetMenuBar(menubar)
|
||||
|
||||
self.Bind(wx.EVT_MENU, self.OnImport, fileImport)
|
||||
@@ -69,7 +69,7 @@ class AttributeEditor(AuxiliaryFrame):
|
||||
mainSizer.Add(leftPanel, 1, wx.ALL | wx.EXPAND, 5)
|
||||
|
||||
rightSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.btnRemoveOverrides = wx.Button(panel, wx.ID_ANY, _("Remove Overides for Item"), wx.DefaultPosition,
|
||||
self.btnRemoveOverrides = wx.Button(panel, wx.ID_ANY, _t("Remove Overides for Item"), wx.DefaultPosition,
|
||||
wx.DefaultSize, 0)
|
||||
self.pg = AttributeGrid(panel)
|
||||
rightSizer.Add(self.pg, 1, wx.ALL | wx.EXPAND, 5)
|
||||
@@ -105,8 +105,8 @@ class AttributeEditor(AuxiliaryFrame):
|
||||
|
||||
def OnImport(self, event):
|
||||
with wx.FileDialog(
|
||||
self, _("Import pyfa override file"),
|
||||
wildcard="pyfa override file (*.csv)|*.csv",
|
||||
self, _t("Import pyfa override file"),
|
||||
wildcard=_t("pyfa override file (*.csv)|*.csv"),
|
||||
style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST
|
||||
) as dlg:
|
||||
if dlg.ShowModal() == wx.ID_OK:
|
||||
@@ -128,8 +128,8 @@ class AttributeEditor(AuxiliaryFrame):
|
||||
defaultFile = "pyfa_overrides.csv"
|
||||
|
||||
with wx.FileDialog(
|
||||
self, _("Save Overrides As..."),
|
||||
wildcard="pyfa overrides (*.csv)|*.csv",
|
||||
self, _t("Save Overrides As..."),
|
||||
wildcard=_t("pyfa overrides (*.csv)|*.csv"),
|
||||
style=wx.FD_SAVE,
|
||||
defaultFile=defaultFile
|
||||
) as dlg:
|
||||
@@ -269,7 +269,7 @@ class AttributeGrid(wxpg.PropertyGrid):
|
||||
prop = wxpg.FloatProperty(key, value=default)
|
||||
|
||||
prop.SetClientData(item.attributes[key]) # set this so that we may access it later
|
||||
prop.SetHelpString("%s\n%s" % (item.attributes[key].displayName or key, _("Default Value: %0.3f") % default))
|
||||
prop.SetHelpString("%s\n%s" % (item.attributes[key].displayName or key, _t("Default Value: %0.3f") % default))
|
||||
self.Append(prop)
|
||||
|
||||
def removeOverrides(self, event):
|
||||
|
||||
Reference in New Issue
Block a user