From fb2a5016f676447a334f25e506263fb24432f71b Mon Sep 17 00:00:00 2001 From: Maxim Ganetsky Date: Tue, 11 Feb 2025 23:00:08 +0300 Subject: [PATCH] IDE: improved i18n --- ide/findrenameidentifier.pas | 6 +++--- ide/lazarusidestrconsts.pas | 9 +++++---- ide/sourcefilemanager.pas | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ide/findrenameidentifier.pas b/ide/findrenameidentifier.pas index 2974bf77f6..ee32884517 100644 --- a/ide/findrenameidentifier.pas +++ b/ide/findrenameidentifier.pas @@ -584,7 +584,7 @@ begin if Result<>mrOk then begin if IsConflicted then IDEMessageDialog(lisRenamingConflict, - Format(lisIdentifierIsAlreadyUsed,[Options.RenameTo]), + Format(lisIdentifierIsAlreadyUsed2,[Options.RenameTo]), mtError,[mbOK]) else LazarusIDE.DoJumpToCodeToolBossError; @@ -1204,7 +1204,7 @@ var if Result then begin if anItem.Node<>nil then begin ContextPos:=anItem.Node.StartPos; - ErrInfo:= Format(lisIdentifierIsAlreadyUsed,[FNewIdentifier]); + ErrInfo:= Format(lisIdentifierIsAlreadyUsed2,[FNewIdentifier]); end else begin if anItem.ResultType='' then ErrInfo:= Format(lisIdentifierIsDeclaredCompilerProcedure,[FNewIdentifier]) @@ -1244,7 +1244,7 @@ begin Res:=TaskDlg(lisInvalidPascalIdentifierCap, Format(lisTheNameContainsAPascalKeyword, [FNewIdentifier]), '', tdiWarning,[mbOk,mbCancel],mbOk, - [lisChooseADifferentName, + [lisChooseADifferentName2, Format(lisUseInstead, [StringReplace(AmpIdentifier,'&','&&',[rfReplaceAll])]), Format(lisUseAnyway, [StringReplace(FNewIdentifier,'&','&&',[rfReplaceAll])])], r); if Res<>mrOK then diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index a40d94857d..c7beb8e25b 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -769,6 +769,7 @@ resourcestring lisisAnInvalidProjectNamePleaseChooseAnotherEGProject = '"%s" is an ' +'invalid project name.%sPlease choose another (e.g. project1.lpi)'; lisChooseADifferentName = 'Choose a different name'; + lisChooseADifferentName2 = 'Choose a different name'; lisUseInstead = 'Use "%s" instead'; lisUseAnyway = 'Use "%s" anyway'; lisTheProjectInfoFileIsEqualToTheProjectMainSource = 'The project info ' @@ -5462,8 +5463,8 @@ resourcestring lisRenamingAborted = 'Renaming aborted'; lisRenamingConflict = 'Renaming conflict'; lisFileAlreadyExists = 'File "%s" already exists.'; - lisIdentifierIsAlreadyUsed = 'Identifier ' - + '"%s" is already used'; + lisIdentifierIsAlreadyUsed = 'Identifier "%s" is already used'; + lisIdentifierIsAlreadyUsed2 = 'Identifier "%s" is already used.'; lisIdentifierCannotBeDotted = 'Identifier "%s" cannot be dotted'; lisIdentifierCannotBeEmpty = 'Identifier cannot be empty'; lisIdentifierIsInvalid = 'Identifier ' @@ -5471,9 +5472,9 @@ resourcestring lisIdentifierIsReservedWord = 'Identifier ' + '"%s" is a reserved word'; lisIdentifierIsDeclaredCompilerProcedure = 'Identifier ' - + '"%s" is a declared compiler procedure'; + + '"%s" is a declared compiler procedure.'; lisIdentifierIsDeclaredCompilerFunction = 'Identifier ' - + '"%s" is a declared compiler function'; + + '"%s" is a declared compiler function.'; lisShowUnitsWithInitialization = 'Show units with initialization/finalization sections'; lisShowUnitsWithInitializationHint = 'These units may initialize global data ' diff --git a/ide/sourcefilemanager.pas b/ide/sourcefilemanager.pas index c56d71a342..9a8b3db8e4 100644 --- a/ide/sourcefilemanager.pas +++ b/ide/sourcefilemanager.pas @@ -5025,7 +5025,7 @@ begin Format(lisInvalidPascalIdentifierName,[NewUnitName,LineEnding]), mtConfirmation, [mrIgnore, lisSave, mrCancel, lisCancel, - mrRetry, lisChooseADifferentName, + mrRetry, lisChooseADifferentName2, mrAbort, lisAbort], not CanAbort); if Result=mrRetry then continue; @@ -5038,7 +5038,7 @@ begin Result:=TaskDlg(lisInvalidPascalIdentifierCap, Format(lisTheNameContainsAPascalKeyword, [NewUnitName]), '', tdiWarning,[mbOk,mbCancel],mbOk, - [lisChooseADifferentName, + [lisChooseADifferentName2, Format(lisUseInstead, [StringReplace(AmpUnitname,'&','&&',[rfReplaceAll])]), Format(lisUseAnyway, [StringReplace(NewUnitName,'&','&&',[rfReplaceAll])])], r); if Result<>mrOk then