# HG changeset patch # User Andrey Skvortsov # Date 1498136876 -10800 # Node ID 794a47ef53230243b4fa64a935849b8941708532 # Parent ba0dde7f047a213507eabaf6e7f77d0510fc4056 add l18n support to variable table in CodeFileEditor (python/C extension) diff -r ba0dde7f047a -r 794a47ef5323 editors/CodeFileEditor.py --- a/editors/CodeFileEditor.py Thu Jun 22 16:06:34 2017 +0300 +++ b/editors/CodeFileEditor.py Thu Jun 22 16:07:56 2017 +0300 @@ -678,10 +678,7 @@ self.VariablesDefaultValue = {"Name" : "", "Type" : DefaultType, "Initial": "", "Description":"", "OnChange":"", "Options":""} - self.Table = VariablesTable(self, [], ["#", "Name","Type", "Initial", - "Description", "OnChange", "Options"]) - # self.Table = VariablesTable(self, [], [_("#"), _("Name"), _("Type"), _("Initial"), - # _("Description"), _("OnChange"), _("Options")]) + self.Table = VariablesTable(self, [], self.GetVariableTableColnames()) self.ColAlignements = [wx.ALIGN_RIGHT] + \ [wx.ALIGN_LEFT]*(len(self.VariablesDefaultValue)) self.ColSizes = [20, 150] + [130]*(len(self.VariablesDefaultValue)-1) @@ -737,6 +734,10 @@ self.VariablesGrid.SetColSize(col, self.ColSizes[col]) self.Table.ResetView(self.VariablesGrid) + def GetVariableTableColnames(self): + _ = lambda x : x + return ["#", _("Name"),_("Type"), _("Initial"), _("Description"), _("OnChange"), _("Options")] + def RefreshModel(self): self.Controler.SetVariables(self.Table.GetData()) self.RefreshBuffer()