You've already forked lazarus-ccr
tvplanit: Translate PrintFormat item editor and auto-position controls.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4931 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -386,8 +386,10 @@ msgid "Delete"
|
||||
msgstr "Löschen"
|
||||
|
||||
#: vpsr.rsdescriptionlbl
|
||||
#, fuzzy
|
||||
#| msgid "Subject:"
|
||||
msgctxt "vpsr.rsdescriptionlbl"
|
||||
msgid "Subject:"
|
||||
msgid "Description:"
|
||||
msgstr "Betreff:"
|
||||
|
||||
#: vpsr.rsdetails
|
||||
@ -436,6 +438,10 @@ msgstr "Fehler: Doppelte Ressource."
|
||||
msgid "Edit"
|
||||
msgstr "Bearbeiten"
|
||||
|
||||
#: vpsr.rseditformatcaption
|
||||
msgid "Edit format"
|
||||
msgstr "Format bearbeiten"
|
||||
|
||||
#: vpsr.rseditingfolders
|
||||
msgid "Folder Editor."
|
||||
msgstr "Ordner-Editor"
|
||||
@ -668,10 +674,18 @@ msgctxt "vpsr.rsmonthpopuptoday"
|
||||
msgid "Today"
|
||||
msgstr "Heute"
|
||||
|
||||
#: vpsr.rsmonths
|
||||
msgid "Months"
|
||||
msgstr "Monate"
|
||||
|
||||
#: vpsr.rsnameisrequired
|
||||
msgid "Error: Name cannot be empty."
|
||||
msgstr "Fehler: Name muss angegeben sein."
|
||||
|
||||
#: vpsr.rsnamelbl
|
||||
msgid "Name:"
|
||||
msgstr "Name:"
|
||||
|
||||
#: vpsr.rsneedelementname
|
||||
msgid "Please supply an Element Name"
|
||||
msgstr "Bitte geben Sie einen Element-Namen an."
|
||||
@ -1017,6 +1031,14 @@ msgstr "bis"
|
||||
msgid "Thursday"
|
||||
msgstr "Donnerstag"
|
||||
|
||||
#: vpsr.rstimeinclbl
|
||||
msgid "Time increment:"
|
||||
msgstr "Zeitintervall:"
|
||||
|
||||
#: vpsr.rstimeincunits
|
||||
msgid "Time increment units:"
|
||||
msgstr "Einheit:"
|
||||
|
||||
#: vpsr.rstitle
|
||||
msgid "Title"
|
||||
msgstr "Titel"
|
||||
@ -1108,6 +1130,10 @@ msgctxt "vpsr.rsweekpopupnavtoday"
|
||||
msgid "Today"
|
||||
msgstr "Heute"
|
||||
|
||||
#: vpsr.rsweeks
|
||||
msgid "Weeks"
|
||||
msgstr "Wochen"
|
||||
|
||||
#: vpsr.rsxdays
|
||||
msgid "%d days"
|
||||
msgstr "%d Tage"
|
||||
@ -1132,6 +1158,10 @@ msgstr "Jährlich, nach Datum"
|
||||
msgid "Yearly By Day"
|
||||
msgstr "Jährlich, nach Wochentag"
|
||||
|
||||
#: vpsr.rsyears
|
||||
msgid "Years"
|
||||
msgstr "Jahre"
|
||||
|
||||
#: vpsr.rsyes
|
||||
msgid "Y"
|
||||
msgstr "Y"
|
||||
|
@ -387,8 +387,10 @@ msgid "Delete"
|
||||
msgstr "Wissen"
|
||||
|
||||
#: vpsr.rsdescriptionlbl
|
||||
#, fuzzy
|
||||
#| msgid "Subject:"
|
||||
msgctxt "vpsr.rsdescriptionlbl"
|
||||
msgid "Subject:"
|
||||
msgid "Description:"
|
||||
msgstr "Onderwerp:"
|
||||
|
||||
#: vpsr.rsdetails
|
||||
@ -437,6 +439,10 @@ msgstr "Fout: Duplicaat Hulpmiddel."
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rseditformatcaption
|
||||
msgid "Edit format"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rseditingfolders
|
||||
msgid "Folder Editor."
|
||||
msgstr "Map Editor."
|
||||
@ -669,10 +675,18 @@ msgctxt "vpsr.rsmonthpopuptoday"
|
||||
msgid "Today"
|
||||
msgstr "Vandaag"
|
||||
|
||||
#: vpsr.rsmonths
|
||||
msgid "Months"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsnameisrequired
|
||||
msgid "Error: Name cannot be empty."
|
||||
msgstr "Fout: Naam mag niet leeg zijn."
|
||||
|
||||
#: vpsr.rsnamelbl
|
||||
msgid "Name:"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsneedelementname
|
||||
msgid "Please supply an Element Name"
|
||||
msgstr "Geeft u aub een Element Naam op"
|
||||
@ -1018,6 +1032,14 @@ msgstr "t/m"
|
||||
msgid "Thursday"
|
||||
msgstr "Donderdag"
|
||||
|
||||
#: vpsr.rstimeinclbl
|
||||
msgid "Time increment:"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rstimeincunits
|
||||
msgid "Time increment units:"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rstitle
|
||||
msgid "Title"
|
||||
msgstr "Titel"
|
||||
@ -1109,6 +1131,10 @@ msgctxt "vpsr.rsweekpopupnavtoday"
|
||||
msgid "Today"
|
||||
msgstr "Vandaag"
|
||||
|
||||
#: vpsr.rsweeks
|
||||
msgid "Weeks"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsxdays
|
||||
msgid "%d days"
|
||||
msgstr "%d dagen"
|
||||
@ -1133,6 +1159,10 @@ msgstr "Jaarlijks, op Datum"
|
||||
msgid "Yearly By Day"
|
||||
msgstr "Jaarlijks, op dag"
|
||||
|
||||
#: vpsr.rsyears
|
||||
msgid "Years"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsyes
|
||||
msgid "Y"
|
||||
msgstr "Y"
|
||||
|
@ -377,7 +377,7 @@ msgstr ""
|
||||
|
||||
#: vpsr.rsdescriptionlbl
|
||||
msgctxt "vpsr.rsdescriptionlbl"
|
||||
msgid "Subject:"
|
||||
msgid "Description:"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsdetails
|
||||
@ -426,6 +426,10 @@ msgstr ""
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rseditformatcaption
|
||||
msgid "Edit format"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rseditingfolders
|
||||
msgid "Folder Editor."
|
||||
msgstr ""
|
||||
@ -658,10 +662,18 @@ msgctxt "vpsr.rsmonthpopuptoday"
|
||||
msgid "Today"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsmonths
|
||||
msgid "Months"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsnameisrequired
|
||||
msgid "Error: Name cannot be empty."
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsnamelbl
|
||||
msgid "Name:"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsneedelementname
|
||||
msgid "Please supply an Element Name"
|
||||
msgstr ""
|
||||
@ -1007,6 +1019,14 @@ msgstr ""
|
||||
msgid "Thursday"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rstimeinclbl
|
||||
msgid "Time increment:"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rstimeincunits
|
||||
msgid "Time increment units:"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rstitle
|
||||
msgid "Title"
|
||||
msgstr ""
|
||||
@ -1098,6 +1118,10 @@ msgctxt "vpsr.rsweekpopupnavtoday"
|
||||
msgid "Today"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsweeks
|
||||
msgid "Weeks"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsxdays
|
||||
msgid "%d days"
|
||||
msgstr ""
|
||||
@ -1122,6 +1146,10 @@ msgstr ""
|
||||
msgid "Yearly By Day"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsyears
|
||||
msgid "Years"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsyes
|
||||
msgid "Y"
|
||||
msgstr ""
|
||||
|
@ -387,8 +387,10 @@ msgid "Delete"
|
||||
msgstr "Удалить"
|
||||
|
||||
#: vpsr.rsdescriptionlbl
|
||||
#, fuzzy
|
||||
#| msgid "Subject:"
|
||||
msgctxt "vpsr.rsdescriptionlbl"
|
||||
msgid "Subject:"
|
||||
msgid "Description:"
|
||||
msgstr "Тема:"
|
||||
|
||||
#: vpsr.rsdetails
|
||||
@ -439,6 +441,10 @@ msgstr "Ошибка: Дубликат ресурсов."
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rseditformatcaption
|
||||
msgid "Edit format"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rseditingfolders
|
||||
msgid "Folder Editor."
|
||||
msgstr "Редактор папки"
|
||||
@ -673,10 +679,18 @@ msgctxt "vpsr.rsmonthpopuptoday"
|
||||
msgid "Today"
|
||||
msgstr "Сегодня"
|
||||
|
||||
#: vpsr.rsmonths
|
||||
msgid "Months"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsnameisrequired
|
||||
msgid "Error: Name cannot be empty."
|
||||
msgstr "Ошибка: Имя не может быть пустым."
|
||||
|
||||
#: vpsr.rsnamelbl
|
||||
msgid "Name:"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsneedelementname
|
||||
msgid "Please supply an Element Name"
|
||||
msgstr ""
|
||||
@ -1036,6 +1050,14 @@ msgstr "Через"
|
||||
msgid "Thursday"
|
||||
msgstr "Четверг"
|
||||
|
||||
#: vpsr.rstimeinclbl
|
||||
msgid "Time increment:"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rstimeincunits
|
||||
msgid "Time increment units:"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rstitle
|
||||
msgid "Title"
|
||||
msgstr "Заголовок"
|
||||
@ -1127,6 +1149,10 @@ msgctxt "vpsr.rsweekpopupnavtoday"
|
||||
msgid "Today"
|
||||
msgstr "Сегодня"
|
||||
|
||||
#: vpsr.rsweeks
|
||||
msgid "Weeks"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsxdays
|
||||
msgid "%d days"
|
||||
msgstr "%d дней"
|
||||
@ -1151,6 +1177,10 @@ msgstr "Ежегодно по дате"
|
||||
msgid "Yearly By Day"
|
||||
msgstr "Ежегодно по дню"
|
||||
|
||||
#: vpsr.rsyears
|
||||
msgid "Years"
|
||||
msgstr ""
|
||||
|
||||
#: vpsr.rsyes
|
||||
msgid "Y"
|
||||
msgstr ""
|
||||
|
@ -1,45 +1,49 @@
|
||||
object frmEditFormat: TfrmEditFormat
|
||||
Left = 403
|
||||
Height = 199
|
||||
Height = 193
|
||||
Top = 199
|
||||
Width = 329
|
||||
HorzScrollBar.Page = 328
|
||||
VertScrollBar.Page = 188
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Edit Format'
|
||||
ClientHeight = 199
|
||||
ClientHeight = 193
|
||||
ClientWidth = 329
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.7'
|
||||
object Label1: TLabel
|
||||
object LblIncrement: TLabel
|
||||
Left = 16
|
||||
Height = 15
|
||||
Top = 76
|
||||
Top = 72
|
||||
Width = 80
|
||||
Caption = 'Day Increment:'
|
||||
FocusControl = edIncrement
|
||||
ParentColor = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
object LblDescription: TLabel
|
||||
Left = 16
|
||||
Height = 15
|
||||
Top = 44
|
||||
Width = 66
|
||||
Caption = 'Description: '
|
||||
FocusControl = edDescription
|
||||
ParentColor = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
object LblName: TLabel
|
||||
Left = 16
|
||||
Height = 15
|
||||
Top = 16
|
||||
Width = 38
|
||||
Caption = 'Name: '
|
||||
FocusControl = edName
|
||||
ParentColor = False
|
||||
end
|
||||
object btnOk: TButton
|
||||
Left = 157
|
||||
Height = 25
|
||||
Top = 164
|
||||
Top = 160
|
||||
Width = 75
|
||||
Caption = 'OK'
|
||||
Default = True
|
||||
@ -49,7 +53,7 @@ object frmEditFormat: TfrmEditFormat
|
||||
object btnCancel: TButton
|
||||
Left = 237
|
||||
Height = 25
|
||||
Top = 164
|
||||
Top = 160
|
||||
Width = 75
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
@ -58,8 +62,8 @@ object frmEditFormat: TfrmEditFormat
|
||||
end
|
||||
object rgDayIncrement: TRadioGroup
|
||||
Left = 16
|
||||
Height = 48
|
||||
Top = 104
|
||||
Height = 51
|
||||
Top = 101
|
||||
Width = 296
|
||||
AutoFill = True
|
||||
Caption = ' Day Increment Unit '
|
||||
@ -71,7 +75,7 @@ object frmEditFormat: TfrmEditFormat
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 4
|
||||
ClientHeight = 28
|
||||
ClientHeight = 31
|
||||
ClientWidth = 292
|
||||
Columns = 4
|
||||
ItemIndex = 0
|
||||
@ -100,7 +104,7 @@ object frmEditFormat: TfrmEditFormat
|
||||
object udIncrement: TUpDown
|
||||
Left = 158
|
||||
Height = 23
|
||||
Top = 72
|
||||
Top = 68
|
||||
Width = 16
|
||||
Associate = edIncrement
|
||||
Max = 365
|
||||
@ -112,7 +116,7 @@ object frmEditFormat: TfrmEditFormat
|
||||
object edIncrement: TEdit
|
||||
Left = 104
|
||||
Height = 23
|
||||
Top = 72
|
||||
Top = 68
|
||||
Width = 54
|
||||
TabOrder = 2
|
||||
Text = '0'
|
||||
|
@ -43,28 +43,32 @@ uses
|
||||
VpPrtFmt;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmEditFormat }
|
||||
|
||||
TfrmEditFormat = class(TForm)
|
||||
btnCancel: TButton;
|
||||
btnOk: TButton;
|
||||
edDescription: TEdit;
|
||||
edName: TEdit;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
LblIncrement: TLabel;
|
||||
LblDescription: TLabel;
|
||||
LblName: TLabel;
|
||||
rgDayIncrement: TRadioGroup;
|
||||
udIncrement: TUpDown;
|
||||
edIncrement: TEdit;
|
||||
procedure btnCancelClick(Sender: TObject);
|
||||
procedure btnOkClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
procedure SetCaptions;
|
||||
protected
|
||||
procedure SaveData(AFormat: TVpPrintFormatItem);
|
||||
procedure SetData(AFormat: TVpPrintFormatItem);
|
||||
function Validate: Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
function Execute(AFormat: TVpPrintFormatItem) : Boolean;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
|
||||
@ -76,6 +80,9 @@ implementation
|
||||
{$R *.dfm}
|
||||
{$ENDIF}
|
||||
|
||||
uses
|
||||
Math, VpMisc, VpSR;
|
||||
|
||||
{ TfrmEditLayout }
|
||||
|
||||
procedure TfrmEditFormat.FormShow(Sender: TObject);
|
||||
@ -106,6 +113,12 @@ begin
|
||||
if Result then
|
||||
SaveData(AFormat);
|
||||
end;
|
||||
|
||||
procedure TfrmEditFormat.FormCreate(Sender: TObject);
|
||||
begin
|
||||
SetCaptions;
|
||||
end;
|
||||
|
||||
{=====}
|
||||
procedure TfrmEditFormat.SaveData(AFormat: TVpPrintFormatItem);
|
||||
var
|
||||
@ -121,7 +134,54 @@ begin
|
||||
else
|
||||
AFormat.DayIncUnits := duDay;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TfrmEditFormat.SetCaptions;
|
||||
const
|
||||
DELTA = 8;
|
||||
MARGIN = 16;
|
||||
var
|
||||
cnv: TControlCanvas;
|
||||
w: Integer;
|
||||
begin
|
||||
Caption := RSEditFormatCaption;
|
||||
LblName.Caption := RSNameLbl;
|
||||
LblDescription.Caption := RSDescriptionLbl;
|
||||
LblIncrement.Caption := RsTimeIncLbl;
|
||||
rgDayIncrement.Caption := RsTimeIncUnits;
|
||||
rgDayIncrement.Items[0] := RSDays;
|
||||
rgDayIncrement.Items[1] := RSWeeks;
|
||||
rgDayIncrement.Items[2] := RSMonths;
|
||||
rgDayIncrement.Items[3] := RSYears;
|
||||
btnOK.Caption := RSOKBtn;
|
||||
btnCancel.Caption := RSCancelBtn;
|
||||
|
||||
w := MaxValue([GetLabelWidth(LblName), GetLabelWidth(LblDescription), GetLabelWidth(LblIncrement)]);
|
||||
edName.Left := MARGIN + w + DELTA;
|
||||
edDescription.Left := edName.Left;
|
||||
edDescription.Width := edName.Width;
|
||||
edIncrement.Left := edName.Left;
|
||||
udIncrement.Left := edIncrement.Left + edIncrement.Width;
|
||||
LblName.Left := edName.Left - GetLabelWidth(LblName) - DELTA;
|
||||
LblDescription.Left := edDescription.Left - GetLabelWidth(lblDescription) - DELTA;
|
||||
lblIncrement.Left := edIncrement.Left - GetLabelWidth(lblIncrement) - DELTA;
|
||||
|
||||
ClientWidth := MARGIN + w + DELTA + edName.Width + MARGIN;
|
||||
rgDayIncrement.Width := ClientWidth - 2*MARGIN;
|
||||
|
||||
cnv := TControlCanvas.Create;
|
||||
try
|
||||
cnv.Control := btnOK;
|
||||
cnv.Font.Assign(btnOK.Font);
|
||||
w := Max(cnv.TextWidth(RSOKBtn), cnv.TextWidth(RSCancelBtn));
|
||||
finally
|
||||
cnv.Free;
|
||||
end;
|
||||
btnOK.Width := w + 16;
|
||||
btnCancel.Width := w + 16;
|
||||
btnCancel.Left := ClientWidth - MARGIN - btnCancel.Width;
|
||||
btnOK.Left := btnCancel.Left - 8 - btnOK.Width;
|
||||
end;
|
||||
|
||||
procedure TfrmEditFormat.SetData(AFormat: TVpPrintFormatItem);
|
||||
var
|
||||
IncName : string;
|
||||
|
@ -122,6 +122,9 @@ resourcestring
|
||||
RSMinutes = 'Minutes';
|
||||
RSHours = 'Hours';
|
||||
RSDays = 'Days';
|
||||
RSWeeks = 'Weeks';
|
||||
RSMonths = 'Months';
|
||||
RSYears = 'Years';
|
||||
RSCalendarWeekAbbr = 'CW'; // Abbreviation of "calendar week"
|
||||
|
||||
{WARNINGS}
|
||||
@ -235,7 +238,7 @@ resourcestring
|
||||
{ Event Edit Dialog Captions }
|
||||
RSDlgEventEdit = 'Event';
|
||||
RSAppointmentGroupBox = 'Appointment';
|
||||
RSDescriptionLbl = 'Subject:';
|
||||
RSDescriptionLbl = 'Description:';
|
||||
RSLocationLbl = 'Location:';
|
||||
RSCategoryLbl = 'Category:';
|
||||
RSStartTimeLbl = 'Start time:';
|
||||
@ -416,6 +419,13 @@ resourcestring
|
||||
RSLoadFileBtn = 'Load file...';
|
||||
RSSaveFileBtn = 'Save file...';
|
||||
|
||||
{ Print Format Item Editor }
|
||||
RSEditFormatCaption= 'Edit format';
|
||||
RSNameLbl = 'Name:';
|
||||
RSTimeIncLbl = 'Time increment:';
|
||||
RSTimeIncUnits = 'Time increment units:';
|
||||
|
||||
|
||||
{ Automatic resource adding/selection} {!!.01}
|
||||
RSAddNewResource = 'No resources have been defined. Would you ' + {!!.01}
|
||||
'like to add one now?'; {!!.01}
|
||||
|
Reference in New Issue
Block a user