Changeset 41 for trunk/Packages/CoolTranslator
- Timestamp:
- May 8, 2019, 11:54:23 AM (6 years ago)
- Location:
- trunk/Packages/CoolTranslator
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CoolTranslator
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
trunk/Packages/CoolTranslator/CoolTranslator.lpk
r40 r41 1 <?xml version="1.0" ?>1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <CONFIG> 3 3 <Package Version="4"> 4 4 <PathDelim Value="\"/> 5 5 <Name Value="CoolTranslator"/> 6 <Type Value="RunAndDesignTime"/> 6 7 <AddToProjectUsesSection Value="True"/> 7 8 <Author Value="Chronos (robie@centrum.cz)"/> 8 9 <CompilerOptions> 9 <Version Value="1 0"/>10 <Version Value="11"/> 10 11 <PathDelim Value="\"/> 11 12 <SearchPaths> 12 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS) "/>13 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)-$(BuildMode)"/> 13 14 </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> 14 33 <Other> 15 <CompilerPath Value="$(CompPath)"/> 34 <CompilerMessages> 35 <IgnoredMessages idx5024="True"/> 36 </CompilerMessages> 16 37 </Other> 17 38 </CompilerOptions> … … 38 59 <OutDir Value="Languages"/> 39 60 </i18n> 40 <Type Value="RunAndDesignTime"/>41 61 <RequiredPkgs Count="2"> 42 62 <Item1> -
trunk/Packages/CoolTranslator/UCoolTranslator.pas
r40 r41 127 127 I, J: Integer; 128 128 Po: TPoFile; 129 Item: TPOFileItem; 129 130 begin 130 131 TranslateComponentRecursive(Application); … … 136 137 with TPoFile(FPoFiles[I]) do 137 138 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, 140 142 Flags, PreviousID); 143 end; 141 144 Translations.TranslateResourceStrings(Po); 142 145 finally … … 197 200 PropInfo: PPropInfo; 198 201 PropList: PPropList; 199 Excludes: TComponentExcludes;200 202 begin 201 203 Count := GetTypeData(Component.ClassInfo)^.PropCount; … … 250 252 if (UpperCase(PropType.Name) = 'TTRANSLATESTRING') then 251 253 //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)))); 253 255 end; 254 256 tkClass: begin … … 295 297 Result := FPOFilesFolder; 296 298 if Copy(Result, 1, 1) <> DirectorySeparator then 297 Result := ExtractFileDir( UTF8Encode(Application.ExeName)) +299 Result := ExtractFileDir(Application.ExeName) + 298 300 DirectorySeparator + Result; 299 301 end; … … 412 414 Lang := ParamStr(i + 1); 413 415 end; 414 if Lang = '' then 415 LCLGetLanguageIDs(Lang, T); 416 if Lang = '' then begin 417 T := ''; 418 LazGetLanguageIDs(Lang, T); 419 end; 416 420 417 421 if Assigned(Language) and (Language.Code = '') and Assigned(FOnAutomaticLanguage) then begin … … 429 433 function TCoolTranslator.FindLocaleFileName(LCExt: string): string; 430 434 var 431 T: string;432 435 Lang: string; 433 436 begin
Note:
See TracChangeset
for help on using the changeset viewer.