Jump to content

Jan Doggen

Members
  • Content Count

    4
  • Joined

  • Last visited

Posts posted by Jan Doggen


  1. New question: I just reread the documentation and it says that "if you run the application where the regional settings have been configured as "German (Germany)", then the HelloWorld.DEU resource module will be automatically loaded and all translated texts will appear in German." Can a program be written in such a way that it picks a *specified* language file. Preferably at runtime (sometime during program startup). Or is BTM just not the tool for that?


  2. 21 hours ago, Anders Melander said:

    I'm curious about where you got that warning. There should be no hints or warnings when compiling and no where in the source is there a #$1000.

    It's not $1000 specifically 😉

     

    unit amLocalization.Import.XLIFF;

     

    function IsAnsi(c: char): boolean; Inline;
    begin
      // Result := (c <= #$FF); [JD]
      Result := (Ord(c) <= $FF);
    end;

     

    unit amLocalization.Persistence;

     

    //    case Value of [JD]
    //      #$20..#$7E,
    //      #$A0..#$D7FF,
    //      #$E000..#$FFFD:
        case Ord(Value) of
          $20..$7E,
          $A0..$D7FF,
          $E000..$FFFD:

     

    unit amLocalization.Normalization;

     

    function IsAnsi(c: char): boolean; Inline;
    begin
      // Result := (c <= #$FF); [JD]
      Result := (Ord(c) <= $FF);
    end;

     

    21 hours ago, Anders Melander said:

    Anyhow, if you're up for it you can try downloading the precompiled application instead and see if you can reproduce the problem with that:

    http://melander.dk/download/amTranslationManagerInstall-1.1.7465.55536.exe

     

    Ouch, that version got an error immediately on startup. That is the Invalid source language ID: 2000 that I also get when running from the debugger (I put ignore/handle breakpoints around those when testing). I have attached the bugreport.txt. That error occurs a second time after choosing the Helloworld example.

    I could then continue the program.

    After setting target language to Dutch, choosing Update, then Build (all languages) worked.

    I assume that if I download new sources these will work too, but I'll wait until the constant warnings are out as well. I have no need to run from the IDE, that was just out of curiosity.

     

     

    bugreport.txt


  3. On 7/26/2020 at 4:02 PM, Anders Melander said:

    (How) Is Windows supposed to know that a .NLD is a dll?

    Quote

     

    I'm assuming you have compiled amTranslationManager.exe yourself since you seem to be running it in the debugger.

    • What source code revision are you building from (git hash or timestamp)?
    • What version of Delphi are you using?
    • What version of Windows are you using?

    The helloworld.nld filename is correct. The file is supposed to be a DLL that only contain the translated resources (i.e. no code). The NLD file type is just the ISO 639-2 language code for Dutch (Netherlands).

     


  4. Sorry, I can't get this to work

     

    - New Project based on the Helloworld example
    - Source language was set to EN/US, target to Dutch
    - Update project to read in the forms/resources

     

    If I click Build/Dutch or Build/all languages,  in TResourceModuleWriter.BeginWrite, the line
    FResourceHandle := BeginUpdateResource(PChar(FFilename), True);
    gives an OS error 193 %1 is not a valid Win32 application.

    FFilename is D:\BTM\Examples\HelloWorld\Win32\Debug\HelloWorld.NLD at that point,
    so indeed, not an application 😉 What can be going on?

     

     

×