Ignore:
Timestamp:
Sep 9, 2007, 1:58:38 PM (18 years ago)
Author:
RBRi
Message:

refactoring
unused things removed, unit tests written, save translations improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Components/ACLDialogs.pas

    r210 r226  
    303303  CancelButtonCaption: string;
    304304
    305 Procedure OnLanguageEvent( Language: TLanguageFile;
    306                            const Apply: boolean );
     305Procedure OnLanguageEvent(Language: TLanguageFile; const Apply: boolean);
     306var
     307  tmpPrefix : String;
    307308begin
    308   if Language <> nil then
    309     Language.Prefix := 'TextInputForm.';
    310 
    311   LoadString( Language, Apply, OKButtonCaption, 'OKButtonCaption', '~OK' );
    312   LoadString( Language, Apply, CancelButtonCaption, 'CancelButtonCaption', '~Cancel' );
     309  tmpPrefix := '';
     310  if Language = nil then
     311  begin
     312    OKButtonCaption := '~OK';
     313    CancelButtonCaption :='~Cancel';
     314  end
     315  else
     316  begin
     317    tmpPrefix := 'TextInputForm' + LANGUAGE_LABEL_DELIMITER; // use messageform captions
     318    Language.LL(Apply, OKButtonCaption, tmpPrefix + 'OKButtonCaption', '~OK');
     319    Language.LL(Apply, CancelButtonCaption, tmpPrefix + 'CancelButtonCaption', '~Cancel');
     320  end;
    313321end;
    314322
Note: See TracChangeset for help on using the changeset viewer.