Ignore:
Timestamp:
Sep 9, 2007, 2:02:29 PM (18 years ago)
Author:
RBRi
Message:

refactoring for language handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NewView/BookmarksFormUnit.pas

    r102 r228  
    8484Procedure TBookmarksForm.OnLanguageEvent( Language: TLanguageFile;
    8585                                          const Apply: boolean );
    86 begin
    87   LogEvent(LogI18n, 'TBookmarksForm.OnLanguageEvent apply: "' + BoolToStr(Apply) + '"');
     86var
     87  tmpPrefix : String;
     88begin
     89  // LogEvent(LogI18n, 'TBookmarksForm.OnLanguageEvent apply: "' + BoolToStr(Apply) + '"');
    8890  Language.LoadComponentLanguage( self, Apply );
    8991
    90   Language.LL( Apply, DeleteBookmarkTitle, 'DeleteBookmarkTitle', 'Delete Bookmark' );
    91   Language.LL( Apply, DeleteBookmarkA, 'DeleteBookmarkA', 'Delete the bookmark named ' );
    92   Language.LL( Apply, DeleteBookmarkB, 'DeleteBookmarkB', '?' );
    93   Language.LL( Apply, RenameBookmarkTitle, 'RenameBookmarkTitle', 'Rename Bookmark' );
    94   Language.LL( Apply, RenameBookmark, 'RenameBookmark', 'Enter the new name of the bookmark' );
     92  tmpPrefix := 'BookmarksForm' + LANGUAGE_LABEL_DELIMITER;
     93
     94  Language.LL( Apply, DeleteBookmarkTitle, tmpPrefix + 'DeleteBookmarkTitle', 'Delete Bookmark' );
     95  Language.LL( Apply, DeleteBookmarkA, tmpPrefix + 'DeleteBookmarkA', 'Delete the bookmark named ' );
     96  Language.LL( Apply, DeleteBookmarkB, tmpPrefix + 'DeleteBookmarkB', '?' );
     97  Language.LL( Apply, RenameBookmarkTitle, tmpPrefix + 'RenameBookmarkTitle', 'Rename Bookmark' );
     98  Language.LL( Apply, RenameBookmark, tmpPrefix + 'RenameBookmark', 'Enter the new name of the bookmark' );
    9599end;
    96100
     
    114118Procedure TBookmarksForm.BookmarksFormOnCreate (Sender: TObject);
    115119Begin
    116   RegisterForLanguages( OnLanguageEvent );
     120  RegisterEventForLanguages( OnLanguageEvent );
    117121End;
    118122
Note: See TracChangeset for help on using the changeset viewer.