IDE: more correct localization of Messages window menu items (visible in EditorToolBar) in case when localized menu items are not currently visible/available

git-svn-id: trunk@46410 -
This commit is contained in:
maxim 2014-10-02 23:24:49 +00:00
parent e0d0b1d047
commit b9c7c9624d
2 changed files with 9 additions and 2 deletions

View File

@ -464,7 +464,8 @@ begin
Parent.ChildsAsSubMenu:=true;
Parent.Caption:=lisAbout;
MsgAboutToolMenuItem:=RegisterIDEMenuCommand(Parent, 'About', lisAbout);
MsgOpenToolOptionsMenuItem:=RegisterIDEMenuCommand(Parent, 'Open Tool Options', lisCompPalOpenPackage);
MsgOpenToolOptionsMenuItem:=RegisterIDEMenuCommand(Parent, 'Open Tool '
+'Options', lisOpenToolOptions);
MsgFilterMsgOfTypeMenuItem:=RegisterIDEMenuCommand(Root,'FilterMsgOfType',lisFilterAllMessagesOfCertainType);
MsgRemoveCompOptHideMenuSection:=RegisterIDEMenuSection(Root,'RemoveCompOptHideMsg');
Parent:=MsgRemoveCompOptHideMenuSection;
@ -2774,7 +2775,10 @@ begin
//only assign caption if it is not empty to avoid its "unlocalizing",
//this is visible e.g. in EditorToolBar menu tree
MsgOpenToolOptionsMenuItem.Caption:=ToolOptionsCaption;
end;
end
else
//assign default caption if item is not visible (needed for EditorToolBar)
MsgOpenToolOptionsMenuItem.Caption:=lisOpenToolOptions;
MsgOpenToolOptionsMenuItem.OnClick:=@OpenToolsOptionsMenuItemClick;
MsgAboutSection.ChildsAsSubMenu:=VisibleCnt>1;
@ -2784,6 +2788,8 @@ begin
MsgType]);
MsgFilterMsgOfTypeMenuItem.Visible:=true;
end else begin
//assign default caption if item is not visible (needed for EditorToolBar)
MsgFilterMsgOfTypeMenuItem.Caption:=lisFilterAllMessagesOfCertainType;
MsgFilterMsgOfTypeMenuItem.Visible:=false;
end;
MsgFilterMsgOfTypeMenuItem.OnClick:=@FilterMsgOfTypeMenuItemClick;

View File

@ -3645,6 +3645,7 @@ resourcestring
lisCPOpenPackage = 'Open Package %s';
lisFilterAllMessagesOfType = 'Filter all messages of type %s';
lisFilterAllMessagesOfCertainType = 'Filter all messages of certain type';
lisOpenToolOptions = 'Open Tool Options';
lisCPOpenUnit = 'Open Unit %s';
lisCompPalOpenUnit = 'Open unit';
lisCompPalComponentList = 'View All';