mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:49:30 +02:00
IDE, Code Templates dialog: improved i18n
git-svn-id: trunk@53058 -
This commit is contained in:
parent
ca40b0fa05
commit
8af5a9ce5b
@ -755,32 +755,8 @@ begin
|
|||||||
lisPasteFromClipboard,
|
lisPasteFromClipboard,
|
||||||
@CodeMacroPaste,nil);
|
@CodeMacroPaste,nil);
|
||||||
RegisterCodeMacro('ProcedureHead', lisInsertProcedureHead,
|
RegisterCodeMacro('ProcedureHead', lisInsertProcedureHead,
|
||||||
'Insert header of current procedure'#13
|
lisInsertHeaderOfCurrentProcedure,
|
||||||
+#13
|
@CodeMacroProcedureHead,nil);
|
||||||
+'Optional Parameters (comma separated):'#13
|
|
||||||
+'WithStart, // proc keyword e.g. ''function'', ''class procedure'''#13
|
|
||||||
+'WithoutClassKeyword,// without ''class'' proc keyword'#13
|
|
||||||
+'AddClassName, // extract/add ClassName.'#13
|
|
||||||
+'WithoutClassName, // skip classname'#13
|
|
||||||
+'WithoutName, // skip function name'#13
|
|
||||||
+'WithoutParamList, // skip param list'#13
|
|
||||||
+'WithVarModifiers, // extract ''var'', ''out'', ''const'''#13
|
|
||||||
+'WithParameterNames, // extract parameter names'#13
|
|
||||||
+'WithoutParamTypes, // skip colon, param types and default values'#13
|
|
||||||
+'WithDefaultValues, // extract default values'#13
|
|
||||||
+'WithResultType, // extract colon + result type'#13
|
|
||||||
+'WithOfObject, // extract ''of object'''#13
|
|
||||||
+'WithCallingSpecs, // extract cdecl; inline;'#13
|
|
||||||
+'WithProcModifiers, // extract forward; alias; external;'#13
|
|
||||||
+'WithComments, // extract comments and spaces'#13
|
|
||||||
+'InUpperCase, // turn to uppercase'#13
|
|
||||||
+'CommentsToSpace, // replace comments with a single space'#13
|
|
||||||
+' // (default is to skip unnecessary space,'#13
|
|
||||||
+' // e.g ''Do ;'' normally becomes ''Do;'''#13
|
|
||||||
+' // with this option you get ''Do ;'')'#13
|
|
||||||
+'WithoutBrackets, // skip start- and end-bracket of parameter list'#13
|
|
||||||
+'WithoutSemicolon, // skip semicolon at end'#13,
|
|
||||||
@CodeMacroProcedureHead,nil);
|
|
||||||
RegisterCodeMacro('ProcedureName', lisInsertProcedureName,
|
RegisterCodeMacro('ProcedureName', lisInsertProcedureName,
|
||||||
lisInsertNameOfCurrentProcedure,
|
lisInsertNameOfCurrentProcedure,
|
||||||
@CodeMacroProcedureName,nil);
|
@CodeMacroProcedureName,nil);
|
||||||
@ -803,16 +779,7 @@ begin
|
|||||||
lisGetWordAtCurrentCursorPosition,
|
lisGetWordAtCurrentCursorPosition,
|
||||||
@CodeMacroWordAtCursor,nil);
|
@CodeMacroWordAtCursor,nil);
|
||||||
RegisterCodeMacro('PrevWord', lisPrecedingWord,
|
RegisterCodeMacro('PrevWord', lisPrecedingWord,
|
||||||
'Returns parameter-indexed word from the current line preceding cursor position.'+LineEnding+LineEnding+
|
lisReturnsParameterIndexedWord,
|
||||||
'Words in a line are numbered 1,2,3,... from left to right, but the last word'+LineEnding+
|
|
||||||
'which is always a macro command to be expanded has number 0, thus $PrevWord(0)'+LineEnding+
|
|
||||||
'is always the current macro'+LineEnding+LineEnding+
|
|
||||||
'Example line:'+LineEnding+
|
|
||||||
'i 0 count-1 forb|'+LineEnding+
|
|
||||||
'Here $PrevWord(0)=forb, $PrevWord(1)=1, $PrevWord(2)=0, $PrevWord(2)=count-1'+LineEnding+LineEnding+
|
|
||||||
'In the end of your template use $PrevWord(-1) which expands to an empty string, but performs an '+
|
|
||||||
'importaint operation of wiping off all of the $PrevWords found. In addition here is a regexp that is used'+
|
|
||||||
'to detect words for this macro: [\w\-+*\(\)\[\].^@]+',
|
|
||||||
@CodeMacroPrevWord,nil);
|
@CodeMacroPrevWord,nil);
|
||||||
RegisterCodeMacroEx('Param', lisTemplateEditParamCell,
|
RegisterCodeMacroEx('Param', lisTemplateEditParamCell,
|
||||||
Format(lisTemplateEditParamCellHelp, [LineEnding]),
|
Format(lisTemplateEditParamCellHelp, [LineEnding]),
|
||||||
|
@ -5594,6 +5594,31 @@ resourcestring
|
|||||||
lisPasteClipboard = 'paste clipboard';
|
lisPasteClipboard = 'paste clipboard';
|
||||||
lisPasteFromClipboard = 'Paste from clipboard';
|
lisPasteFromClipboard = 'Paste from clipboard';
|
||||||
lisInsertProcedureHead = 'insert procedure head';
|
lisInsertProcedureHead = 'insert procedure head';
|
||||||
|
lisInsertHeaderOfCurrentProcedure = 'Insert header of current procedure'#13
|
||||||
|
+#13
|
||||||
|
+'Optional Parameters (comma separated):'#13
|
||||||
|
+'WithStart, // proc keyword e.g. ''function'', ''class procedure'''#13
|
||||||
|
+'WithoutClassKeyword,// without ''class'' proc keyword'#13
|
||||||
|
+'AddClassName, // extract/add ClassName.'#13
|
||||||
|
+'WithoutClassName, // skip classname'#13
|
||||||
|
+'WithoutName, // skip function name'#13
|
||||||
|
+'WithoutParamList, // skip param list'#13
|
||||||
|
+'WithVarModifiers, // extract ''var'', ''out'', ''const'''#13
|
||||||
|
+'WithParameterNames, // extract parameter names'#13
|
||||||
|
+'WithoutParamTypes, // skip colon, param types and default values'#13
|
||||||
|
+'WithDefaultValues, // extract default values'#13
|
||||||
|
+'WithResultType, // extract colon + result type'#13
|
||||||
|
+'WithOfObject, // extract ''of object'''#13
|
||||||
|
+'WithCallingSpecs, // extract cdecl; inline;'#13
|
||||||
|
+'WithProcModifiers, // extract forward; alias; external;'#13
|
||||||
|
+'WithComments, // extract comments and spaces'#13
|
||||||
|
+'InUpperCase, // turn to uppercase'#13
|
||||||
|
+'CommentsToSpace, // replace comments with a single space'#13
|
||||||
|
+' // (default is to skip unnecessary space,'#13
|
||||||
|
+' // e.g ''Do ;'' normally becomes ''Do;'''#13
|
||||||
|
+' // with this option you get ''Do ;'')'#13
|
||||||
|
+'WithoutBrackets, // skip start- and end-bracket of parameter list'#13
|
||||||
|
+'WithoutSemicolon, // skip semicolon at end'#13;
|
||||||
lisInsertProcedureName = 'insert procedure name';
|
lisInsertProcedureName = 'insert procedure name';
|
||||||
lisInsertNameOfCurrentProcedure = 'Insert name of current procedure';
|
lisInsertNameOfCurrentProcedure = 'Insert name of current procedure';
|
||||||
lisInsertDate = 'insert date';
|
lisInsertDate = 'insert date';
|
||||||
@ -5639,6 +5664,16 @@ resourcestring
|
|||||||
'Note: "Sync has no position and no "=", so it syncs to the previous cell with the same default (in this case "foo")' ;
|
'Note: "Sync has no position and no "=", so it syncs to the previous cell with the same default (in this case "foo")' ;
|
||||||
|
|
||||||
lisPrecedingWord = 'Preceding word';
|
lisPrecedingWord = 'Preceding word';
|
||||||
|
lisReturnsParameterIndexedWord = 'Returns parameter-indexed word from the current line preceding cursor position.'+#13+#13+
|
||||||
|
'Words in a line are numbered 1,2,3,... from left to right, but the last word'+#13+
|
||||||
|
'which is always a macro command to be expanded has number 0, thus $PrevWord(0)'+#13+
|
||||||
|
'is always the current macro.'+#13+#13+
|
||||||
|
'Example line:'+#13+
|
||||||
|
'i 0 count-1 forb|'+#13+
|
||||||
|
'Here $PrevWord(0)=forb, $PrevWord(1)=i, $PrevWord(2)=0, $PrevWord(3)=count-1'+#13+#13+
|
||||||
|
'In the end of your template use $PrevWord(-1) which expands to an empty string, but performs an '+
|
||||||
|
'importaint operation of wiping off all of the $PrevWords found. In addition here is a regexp that is used '+
|
||||||
|
'to detect words for this macro: [\w\-+*\(\)\[\].^@]+';
|
||||||
lisForm = 'Form';
|
lisForm = 'Form';
|
||||||
lisInheritedProjectComponent = 'Inherited project component';
|
lisInheritedProjectComponent = 'Inherited project component';
|
||||||
lisNewDlgInheritFromAProjectFormComponent = 'Inherit from a project form or component';
|
lisNewDlgInheritFromAProjectFormComponent = 'Inherit from a project form or component';
|
||||||
|
Loading…
Reference in New Issue
Block a user