Announcement

Collapse
No announcement yet.

Localization of downloaded ReleaseNotes?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Localization of downloaded ReleaseNotes?

    Is there a simple way to download localized ReleaseNotes or do I need to handle that in the scripts?

  • #2
    The TrueUpdate client only keeps itself updated automatically, all the rest is done via scripting. The wizard can create a skeleton of the project for you, but downloading any additional files would need a couple of lines of Lua script (unless you chose the "download zip" option in the wizard, and the release notes are stored also in that zip archive).

    Ulrich

    Comment


    • #3
      Hallo Ultrich!
      Yup. But I am running into issues finding the default language via LUA. This works great with Setup Factory.

      TrueUpdate Help hast this code example:
      Code:
      -- Retrieve the system's default language ID's
      tLangID = System.GetDefaultLangID();
      
      -- Check if default primary language is english (English = 9)
      if tLangID.Primary == 9 then
      -- Default primary language is english
      Dialog.Message("Default Language", "Your default language is English!");
      else
      [...]

      I get a runtime error in that tLangID returns NIL.

      It also looks like the Setup Factory
      tLang = Language.GetDisplayLanguage();
      is not supported.

      Comment


      • #4
        I see no such errors. This is what I did:

        Added my Language plugin to the project:

        Click image for larger version

Name:	SCRN-2022-10-13-01.png
Views:	182
Size:	18.0 KB
ID:	309398

        Then I wrote the script as this:

        Code:
        local tSystem = System.GetDefaultLangID();
        local tDisplay = Language.GetDisplayLanguage();
        
        Dialog.Message("Info", "System Language:\r\nPrimary: " .. tSystem.Primary .. "\r\nSecondary: " ..
        tSystem.Secondary .. "\r\n\r\nDisplay Language:\r\nPrimary: " .. tDisplay.Primary .. "\r\nSecondary: " ..
        tDisplay.Secondary);
        I compiled the TrueUpdate client and ran it, and got this result on my PC:

        Click image for larger version

Name:	SCRN-2022-10-13-02.png
Views:	75
Size:	6.1 KB
ID:	309399

        No error, no unexpected result.

        Ulrich

        Comment


        • #5
          It's installed and enabled. Weird. Have to try some more. My Plugin is v2.0.1.4 Is there a newer version?
          I noticed there is a Language and a Language (64) plugin in Setup Factory. There is only Language in True Update. The Plugins folder is the same.

          In addition, while it had been enabled all along in True update, it was not checked in Setup Factory but worked fine there.

          Any ideas. I will try running your code example tomorrow. Does it make a difference whether it is in the local or server script secion?

          Is there a way to debug witthout uplaoding to the server, creating an older dummy True Update component locally and trying that. It's pretty painful that way.

          === A little later ===
          Ok, put the example into the local script and just ran the client and my results matched yours. I will run it on the Local script and pass it as a global to the Server script. That should work, right?

          Still wonder about the Setup Factory mysteries.
          Last edited by haralds; 10-13-2022, 10:36 PM.

          Comment


          • #6
            Some interesting facts:
            1. This works in the Client Script, but creates errors in the Server Script.
            2. The best way to resolve this is to set up global initialization in the Client Script and then read the result variables where needed.
            3. The overall UX language is triggered by the Primary language and not the Display language.

            Ulrich, thanks for all your help. Is there a way to override 3. to make testing easier? Installing DE VMs is a royal pain.

            Comment


            • #7
              I noticed there is a Language and a Language (64) plugin in Setup Factory. There is only Language in True Update. The Plugins folder is the same.
              The folders should show different contents. TrueUpdate uses Lua 5.0 and creates only 32-bit executables, while Setup Factory 9 uses Lua 5.1, and has two versions of the plugin, one for 32-bit and another for native 64-bit setups. Plugins designed for Lua 5.1 won't work with TrueUpdate.

              1. This works in the Client Script, but creates errors in the Server Script.
              Not for me, it is working fine here in both scripts.

              2. The best way to resolve this is to set up global initialization in the Client Script and then read the result variables where needed.
              3. The overall UX language is triggered by the Primary language and not the Display language.
              Ulrich, thanks for all your help. Is there a way to override 3. to make testing easier? Installing DE VMs is a royal pain.
              As in the previous reply, it is working. I get consistent results in both Client and Server scripts.

              Click image for larger version  Name:	SCRN-2022-10-14-01.png Views:	0 Size:	8.8 KB ID:	309403

              It could be that your server script was not updated, and a script with error is being downloaded and used. Please take the attached project, copy it to an empty folder, build it there, and run it there. No upload required, it is using the current folder as the server location. When you run the TrueUpdate client, you should see that it works as expected.

              This is for Windows with German as the display language:

              Click image for larger version

Name:	SCRN-2022-10-14-02.png
Views:	67
Size:	19.4 KB
ID:	309405

              Ulrich

              Comment

              Working...
              X
              😀
              🥰
              🤢
              😎
              😡
              👍
              👎