Changeset 306
- Timestamp:
- Jan 3, 2012, 10:34:03 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CoolTranslator/UCoolTranslator.pas
r287 r306 10 10 11 11 type 12 THandleStringEvent = function (AValue: string): string of object; 13 12 14 { TComponentExcludes } 13 15 … … 31 33 private 32 34 FLanguage: TLanguage; 35 FOnAutomaticLanguage: THandleStringEvent; 33 36 FOnTranslate: TNotifyEvent; 34 37 FPOFilesFolder: string; … … 61 64 property Language: TLanguage read FLanguage write SetLanguage; 62 65 property OnTranslate: TNotifyEvent read FOnTranslate write FOnTranslate; 66 property OnAutomaticLanguage: THandleStringEvent read FOnAutomaticLanguage 67 write FOnAutomaticLanguage; 63 68 end; 64 69 … … 131 136 for J := 0 to Items.Count - 1 do 132 137 with TPoFileItem(Items[J]) do 133 Po.Add(Identifier , Original, Translation, Comments, Context,138 Po.Add(IdentifierLow, Original, Translation, Comments, Context, 134 139 Flags, PreviousID); 135 140 Translations.TranslateResourceStrings(Po); … … 393 398 LCLGetLanguageIDs(Lang, T); 394 399 400 if Assigned(Language) and (Language.Code = '') and Assigned(FOnAutomaticLanguage) then begin 401 Lang := FOnAutomaticLanguage(Lang); 402 end; 403 395 404 if Lang = 'en' then Lang := ''; // English files are without en code 405 396 406 Result := Lang; 397 407 end;
Note:
See TracChangeset
for help on using the changeset viewer.