unit uMessages;
{$INCLUDE 'Plugin.inc'}

interface

uses
  {$INCLUDE 'DelphiFarUnits.inc'} ,
  uSystem,
  uPluginConsts;

type
  TMessages = (
    MNoLngStringDefined = -1,
    //
    MTitle = 0,
    //
    MOK,
    MCancel,
    MYes,
    MNo,
    //
    MExceptionOccurredIn,
    //
    MNoFilesSelected,
    MInvalidNumber,
    MFailuresInfo,
    MEnterBeginningOfFileName,
    MStartFromThisNumber,
    MSavePatternSettings,
    MDeleteSavedPattern,
    //
    MRenameFileUnderCursor,
    MSavePatternSettingsByDefault,
    // These must be at the end!! They are not expected to be translated
    MDummyLastString
  );

function GetMsg(MsgID: TMessages): string;

implementation

function GetMsg(MsgID: TMessages): string;
begin
  if MsgID = MNoLngStringDefined then
    Result := ''
  else
    Result := TFarPlugin.Instance.GetLangString(TIntPtr(MsgID));
end;

end.
