IDE, Color opts, i18n

This commit is contained in:
Martin 2025-03-21 10:25:28 +01:00
parent 357feec170
commit 69f46e54f0
3 changed files with 10 additions and 7 deletions

View File

@ -1162,8 +1162,6 @@ begin
end;
procedure TEditorColorOptionsFrame.FillColorElementListBox;
const
NAME_EXTENDED = '(Extended)';
var
i, AttriIdx: Integer;
ParentName: String;
@ -1178,7 +1176,7 @@ begin
// Create Groups
if not FIsEditingDefaults then begin
ColorElementTree.Items.Add(nil, FCurrentHighlighter.LanguageName + ' ');
ColorElementTree.Items.Add(nil, FCurrentHighlighter.LanguageName + ' ' + NAME_EXTENDED).Visible := False;
ColorElementTree.Items.Add(nil, FCurrentHighlighter.LanguageName + ' ' + dlgAddHiAttrGroup_Suffix_Extended).Visible := False;
end
else
ColorElementTree.Items.Add(nil, AdditionalHighlightGroupNames[agnDefault]);
@ -1202,13 +1200,13 @@ begin
end
else
if hafCustomWords in Attr.Features then begin
ParentName := FCurrentHighlighter.LanguageName + ' (Custom)';
ParentName := FCurrentHighlighter.LanguageName + dlgAddHiAttrGroup_Suffix_Custom;
ParentNode := ColorElementTree.Items.FindTopLvlNode(ParentName);
end
else begin
ParentName := FCurrentHighlighter.LanguageName;
if hafAlpha in Attr.Features then begin
ParentName := ParentName + ' ' + NAME_EXTENDED;
ParentName := ParentName + ' ' + dlgAddHiAttrGroup_Suffix_Extended;
ParentNode := ColorElementTree.Items.FindTopLvlNode(ParentName);
end;
end;
@ -1224,7 +1222,7 @@ begin
p := ParentNode;
if p = nil then
p := ColorElementTree.Items.Add(nil, ParentName);
ParentName := ParentName + ' (entry type)';
ParentName := ParentName + dlgAddHiAttrGroup_Suffix_EntryType;
ParentNode := ColorElementTree.Items.AddChild(p, ParentName);
ComplWindowEntryParentNode := ParentNode;
end;

View File

@ -2172,6 +2172,7 @@ resourcestring
dlgIfDefNodeInactive = 'Inactive $IFDEF node';
dlgIfDefNodeActive = 'Active $IFDEF node';
dlgIfDefNodeTmpActive = 'Included mixed state $IFDEF node';
dlgAddHiAttrCustom = 'Custom %d';
dbgAsmWindowSourceLine = 'Source line';
dbgAsmWindowSourceFunc = 'Function name';
@ -2186,6 +2187,10 @@ resourcestring
dlgAddHiAttrGroupTemplateEdit = 'Template Edit';
dlgAddHiAttrGroupIfDef = 'IfDef';
dlgAddHiAttrGroupOutlineColors = 'Outline Colors';
dlgAddHiAttrGroup_Suffix_Extended = '(Extended)';
dlgAddHiAttrGroup_Suffix_Custom = '(Custom)';
dlgAddHiAttrGroup_Suffix_EntryType = '(entry type)';
dlgEditAccessCaptionLockedInView = 'Locked, if text in view';
dlgEditAccessCaptionUnLockedInSoftView = 'Unlocked, if text in centered view';

View File

@ -2281,7 +2281,7 @@ begin
inherited Create(AOwner);
for i := 0 to 9 do begin
FCustomAttribs[i] := TSynHighlighterLazCustomPasAttribute.Create('Custom '+IntToStr(i), 'CustomToken_'+IntToStr(i));
FCustomAttribs[i] := TSynHighlighterLazCustomPasAttribute.Create(Format(dlgAddHiAttrCustom, [i]), 'CustomToken_'+IntToStr(i));
AddAttribute(FCustomAttribs[i]);
FCustomAttribs[i].OnChange := @DoBuildCustomPasAttr;
end;