Changeset 526


Ignore:
Timestamp:
May 6, 2019, 10:05:59 AM (6 years ago)
Author:
chronos
Message:
  • Fixed: Got rid of compiler notes and warnings.
  • Modified: Use .lrj instead of .lrt file.
Location:
CoolTranslator
Files:
1 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • CoolTranslator/CoolTranslator.lpk

    r269 r526  
    1 <?xml version="1.0"?>
     1<?xml version="1.0" encoding="UTF-8"?>
    22<CONFIG>
    33  <Package Version="4">
    44    <PathDelim Value="\"/>
    55    <Name Value="CoolTranslator"/>
     6    <Type Value="RunAndDesignTime"/>
    67    <AddToProjectUsesSection Value="True"/>
    78    <Author Value="Chronos (robie@centrum.cz)"/>
    89    <CompilerOptions>
    9       <Version Value="10"/>
     10      <Version Value="11"/>
    1011      <PathDelim Value="\"/>
    1112      <SearchPaths>
    12         <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
     13        <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)-$(BuildMode)"/>
    1314      </SearchPaths>
     15      <Parsing>
     16        <SyntaxOptions>
     17          <SyntaxMode Value="Delphi"/>
     18          <CStyleOperator Value="False"/>
     19          <AllowLabel Value="False"/>
     20          <CPPInline Value="False"/>
     21        </SyntaxOptions>
     22      </Parsing>
     23      <CodeGeneration>
     24        <Optimizations>
     25          <OptimizationLevel Value="0"/>
     26        </Optimizations>
     27      </CodeGeneration>
     28      <Linking>
     29        <Debugging>
     30          <GenerateDebugInfo Value="False"/>
     31        </Debugging>
     32      </Linking>
    1433      <Other>
    15         <CompilerPath Value="$(CompPath)"/>
     34        <CompilerMessages>
     35          <IgnoredMessages idx5024="True"/>
     36        </CompilerMessages>
    1637      </Other>
    1738    </CompilerOptions>
     
    3859      <OutDir Value="Languages"/>
    3960    </i18n>
    40     <Type Value="RunAndDesignTime"/>
    4161    <RequiredPkgs Count="2">
    4262      <Item1>
  • CoolTranslator/Demo/Languages/TranslatorDemo.cs.po

    r457 r526  
    99"MIME-Version: 1.0\n"
    1010"Content-Transfer-Encoding: 8bit\n"
    11 
    12 #: tform1.form1.caption
    13 msgctxt "TFORM1.FORM1.CAPTION"
    14 msgid "Translator Demo"
    15 msgstr "Ukázka Translatoru"
    1611
    1712#: tmainform.button1.caption
  • CoolTranslator/Demo/Languages/TranslatorDemo.de.po

    r457 r526  
    11msgid ""
    22msgstr "Content-Type: text/plain; charset=UTF-8"
    3 
    4 #: tform1.form1.caption
    5 msgctxt "TFORM1.FORM1.CAPTION"
    6 msgid "Translator Demo"
    7 msgstr ""
    83
    94#: tmainform.button1.caption
  • CoolTranslator/Demo/Languages/TranslatorDemo.po

    r457 r526  
    11msgid ""
    22msgstr "Content-Type: text/plain; charset=UTF-8"
    3 
    4 #: tform1.form1.caption
    5 msgctxt "TFORM1.FORM1.CAPTION"
    6 msgid "Translator Demo"
    7 msgstr ""
    83
    94#: tmainform.button1.caption
  • CoolTranslator/Demo/UMainForm.lfm

    r457 r526  
    11object MainForm: TMainForm
    22  Left = 406
    3   Height = 240
     3  Height = 300
    44  Top = 191
    5   Width = 466
     5  Width = 582
    66  Caption = 'Translator Demo'
    7   ClientHeight = 240
    8   ClientWidth = 466
     7  ClientHeight = 300
     8  ClientWidth = 582
     9  DesignTimePPI = 120
    910  OnCreate = FormCreate
    10   LCLVersion = '1.1'
     11  LCLVersion = '2.0.2.0'
    1112  object ListBox1: TListBox
    12     Left = 171
    13     Height = 168
    14     Top = 24
    15     Width = 141
     13    Left = 214
     14    Height = 210
     15    Top = 30
     16    Width = 176
    1617    ItemHeight = 0
    1718    OnSelectionChange = ListBox1SelectionChange
     19    ParentFont = False
    1820    TabOrder = 0
    1921  end
    2022  object Button1: TButton
    21     Left = 8
    22     Height = 25
    23     Top = 208
    24     Width = 128
     23    Left = 10
     24    Height = 31
     25    Top = 260
     26    Width = 160
    2527    Caption = 'Show MainForm.Name'
    2628    OnClick = Button1Click
     29    ParentFont = False
    2730    TabOrder = 1
    2831  end
    2932  object Label1: TLabel
    30     Left = 10
    31     Height = 13
    32     Top = 24
    33     Width = 46
     33    Left = 12
     34    Height = 20
     35    Top = 30
     36    Width = 67
    3437    Caption = 'MainForm'
    3538    ParentColor = False
     39    ParentFont = False
    3640  end
    3741  object Label2: TLabel
    38     Left = 10
    39     Height = 13
    40     Top = 6
    41     Width = 134
     42    Left = 12
     43    Height = 20
     44    Top = 8
     45    Width = 187
    4246    Caption = 'Form name as label caption:'
    4347    ParentColor = False
     48    ParentFont = False
    4449  end
    4550  object Label3: TLabel
    46     Left = 171
    47     Height = 13
    48     Top = 8
    49     Width = 67
     51    Left = 214
     52    Height = 20
     53    Top = 10
     54    Width = 91
    5055    Caption = 'Language list:'
    5156    ParentColor = False
     57    ParentFont = False
    5258  end
    5359  object ListBox2: TListBox
    54     Left = 321
    55     Height = 168
    56     Top = 24
    57     Width = 135
     60    Left = 401
     61    Height = 210
     62    Top = 30
     63    Width = 169
    5864    ItemHeight = 0
     65    ParentFont = False
    5966    TabOrder = 2
    6067  end
    6168  object Label4: TLabel
    62     Left = 321
    63     Height = 13
    64     Top = 10
    65     Width = 46
     69    Left = 401
     70    Height = 20
     71    Top = 12
     72    Width = 60
    6673    Caption = 'Excludes:'
    6774    ParentColor = False
     75    ParentFont = False
    6876  end
    6977  object CoolTranslator1: TCoolTranslator
    7078    POFilesFolder = 'Languages'
    7179    left = 72
    72     top = 72
     80    top = 90
    7381  end
    7482end
  • CoolTranslator/UCoolTranslator.pas

    r495 r526  
    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
     
    197200  PropInfo: PPropInfo;
    198201  PropList: PPropList;
    199   Excludes: TComponentExcludes;
    200202begin
    201203  Count := GetTypeData(Component.ClassInfo)^.PropCount;
     
    250252          if (UpperCase(PropType.Name) = 'TTRANSLATESTRING') then
    251253          //if not IsExcluded(Component, PropInfo^.Name) then
    252               SetStrProp(Component, PropInfo, TranslateText(PropInfo^.Name, GetWideStrProp(Component, PropInfo)));
     254              SetStrProp(Component, PropInfo, TranslateText(PropInfo^.Name, string(GetWideStrProp(Component, PropInfo))));
    253255        end;
    254256        tkClass: begin
     
    295297  Result := FPOFilesFolder;
    296298  if Copy(Result, 1, 1) <> DirectorySeparator then
    297     Result := ExtractFileDir(UTF8Encode(Application.ExeName)) +
     299    Result := ExtractFileDir(Application.ExeName) +
    298300      DirectorySeparator + Result;
    299301end;
     
    412414        Lang := ParamStr(i + 1);
    413415  end;
    414   if Lang = '' then
     416  if Lang = '' then begin
     417    T := '';
    415418    LazGetLanguageIDs(Lang, T);
     419  end;
    416420
    417421  if Assigned(Language) and (Language.Code = '') and Assigned(FOnAutomaticLanguage) then begin
     
    429433function TCoolTranslator.FindLocaleFileName(LCExt: string): string;
    430434var
    431   T: string;
    432435  Lang: string;
    433436begin
Note: See TracChangeset for help on using the changeset viewer.