Ignore:
Timestamp:
May 8, 2019, 12:11:40 PM (5 years ago)
Author:
chronos
Message:
  • Fixed: Build under Lazarus 2.0.
  • Modified: Used .lrj files instead of .lrt files.
  • Removed: TemplateGenerics package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CoolTranslator/UCoolTranslator.pas

    r1 r21  
    127127  I, J: Integer;
    128128  Po: TPoFile;
     129  Item: TPOFileItem;
    129130begin
    130131  TranslateComponentRecursive(Application);
     
    136137    with TPoFile(FPoFiles[I]) do
    137138      for J := 0 to Items.Count - 1 do
    138       with TPoFileItem(Items[J]) do
    139         Po.Add(IdentifierLow, Original, Translation, Comments, Context,
     139      with TPoFileItem(Items[J]) do begin
     140        Item := nil;
     141        Po.FillItem(Item, IdentifierLow, Original, Translation, Comments, Context,
    140142          Flags, PreviousID);
     143      end;
    141144    Translations.TranslateResourceStrings(Po);
    142145  finally
     
    249252          if (UpperCase(PropType.Name) = 'TTRANSLATESTRING') then
    250253          //if not IsExcluded(Component, PropInfo^.Name) then
    251               SetStrProp(Component, PropInfo, TranslateText(PropInfo^.Name, GetWideStrProp(Component, PropInfo)));
     254              SetStrProp(Component, PropInfo, TranslateText(PropInfo^.Name, string(GetWideStrProp(Component, PropInfo))));
    252255        end;
    253256        tkClass: begin
     
    294297  Result := FPOFilesFolder;
    295298  if Copy(Result, 1, 1) <> DirectorySeparator then
    296     Result := ExtractFileDir(UTF8Encode(Application.ExeName)) +
     299    Result := ExtractFileDir(Application.ExeName) +
    297300      DirectorySeparator + Result;
    298301end;
     
    411414        Lang := ParamStr(i + 1);
    412415  end;
    413   if Lang = '' then
     416  if Lang = '' then begin
     417    T := '';
    414418    LazGetLanguageIDs(Lang, T);
     419  end;
    415420
    416421  if Assigned(Language) and (Language.Code = '') and Assigned(FOnAutomaticLanguage) then begin
Note: See TracChangeset for help on using the changeset viewer.