Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-1604

Windows install is not using Qt default translations

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.2.1
    • 2.1.3
    • Localization
    • Windows

      The Windows install of Picard 2.2 does not use the Qt locales for Qt provided dialogs and other strings.

      E.g. the non-native file picker (used if multi-dir selection is enabled) or the color chooser are always displayed in English.

          [PICARD-1604] Windows install is not using Qt default translations

          No need to apology, I was also very surprised to find that Dutch translations are not available. My first reaction was that maybe for some reason it was just missing from the Picard package.

          Some tips if you want to improve the translation here:

          • Qt provides a tool called Qt Linguist to edit translations. It is usually part of the pretty big Qt development tools setup, but there are standalone installers available at https://github.com/lelegard/qtlinguist-installers/releases
          • With Qt Linguist you can open the .ts files from https://github.com/qt/qttranslations/tree/5.13.1/translations and edit their translations. I would suggest you use one of the existing files for qtbase and rename it to qtbase_nl.ts. Then open it in Qt Linguist and change the target language to Dutch (in Edit > Translation file settings)
          • For testing translate some relevant strings
          • With File -> Release or Release as... you can export the file in the .qm format, which is used by the application. Place the qtbase_nl.qm file in C:\Program Files\MusicBrainz Picard\PyQt5\Qt\translations and Picard should pick it up.

          You can see if Picard is loading the file if you start Picard in debug mode and look into the debug / error log. There will be a line like:

          D: 15:56:04,408 tagger.main:913: Looking for Qt locale nl_NL in C:/Program Files/MusicBrainz Picard/PyQt5/Qt/translations

          If it does not find the translation file there will be a line directly after the above line saying it could not load the file. If it was successful there is no such error.

          Philipp Wolfer added a comment - No need to apology, I was also very surprised to find that Dutch translations are not available. My first reaction was that maybe for some reason it was just missing from the Picard package. Some tips if you want to improve the translation here: Qt provides a tool called Qt Linguist to edit translations. It is usually part of the pretty big Qt development tools setup, but there are standalone installers available at https://github.com/lelegard/qtlinguist-installers/releases With Qt Linguist you can open the .ts files from https://github.com/qt/qttranslations/tree/5.13.1/translations and edit their translations. I would suggest you use one of the existing files for qtbase and rename it to qtbase_nl.ts. Then open it in Qt Linguist and change the target language to Dutch (in Edit > Translation file settings) For testing translate some relevant strings With File -> Release or Release as... you can export the file in the .qm format, which is used by the application. Place the qtbase_nl.qm file in C:\Program Files\MusicBrainz Picard\PyQt5\Qt\translations and Picard should pick it up. You can see if Picard is loading the file if you start Picard in debug mode and look into the debug / error log. There will be a line like: D: 15:56:04,408 tagger.main:913: Looking for Qt locale nl_NL in C:/Program Files/MusicBrainz Picard/PyQt5/Qt/translations If it does not find the translation file there will be a line directly after the above line saying it could not load the file. If it was successful there is no such error.

          Apologies for the false alarm then. It’s pretty rare for these things not to be translated into Dutch. I guess I’ll just have to do that myself.

          Maurits Meulenbelt added a comment - Apologies for the false alarm then. It’s pretty rare for these things not to be translated into Dutch. I guess I’ll just have to do that myself.

          Unfortunately Qt does not provide Dutch translations currently. I don't exactly know how their process is for translations, but they are all in https://github.com/qt/qttranslations/tree/5.12/translations

          Relevant for Picard are the translations of qtbase.

          Philipp Wolfer added a comment - Unfortunately Qt does not provide Dutch translations currently. I don't exactly know how their process is for translations, but they are all in https://github.com/qt/qttranslations/tree/5.12/translations Relevant for Picard are the translations of qtbase.

          I’m afraid I still have English file and colour pickers in 2.2.1 on Windows 10.

          Maurits Meulenbelt added a comment - I’m afraid I still have English file and colour pickers in 2.2.1 on Windows 10.

          Philipp Wolfer added a comment - Reported for PyInstaller at https://github.com/pyinstaller/pyinstaller/issues/4429

          Looks like the translations get installed to C:\Program Files\MusicBrainz Picard\PyQt5\translations , but expected would be C:\Program Files\MusicBrainz Picard\PyQt5\Qt\translations.

          Philipp Wolfer added a comment - Looks like the translations get installed to C:\Program Files\MusicBrainz Picard\PyQt5\translations , but expected would be C:\Program Files\MusicBrainz Picard\PyQt5\Qt\translations.

            outsidecontext Philipp Wolfer
            outsidecontext Philipp Wolfer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2.2.1