mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 02:39:15 +02:00
JCF2: localized options caption and settings file related error messages
git-svn-id: trunk@23977 -
This commit is contained in:
parent
110e7b7c88
commit
e915927961
@ -5,6 +5,14 @@ unit jcfuiconsts;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
resourcestring
|
resourcestring
|
||||||
|
//Settings caption and error messages
|
||||||
|
lisJCFFormatSettings = 'JCF Format Settings';
|
||||||
|
lisTheSettingsFileDoesNotExist = 'The settings file "%s" does not exist.%s'+
|
||||||
|
'The formatter will work better if it is configured to use a valid settings file';
|
||||||
|
lisErrorWritingSettingsFileReadOnly = 'Error writing settings file: %s is read only';
|
||||||
|
lisErrorWritingSettingsException = 'Error writing settings file %s:%s%s';
|
||||||
|
lisNoSettingsFound = 'No settings found';
|
||||||
|
|
||||||
//Format File settings tab
|
//Format File settings tab
|
||||||
lisFrFilesFileIsWritable = 'File is writable';
|
lisFrFilesFileIsWritable = 'File is writable';
|
||||||
lisFrFilesFormatFileIs = 'Format file is %s';
|
lisFrFilesFormatFileIs = 'Format file is %s';
|
||||||
|
@ -173,7 +173,8 @@ uses
|
|||||||
{ local }
|
{ local }
|
||||||
JcfStringUtils,
|
JcfStringUtils,
|
||||||
JcfSetBase,
|
JcfSetBase,
|
||||||
JcfRegistrySettings;
|
JcfRegistrySettings,
|
||||||
|
jcfuiconsts;
|
||||||
|
|
||||||
|
|
||||||
constructor TFormatSettings.Create(const pbReadRegFile: boolean);
|
constructor TFormatSettings.Create(const pbReadRegFile: boolean);
|
||||||
@ -243,7 +244,7 @@ end;
|
|||||||
|
|
||||||
class function TFormatSettings.GetGroupCaption: String;
|
class function TFormatSettings.GetGroupCaption: String;
|
||||||
begin
|
begin
|
||||||
Result := 'JCF Format Settings';
|
Result := lisJCFFormatSettings;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TFormatSettings.GetInstance: TAbstractIDEOptions;
|
class function TFormatSettings.GetInstance: TAbstractIDEOptions;
|
||||||
@ -303,8 +304,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if pbMustExist then
|
if pbMustExist then
|
||||||
begin
|
begin
|
||||||
MessageDlg('The settings file "' + psFileName + '" does not exist.' + NativeLineBreak +
|
MessageDlg(Format(lisTheSettingsFileDoesNotExist, [psFileName, NativeLineBreak]),
|
||||||
'The formatter will work better if it is configured to use a valid settings file',
|
|
||||||
mtError, [mbOK], 0);
|
mtError, [mbOK], 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -347,9 +347,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
{ fail quietly? }
|
{ fail quietly? }
|
||||||
if lcReg.FormatFileWriteOption = eAlwaysWrite then
|
if lcReg.FormatFileWriteOption = eAlwaysWrite then
|
||||||
MessageDlg('Error writing settings file: ' +
|
MessageDlg(Format(lisErrorWritingSettingsFileReadOnly, [lcReg.FormatConfigFileName]), mtError, [mbOK], 0);
|
||||||
lcReg.FormatConfigFileName + ' is read only', mtError, [mbOK], 0);
|
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -373,9 +371,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
if lcReg.FormatFileWriteOption = eAlwaysWrite then
|
if lcReg.FormatFileWriteOption = eAlwaysWrite then
|
||||||
begin
|
begin
|
||||||
MessageDlg('Error writing settings file ' +
|
MessageDlg(Format(lisErrorWritingSettingsException, [GetRegSettings.FormatConfigFileName, NativeLineBreak, E.Message]),
|
||||||
GetRegSettings.FormatConfigFileName + NativeLineBreak + ' :' +
|
mtError, [mbOK], 0);
|
||||||
E.Message, mtError, [mbOK], 0);
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -461,7 +458,7 @@ begin
|
|||||||
lcAllSettings := pcStream.ExtractSection(CODEFORMAT_SETTINGS_SECTION);
|
lcAllSettings := pcStream.ExtractSection(CODEFORMAT_SETTINGS_SECTION);
|
||||||
if lcAllSettings = nil then
|
if lcAllSettings = nil then
|
||||||
begin
|
begin
|
||||||
ShowMessage('No settings found');
|
ShowMessage(lisNoSettingsFound);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user