Announcement

Collapse
No announcement yet.

Translate NSISdl

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

  • Translate NSISdl

    I made a NSISdl include file for NSIS, it includes 4 macros:

    NSISDL_DOWNLOAD SOURCE DESTINATION
    NSISDL_DOWNLOAD_TIMEOUT SOURCE DESTINATION TIMEOUT
    NSISDL_DOWNLOAD_QUIET SOURCE DESTINATION
    NSISDL_DOWNLOAD_QUIET_TIMEOUT SOURCE DESTINATION TIMEOUT

    It:

    - supports automatic translation.
    - creates the directory where will be created the DESTINATION file.
    - doesn't need Modern UI to work.
    - uses LangStrings, so you can use too these in your script:

    NSISDL_DOWNLOADING
    NSISDL_CONNECTING
    NSISDL_SECOND
    NSISDL_MINUTE
    NSISDL_HOUR
    NSISDL_PLURAL
    NSISDL_PROGRESS
    NSISDL_REMAINING

    i.e. MessageBox MB_OK "$(NSISDL_SECOND)"

    NOTE: When you use any macro of this include file, they will SetDetailsPrint to both.

    If someone wants to make a translation for NSISdl, use the English language as a base for your work.
    Attached Files
    My Wiki Pages

    Working now on:
    New projects. (language: any)

  • #2
    I'm trying to translate the plugin to Lithuanian, however because of the structual diferences in the Lithuanian language compared to English I am running into a problem with the plural define.

    Example: hour is valanda but hours is valandos note that the ending changes completely.

    Vytautas
    My NSIS Mods and Files

    Comment


    • #3
      Attached is the file including Lithuanian Translation with a comment note about the hours string.

      PS. Also modified the other translation to use the NSISDL_LANG define instead of the language number.

      Vytautas
      Attached Files
      My NSIS Mods and Files

      Comment


      • #4
        !define NSISDL_LANG "1031" #German (by Jan T. Sott)

        LangString NSISDL_DOWNLOADING ${NSISDL_LANG} "Dateidownload: %s"
        LangString NSISDL_CONNECTING ${NSISDL_LANG} "Verbindung wird aufgebaut"
        LangString NSISDL_SECOND ${NSISDL_LANG} "Sekunde"
        LangString NSISDL_MINUTE ${NSISDL_LANG} "Minute"
        LangString NSISDL_HOUR ${NSISDL_LANG} "Stunde"
        LangString NSISDL_PLURAL ${NSISDL_LANG} "n"
        LangString NSISDL_PROGRESS ${NSISDL_LANG} "%dkB (%d%%) von %dkB @ %d.%01dkB/s"
        LangString NSISDL_REMAINING ${NSISDL_LANG} "(Verbleibende Zeit: %d %s%s)"

        !undef NSISDL_LANG


        "Dateidownload" is the term used by IE, so i took it aswell
        NSIS IDE for Atom | NSIS for Visual Studio Code | NSIS for Sublime Text | NSIS.docset

        Comment


        • #5
          Thanks, language added.

          I made some more changes:

          - Added 4 macros to use with NSISdlSmooth.dll (these macros need "NSISdlSmooth" plugin installed to work):

          NSISDLSMOOTH_DOWNLOAD SOURCE DESTINATION
          NSISDLSMOOTH_DOWNLOAD_TIMEOUT SOURCE DESTINATION TIMEOUT
          NSISDLSMOOTH_DOWNLOAD_QUIET SOURCE DESTINATION
          NSISDLSMOOTH_DOWNLOAD_QUIET_TIMEOUT SOURCE DESTINATION TIMEOUT

          - Changed way to detect languages, it detects first if you loaded a language file and uses it depending on the $LANGUAGE variable. So, you can't use a language without loading its NSIS language file first.
          Attached Files
          My Wiki Pages

          Working now on:
          New projects. (language: any)

          Comment


          • #6
            something went wrong. check my spelling, you converted some terms to lowercase (minute, sekunde etc.)
            NSIS IDE for Atom | NSIS for Visual Studio Code | NSIS for Sublime Text | NSIS.docset

            Comment


            • #7
              Now the texts are exactly the same way you put...
              Attached Files
              My Wiki Pages

              Working now on:
              New projects. (language: any)

              Comment


              • #8
                deguix, I checked out your newest language translation system and I noticed one problem. Most script have all of there include files at the very start of the script, e.g before the languages are inserted into the script. Therefore none of the translations will ever be included in the script.

                Vytautas
                My NSIS Mods and Files

                Comment


                • #9
                  You're right. Returning to the old style (just that)...

                  I'm not testing much because I'm using a new home computer, and I have to share with some persons and play new games (yeah!) but I still here.
                  Attached Files
                  My Wiki Pages

                  Working now on:
                  New projects. (language: any)

                  Comment


                  • #10
                    I assume that if the /translate is used and the values are blank that the plugin uses hardcoded defaults. Cos I noticed that LandString does not set a default translation if one does not exist.

                    Vytautas
                    My NSIS Mods and Files

                    Comment


                    • #11
                      No, it doesn't. If you want defaults you'd have to use the MUI mechanism which is using defines and using the default if a define is not defined. I hope that made sense, heh
                      NSIS FAQ | NSIS Home Page | Donate $
                      "I hear and I forget. I see and I remember. I do and I understand." -- Confucius

                      Comment


                      • #12
                        I assumed that the plugin dll has some hardcoded defaults

                        Vytautas
                        My NSIS Mods and Files

                        Comment


                        • #13
                          updated with

                          Chinese (Traditional)
                          Chinese (Simplified)

                          thanks.
                          Attached Files

                          Comment


                          • #14
                            Croatian nsisdl update



                            !define NSISDL_LANG "1050" #Croatian (by Igor Ostriz)

                            LangString NSISDL_DOWNLOADING ${NSISDL_LANG} "Preuzimanje %s"
                            LangString NSISDL_CONNECTING ${NSISDL_LANG} "Spajanje ..."
                            LangString NSISDL_SECOND ${NSISDL_LANG} "sekunde"
                            LangString NSISDL_MINUTE ${NSISDL_LANG} "minute"
                            LangString NSISDL_HOUR ${NSISDL_LANG} "sat"
                            LangString NSISDL_PLURAL ${NSISDL_LANG} "a"
                            LangString NSISDL_PROGRESS ${NSISDL_LANG} "%dkB (%d%%) od %dkB @ %d.%01dkB/s"
                            LangString NSISDL_REMAINING ${NSISDL_LANG} "(%d %s%s preostalo)"

                            !undef NSISDL_LANG

                            Comment


                            • #15
                              I changed again to the old style, because it inserted unnecessary LangStrings of languages you didn't want.

                              Now have to include the Language Files first, then you include this file.

                              Included Croatian translation with the new NSISdl.nsh.
                              Attached Files
                              My Wiki Pages

                              Working now on:
                              New projects. (language: any)

                              Comment

                              Working...
                              X