tvplanit: Fix missing popup translation of task list and contact grid. Fix demo changing view when language is changed.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4832 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-06-24 22:34:38 +00:00
parent 2b22eefdca
commit 852270b0c2
7 changed files with 24 additions and 9 deletions

View File

@ -335,7 +335,7 @@ object MainForm: TMainForm
end
end
object TabResources: TTabSheet
Caption = 'Maintenance'
Caption = 'Resources'
ClientHeight = 504
ClientWidth = 772
TabVisible = False

View File

@ -7,7 +7,7 @@ TMAINFORM.TABTASKS.CAPTION=Tasks
TMAINFORM.RBALLTASKS.CAPTION=All tasks
TMAINFORM.RBHIDECOMPLETEDTASKS.CAPTION=Hide completed tasks
TMAINFORM.TABCONTACTS.CAPTION=Contacts
TMAINFORM.TABRESOURCES.CAPTION=Maintenance
TMAINFORM.TABRESOURCES.CAPTION=Resources
TMAINFORM.BTNNEWRES.CAPTION=New
TMAINFORM.BTNEDITRES.CAPTION=Edit
TMAINFORM.BTNDELETERES.CAPTION=Delete

View File

@ -558,6 +558,8 @@ begin
VpDayView1.LoadLanguage;
VpWeekView1.LoadLanguage;
VpMonthView1.LoadLanguage;
VpTaskList1.LoadLanguage;
VpContactGrid1.LoadLanguage;
// Select language in language combobox.
if ALang = '' then ALang := 'en';
@ -639,7 +641,7 @@ begin
VpWeekView1.WeekStartsOn := firstWeekDay;
{$ENDIF}
SetActiveView(FActiveView);
SetActiveView(1001);
Invalidate;
end;
@ -672,7 +674,6 @@ begin
VpMonthView1.Align := alClient;
VpMonthView1.Show;
DaySelectorPanel.Hide;
TitleLbl.Caption := RSEventsPerMonth;
ImageList1.GetBitmap(5, Img.Picture.Bitmap);
end;
@ -686,7 +687,6 @@ begin
VpDayView1.Hide;
VpWeekView1.Show;
DaySelectorPanel.Hide;
TitleLbl.Caption := RSEventsPerWeek;
ImageList1.GetBitmap(4, Img.Picture.Bitmap);
end;
@ -704,7 +704,6 @@ begin
DaySelectorPanel.Show;
DaysTrackbar.Position := FVisibleDays;
VpDayView1.NumDays := DaysTrackBar.Position;
TitleLbl.Caption := RSEventsPerDay;
ImageList1.GetBitmap(3, Img.Picture.Bitmap);
end;
@ -770,7 +769,7 @@ begin
0: ShowResources;
1: ShowSettings;
end;
end;
end;
end;
end.

View File

@ -227,8 +227,10 @@ msgid "Events"
msgstr "Termine"
#: tmainform.tabresources.caption
#, fuzzy
#| msgid "Maintenance"
msgctxt "tmainform.tabresources.caption"
msgid "Maintenance"
msgid "Resources"
msgstr "Wartung"
#: tmainform.tabsettings.caption

View File

@ -217,7 +217,7 @@ msgstr ""
#: tmainform.tabresources.caption
msgctxt "TMAINFORM.TABRESOURCES.CAPTION"
msgid "Maintenance"
msgid "Resources"
msgstr ""
#: tmainform.tabsettings.caption

View File

@ -213,6 +213,7 @@ type
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure LoadLanguage;
procedure LinkHandler(Sender: TComponent;
NotificationType: TVpNotificationType; const Value: Variant); override;
function GetControlType : TVpItemType; override;
@ -478,6 +479,12 @@ begin
end;
{=====}
procedure TVpContactGrid.LoadLanguage;
begin
FDefaultPopup.Items.Clear;
InitializeDefaultPopup;
end;
procedure TVpContactGrid.LinkHandler(Sender: TComponent;
NotificationType: TVpNotificationType; const Value: Variant);
begin

View File

@ -224,6 +224,7 @@ type
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure DeleteActiveTask(Verify: Boolean);
procedure LoadLanguage;
procedure LinkHandler(Sender: TComponent;
NotificationType: TVpNotificationType;
const Value: Variant); override;
@ -593,6 +594,12 @@ begin
end;
{=====}
procedure TVpTaskList.LoadLanguage;
begin
FDefaultPopup.Items.Clear;
InitializeDefaultPopup;
end;
procedure TVpTaskList.LinkHandler(Sender: TComponent;
NotificationType: TVpNotificationType; const Value: Variant);
begin