UPD: Localize size and time units in Find Files dialog.

This commit is contained in:
cobines 2010-04-08 21:38:12 +00:00
commit 8025f4cd66
3 changed files with 33 additions and 22 deletions

View file

@ -380,15 +380,6 @@ object frmFindDlg: TfrmFindDlg
BorderSpacing.Top = 6
Enabled = False
ItemHeight = 17
Items.Strings = (
'Second(s)'
'Minute(s)'
'Hour(s)'
'Day(s)'
'Week(s)'
'Month(s)'
'Year(s)'
)
Style = csDropDownList
TabOrder = 10
end
@ -467,20 +458,11 @@ object frmFindDlg: TfrmFindDlg
Left = 284
Height = 25
Top = 234
Width = 72
Width = 96
Enabled = False
ItemHeight = 17
ItemIndex = 1
Items.Strings = (
'Byte'
'Kbyte'
'Mbyte'
'Gbyte'
'Tbyte'
)
Style = csDropDownList
TabOrder = 15
Text = 'Kbyte'
end
object cbTimeFrom: TCheckBox
AnchorSideLeft.Control = tsAdvanced

View file

@ -234,8 +234,6 @@ procedure TfrmFindDlg.FormCreate(Sender: TObject);
var
I: Integer;
begin
// load language
edtFindPathStart.DialogTitle:= rsFindWhereBeg;
FFindThread:= nil;
FSearchingActive := False;
FFrmAttributesEdit := nil;
@ -246,6 +244,22 @@ begin
Height:= pnlFindFile.Height + 22;
DsxPlugins := TDSXModuleList.Create;
DsxPlugins.Assign(gDSXPlugins);
// load language
edtFindPathStart.DialogTitle:= rsFindWhereBeg;
cmbNotOlderThanUnit.Items.Add(rsTimeUnitSecond);
cmbNotOlderThanUnit.Items.Add(rsTimeUnitMinute);
cmbNotOlderThanUnit.Items.Add(rsTimeUnitHour);
cmbNotOlderThanUnit.Items.Add(rsTimeUnitDay);
cmbNotOlderThanUnit.Items.Add(rsTimeUnitWeek);
cmbNotOlderThanUnit.Items.Add(rsTimeUnitMonth);
cmbNotOlderThanUnit.Items.Add(rsTimeUnitYear);
cmbFileSizeUnit.Items.Add(rsSizeUnitBytes);
cmbFileSizeUnit.Items.Add(rsSizeUnitKBytes);
cmbFileSizeUnit.Items.Add(rsSizeUnitMBytes);
cmbFileSizeUnit.Items.Add(rsSizeUnitGBytes);
cmbFileSizeUnit.Items.Add(rsSizeUnitTBytes);
// fill search depth combobox
cbSearchDepth.Items.Add(rsFindDepthAll);
cbSearchDepth.Items.Add(rsFindDepthCurDir);
@ -261,7 +275,8 @@ begin
btnStart.Default := True;
{$ENDIF}
cmbNotOlderThanUnit.ItemIndex:= 3;
cmbNotOlderThanUnit.ItemIndex := 3; // Days
cmbFileSizeUnit.ItemIndex := 1; // Kilobytes
edtFindPathStart.ShowHidden := gShowSystemFiles;
end;

View file

@ -213,6 +213,20 @@ resourcestring
rsFindDepth = '%s level(s)';
rsFindSaveTemplateCaption = 'Save search template';
rsFindSaveTemplateTitle = 'Template name:';
rsTimeUnitSecond = 'Second(s)';
rsTimeUnitMinute = 'Minute(s)';
rsTimeUnitHour = 'Hour(s)';
rsTimeUnitDay = 'Day(s)';
rsTimeUnitWeek = 'Week(s)';
rsTimeUnitMonth = 'Month(s)';
rsTimeUnitYear = 'Year(s)';
rsSizeUnitBytes = 'Bytes';
rsSizeUnitKBytes = 'Kilobytes';
rsSizeUnitMBytes = 'Megabytes';
rsSizeUnitGBytes = 'Gigabytes';
rsSizeUnitTBytes = 'Terabytes';
// Symlink dialog
rsSymErrCreate = 'Error creating symlink.';
// Hardlink dialog