Bug fix: Filters does not work in localized environment, reported by Péter Gábor(#31038)

git-svn-id: trunk@53546 -
This commit is contained in:
balazs 2016-12-03 08:36:21 +00:00
parent c22bc4f0c3
commit b2d896b3a2
2 changed files with 31 additions and 2 deletions

View File

@ -73,6 +73,36 @@ const
rsMainFrm_VSTText_PackageCategory25,
rsMainFrm_VSTText_PackageCategory26);
//needed for localized filter, since the JSON contains only english text
CategoriesEng: array[0..MaxCategories - 1] of String = (
'Charts and Graphs',
'Cryptography',
'DataControls',
'Date and Time',
'Dialogs',
'Edit, Memos',
'Files and Drives',
'GUIContainers',
'Graphics',
'Grids',
'Indicators and Gauges',
'Labels',
'LazIDEPlugins',
'List and Combo Boxes',
'ListViews and TreeViews',
'Menus',
'Multimedia',
'Networking',
'Panels',
'Reporting',
'Science',
'Security',
'Shapes',
'Sizers, Scrollers',
'System',
'Tabbed Components',
'Other');
var
LocalRepositoryConfigFile: String;
LocalRepositoryUpdatesFile: String;
@ -166,7 +196,6 @@ begin
Result := FormatFloat('#,##0.0 GB/s', Speed / GB);
end;
function GetDirSize(const ADirName: String; var AFileCnt, ADirCnt: Integer): Int64;
var
DirSize: Int64;

View File

@ -715,7 +715,7 @@ begin
begin
if Data^.DataType = 12 then
begin
if Pos(UpperCase(Categories[AExtraParam]), UpperCase(Data^.Category)) > 0 then
if Pos(UpperCase(CategoriesEng[AExtraParam]), UpperCase(Data^.Category)) > 0 then
FilterNode(Node, 'PackageCategory')
else
FilterNode(Node, '')